ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/UseTheForce/ForceField.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/UseTheForce/ForceField.cpp (file contents):
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 3153 by chuckv, Fri Jul 6 18:15:03 2007 UTC

# Line 131 | Line 131 | namespace oopse {
131  
132    }
133  
134 +  NonBondedInteractionType* ForceField::getNonBondedInteractionType(const std::string &at1, const std::string &at2) {
135 +    std::vector<std::string> keys;
136 +    keys.push_back(at1);
137 +    keys.push_back(at2);    
138 +
139 +    //try exact match first
140 +    NonBondedInteractionType* nbiType = nonBondedInteractionTypeCont_.find(keys);
141 +    if (nbiType) {
142 +      return nbiType;
143 +    } else {
144 +      //if no exact match found, try wild card match
145 +      return nonBondedInteractionTypeCont_.find(keys, wildCardAtomTypeName_);
146 +    }
147 +
148 +  }
149 +
150    BondType* ForceField::getExactBondType(const std::string &at1, const std::string &at2){
151      std::vector<std::string> keys;
152      keys.push_back(at1);
# Line 156 | Line 172 | namespace oopse {
172      keys.push_back(at4);  
173      return torsionTypeCont_.find(keys);
174    }
175 +
176 +  NonBondedInteractionType* ForceField::getExactNonBondedInteractionType(const std::string &at1, const std::string &at2){
177 +    std::vector<std::string> keys;
178 +    keys.push_back(at1);
179 +    keys.push_back(at2);    
180 +    return nonBondedInteractionTypeCont_.find(keys);
181 +  }
182 +
183 +
184    bool ForceField::addAtomType(const std::string &at, AtomType* atomType) {
185      std::vector<std::string> keys;
186      keys.push_back(at);
# Line 189 | Line 214 | namespace oopse {
214      return torsionTypeCont_.add(keys, torsionType);
215    }
216  
217 +  bool ForceField::addNonBondedInteractionType(const std::string &at1, const std::string &at2, NonBondedInteractionType* nbiType) {
218 +    std::vector<std::string> keys;
219 +    keys.push_back(at1);
220 +    keys.push_back(at2);    
221 +    return nonBondedInteractionTypeCont_.add(keys, nbiType);
222 +
223 +  }
224 +
225    RealType ForceField::getRcutFromAtomType(AtomType* at) {
226      /**@todo */
227      GenericData* data;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines