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

Comparing trunk/src/restraints/Restraints.cpp (file contents):
Revision 507 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 963 by tim, Wed May 17 21:51:42 2006 UTC

# Line 53 | Line 53 | namespace oopse {
53  
54   namespace oopse {
55    
56 <  Restraints::Restraints(SimInfo* info, double lambdaVal, double lambdaExp){
56 >  Restraints::Restraints(SimInfo* info, RealType lambdaVal, RealType lambdaExp){
57      info_ = info;
58      Globals* simParam = info_->getSimParams();
59  
# Line 61 | Line 61 | namespace oopse {
61      lambdaK = lambdaExp;
62      
63      if (simParam->getUseSolidThermInt()) {
64 <      if (simParam->haveDistSpringConst()) {
65 <        kDist = simParam->getDistSpringConst();
64 >      if (simParam->haveThermIntDistSpringConst()) {
65 >        kDist = simParam->getThermIntDistSpringConst();
66        }
67        else{
68 <        kDist = 6.0;
68 >        kDist = simParam->getThermIntDistSpringConst();
69          sprintf(painCave.errMsg,
70                  "ThermoIntegration Warning: the spring constant for the\n"
71                  "\ttranslational restraint was not specified. OOPSE will use\n"
# Line 75 | Line 75 | namespace oopse {
75          painCave.isFatal = 0;
76          simError();
77        }
78 <      if (simParam->haveThetaSpringConst()) {
79 <        kTheta = simParam->getThetaSpringConst();
78 >      if (simParam->haveThermIntThetaSpringConst()) {
79 >        kTheta = simParam->getThermIntThetaSpringConst();
80        }
81        else{
82 <        kTheta = 7.5;
82 >        kTheta = simParam->getThermIntThetaSpringConst();
83          sprintf(painCave.errMsg,
84                  "ThermoIntegration Warning: the spring constant for the\n"
85                  "\tdeflection orientational restraint was not specified.\n"
# Line 89 | Line 89 | namespace oopse {
89          painCave.isFatal = 0;
90          simError();
91        }
92 <      if (simParam->haveOmegaSpringConst()) {
93 <        kOmega = simParam->getOmegaSpringConst();
92 >      if (simParam->haveThermIntOmegaSpringConst()) {
93 >        kOmega = simParam->getThermIntOmegaSpringConst();
94        }
95        else{
96 <        kOmega = 13.5;
96 >        kOmega = simParam->getThermIntOmegaSpringConst();
97          sprintf(painCave.errMsg,
98                  "ThermoIntegration Warning: the spring constant for the\n"
99                  "\tspin orientational restraint was not specified. OOPSE\n"
# Line 119 | Line 119 | namespace oopse {
119    Restraints::~Restraints(){
120    }
121    
122 <  void Restraints::Calc_rVal(Vector3d &position, double refPosition[3]){
122 >  void Restraints::Calc_rVal(Vector3d &position, RealType refPosition[3]){
123      delRx = position.x() - refPosition[0];
124      delRy = position.y() - refPosition[1];
125      delRz = position.z() - refPosition[2];
# Line 127 | Line 127 | namespace oopse {
127      return;
128    }
129    
130 <  void Restraints::Calc_body_thetaVal(RotMat3x3d &matrix, double refUnit[3]){
130 >  void Restraints::Calc_body_thetaVal(RotMat3x3d &matrix, RealType refUnit[3]){
131      ub0x = matrix(0,0)*refUnit[0] + matrix(0,1)*refUnit[1]
132        + matrix(0,2)*refUnit[2];
133      ub0y = matrix(1,0)*refUnit[0] + matrix(1,1)*refUnit[1]
# Line 146 | Line 146 | namespace oopse {
146      return;
147    }
148    
149 <  void Restraints::Calc_body_omegaVal(double zAngle){
150 <    double zRotator[3][3];
151 <    double tempOmega;
152 <    double wholeTwoPis;
149 >  void Restraints::Calc_body_omegaVal(RealType zAngle){
150 >    RealType zRotator[3][3];
151 >    RealType tempOmega;
152 >    RealType wholeTwoPis;
153      // Use the omega accumulated from the rotation propagation
154      omega = zAngle;
155      
# Line 185 | Line 185 | namespace oopse {
185      return;
186    }
187    
188 <  double Restraints::Calc_Restraint_Forces(){
188 >  RealType Restraints::Calc_Restraint_Forces(){
189      SimInfo::MoleculeIterator mi;
190      Molecule* mol;
191      Molecule::IntegrableObjectIterator ii;
192      StuntDouble* integrableObject;
193      Vector3d pos;
194      RotMat3x3d A;
195 <    double refPos[3];
196 <    double refVec[3];
197 <    double tolerance;
198 <    double tempPotent;
199 <    double factor;
200 <    double spaceTrq[3];
201 <    double omegaPass;
195 >    RealType refPos[3];
196 >    RealType refVec[3];
197 >    RealType tolerance;
198 >    RealType tempPotent;
199 >    RealType factor;
200 >    RealType spaceTrq[3];
201 >    RealType omegaPass;
202      GenericData* data;
203      DoubleGenericData* doubleData;
204      

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines