Changes in src/analysis_bonds.cpp [4eb4fe:fe238c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_bonds.cpp
r4eb4fe rfe238c 51 51 * \param &Max maximum distance on return, 0 if no bond between the two elements 52 52 */ 53 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, const element *type1, constelement *type2, double &Min, double &Mean, double &Max)53 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, element *type1, element *type2, double &Min, double &Mean, double &Max) 54 54 { 55 55 Min = 2e+6; … … 93 93 Vector OOBond; 94 94 95 OHBond = (*first) - (*central); 96 OOBond = (*second) - (*central); 97 const double angle = OHBond.Angle(OOBond); 95 OHBond.CopyVector(first); 96 OHBond.SubtractVector(central); 97 OOBond.CopyVector(second); 98 OOBond.SubtractVector(central); 99 const double angle = OHBond.Angle(&OOBond); 98 100 return angle; 99 101 }; … … 124 126 * \param *InterfaceElement or NULL 125 127 */ 126 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, constelement * InterfaceElement = NULL)128 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, element * InterfaceElement = NULL) 127 129 { 128 130 atom *Walker = NULL; … … 143 145 if ((Walker->type->Z == 8) && (Runner->type->Z == 8)) { 144 146 // check distance 145 const double distance = Runner->x.DistanceSquared( Walker->x);147 const double distance = Runner->x.DistanceSquared(&Walker->x); 146 148 if ((distance > MYEPSILON) && (distance < HBRIDGEDISTANCE*HBRIDGEDISTANCE)) { // distance >0 means different atoms 147 149 // on other atom(Runner) we check for bond to interface element and
Note:
See TracChangeset
for help on using the changeset viewer.