bioworld.c File Reference Detailed DescriptionImplementation of the bridge between world structures and biological information.
Definition in file bioworld.c.
Function Documentation
Attempts to read a list of residues whose internal degrees of freedom are to be considered flexible. If the file with the list is not available, the degrees of freedom are deduced from the bond type: double bonds are rigid and single bonds define rotations This is intented to be used to model loops in proteins where only a small part of the protein must move. Note that only the backbone rotations between the N-Calpha and Calpha-C atoms are considered. Lateral chains are fixed.
Definition at line 231 of file bioworld.c. References CreateFileName(), DeleteFileName(), Error(), GetFileFullName(), MEM_DUP, NEW, and RES_EXT. Referenced by InitBioWorld().
Attempts to read a list of rigids and hinges of a molecule. This was implemented to test the examples provided by Adnan Sljoka. The list of rigids is just a list of all atoms in the molecule with the associated rigid. RigidID 0 is used for atoms not assigned to any rigid. The un-assigned atoms not involved in the hinges (see below) are not modelled. The hinges is a list of pairs of atoms defining rotation joints. These joints can correspond to actual bonds between atoms or to hydrogen bonds (not explicit). Typically we will have two rigid bodies and several chains connecting them. The chains are composed by revolute joints only. In the chains, we use the normal policy of considering fixed all the bonds not included in the list of bonds defining the hinge. Thus, several small rigids might appear in the chains. Note that the read fails if the rigids or the hinges can not be fully read. This function can only be used after calling GetMoleculeBasicInfo and after setting the atom positions.
Definition at line 277 of file bioworld.c. References AddBond(), CreateFileName(), DeleteFileName(), Error(), FALSE, GetFileFullName(), HasBond(), HINGE_EXT, TBioWorld::m, MEM_DUP, MEM_EXPAND, TBioWorld::na, TBioWorld::nb, TBioWorld::nbAtom, NEW, RIGID_EXT, and TRUE. Referenced by InitBioWorld().
Collects the basic information about the molecule such as the number of atoms, the number of bonds per atoms, the total number of bonds,... This is part of the BioWorld initialization.
Definition at line 398 of file bioworld.c. References DeleteBondIterator(), Error(), GetFirstNeighbour(), GetNextNeighbour(), TBioWorld::m, TBioWorld::na, nAtoms(), TBioWorld::nb, TBioWorld::nba, TBioWorld::nbAtom, NEW, NO_UINT, and VdWRadius(). Referenced by InitBioWorld().
Initializes the atom positions in a BioWorld using an external file of atoms or, if the file is not available, from the molecular information. This is part of the BioWorld initialization.
Definition at line 437 of file bioworld.c. References ATOM_EXT, CreateFileName(), DeleteFileName(), GetAtomCoordinates(), GetFileFullName(), TBioWorld::m, and TBioWorld::na. Referenced by InitBioWorld().
Determines the rigid groups of atoms (links) and the connections between them (joints). This function can only be used after calling GetMoleculeBasicInfo and after setting the atom positions.
Definition at line 472 of file bioworld.c. References CopyID(), TBioWorld::cut, DeleteBondIterator(), DeleteID(), FALSE, GetFirstNeighbour(), GetNextNeighbour(), InitVector(), TBioWorld::joint1, TBioWorld::joint2, TBioWorld::linkID, TBioWorld::linkList, TBioWorld::links, TBioWorld::m, TBioWorld::na, TBioWorld::nbAtom, NEW, NewVectorElement(), TBioWorld::nj, TBioWorld::nl, and NO_UINT. Referenced by InitBioWorld().
Determines the rigid groups of atoms (links) and the connections between them (joints) for proteins by fixing all the degrees of freedom but those for a list of residues. The residue information is read from file using ReadResidueList. This function can only be used after calling GetMoleculeBasicInfo and after setting the atom positions.
Definition at line 553 of file bioworld.c. References CopyID(), TBioWorld::cut, TBioWorld::cutB, DeleteBondIterator(), DeleteID(), Error(), ExpandBox(), FALSE, GetAtomChain(), GetAtomicNumber(), GetAtomResidue(), GetFirstNeighbour(), GetNextNeighbour(), InitBoxFromPoint(), InitVector(), IsAtomInProline(), TBioWorld::joint1, TBioWorld::joint2, TBioWorld::linkID, TBioWorld::linkList, TBioWorld::links, TBioWorld::m, TBioWorld::na, TBioWorld::nbAtom, NEW, NewVectorElement(), TBioWorld::nj, TBioWorld::nl, NO_UINT, TBioWorld::pos, and TRUE. Referenced by InitBioWorld().
Determines the rigid groups of atoms (links) and the connections between them (joints) for proteins taking into account the provide rigid/hinge information. This information is read from file using ReadRigidsAndHinges. This function can only be used after calling GetMoleculeBasicInfo and after setting the atom positions.
Definition at line 766 of file bioworld.c. References CopyID(), TBioWorld::cut, DeleteBondIterator(), DeleteID(), Error(), FALSE, GetFirstNeighbour(), GetNextNeighbour(), GetVectorElement(), InitVector(), TBioWorld::joint1, TBioWorld::joint2, TBioWorld::linkID, TBioWorld::linkList, TBioWorld::links, TBioWorld::m, TBioWorld::na, TBioWorld::nbAtom, NEW, NewVectorElement(), TBioWorld::nj, TBioWorld::nl, NO_UINT, and TRUE. Referenced by InitBioWorld().
Generates a transform from a gobal frame to a local frame for each link. The global frame is attached to the first link (i.e., its transform is the identity). The local frame attachd to each link (link=rigid group of atoms) is defined from the first atom in the link with at least two bonds. The first bond defines the X axis, the plane including the two bonds defines the X-Y plane and Z is just a vector orthogonal to this plane. By defining these local frames, we can readily obtain the configuration for a given conformation from the position of the atoms, irrespectively of the frame where these positions are defined. Note that this function does not requires a fully defined BioWorld since it only uses the list of atoms for each link (i.e., the world is not used).
Definition at line 962 of file bioworld.c. References CrossProduct(), DeleteBondIterator(), DifferenceVector(), Error(), FALSE, GetAtomicNumber(), GetAtomResidue(), GetFirstNeighbour(), GetNextNeighbour(), GetVectorElement(), HasBond(), HTransformFromVectors(), HTransformPrint(), TBioWorld::linkList, TBioWorld::links, TBioWorld::m, TBioWorld::nbAtom, TBioWorld::nl, NO_UINT, and Normalize(). Referenced by BioWordConformationFromAtomPositions(), and InitWorldFromMolecule().
Defines a mechanical structure (a world) from molecular information.
Definition at line 1130 of file bioworld.c. References AddBody2Link(), AddJoint2World(), AddLink2World(), Atoms2Transforms(), CheckAllCollisions(), CT_REPRESENTATION, CT_VDW_RATIO, TBioWorld::cut, TBioWorld::cutB, DECOR_SHAPE, DeleteBondIterator(), DeleteColor(), DeleteJoint(), DeleteLink(), DeletePolyhedron(), DifferenceVector(), Error(), FALSE, TBioWorld::g2l, GenerateWorldEquations(), GetAtomicNumber(), GetBoxDiagonal(), GetFirstNeighbour(), GetNextNeighbour(), GetParameter(), GetSolutionPointFromLinkTransforms(), GetVectorElement(), GetWorldLink(), HIDDEN_SHAPE, HTransformApply(), HTransformDelete(), HTransformInverse(), InitLink(), InitWorld(), TBioWorld::joint1, TBioWorld::joint2, TBioWorld::linkID, TBioWorld::linkList, TBioWorld::links, TBioWorld::localPos, TBioWorld::m, MEM_DUP, MEM_EXPAND, TBioWorld::na, NEW, NewColor(), NewCylinder(), NewRevoluteJoint(), NewSegments(), NewSphere(), TBioWorld::nj, TBioWorld::nl, NO_UINT, NORMAL_SHAPE, PointInBox(), TBioWorld::pos, SumVectorScale(), VdWRadius(), and TBioWorld::w. Referenced by InitBioWorld().
Initializes a world structure from biological information.
Definition at line 1394 of file bioworld.c. References BioWordConformationFromAtomPositions(), BioWordSetAtomPositionsFromConformation(), DetectLinksAndJoints(), DetectLinksAndJointsFromResidues(), DetectLinksAndJointsFromRigidsAndHinges(), FALSE, GetAtomPositions(), GetMoleculeBasicInfo(), InitWorldFromMolecule(), TBioWorld::m, TBioWorld::na, TBioWorld::nb, TBioWorld::nbAtom, NEW, TBioWorld::pos, ReadMolecule(), ReadResidueList(), ReadRigidsAndHinges(), RemoveBond(), and SetAtomCoordinates(). Referenced by main().
Enforces all bond lengths and angles to be the same for each pair or triplet of atoms of different type. We set up a set of constraints and finds a point that holds them form the current conformation using a local procedure. The new point is used to change the atom positions in the given bioworld.
Definition at line 1470 of file bioworld.c. References AddCt2Monomial(), AddEquation2CS(), AddMonomial(), AddVariable2CS(), AddVariable2Monomial(), DeleteBondIterator(), DeleteBox(), DeleteCuikSystem(), DeleteEquation(), DeleteMonomial(), DeleteVariable(), DifferenceVector(), Distance(), DotProduct(), DUMMY_EQ, DUMMY_VAR, EQU, Error(), GenerateDotProductEquation(), GenerateNormEquation(), GetAtomicNumber(), GetCSSystemVars(), GetCSVariableID(), GetCSVariableNames(), GetFirstNeighbour(), GetNextNeighbour(), InitBoxFromPoint(), InitCuikSystem(), InitEquation(), InitMonomial(), TBioWorld::m, TBioWorld::na, TBioWorld::nb, TBioWorld::nba, NEW, NewInterval(), NewVariable(), NFUN, NO_UINT, TBioWorld::pos, PrintBoxSubset(), PrintCuikSystem(), ResetMonomial(), SetEquationCmp(), SetEquationType(), SetEquationValue(), SetVariableInterval(), SYSTEM_EQ, and SYSTEM_VAR. Returns a pointer to the world generated from the bio-information. This function is provided for convenience but caution must be taken not to modify this internal structure.
Definition at line 1802 of file bioworld.c. References TBioWorld::w. Referenced by main().
Number of atoms in the molecule.
Definition at line 1807 of file bioworld.c. References TBioWorld::na. Referenced by main().
Number of variables used to represent a conformation. This changes for different representations (see CT_REPRESENTATION) In any case this function returns the number of system varibles used to represent a conformation. This is the number of variables appearing in the output files. Internally, though, a different number of variables migth be used (resulting from the simplification and dummification of the equations, if applied).
Definition at line 1812 of file bioworld.c. References GetWorldNumSystemVariables(), and TBioWorld::w. Referenced by main().
Computes the position of the atoms in a molecule from the conformation encoded in the conformation vector. The contents of this vector changes according to the representation used for the equations (see CT_REPRESENTATION).
Definition at line 1817 of file bioworld.c. References DeleteLinkTransforms(), GetLinkTransformsFromSolutionPoint(), GetVectorElement(), HTransformApply(), TBioWorld::linkList, TBioWorld::links, TBioWorld::localPos, TBioWorld::nl, NO_UINT, and TBioWorld::w. Referenced by BioWordSetAtomPositionsFromConformation(), and main().
Changes the position of the atoms in a molecule. The new position is computed from the conformation encoded in the conformation vector. The contents of this vector changes according to the representation used for the equations (see CT_REPRESENTATION).
Definition at line 1846 of file bioworld.c. References BioWordGetAtomPositionsFromConformation(), TBioWorld::m, TBioWorld::pos, and SetAtomCoordinates(). Referenced by BioWorldEnergy(), InitBioWorld(), and SaveBioWorldBioInfo().
Computes the Root Mean Square Error (RMSE) between the current the atom positions stored int he BioWorld structure and the atom position corresponding to another conformation. These atom postiions can be computed form conformations using BioWordGetAtomPositionsFromConformation. If the flexibility of the molecule is reduced to only few residues only those are considered for the error.
Definition at line 1854 of file bioworld.c. References Distance(), TBioWorld::linkID, TBioWorld::na, and TBioWorld::pos. Referenced by main().
Generates a conformation (internal coordinates) from the atom positions). The exact form of the internal coordinates depend on the CT_REPRESENTATION value in the file of parameters. If DOF is used, the conformation is represented in the tradional internal coordinates in molecular modeling (dihedral angles). Other representations are not typical in bio-engineering but in Robotics.
Definition at line 1876 of file bioworld.c. References Atoms2Transforms(), GetSolutionPointFromLinkTransforms(), HTransformDelete(), NEW, TBioWorld::nl, and TBioWorld::w. Referenced by InitBioWorld(), and main().
Computes the energy of a given configuraion. This is used to implement T-RRT like algorithms on biomolecules. The signature of this function is generic for all cost function (see EvaluateCSCost).
Definition at line 1896 of file bioworld.c. References BioWordSetAtomPositionsFromConformation(), and ComputeEnergy(). Referenced by main().
Changes the atom positions and stores the resulting conformation into a molecular format.
Definition at line 1905 of file bioworld.c. References BioWordSetAtomPositionsFromConformation(), TBioWorld::m, and WriteMolecule(). Referenced by main().
Store the world information (stored into the BioWorld structure) into a file so that it can be read as Moreover we generate a conformation deduced from the atom positions. This can be given it is already available to the caller (for instance as an output of InitBioWorld). The world and the conformation file can be used to generate the atlas or to plan.
Definition at line 1913 of file bioworld.c. References PrintWorld(), and TBioWorld::w. Referenced by main().
Releases the memory allocated in a BioWorld structure.
Definition at line 1918 of file bioworld.c. References TBioWorld::cut, TBioWorld::cutB, DeleteBox(), DeleteMolecule(), DeleteVector(), DeleteWorld(), TBioWorld::g2l, HTransformDelete(), TBioWorld::joint1, TBioWorld::joint2, TBioWorld::linkID, TBioWorld::linkList, TBioWorld::links, TBioWorld::localPos, TBioWorld::m, TBioWorld::nbAtom, TBioWorld::nl, TBioWorld::pos, and TBioWorld::w. Referenced by main(). |
Follow us!