MOLGEOM.CPP
Description : Molecular geometry member functions of Atom and Molecule classes
Header files called upon : fstream.h, iomanip.h, strstream.h, string.h, math.h, stdlib.h
, VECTOR.H
, MATRIX.H
, MOLECULE.H
Class details are as follows:
Further class member definitions : Atom
Member functions (public)
- float Atom::distance(Atom *atomPt[2])
- Returns the bond distance between two atoms specified by an atom pointer
- eg Atom *atm_ptr[2];
- assign atm_ptr to atoms
- cout << Atom::distance(atm_ptr);
- NB function declared in MOLECULE.H
- float Atom::angle(Atom *atomPt[3])
- Returns the bond angle (in degrees) between three atoms specified by an atom pointer
- eg Atom *atm_ptr[3];
- assign atm_ptr to atoms
- cout << Atom::angle(atm_ptr);
- NB function declared in MOLECULE.H
- float Atom::torsion(Atom *atomPt[4])
- Returns the torsion angle (in degrees) between four atoms specified by an atom pointer
- eg Atom *atm_ptr[4];
- assign atm_ptr to atoms
- cout << Atom::torsion(atm_ptr);
- NB function declared in MOLECULE.H
Further class member definitions : Molecule
Member functions (public)
- void Molecule::findBonds(const float& maxBondLength, int oneDirection)
- Checks distance between all atoms and assigns a bond between
atoms with distance less than that defined by parameter
'maxBondLength'. If 'oneDirection' is given value 0 then
reciprocative arrangement occurs ie if atom1 assigned bond
to atom2, then atom2 assigned bond to atom1; if
'oneDirection' assigned non-zero then non-reciprocative
arrangement occurs, which is adequate for function
'calcGeometry' (see below)
- eg mol1.findbonds(2.2, 1);
- NB function declared in MOLECULE.H
- void Molecule::calcGeometry()
- Steps through bond connection network for every atom in a
molecule using 'traverse' function (see below) in order to
calculate and write out bond distances, bond angles and
torsion angles
- eg mol1.calcGeometry();
- NB1 bond connectivities must alreay have been allocated
before using this function ie use function 'findbonds'
(see above)
- NB2 function declared in MOLECULE.H
- void Molecule::traverse(Atom *pt)
- Recursive function that steps through the bond connection
network of a molecule on order to calculate and write out
bond distances, bond angles and torsion angles. This
function is called using function 'calcGeometry()' (see
above)
- NB funtion declared in MOLECULE.H
Further class member definitions : ProteinMainChain (derived from class Molecule)
Member functions (public)
- void ProteinMainChain::torsionList()
- calculates and writes out torsion angles for protein main-chain
- eg protmc1.torsionList();
- NB function declared in MOLECULE.H