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

Comparing trunk/src/nonbonded/LJ.cpp (file contents):
Revision 1895 by gezelter, Mon Jul 1 21:09:37 2013 UTC vs.
Revision 2071 by gezelter, Sat Mar 7 21:41:51 2015 UTC

# Line 51 | Line 51 | namespace OpenMD {
51  
52   namespace OpenMD {
53  
54 <  LJ::LJ() : name_("LJ"), initialized_(false), forceField_(NULL) {}
54 >  LJ::LJ() : initialized_(false), forceField_(NULL), name_("LJ") {}
55  
56    RealType LJ::getSigma(AtomType* atomType1, AtomType* atomType2) {
57  
# Line 135 | Line 135 | namespace OpenMD {
135  
136  
137    void LJ::addType(AtomType* atomType){
138    LennardJonesAdapter lja1 = LennardJonesAdapter(atomType);
139
140    RealType sigma1 = lja1.getSigma();
141    RealType epsilon1 = lja1.getEpsilon();
138      
139      // add it to the map:
140      int atid = atomType->getIdent();
# Line 180 | Line 176 | namespace OpenMD {
176      }      
177    }
178    
179 <  void LJ::addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType sigma, RealType epsilon){
179 >  void LJ::addExplicitInteraction(AtomType* atype1, AtomType* atype2,
180 >                                  RealType sigma, RealType epsilon){
181      
182      LJInteractionData mixer;
183      mixer.sigma = sigma;
# Line 263 | Line 260 | namespace OpenMD {
260      
261      RealType dudr = *(idat.sw) * *(idat.vdwMult) * epsilon * (myDeriv -
262                                                                myDerivC)*sigmai;      
266    
263      (*(idat.pot))[VANDERWAALS_FAMILY] += *(idat.sw) * pot_temp;
264      *(idat.f1) += *(idat.d) * dudr / *(idat.rij);
265      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines