| 53 |  | #include "primitives/Molecule.hpp" | 
| 54 |  | #include "utils/MemoryUtils.hpp" | 
| 55 |  | #include "utils/simError.h" | 
| 56 | < | #include "utils/ElementsTable.hpp" | 
| 56 | > | #include "utils/StringUtils.hpp" | 
| 57 |  |  | 
| 58 |  | namespace OpenMD { | 
| 59 |  | Molecule::Molecule(int stampId, int globalIndex, const std::string& molName, | 
| 196 |  | // get the chain of base types for this atom type: | 
| 197 |  | std::vector<AtomType*> ayb = at->allYourBase(); | 
| 198 |  | // use the last type in the chain of base types for the name: | 
| 199 | < | std::string bn = ayb[ayb.size()-1]->getName(); | 
| 200 | < |  | 
| 201 | < | if (bn.compare("O")==0 || bn.compare("N")==0 || bn.compare("F")==0) | 
| 202 | < | hBondAcceptors_.push_back( atom ); | 
| 199 | > | std::string bn = UpperCase(ayb[ayb.size()-1]->getName()); | 
| 200 |  |  | 
| 201 | + | if (bn.compare("O")==0 || bn.compare("N")==0 | 
| 202 | + | || bn.compare("F")==0) | 
| 203 | + | hBondAcceptors_.push_back( atom ); | 
| 204 | + |  | 
| 205 |  | } | 
| 206 |  |  | 
| 207 |  | // find electronegative atoms that are either bonded to | 
| 216 |  | std::vector<AtomType*> ayb1 = at1->allYourBase(); | 
| 217 |  | std::vector<AtomType*> ayb2 = at2->allYourBase(); | 
| 218 |  | // use the last type in the chain of base types for the name: | 
| 219 | < | std::string bn1 = ayb1[ayb1.size()-1]->getName(); | 
| 220 | < | std::string bn2 = ayb2[ayb2.size()-1]->getName(); | 
| 219 | > | std::string bn1 = UpperCase(ayb1[ayb1.size()-1]->getName()); | 
| 220 | > | std::string bn2 = UpperCase(ayb2[ayb2.size()-1]->getName()); | 
| 221 |  |  | 
| 222 |  | if (bn1.compare("H")==0) { | 
| 223 |  | if (bn2.compare("O")==0 || bn2.compare("N")==0 | 
| 247 |  | // get the chain of base types for this atom type: | 
| 248 |  | std::vector<AtomType*> ayb1 = at1->allYourBase(); | 
| 249 |  | // use the last type in the chain of base types for the name: | 
| 250 | < | std::string bn1 = ayb1[ayb1.size()-1]->getName(); | 
| 250 | > | std::string bn1 = UpperCase(ayb1[ayb1.size()-1]->getName()); | 
| 251 |  |  | 
| 252 |  | if (bn1.compare("O")==0 || bn1.compare("N")==0 | 
| 253 |  | || bn1.compare("F")==0) { | 
| 257 |  | // get the chain of base types for this atom type: | 
| 258 |  | std::vector<AtomType*> ayb2 = at2->allYourBase(); | 
| 259 |  | // use the last type in the chain of base types for the name: | 
| 260 | < | std::string bn2 = ayb2[ayb2.size()-1]->getName(); | 
| 260 | > | std::string bn2 = UpperCase(ayb2[ayb2.size()-1]->getName()); | 
| 261 |  | if (bn2.compare("H")==0) { | 
| 262 |  | HBondDonor* donor = new HBondDonor(); | 
| 263 |  | donor->donorAtom = atom1; |