Changes in src/analysis_bonds.cpp [112b09:36166d]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/analysis_bonds.cpp
r112b09 r36166d 13 13 #include "element.hpp" 14 14 #include "info.hpp" 15 #include "verbose.hpp" 15 16 #include "log.hpp" 16 17 #include "molecule.hpp" … … 121 122 * \param *molecules molecules to count bonds 122 123 * \param *InterfaceElement or NULL 123 */ 124 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, const element * InterfaceElement = NULL) 124 * \param *Interface2Element or NULL 125 */ 126 int CountHydrogenBridgeBonds(MoleculeListClass *molecules, const element * InterfaceElement = NULL, const element * Interface2Element = NULL) 125 127 { 126 128 int count = 0; … … 128 130 double Otherangle = 0.; 129 131 bool InterfaceFlag = false; 132 bool Interface2Flag = false; 130 133 bool OtherHydrogenFlag = true; 131 134 for (MoleculeList::const_iterator MolWalker = molecules->ListOfMolecules.begin();MolWalker != molecules->ListOfMolecules.end(); ++MolWalker) { … … 145 148 OtherHydrogens = 0; 146 149 InterfaceFlag = (InterfaceElement == NULL); 150 Interface2Flag = (Interface2Element == NULL); 147 151 for (BondList::const_iterator BondRunner = (*Runner)->ListOfBonds.begin(); BondRunner != (*Runner)->ListOfBonds.end(); BondRunner++) { 148 152 atom * const OtherAtom = (*BondRunner)->GetOtherAtom(*Runner); … … 155 159 } 156 160 InterfaceFlag = InterfaceFlag || (OtherAtom->type == InterfaceElement); 161 Interface2Flag = Interface2Flag || (OtherAtom->type == Interface2Element); 157 162 } 158 163 DoLog(1) && (Log() << Verbose(1) << "Otherangle is " << Otherangle << " for " << OtherHydrogens << " hydrogens." << endl); … … 168 173 break; 169 174 } 170 if (InterfaceFlag && OtherHydrogenFlag) {175 if (InterfaceFlag && Interface2Flag && OtherHydrogenFlag) { 171 176 // on this element (Walker) we check for bond to hydrogen, i.e. part of water molecule 172 177 for (BondList::const_iterator BondRunner = (*Walker)->ListOfBonds.begin(); BondRunner != (*Walker)->ListOfBonds.end(); BondRunner++) {
Note:
See TracChangeset
for help on using the changeset viewer.