Public Member Functions | Static Public Member Functions
Builder Class Reference

#include <builder.hh>

Inherited by HeuristicBuilder, and RuleBasedBuilder.

Public Member Functions

 Builder ()
virtual ~Builder ()
virtual void CompleteAtoms (mol::ResidueHandle rh)
virtual void SetDialect (Dialect dialect)
virtual void SetStrictHydrogenMode (bool strict)
bool GetStrictHydrogenMode () const
Dialect GetDialect () const
virtual void CheckResidueCompleteness (const mol::ResidueHandle &rh)
virtual bool IsResidueComplete (const mol::ResidueHandle &rh)
virtual mol::ResidueKey IdentifyResidue (const mol::ResidueHandle &rh)
virtual void FillResidueProps (mol::ResidueHandle residue)
virtual void FillAtomProps (mol::AtomHandle atom)
virtual void ConnectAtomsOfResidue (mol::ResidueHandle rh)
virtual void ConnectResidueToPrev (mol::ResidueHandle rh, mol::ResidueHandle prev)
virtual void ConnectResidueToNext (mol::ResidueHandle rh, mol::ResidueHandle next)
virtual void AssignTorsions (mol::ChainHandle ch)
virtual void AssignTorsionsToResidue (mol::ResidueHandle residue)
void AssignBackBoneTorsionsToResidue (mol::ResidueHandle res)
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)

Static Public Member Functions

static String GuessAtomElement (const String &atom_name, bool hetatm)
static bool AreResiduesConsecutive (const mol::ResidueHandle &r1, const mol::ResidueHandle &r2)

Detailed Description

abstract builder interface

A builder serves several purposes:

The exact behaviour for a builder is implementation-specific. While some builders implement sophisticated checks to identity residues, other builders may only perform a name lookup. For two specific implementations of builders, HeuristicBuilder and RuleBasedBuilder.

Custom builders can be registered with Conopology::RegisterBuilder(). The default builder is set with Conopology::SetDefaultBuilder(). Since all entity loaders make use of the default builder to infer connectivity of the atoms, changing the default builder can largely affect the loading behaviour.

Definition at line 54 of file builder.hh.

Constructor & Destructor Documentation

Builder ( )

Definition at line 57 of file builder.hh.

virtual ~Builder ( )

Member Function Documentation

static bool AreResiduesConsecutive ( const mol::ResidueHandle r1,
const mol::ResidueHandle r2 

whether the r1 and r2 have consecutive residue numbers

void AssignBackBoneTorsionsToResidue ( mol::ResidueHandle  res)

assign Backbone torsions to single residue

virtual void AssignTorsions ( mol::ChainHandle  ch)

assign named torsions to a complete chain

Reimplemented in RuleBasedBuilder, and HeuristicBuilder.

virtual void AssignTorsionsToResidue ( mol::ResidueHandle  residue)

assign named torsions to single residue

Reimplemented in HeuristicBuilder, and RuleBasedBuilder.

virtual void CheckResidueCompleteness ( const mol::ResidueHandle rh)

verify that the given residue has all atoms it is supposed to have based on its key

Reimplemented in RuleBasedBuilder.

virtual void CompleteAtoms ( mol::ResidueHandle  rh)

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

Reimplemented in RuleBasedBuilder.

virtual void ConnectAtomsOfResidue ( mol::ResidueHandle  rh)

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 in HeuristicBuilder, and RuleBasedBuilder.

virtual void ConnectResidueToNext ( mol::ResidueHandle  rh,
mol::ResidueHandle  next 
See also:

Reimplemented in HeuristicBuilder, and RuleBasedBuilder.

virtual void ConnectResidueToPrev ( mol::ResidueHandle  rh,
mol::ResidueHandle  prev 

connect atoms of residue to previous

The order of the parameters is important. In case of a polypeptide chain, the residues are thought to be ordered from N- to C- terminus.

See also:

Reimplemented in HeuristicBuilder.

void DistanceBasedConnect ( mol::AtomHandle  atom)

|brief Connect atom with all atoms for whith IsBondFeasible() and AreResiduesConsecutive() returns true

virtual bool DoesPeptideBondExist ( const mol::AtomHandle n,
const mol::AtomHandle c 

Check if peptide bond is formed between the two atoms.

This method is called by ConnectResidueWithNext() after making sure that both residues participating in the peptide bond are peptide linking components.

By default, IsBondFeasible() is used to check whether the two atoms form a peptide bond.

virtual void FillAtomProps ( mol::AtomHandle  atom)

Reimplemented in HeuristicBuilder, and RuleBasedBuilder.

virtual void FillResidueProps ( mol::ResidueHandle  residue)

Assign (correct) residue properties.

Assign chemical class of the residue and one letter code.

Reimplemented in RuleBasedBuilder, and HeuristicBuilder.

Dialect GetDialect ( ) const

Definition at line 69 of file builder.hh.

bool GetStrictHydrogenMode ( ) const

Definition at line 67 of file builder.hh.

static String GuessAtomElement ( const String atom_name,
bool  hetatm 

guess element of atom based on name and hetatm flag

void GuessChemClass ( mol::ResidueHandle  res)

guess and assign chemical class of residue based on atoms and connectivity

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

attempt to identify the residue based on its atoms, and return a suggestion for the proper residue key

Reimplemented in RuleBasedBuilder.

virtual bool IsBondFeasible ( const mol::AtomHandle atom_a,
const mol::AtomHandle atom_b 

Overloadable hook to check if bond between to atoms is feasible.

The default implementation uses a distance-based check to check if the two atoms should be connected. The atoms are connected if they are in the range of 0.8 to 1.2 times their van-der-WAALS radius.

virtual bool IsResidueComplete ( const mol::ResidueHandle rh)

Check whether the residue has all atoms it is supposed to have.

Add hydrogen flag

Reimplemented in RuleBasedBuilder, and HeuristicBuilder.

virtual void SetDialect ( Dialect  dialect)

Reimplemented in RuleBasedBuilder.

Definition at line 64 of file builder.hh.

virtual void SetStrictHydrogenMode ( bool  strict)

Definition at line 66 of file builder.hh.

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