babel.h
Go to the documentation of this file.
1 #ifndef BABELH
2 #define BABELH
3 
4 #include "boolean.h"
5 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
26  typedef void TBondIterator;
27 
33  typedef void TMolecule;
34 
51  TMolecule *ReadMolecule(char *fname);
52 
63  void WriteMolecule(char *fname,TMolecule *m);
64 
74  unsigned int nAtoms(TMolecule *ml);
75 
86  unsigned int GetAtomicNumber(unsigned int na,TMolecule *ml);
87 
99  unsigned int GetAtomResidue(unsigned int na,TMolecule *ml);
100 
112  char GetAtomChain(unsigned int na,TMolecule *ml);
113 
124  boolean IsAtomInProline(unsigned int na,TMolecule *ml);
125 
143  double VdWRadius(unsigned int na,TMolecule *ml);
144 
156  boolean HasBond(unsigned int na1,unsigned int na2,TMolecule *ml);
157 
170  void AddBond(unsigned int na1,unsigned int na2,TMolecule *ml);
171 
182  void RemoveBond(unsigned int na1,unsigned int na2,TMolecule *ml);
183 
198  unsigned int GetFirstNeighbour(unsigned int na,boolean *fix,TBondIterator **it,TMolecule *ml);
199 
216  unsigned int GetNextNeighbour(unsigned int na,boolean *fix,TBondIterator *it,TMolecule *ml);
217 
225  void DeleteBondIterator(TBondIterator *it);
226 
243  void GetAtomCoordinates(double *pos,TMolecule *ml);
244 
257  void SetAtomCoordinates(double *pos,TMolecule *ml);
258 
273  double ComputeEnergy(TMolecule *ml);
274 
282  void DeleteMolecule(TMolecule *ml);
283 
284 #ifdef __cplusplus
285 }
286 #endif
287 
288 #endif
Definition of the boolean type.
double ComputeEnergy(TMolecule *ml)
Computes the potential energy of a molecule.
Definition: babel.cpp:327
void DeleteBondIterator(TBondIterator *it)
Deletes the bond iterator defined in GetFirstNeighbour.
Definition: babel.cpp:292
void DeleteMolecule(TMolecule *ml)
Destructor.
Definition: babel.cpp:346
void GetAtomCoordinates(double *pos, TMolecule *ml)
Gets the positions of the atoms in the molecule.
Definition: babel.cpp:301
void WriteMolecule(char *fname, TMolecule *m)
Writes the molecule information to a file.
Definition: babel.cpp:72
double VdWRadius(unsigned int na, TMolecule *ml)
Returns the Van der Waals radius for a given atom.
Definition: babel.cpp:165
boolean IsAtomInProline(unsigned int na, TMolecule *ml)
Identifies atoms in proline residues.
Definition: babel.cpp:148
TMolecule * ReadMolecule(char *fname)
Reads the molecule information from a file.
Definition: babel.cpp:46
char GetAtomChain(unsigned int na, TMolecule *ml)
Returns a char identifying the chain of the atom.
Definition: babel.cpp:131
void TBondIterator
Iterator over the neighbours of a given atom.
Definition: babel.h:26
boolean HasBond(unsigned int na1, unsigned int na2, TMolecule *ml)
Determines is a given bond exists.
Definition: babel.cpp:177
unsigned int GetNextNeighbour(unsigned int na, boolean *fix, TBondIterator *it, TMolecule *ml)
Gets the identifier of the next neighbour for a given atom in a molecule.
Definition: babel.cpp:264
void SetAtomCoordinates(double *pos, TMolecule *ml)
Sets the positions of the atoms in the molecule.
Definition: babel.cpp:318
unsigned int GetAtomResidue(unsigned int na, TMolecule *ml)
Returns the residue of a given atom.
Definition: babel.cpp:114
void TMolecule
The molecule handler type.
Definition: babel.h:33
unsigned int GetFirstNeighbour(unsigned int na, boolean *fix, TBondIterator **it, TMolecule *ml)
Gets the identifier of the first neighbour for a given atom in a molecule.
Definition: babel.cpp:237
void RemoveBond(unsigned int na1, unsigned int na2, TMolecule *ml)
Removes a bond between two atoms.
Definition: babel.cpp:211
unsigned int nAtoms(TMolecule *ml)
Number of atoms in a molecule.
Definition: babel.cpp:93
void AddBond(unsigned int na1, unsigned int na2, TMolecule *ml)
Adds a bond between two atoms.
Definition: babel.cpp:202
unsigned int GetAtomicNumber(unsigned int na, TMolecule *ml)
Returns the atomic number of a given atom.
Definition: babel.cpp:102