RuleBasedBuilder Class Reference

Use library of chemical compounds to derive bonds and clean-up structural problems. More...

#include <rule_based_builder.hh>

Inherits ost::conop::Builder.


Public Member Functions

 RuleBasedBuilder (const CompoundLibPtr &compound_lib)
virtual void FillAtomProps (mol::AtomHandle atom)
virtual void CompleteAtoms (const mol::ResidueHandle &rh)
virtual void CheckResidueCompleteness (const mol::ResidueHandle &rh)
virtual mol::ResidueKey IdentifyResidue (const mol::ResidueHandle &rh)
virtual void ConnectAtomsOfResidue (const mol::ResidueHandle &rh)
virtual void ConnectResidueToNext (const mol::ResidueHandle &rh, const mol::ResidueHandle &next)
virtual void AssignTorsions (const mol::ChainHandle &ch)
virtual void AssignTorsionsToResidue (const mol::ResidueHandle &residue)
virtual bool OnUnknownAtom (mol::AtomHandle atom)
virtual void OnMissingAtom (const mol::ResidueHandle &residue, const String &atom_name)
virtual void FillAtomProps (mol::AtomHandle atom, const AtomSpec &spec)
virtual void FillResidueProps (mol::ResidueHandle residue)
virtual bool IsResidueComplete (const mol::ResidueHandle &residue)


Detailed Description

Use library of chemical compounds to derive bonds and clean-up structural problems.

Todo:
Sorting of the residues directly uses impl layer of the base module. Would be much nicer if the order could be assigned in the public interface and then tell the residues to sort the atoms in ascending order.

Definition at line 40 of file rule_based_builder.hh.


Constructor & Destructor Documentation

RuleBasedBuilder ( const CompoundLibPtr compound_lib  )  [inline]

Definition at line 42 of file rule_based_builder.hh.


Member Function Documentation

virtual void AssignTorsions ( const mol::ChainHandle ch  )  [virtual]

requires chemical types

Reimplemented from Builder.

virtual void AssignTorsionsToResidue ( const mol::ResidueHandle residue  )  [virtual]

assign named torsions to single residue

Reimplemented from Builder.

virtual void CheckResidueCompleteness ( const mol::ResidueHandle rh  )  [virtual]

Check residue completeness.

By using the description of the chemical compound, the completeness of the residue is verified. The method distinguishes between required atoms and atoms that are optional, like OXT that is only present, if not peptide bond is formed. Whenever an unknown atom is encountered, OnUnknownAtom() is invoked. Subclasses of the RuleBasedBuilder may implement some additional logic to deal with unknown atom. Likewise, whenever a required atom is missing, OnMissingAtom() is invoked. Hydrogen atoms are not considered as required by default

Reimplemented from Builder.

virtual void CompleteAtoms ( const mol::ResidueHandle rh  )  [virtual]

add any missing atoms to the residue based on its key, with coordinates set to zero

Reimplemented from Builder.

virtual void ConnectAtomsOfResidue ( const mol::ResidueHandle rh  )  [virtual]

connect atoms of one residue

Connects atoms of residue based on residue and atom name. This method does not establish inter-residue bonds. To connect atoms that belong to different residues, use ConnectResidueToPrev(), or ConnectResidueToNext().

Reimplemented from Builder.

virtual void ConnectResidueToNext ( const mol::ResidueHandle rh,
const mol::ResidueHandle next 
) [virtual]

Connects the two residues together.

Connections are established if both of the residues are peptide-linking components and when PeptideBondExists() returns true.

Parameters:
rh is the N-terminal partner donating the C and O for the peptide bond.
next is the C-terminal partner, donating the nitrogen to the bond.

Reimplemented from Builder.

virtual void FillAtomProps ( mol::AtomHandle  atom,
const AtomSpec spec 
) [virtual]

Fill in missing information based on atom name.

virtual void FillAtomProps ( mol::AtomHandle  atom  )  [virtual]

fill atom properties such as element and radius

Reimplemented from Builder.

virtual void FillResidueProps ( mol::ResidueHandle  residue  )  [virtual]

Set residue properties such as chemical class.

Reimplemented from Builder.

virtual mol::ResidueKey IdentifyResidue ( const mol::ResidueHandle rh  )  [virtual]

Identify residue by name.

Looks-up the residue in the database of chemical compounds and returns the name of the residue or "UNK" if the residue has not been found in the library.

Reimplemented from Builder.

virtual bool IsResidueComplete ( const mol::ResidueHandle residue  )  [virtual]

Check whether the residue has all required atoms. This does not include hydrogens and leaving atoms such as the terminal OXT.

Reimplemented from Builder.

virtual void OnMissingAtom ( const mol::ResidueHandle residue,
const String atom_name 
) [inline, virtual]

Invoked whenever an atom is missing.

It is up to the overloaded method to deal with the missing atom, either by ignoring it or by inserting a dummy atom.

Definition at line 102 of file rule_based_builder.hh.

virtual bool OnUnknownAtom ( mol::AtomHandle  atom  )  [virtual]

Invoked whenever an unkknown atom has been encountered during a residue completeness check.

The default implementation guesses the atom properties based on the name and returns false, meaning that it should be treated as an unknown atom.

Custom implementations of this method may delete the atom, or modify it.

Todo:
what should be done when the atom name is changed? it would be neccessary to rerun CheckResidueCompleteness().


The documentation for this class was generated from the following file:

Generated on Fri Jul 2 14:23:06 2010 for OpenStructure by  doxygen 1.5.8