Class for detecting hydrogen bonds. More...
|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. More...|
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.
|bool loos::HBondDetector::hBonded||(||const pAtom||donor,|
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.