CCP4 Coordinate Library Project

Object interface: Types and Constants



Table Description
Mathematical types Mathematical types used by Library.
Mathematical constants Mathematical constants used by Library.
Coordinate-relating types Data types relating to coordinate context.


Mathematical types

All mathematical types used by Library, which are not part of standard C and C++ (except those for classes, see below), are defined in file mattype_.h. They are collected in the table below.

Some type definitions depend on whether the Library was compiled with UseDoubleFloat flag on or off. This flag is set on the very top of file mattype_.h. By default, this flag is set "on".

Type definitions for classes and structures are made in places where the classes/structures are first introduced (normaly in header files). These definitions are done in a uniform way by applying macros DefineClass and DefineStructure. Class and structure type definition convention is described in General Remarks.

Type Definition
"double float on"
Definition
"double float off"
Description
pstr char * char * pointer on character, or string of characters
byte unsigned char unsigned char byte
byteptr byte * byte * pointer on byte, or string of bytes
shortint signed char signed char 8-bit integer
Boolean unsigned char unsigned char logical variable ('True' or 'False')
word unsigned int unsigned int 32-bit word
realtype double (64-bit) float (32-bit) real variable
rvector double * float * vector of real numbers
ivector int * int * vector of integer numbers
wvector word * word * vector of words
bvector byte * byte * vector of bytes or logical numbers
lvector long * long * vector of long integers
psvector pstr * pstr * vector of character strings
rmatrix rvector * rvector * matrix of real numbers
imatrix ivector * ivector * matrix of integer numbers
wmatrix wvector * wvector * matrix of words
bmatrix bvector * bvector * matrix of bytes or logical numbers
lmatrix lvector * lvector * matrix of long integers
psmatrix psvector * psvector * matrix of character strings
rmatrix3 rmatrix * rmatrix * 3D matrix of real numbers
imatrix3 imatrix * imatrix * 3D matrix of integer numbers
wmatrix3 wmatrix * wmatrix * 3D matrix of words
bmatrix3 bmatrix * bmatrix * 3D matrix of bytes or logical numbers
lmatrix3 lmatrix * lmatrix * 3D matrix of long integers
psmatrix3 psmatrix * psmatrix * 3D matrix of character strings


Mathematical constants

All mathematical constants used by Library, which are not part of standard C and C++, are defined in file mattype_.h. They are collected in the table below.

Some constant definitions depend on whether the Library was compiled with UseDoubleFloat flag on or off. This flag is set on the very top of file mattype_.h. By default, this flag is set "on".

Constant Definition
"double float on"
Definition
"double float off"
Description
MinReal 2.2250e-308 1.1755e-38 minimal real number
MaxReal 1.7976e+308 3.4020e+38 maximal real number
True 1 1 logical "true"
False 0 0 logical "false"
MinInt -32768 -32768 minimal 16-bit integer number
MaxInt 32767 32767 maximal 16-bit integer number
MaxWord 65535 65535 maximal 16-bit word
MinInt4 -2147483647 -2147483647 minimal 32-bit integer number
MaxInt4 2147483647 2147483647 maximal 32-bit integer number
MaxWord4 4294967295 4294967295 maximal 32-bit word
Pi 3.141592653589793238462643 3.141592653589793238462643 Arkhimed's "Pi"
Eu 2.718281828459045235360287 2.718281828459045235360287 Euler's "e"
ln10 2.3025850929940456840179915 2.3025850929940456840179915 logarithm of 10


Coordinate-relating types

Data types, which relate to coordinate context, are defined in file mmdb_defs.h. They are collected in the table below.

It is important that application uses the proposed types, for compliency with future changes of the Library.

Type Definition Description
ChainID char[10] Chain ID (extension of 1-letter PDB chain ID). Chain ID is set to empty string (""), if no chain ID is given in the coordinate file. Only first character (space if chain ID is empty) may be output into PDB file
PChainID ChainID * Pointer on chain ID
ResName char[20] Residue name (extension of 3-letter PDB residue name). A minimum of 1 character must be in the name, leading and padding spaces must not appear. Only 3 first characters (right-justified) may be output into PDB file
InsCode char[10] Insertion code (extension of 1-letter PDB insertion code). Insertion code is set to empty string (""), if no insertion code is given in the coordinate file. Only first character (space if insertion code is empty) may be output into PDB file
AtomName char[20] Atom name (extension of 4-letter PDB atom name). Leading and padding spaces are significant. Only first 4 characters (left-justified, leading spaces do count) may be output into PDB file
AltLoc char[20] Alternate location indicator (extension of 1-letter PDB alternate location indicator). The field is set to empty string (""), if no alternate location indicator is given in the coordinate file. Only first character (space if the field is empty) may be output into PDB file
Element char[20] Chemical element name (extension of 2-letter PDB chemical element name). A minimum of 2 characters must be in the field. All spaces are significant: 1-letter element codes come with leading space (" H" for hydrogen). Only first 2 characters may be output into PDB file
SegID char[20] Segment ID (extension of 4-letter PDB segment ID). Leading and padding spaces are significant. Only first 4 characters (left-justified, leading spaces do count) may be output into PDB file
AtCharge char[20] Charge on atom (extension of 2-letter PDB description of atom charge). All spaces are significant, and only 2 first characters (left-justified, leading spaces do count) may be output into PDB file.
IDCode char[12] Entry code (extension of 4-letter PDB code). A minimum of 4 characters must be in entry code; only first 4 characters may be output into PDB file
PIDCode IDCode * Pointer on entry code
HelixID char[20] Helix ID (extension of 3-letter PDB helix ID). Only up to first 3 characters may be output into PDB file
StrandID char[20] Strand ID (extension of 3-letter PDB strand ID). Only up to first 3 characters may be output into PDB file
SheetID char[20] Sheet ID (extension of 3-letter PDB sheet ID). Only up to first 3 characters may be output into PDB file
TurnID char[20] Turn ID (extension of 3-letter PDB turn ID). Only up to first 3 characters may be output into PDB file
SymGroup char[30] Group of space symmetry (extension of 11-letter PDB space symmetry group name). Only up to first 11 characters may be output into PDB file
Date char[12] Date in format DD-MMM-YYYY. When output into PDB file, the field is converted to DD-MMM-YY; when output into mmCIF file - to YYYY-MM-DD
RecName char[7] Name of PDB record (PDB record keyword)
DBName char[10] Sequence database name
DBAcCode char[20] Sequence database accession code
DBIdCode char[20] Sequence database identification code
vect3 realtype[3] vector of 3 real numbers
vect4 realtype[4] vector of 4 real numbers
mat33 vect3[3] matrix 3x3 of real numbers
mat44 vect4[4] matrix 4x4 of real numbers
mat633 mat33[6] 3D matrix 6x3x3 of real numbers



Back to index