ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/LJ.cpp
(Generate patch)

Comparing branches/development/src/nonbonded/LJ.cpp (file contents):
Revision 1472 by gezelter, Mon Jul 19 20:42:55 2010 UTC vs.
Revision 1473 by gezelter, Tue Jul 20 15:43:00 2010 UTC

# Line 107 | Line 107 | namespace OpenMD {
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()) {
# Line 142 | Line 143 | namespace OpenMD {
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()) {
# Line 228 | Line 230 | namespace OpenMD {
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,
# Line 305 | Line 308 | namespace OpenMD {
308      RealType sigmai = mixer.sigmai;
309      RealType epsilon = mixer.epsilon;
310      
311 +
312      ros = rij * sigmai;
313  
314      getLJfunc(ros, myPot, myDeriv);
# Line 331 | Line 335 | namespace OpenMD {
335      f1 = d * dudr / rij;
336  
337      return;
338 +
339 +
340 +
341    }
342  
343    void LJ::do_lj_pair(int *atid1, int *atid2, RealType *d, RealType *rij,
# Line 352 | Line 359 | namespace OpenMD {
359      f1[0] = frc.x();
360      f1[1] = frc.y();
361      f1[2] = frc.z();
362 <    
362 >
363      return;    
364    }
365    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines