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

Comparing branches/development/src/brains/ForceManager.cpp (file contents):
Revision 1467 by gezelter, Sat Jul 17 15:33:03 2010 UTC vs.
Revision 1480 by gezelter, Mon Jul 26 19:50:53 2010 UTC

# Line 57 | Line 57
57   #include "primitives/Bend.hpp"
58   #include "primitives/Torsion.hpp"
59   #include "primitives/Inversion.hpp"
60 #include "nonbonded/LJ.hpp"
60  
61   namespace OpenMD {
62 +  
63 +  ForceManager::ForceManager(SimInfo * info) : info_(info),
64 +                                               NBforcesInitialized_(false) {
65 +    lj_ = LJ::Instance();
66 +    lj_->setForceField(info_->getForceField());
67  
68 +    eam_ = EAM::Instance();
69 +    eam_->setForceField(info_->getForceField());
70 +  }
71 +
72    void ForceManager::calcForces() {
73      
74      if (!info_->isFortranInitialized()) {
75        info_->update();
76      }
77      
70    if (!NBforcesInitialized_) {
71      LJ* lj = new LJ(info_->getForceField());
72      lj->initialize();
73    }
74
78      preCalculation();
79      
80      calcShortRangeInteraction();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines