OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions
RuleBasedBuilder Class Reference

#include <rule_based_builder.hh>

Inherits Builder.

Public Member Functions

 RuleBasedBuilder (const CompoundLibPtr &compound_lib)
virtual void SetDialect (Dialect dialect)
virtual void FillAtomProps (mol::AtomHandle atom)
virtual void CompleteAtoms (mol::ResidueHandle rh)
virtual void CheckResidueCompleteness (const mol::ResidueHandle &rh)
virtual mol::ResidueKey IdentifyResidue (const mol::ResidueHandle &rh)
virtual void ConnectAtomsOfResidue (mol::ResidueHandle rh)
virtual void ConnectResidueToNext (mol::ResidueHandle rh, mol::ResidueHandle next)
virtual void AssignTorsions (mol::ChainHandle ch)
virtual void AssignTorsionsToResidue (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)
mol::AtomHandleList GetUnknownAtoms (mol::ResidueHandle res)
virtual bool IsResidueComplete (const mol::ResidueHandle &residue)
CompoundLibPtr GetCompoundLib () const
- Public Member Functions inherited from Builder
 Builder ()
virtual ~Builder ()
virtual void SetStrictHydrogenMode (bool strict)
bool GetStrictHydrogenMode () const
Dialect GetDialect () const
virtual void ConnectResidueToPrev (mol::ResidueHandle rh, mol::ResidueHandle prev)
virtual bool DoesPeptideBondExist (const mol::AtomHandle &n, const mol::AtomHandle &c)
virtual bool IsBondFeasible (const mol::AtomHandle &atom_a, const mol::AtomHandle &atom_b)
void GuessChemClass (mol::ResidueHandle res)
void DistanceBasedConnect (mol::AtomHandle atom)
void SetBondFeasibilityCheck (bool b_feas_flag)
bool GetBondFeasibilityCheck () const

Additional Inherited Members

- Static Public Member Functions inherited from Builder
static String GuessAtomElement (const String &atom_name, bool hetatm)
static bool AreResiduesConsecutive (const mol::ResidueHandle &r1, const mol::ResidueHandle &r2)

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 ( mol::ChainHandle  ch)
virtual

requires chemical types

Reimplemented from Builder.

virtual void AssignTorsionsToResidue ( 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 ( 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 ( 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 ( mol::ResidueHandle  rh,
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:
rhis the N-terminal partner donating the C and O for the peptide bond.
nextis the C-terminal partner, donating the nitrogen to the bond.

Reimplemented from Builder.

virtual void FillAtomProps ( mol::AtomHandle  atom)
virtual

fill atom properties such as element and radius

Reimplemented from Builder.

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

Fill in missing information based on atom name.

virtual void FillResidueProps ( mol::ResidueHandle  residue)
virtual

Set residue properties such as chemical class.

Reimplemented from Builder.

CompoundLibPtr GetCompoundLib ( ) const
inline

Definition at line 125 of file rule_based_builder.hh.

mol::AtomHandleList GetUnknownAtoms ( mol::ResidueHandle  res)
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 
)
inlinevirtual

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 110 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().
virtual void SetDialect ( Dialect  dialect)
inlinevirtual

Reimplemented from Builder.

Definition at line 46 of file rule_based_builder.hh.


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