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

Comparing trunk/src/integrators/Integrator.cpp (file contents):
Revision 1782 by gezelter, Wed Aug 22 02:28:28 2012 UTC vs.
Revision 2071 by gezelter, Sat Mar 7 21:41:51 2015 UTC

# Line 35 | Line 35
35   *                                                                      
36   * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37   * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 < * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 49 | Line 49 | namespace OpenMD {
49  
50   namespace OpenMD {
51    Integrator::Integrator(SimInfo* info)
52 <    : info_(info), forceMan_(NULL) , needPotential(false), needStress(false),
53 <      needReset(false), velocitizer_(NULL), needVelocityScaling(false),
54 <      rnemd_(NULL), useRNEMD(false), rotAlgo_(NULL), flucQ_(NULL),
55 <      rattle_(NULL), dumpWriter(NULL), statWriter(NULL), thermo(info),
56 <      snap(info->getSnapshotManager()->getCurrentSnapshot()) {
52 >    : info_(info), forceMan_(NULL), rotAlgo_(NULL), flucQ_(NULL),
53 >      rattle_(NULL), velocitizer_(NULL), rnemd_(NULL),
54 >      needPotential(false), needStress(false),
55 >      needReset(false),  needVelocityScaling(false),
56 >      useRNEMD(false), dumpWriter(NULL), statWriter(NULL), thermo(info_),
57 >      snap(info_->getSnapshotManager()->getCurrentSnapshot()) {
58      
59      simParams = info->getSimParams();
60      
# Line 143 | Line 144 | namespace OpenMD {
144      
145      rotAlgo_ = new DLM();
146      rattle_ = new Rattle(info);
147 <    flucQ_ = new FluctuatingChargeLangevin(info);
147 >    if (simParams->getFluctuatingChargeParameters()->havePropagator()) {
148 >      std::string prop = toUpperCopy(simParams->getFluctuatingChargeParameters()->getPropagator());
149 >      if (prop.compare("NVT")==0){
150 >         flucQ_ = new FluctuatingChargeNVT(info);
151 >      } else if (prop.compare("LANGEVIN")==0) {
152 >         flucQ_ = new FluctuatingChargeLangevin(info);
153 >      } else {
154 >        sprintf(painCave.errMsg,
155 >                "Integrator Error: Unknown Fluctuating Charge propagator (%s) requested\n",
156 >                simParams->getFluctuatingChargeParameters()->getPropagator().c_str());
157 >        painCave.isFatal = 1;
158 >      }
159 >    }
160      flucQ_->setForceManager(forceMan_);
161    }
162    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines