--- trunk/src/UseTheForce/ForceField.cpp 2007/07/06 18:14:35 1150 +++ trunk/src/UseTheForce/ForceField.cpp 2007/07/06 18:15:03 1151 @@ -131,6 +131,22 @@ namespace oopse { } + NonBondedInteractionType* ForceField::getNonBondedInteractionType(const std::string &at1, const std::string &at2) { + std::vector keys; + keys.push_back(at1); + keys.push_back(at2); + + //try exact match first + NonBondedInteractionType* nbiType = nonBondedInteractionTypeCont_.find(keys); + if (nbiType) { + return nbiType; + } else { + //if no exact match found, try wild card match + return nonBondedInteractionTypeCont_.find(keys, wildCardAtomTypeName_); + } + + } + BondType* ForceField::getExactBondType(const std::string &at1, const std::string &at2){ std::vector keys; keys.push_back(at1); @@ -156,6 +172,15 @@ namespace oopse { keys.push_back(at4); return torsionTypeCont_.find(keys); } + + NonBondedInteractionType* ForceField::getExactNonBondedInteractionType(const std::string &at1, const std::string &at2){ + std::vector keys; + keys.push_back(at1); + keys.push_back(at2); + return nonBondedInteractionTypeCont_.find(keys); + } + + bool ForceField::addAtomType(const std::string &at, AtomType* atomType) { std::vector keys; keys.push_back(at); @@ -189,6 +214,14 @@ namespace oopse { return torsionTypeCont_.add(keys, torsionType); } + bool ForceField::addNonBondedInteractionType(const std::string &at1, const std::string &at2, NonBondedInteractionType* nbiType) { + std::vector keys; + keys.push_back(at1); + keys.push_back(at2); + return nonBondedInteractionTypeCont_.add(keys, nbiType); + + } + RealType ForceField::getRcutFromAtomType(AtomType* at) { /**@todo */ GenericData* data;