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

Comparing trunk/src/restraints/ThermoIntegrationForceManager.cpp (file contents):
Revision 437 by chrisfen, Sat Mar 12 19:05:16 2005 UTC vs.
Revision 998 by chrisfen, Mon Jul 3 13:18:43 2006 UTC

# Line 1 | Line 1
1 < /*
1 > /*
2   * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved.
3   *
4   * The University of Notre Dame grants you ("Licensee") a
# Line 51 | Line 51 | namespace oopse {
51   namespace oopse {
52    
53    ThermoIntegrationForceManager::ThermoIntegrationForceManager(SimInfo* info):
54 <  ForceManager(info){
55 <    currSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
56 <    simParam = info_->getSimParams();
54 >    ForceManager(info){
55 >      currSnapshot_ = info_->getSnapshotManager()->getCurrentSnapshot();
56 >      simParam = info_->getSimParams();
57      
58 <    if (simParam->haveThermIntLambda()){
59 <      tIntLambda_ = simParam->getThermIntLambda();
60 <    }
61 <    else{
62 <      tIntLambda_ = 1.0;
63 <      sprintf(painCave.errMsg,
64 <              "ThermoIntegration error: the transformation parameter (lambda) was\n"
65 <              "\tnot specified. OOPSE will use a default value of %f. To set\n"
66 <              "\tlambda, use the thermodynamicIntegrationLambda variable.\n",
67 <              tIntLambda_);
68 <      painCave.isFatal = 0;
69 <      simError();
70 <    }
58 >      if (simParam->haveThermodynamicIntegrationLambda()){
59 >        tIntLambda_ = simParam->getThermodynamicIntegrationLambda();
60 >      }
61 >      else{
62 >        tIntLambda_ = 1.0;
63 >        sprintf(painCave.errMsg,
64 >                "ThermoIntegration error: the transformation parameter\n"
65 >                "\t(lambda) was not specified. OOPSE will use a default\n"
66 >                "\tvalue of %f. To set lambda, use the \n"
67 >                "\tthermodynamicIntegrationLambda variable.\n",
68 >                tIntLambda_);
69 >        painCave.isFatal = 0;
70 >        simError();
71 >      }
72      
73 <    if (simParam->haveThermIntK()){
74 <      tIntK_ = simParam->getThermIntK();
75 <    }
76 <    else{
77 <      tIntK_ = 1.0;
78 <      sprintf(painCave.errMsg,
79 <              "ThermoIntegration Warning: the tranformation parameter exponent\n"
80 <              "\t(k) was not specified. OOPSE will use a default value of %f.\n"
81 <              "\tTo set k, use the thermodynamicIntegrationK variable.\n",
82 <              tIntK_);
83 <      painCave.isFatal = 0;
84 <      simError();      
85 <    }
73 >      if (simParam->haveThermodynamicIntegrationK()){
74 >        tIntK_ = simParam->getThermodynamicIntegrationK();
75 >      }
76 >      else{
77 >        tIntK_ = 1.0;
78 >        sprintf(painCave.errMsg,
79 >                "ThermoIntegration Warning: the tranformation parameter\n"
80 >                "\texponent (k) was not specified. OOPSE will use a default\n"
81 >                "\tvalue of %f. To set k, use the thermodynamicIntegrationK\n"
82 >                "\tvariable.\n",
83 >                tIntK_);
84 >        painCave.isFatal = 0;
85 >        simError();      
86 >      }
87      
88 <    if (simParam->getUseSolidThermInt()) {
89 <      // build a restraint object
90 <      restraint_ =  new Restraints(info_, tIntLambda_, tIntK_);
88 >      if (simParam->getUseSolidThermInt()) {
89 >        // build a restraint object
90 >        restraint_ =  new Restraints(info_, tIntLambda_, tIntK_);
91        
92 <    }
92 >      }
93      
94 <    // build the scaling factor used to modulate the forces and torques
95 <    factor_ = pow(tIntLambda_, tIntK_);
94 >      // build the scaling factor used to modulate the forces and torques
95 >      factor_ = pow(tIntLambda_, tIntK_);
96  
97 <  }
97 >    }
98    
99    ThermoIntegrationForceManager::~ThermoIntegrationForceManager(){
100    }
# Line 144 | Line 146 | namespace oopse {
146      tempTau = curSnapshot->statData.getTau();
147      tempTau *= factor_;
148      curSnapshot->statData.setTau(tempTau);
149 <
149 >  
150      // do crystal restraint forces for thermodynamic integration
151      if (simParam->getUseSolidThermInt()) {
152        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines