CCP4 Coordinate Library Project
Object interface: Querying the Coordinate Hierarchy.
This section presents a collection of different functions for
querying the coordinate hierarchy.
Only non-specific querying functions are listed here. Querying
functions which relate closely to subjects of other sections of
this Manual (e.g., retrieving the description of an error code,
type of input file etc.), are described in those sections.
PURPOSEObtaining the entry ID (or a PDB ID code).
RETURN
The function returns pointer to a string containing
the entry ID. If no entry ID was set or read from coordinate
file, the return will be "XXXX".
PURPOSEObtaining the total number of atoms in the
coordinate hierarchy.
RETURN
The function returns total number of atoms, which are currently
contained in the coordinate hierarchy.
PURPOSEObtaining the number of models in the
coordinate hierarchy.
RETURN
The function returns the number of models, which are currently
contained in the coordinate hierarchy.
PURPOSEChecking on the presence of crystallographic information
in coordinate hierarchy.
RETURN
The function returns True if cell parameters
a, b, c,
alpha, beta and
gamma were read from coordinate file or
otherwise set up in the hierarchy.
PURPOSEChecking on the presence of the name of space symmetry
group in coordinate hierarchy.
RETURN
The function returns True if name of space
group of symmetry was read from coordinate file or otherwise set
up in the hierarchy.
PURPOSEChecking on the presence of the
orthogonalising/fractionalising matrices.
RETURN
The function returns True if the
orthogonalising/fractionalising matrices were successfully
calculated. The calculations are performed automatically
when cell parameters are read from a coordinate file or
set up by application.
PURPOSEChecking on the presence of orthogonal-fractional
transformation matrix in
coordinate hierarchy.
RETURN
The function returns True if the
orthogonal-fractional transformation matrix (PDB records
SCALEn) was read from coordinate file or otherwise set
up in the hierarchy.
PURPOSEChecking on the presence of non-crystallographic
symmetry transformation matrices in
coordinate hierarchy.
RETURN
The function returns True if the
non-crystallographic symmetry transformation matrices
(PDB records MTRIXn) were read from coordinate file or
otherwise set up in the hierarchy.
PURPOSEChecking on quality and completeness of
crystallographic information set up in
coordinate hierarchy.
RETURN
The function returns a non-negative value if crystallographic
information is usable. Positive return is interpreted as a
combination of the following flags:
Flag |
Value |
Description |
CRRDY_Complete |
0 |
Crystallographic information is complete |
CRRDY_NotPrecise |
0x00000001 |
The newly set up crystallographic information
somewhat differ from the previous setting or
from what was read from a coordinate file |
CRRDY_isTranslation |
0x00000002 |
The orthogonal-to-fractional transformation matrix
contains translational component(s) |
CRRDY_NoOrthCode |
0x00000004 |
The orthogonalization code was not supplied or
could not be established |
Negative return codes indicate more serious problems:
Code |
Value |
Description |
CRRDY_NoTransfMatrices |
-1 |
No orthogonal-to-fractional transformation matrix
was read from coordinate file or otherwise
set up in the hierarchy |
CRRDY_Unchecked |
-2 |
The crystallographic information (cell parameter and/or
transformation matrices) was not properly set up
in the coordinate hierarchy (e.g. not all SCALEn
cards were supplied or part of cell parameters is
missing) |
CRRDY_Ambiguous |
-3 |
The newly set up crystallographic information
differ considerably from the previous setting or
from what was read from a coordinate file |
CRRDY_NoCell |
-4 |
No cell parameters were read from a coordinate file
or otherwise set up in the coordinate hierarchy |
PURPOSEObtaining the number of symmetry operations.
RETURN
The function returns the number of symmetry operations that
are present in the space symmetry group currently set up in
the coordinate hierarchy.
The function returns 0 if no space symmetry group is defined.
PURPOSEObtaining the symmetry transformation matrix.
ARGUMENTS
mat44 & TMatrix
Matrix to accept the transformation matrix.
int Nop
Number of the space group symmetry operation. It should
be in the range of 0..NumberOfSymOps-1,
where NumberOfSymOps is returned by
CMMDBManager::GetNumberOfSymOps.
int cellshift_a
Shift of the unit cell in a-directions in a-periods.
int cellshift_b
Shift of the unit cell in b-directions in b-periods.
int cellshift_c
Shift of the unit cell in c-directions in c-periods.
DESCRIPTION
The function calculates and returns the symmetry transformation
matrix, which transforms from the principal orthogonal
coordinates found in a coordinate file, into orthogonal
coordinates of a symmetry mate generated by
Nopth symmetry operation of the current
space symmetry group in the unit cell shifted by
cellshift_a a-periods,
cellshift_b b-periods and
cellshift_c c-periods from the principal
unit cell of coordinate file.
RETURN
The function returns 0 if no problems were encountered.
Other returns indicate:
1 |
Nop is not in the right range
or space symmetry group was not set up
|
2 |
fractionalizing/orthogonalizing matrices were not
calculated (lack of crystallographic data
in the file)
|
3 |
cell parameters a,
b, c,
alpha, beta,
gamma were not set up
|
NOTE :
First symmetry operation Nop=0 is the
identity.
PURPOSECalculating the averaged properties of all atoms in the
coordinate hierarchy.
ARGUMENTS
RSAtomStat AS
Reference to structure
SAtomStat
, which returns the average results.
DESCRIPTION
The function performs an actual calculation of averaged atom properties,
none of them are stored as variables. It is therefore advised to avoid
unnecessary calls to this function.
PURPOSECalculating the mass center of a set of atoms.
ARGUMENTS
PPCAtom A
Array of atoms. This array may conveniently
come from selection functions.
int nA
Number of atoms in array A. The array is
indexed as 0..nA-1 .
realtype & xmc
X-coordinate of mass center.
realtype & ymc
Y-coordinate of mass center.
realtype & zmc
Z-coordinate of mass center.
DESCRIPTION
The function calculates the mass center of atoms given in array
A, with atomic weights peculiar to the
element type taken into account.
Back to index