LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
Public Member Functions | List of all members
loos::HBondDetector Class Reference

Class for detecting hydrogen bonds. More...

#include <HBondDetector.hpp>

Public Member Functions

 HBondDetector (const double distance, const double angle, const AtomicGroup &group)
 
 HBondDetector (const AtomicGroup &group)
 
bool hBonded (const pAtom donor, const pAtom hydrogen, const pAtom acceptor)
 Method to test if this triple of atoms forms an h-bond.
 

Detailed Description

Class for detecting hydrogen bonds.

This is a class intended to make it easy to determine if 3 atoms form a hydrogen bond based on distance and angle criteria. The basic criteria are set when the class is constructed (as is the periodicity information) so that one only needs to pass the pAtoms when using it. The periodicity information is extracted from the AtomicGroup passed to the constructor, so that group's shared periodic box will be used in all distance calculations.

If you use the constructors with default distances and cutoffs, you get a distance cutoff of 3.5 Ang, and an angle cutoff of 20 degrees from linear.

Member Function Documentation

◆ hBonded()

bool loos::HBondDetector::hBonded ( const pAtom donor,
const pAtom hydrogen,
const pAtom acceptor )

Method to test if this triple of atoms forms an h-bond.

Assumes that donor and hydrogen are in the same molecule, so no imaging is performed when calculating their vector. First tests if the hydrogen-acceptor distance is less than the threshold, then tests the angle to make sure it's straighter than the threshold.

Actually operates on the distance**2 and the cosine of the angle, for better performance.


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