| 107 |  | } | 
| 108 |  |  | 
| 109 |  | RealType LJ::getSigma(int atid) { | 
| 110 | + | if (!initialized_) initialize(); | 
| 111 |  | std::map<int, AtomType*> :: const_iterator it; | 
| 112 |  | it = LJMap.find(atid); | 
| 113 |  | if (it == LJMap.end()) { | 
| 143 |  | } | 
| 144 |  |  | 
| 145 |  | RealType LJ::getEpsilon(int atid) { | 
| 146 | + | if (!initialized_) initialize(); | 
| 147 |  | std::map<int, AtomType*> :: const_iterator it; | 
| 148 |  | it = LJMap.find(atid); | 
| 149 |  | if (it == LJMap.end()) { | 
| 166 |  | } | 
| 167 |  |  | 
| 168 |  | void LJ::initialize() { | 
| 169 | < | ForceField::AtomTypeContainer atomTypes = forceField_->getAtomTypes(); | 
| 169 | > | ForceField::AtomTypeContainer* atomTypes = forceField_->getAtomTypes(); | 
| 170 |  | ForceField::AtomTypeContainer::MapTypeIterator i; | 
| 171 |  | AtomType* at; | 
| 172 |  |  | 
| 173 | < | for (at = atomTypes.beginType(i); at != NULL; | 
| 174 | < | at = atomTypes.nextType(i)) { | 
| 173 | > | for (at = atomTypes->beginType(i); at != NULL; | 
| 174 | > | at = atomTypes->nextType(i)) { | 
| 175 |  |  | 
| 176 |  | if (at->isLennardJones()) | 
| 177 |  | addType(at); | 
| 178 |  | } | 
| 179 |  |  | 
| 180 | < | ForceField::NonBondedInteractionTypeContainer nbiTypes = forceField_->getNonBondedInteractionTypes(); | 
| 180 | > | ForceField::NonBondedInteractionTypeContainer* nbiTypes = forceField_->getNonBondedInteractionTypes(); | 
| 181 |  | ForceField::NonBondedInteractionTypeContainer::MapTypeIterator j; | 
| 182 |  | NonBondedInteractionType* nbt; | 
| 183 |  |  | 
| 184 | < | for (nbt = nbiTypes.beginType(j); nbt != NULL; | 
| 185 | < | nbt = nbiTypes.nextType(j)) { | 
| 184 | > | for (nbt = nbiTypes->beginType(j); nbt != NULL; | 
| 185 | > | nbt = nbiTypes->nextType(j)) { | 
| 186 |  |  | 
| 187 |  | if (nbt->isLennardJones()) { | 
| 188 |  |  | 
| 230 |  |  | 
| 231 |  | // add it to the map: | 
| 232 |  | AtomTypeProperties atp = atomType->getATP(); | 
| 233 | < | std::pair<std::map<int,AtomType*>::iterator,bool> ret; | 
| 233 | > |  | 
| 234 | > | std::pair<std::map<int,AtomType*>::iterator,bool> ret; | 
| 235 |  | ret = LJMap.insert( std::pair<int, AtomType*>(atp.ident, atomType) ); | 
| 236 |  | if (ret.second == false) { | 
| 237 |  | sprintf( painCave.errMsg, | 
| 308 |  | RealType sigmai = mixer.sigmai; | 
| 309 |  | RealType epsilon = mixer.epsilon; | 
| 310 |  |  | 
| 311 | + |  | 
| 312 |  | ros = rij * sigmai; | 
| 313 |  |  | 
| 314 |  | getLJfunc(ros, myPot, myDeriv); | 
| 335 |  | f1 = d * dudr / rij; | 
| 336 |  |  | 
| 337 |  | return; | 
| 338 | + |  | 
| 339 |  | } | 
| 340 |  |  | 
| 341 |  | void LJ::do_lj_pair(int *atid1, int *atid2, RealType *d, RealType *rij, | 
| 357 |  | f1[0] = frc.x(); | 
| 358 |  | f1[1] = frc.y(); | 
| 359 |  | f1[2] = frc.z(); | 
| 360 | < |  | 
| 360 | > |  | 
| 361 |  | return; | 
| 362 |  | } | 
| 363 |  |  |