Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/analysis_bonds.cpp

    r4eb4fe rfe238c  
    5151 * \param &Max maximum distance on return, 0 if no bond between the two elements
    5252 */
    53 void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, const element *type1, const element *type2, double &Min, double &Mean, double &Max)
     53void MinMeanMaxBondDistanceBetweenElements(const molecule *mol, element *type1, element *type2, double &Min, double &Mean, double &Max)
    5454{
    5555  Min = 2e+6;
     
    9393  Vector OOBond;
    9494
    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);
    98100  return angle;
    99101};
     
    124126 * \param *InterfaceElement or NULL
    125127 */
    126 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, const element * InterfaceElement = NULL)
     128int CountHydrogenBridgeBonds(MoleculeListClass *molecules, element * InterfaceElement = NULL)
    127129{
    128130  atom *Walker = NULL;
     
    143145          if ((Walker->type->Z  == 8) && (Runner->type->Z  == 8)) {
    144146            // check distance
    145             const double distance = Runner->x.DistanceSquared(Walker->x);
     147            const double distance = Runner->x.DistanceSquared(&Walker->x);
    146148            if ((distance > MYEPSILON) && (distance < HBRIDGEDISTANCE*HBRIDGEDISTANCE)) { // distance >0 means  different atoms
    147149              // on other atom(Runner) we check for bond to interface element and
Note: See TracChangeset for help on using the changeset viewer.