| 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 | 
| 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->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 | > | } | 
| 71 |  |  | 
| 72 | < | if (simParam->haveThermIntK()){ | 
| 73 | < | tIntK_ = simParam->getThermIntK(); | 
| 74 | < | } | 
| 75 | < | else{ | 
| 76 | < | tIntK_ = 1.0; | 
| 77 | < | sprintf(painCave.errMsg, | 
| 78 | < | "ThermoIntegration Warning: the tranformation parameter exponent\n" | 
| 79 | < | "\t(k) was not specified. OOPSE will use a default value of %f.\n" | 
| 80 | < | "\tTo set k, use the thermodynamicIntegrationK variable.\n", | 
| 81 | < | tIntK_); | 
| 82 | < | painCave.isFatal = 0; | 
| 83 | < | simError(); | 
| 84 | < | } | 
| 72 | > | if (simParam->haveThermIntK()){ | 
| 73 | > | tIntK_ = simParam->getThermIntK(); | 
| 74 | > | } | 
| 75 | > | else{ | 
| 76 | > | tIntK_ = 1.0; | 
| 77 | > | sprintf(painCave.errMsg, | 
| 78 | > | "ThermoIntegration Warning: the tranformation parameter exponent\n" | 
| 79 | > | "\t(k) was not specified. OOPSE will use a default value of %f.\n" | 
| 80 | > | "\tTo set k, use the thermodynamicIntegrationK variable.\n", | 
| 81 | > | tIntK_); | 
| 82 | > | painCave.isFatal = 0; | 
| 83 | > | simError(); | 
| 84 | > | } | 
| 85 |  |  | 
| 86 | < | if (simParam->getUseSolidThermInt()) { | 
| 87 | < | // build a restraint object | 
| 88 | < | restraint_ =  new Restraints(info_, tIntLambda_, tIntK_); | 
| 86 | > | if (simParam->getUseSolidThermInt()) { | 
| 87 | > | // build a restraint object | 
| 88 | > | restraint_ =  new Restraints(info_, tIntLambda_, tIntK_); | 
| 89 |  |  | 
| 90 | < | } | 
| 90 | > | } | 
| 91 |  |  | 
| 92 | < | // build the scaling factor used to modulate the forces and torques | 
| 93 | < | factor_ = pow(tIntLambda_, tIntK_); | 
| 92 | > | // build the scaling factor used to modulate the forces and torques | 
| 93 | > | factor_ = pow(tIntLambda_, tIntK_); | 
| 94 |  |  | 
| 95 | < | } | 
| 95 | > | } | 
| 96 |  |  | 
| 97 |  | ThermoIntegrationForceManager::~ThermoIntegrationForceManager(){ | 
| 98 |  | } |