Loading...
Searching...
No Matches
BALL::AddHydrogenProcessor Class Reference
Molecular Modeling » Molecular Structure » Miscellaneous

`#include <BALL/STRUCTURE/addHydrogenProcessor.h>`

Inheritance diagram for BALL::AddHydrogenProcessor:

## Public Member Functions

| AddHydrogenProcessor ()
| Default constructor.
virtual | ~AddHydrogenProcessor ()
| Destructor.
virtual bool | start ()
virtual Processor::Result | operator() (Composite &composite)
Size | getConnectivity (const Atom &atom) const
void | setRings (const vector< vector< Atom * > > &rings)
Size | getNumberOfAddedHydrogens () const
Public Member Functions inherited from BALL::UnaryProcessor< Composite >
| UnaryProcessor ()
| UnaryProcessor (const UnaryProcessor &)
virtual | ~UnaryProcessor ()
virtual bool | finish ()

## Protected Member Functions

Processor::Result | placePeptideBondH_ (Residue *res)
Size | countBondOrders (const Atom &atom) const
void | addHydrogen_ (Atom &atom, Vector3 position)
bool | isRingAtom_ (const Atom &atom) const
vector< Atom * > | getPartners_ (Atom &atom) const
Vector3 | getNormal_ (const Vector3 &v) const
bool | normalize_ (Vector3 &v) const
bool | hasMultipleBond_ (const Atom &atom) const
float | getBondLength_ (Position element) const

## Additional Inherited Members

Public Types inherited from BALL::UnaryFunctor< ArgumentType, ResultType >
typedef ResultType | result_type
typedef ArgumentType | argument_type
typedef ArgumentType & | argument_reference
typedef const ArgumentType & | const_argument_reference
typedef ArgumentType * | argument_pointer
typedef const ArgumentType * | const_argument_pointer

## Detailed Description

Saturate atoms with hydrogen atoms.

This processor only works for main group elements. The formal charge of the atoms are taken into account. The placement of the hydrogen atoms only depends on the direct neighbour atoms.

No additional optimization of the atom placement is performed. The optimal bond lengths are calculated by a modified Schomaker-Stevenson rule (adapted from the MMFF94 Force Field.). For hydrogen atoms located in a peptide bond the atom is placed taking the planarity of the bond into account. In this case bond length is taken from the rules used by DSSP (Kabsch-Sander) as implemented by the HydrogenBondProcessor.

  Usage:
  RingPerceptionProcessor rpp;
  vector<vector<Atom*> > rings;
  rpp.calculateSSSR(rings, system);
  rings = rpp.getAllSmallRings();
  AddHydrogenProcessor ap;
  ap.setRings(rings);
  system.apply(ap);
  BALL::AddHydrogenProcessor::AddHydrogenProcessor
  AddHydrogenProcessor()
  Default constructor.
  BALL::AddHydrogenProcessor::setRings
  void setRings(const vector< vector< Atom * > > &rings)
  BALL::RingPerceptionProcessor
  Definition ringPerceptionProcessor.h:38
  BALL::RingPerceptionProcessor::getAllSmallRings
  const vector< vector< Atom * > > & getAllSmallRings() const
  BALL::RingPerceptionProcessor::calculateSSSR
  Size calculateSSSR(vector< vector< Atom * > > &sssr, AtomContainer &ac)

Keep in mind that the hydrogen positions obtained by using this method are usually not optimal. For better better Atom placment when adding hydrogens to Proteins and DNA you should use the ReconstructFragmentProcessor. Nevertheless in both cases it is recommended to optimize the obtained hydrogen atom positions using a force field (e.g. BALL::AmberFF, BALL::CharmmFF, BALL::MMFF94)

Definition at line 58 of file addHydrogenProcessor.h.

## Constructor & Destructor Documentation

## AddHydrogenProcessor()

BALL::AddHydrogenProcessor::AddHydrogenProcessor | ( |  | ) |

Default constructor.

## ~AddHydrogenProcessor()

virtual BALL::AddHydrogenProcessor::~AddHydrogenProcessor | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## addHydrogen_()

void BALL::AddHydrogenProcessor::addHydrogen_ | ( | Atom & | atom,
|  | Vector3 | position )

protected

Adds a single hydrogen an atom.

Parameters

  atom | The Atom to which a hydrogen should be added
  position | The position of the newly added hydrogen

## countBondOrders()

Size BALL::AddHydrogenProcessor::countBondOrders | ( | const Atom & | atom | ) | const

protected

Sums up the bond orders of all bonds the atom participates in.

Parameters

  atom | The Atom for which the bond orders should be determined

Returns
  The bond orders of the Atom.

## getBondLength_()

float BALL::AddHydrogenProcessor::getBondLength_ | ( | Position | element | ) | const

protected

Get the ideal bond length for the given element with hydrogen atoms. This uses the Schomaker-Stevenson rule.

Parameters

  element | The Element for which to compute the distance

Returns
  The preferred distance of a hydrogen atom from the input Element

## getConnectivity()

Size BALL::AddHydrogenProcessor::getConnectivity | ( | const Atom & | atom | ) | const

Computes the number of connections of a provided Atom the computation is solely based on the formal charge of the molecule as obtained from its group in the PTE. Hence only one connectivity is computed for every element.

Parameters

  atom | The Atom for which the connectivity shoudl be computed

Returns
  The number of connections the atom most likely will form. 0 if no connectivity could be computed.

## getNormal_()

Vector3 BALL::AddHydrogenProcessor::getNormal_ | ( | const Vector3 & | v | ) | const

protected

Computes a vector orthogonal to the input. It uses the x-axis as reference. If the input is colinear to the x-axis, the y-axis is used.

Parameters

  v | A vector for which an orthogonal vector shoudl be computed

Returns
  A vector of unit length orthogonal to the input

## getNumberOfAddedHydrogens()

Size BALL::AddHydrogenProcessor::getNumberOfAddedHydrogens | ( |  | ) | const

inline

Returns the number of added hydrogen atoms. This value will accumulate over multiple calls of operator()

Returns
  The number of added hydrogens

Definition at line 118 of file addHydrogenProcessor.h.

## getPartners_()

vector< Atom * > BALL::AddHydrogenProcessor::getPartners_ | ( | Atom & | atom | ) | const

protected

Returns a list of atoms bound to the specified Atom

Parameters

  atom | the atom for which the binding partners should be determined

Returns
  A std::vector containing all Atoms that have a bond to the specified Atom

## hasMultipleBond_()

bool BALL::AddHydrogenProcessor::hasMultipleBond_ | ( | const Atom & | atom | ) | const

protected

Determines whether an Atom has a bond that is not a single bond.

Parameters

  atom | The Atom that should be checked for non-single bonds.

Returns
  true if the atom has a a non-single bond, false otherwise

## isRingAtom_()

bool BALL::AddHydrogenProcessor::isRingAtom_ | ( | const Atom & | atom | ) | const

protected

Returns whether the atom is in the internal list of ring atoms

See also
  AddHydrogenProcessor::setRings

Parameters

  atom | The Atom that should be checked

Returns
  true if the Atom is in the ring Atom set false otherwise

## normalize_()

bool BALL::AddHydrogenProcessor::normalize_ | ( | Vector3 & | v | ) | const

protected

Normalizes a vector.

Parameters

  v | The vector that should be normalized. Normalization is performed in-place.

Returns
  true if the vector is non-zero false otherwise.

## operator()()

virtual Processor::Result BALL::AddHydrogenProcessor::operator() | ( | Composite & | composite | ) |

virtual

Adds hydrogen atoms to the specified composite. If composite is a Residue it uses the peptide bond rule to place hydrogens. Otherwise the placement heuristic based on the modified Schomaker-Stevenson rule is used.

See also
  UnaryProcessor::operator()

Parameters

  composite | The composite that should be saturated with hydrogens

Returns
  Processor::CONTINUE is returned in all cases.

Reimplemented from BALL::UnaryProcessor< Composite >.

## placePeptideBondH_()

Processor::Result BALL::AddHydrogenProcessor::placePeptideBondH_ | ( | Residue * | res | ) |

protected

Place peptide bond H-atoms according to Kabsch-Sander

Parameters

  res | A pointer to a Residue for which a peptide bond hydrogen should be placed

Returns
  Processor::CONTINUE in all cases.

## setRings()

void BALL::AddHydrogenProcessor::setRings | ( | const vector< vector< Atom * > > & | rings | ) |

Sets the internal list of ring atoms. This is necessary computing a better estimate of the hydrogen position.

Parameters

  rings | A set of rings. A suitable input for this method can be computed by using RingPerceptionProcessor::calculateSSSR

## start()

virtual bool BALL::AddHydrogenProcessor::start | ( |  | ) |

virtual

Initialize the processor. Resets the number of added hydrogens.

See also
  UnaryProcessor::start()

Returns
  true in all cases

Reimplemented from BALL::UnaryProcessor< Composite >.