Cif

TCifLoop is used internally by the TCif object

Note that each object of the table should contain a pointer to a unique TCifLoopData object.

Constructor     TCifLoop()
Function returns parameters  
Clear void   Clears the content of the loop
Format void TEStringList *Data Parses strings and initialises the table. The strings should represent a valid loop data. If any field of the table is recognised as a valid atom label, that atom is assigned the corresponding data object (TCifLoopData). If labels have changed, call to the UpdateTable to update labels in the table.
GetLoopName TEString   Returns a string, which is common for all columns. For example for following loop:
loop_
 _atom_site_label
 _atom_site_type_symbol,  ...
the function returns "_atom_site".
SaveToFile void TEFile *F Saves the loop to a file
ShortColumnName TEString int ColIndex Returns the column name minus the the loop name (see above). Thus for "_atom_site_label", the name is "label".
Table TETable* void Returns the table representing the loop data. Use it to make tables or iterate through data.
UpdateTable void   Updates the content of the table; changes labels of the atoms

 

TCif - encapsulates a CIF file

Constructor     TCif(TAtomsInfo *AI);
Function returns parameters  
AddParam
 
bool const TEString &Param
TCifData *Params
Adds a new parameter to the CIF. The Params is copied to a new object, so it should be deleted within the main body of a program
AddParam
 
bool const TEString &Param
const TEString &Params
bool String
Adds a new parameter to the CIF. If the parameter is a string object, then set the String parameter to true.
Adopt bool TXFile *XF Adopts the content of a file (asymmetric unit, loops, etc) to a specified source file
AddLoop TCifLoop* const TEString &Name Adds a loop to current  file
Clear void   Empties the content of current file
DataName TEString   Returns the data name of the file (data_XXX, returns XXX in this case)
DataNameUpperCase bool   Shows if the data name will appear in upper case or in a default case when current object is loaded from a file
DataNameUpperCase void bool Allows changing the case of the data name. The change takes place only when a file is being loaded. Use SetDataName function to change the data name
GetSParam TEString const TEString &Param Returns the first string of the TCifData objects associated with a given parameter. Note that the data is stores in a TEStringList, which may contain more than one string. To get full information, use GetParam function instead.
GetParam TCifData *Params const TEString &Param Returns full value of a parameter
LoadFromFile bool const TEString &FileName Load the object from a file. If the operation is successful, returns true and false otherwise
Loop TCifLoop * int index Returns a loop specified by index
Loop TCifLoop * const TEString &L Returns a loop specified by name
LoopCount int   Returns the number of loops
LoopName TEString int index Returns the name of a loop specified by the index
ParamExists bool const TEString &Param Returns true if a specified parameter exists
SaveToFile bool const TEString &FileName Saves the data to a file and returns true if successful and false in the case of failure
SetDataName void const TEString &D Set the data name. You should specify only the data name, not data_DATANAME. The function is not affected by DataNameUpperCase function, and, hence, specify the character's case manually, if necessary.
SetParam bool const TEString &Param
TCifData *Params
Sets a specified parameter to a value of Params
WeightA TEString   Returns a string representing weighting details of the model
WeightB TEString   Returns a string representing weighting details of the model


struct TCifData
{
    TEStringList *Data;   
    bool String;                //specifies if the data is a string type, e.g. should be in commas
};
struct TCifLoopData
{
    bool String;
    TCAtom *CA;            //contains a pointer to a n atom if the cell is atom label relevant
};
class TLLTBondSort: public TListSort
{
public:
    short SortType;
    TLAtom *Atom;                  // for internal use
    TEStringList *Symmetry;     // for internal use
    int Compare(void *I, void *I1);
};
 
 

TLinkedLoopTable, the class for the creation of tables combining bond lengths and angles

Constructor     TLinkedLoopTable(TCif *C)
Finction returns parameters  
MakeTable TETable * const TEString &Atom Returns a table constructed for Atom. The Atom should represent a valid atom label in Cif->AsymmUnit.
static SymmCodeToSymm TEString TCif *Cif
const TEString &Code
Transforms a symmetry code written like "22_565" to the symmetry operation corresponding to the code in a SYMM like view "x, 1+y, z"
Properties      
BondSort     A class derived from the abstract class TListSort. Use the BondSort property SortType, to change the way the tables produce with a call to MakeTable look like. Possible values are:
slltLength: Length, Mr, Atom Label;
slltName
: Atom Label, Length;
slltMw
: Mr, Length, Atom Label
default value is slltLength. The sorting happens according to the sequence shown above.


© Oleg V. Dolomanov, 2004
Last Updated 2004.05.15