| 193 |
|
simError(); |
| 194 |
|
} |
| 195 |
|
|
| 196 |
< |
for(i=0; i<entry_plug->n_mol; i++ ){ |
| 197 |
< |
entry_plug->molecules[i].atoms2rigidBodies(); |
| 198 |
< |
} |
| 199 |
< |
|
| 200 |
< |
|
| 201 |
< |
if (entry_plug->useThermInt) { |
| 202 |
< |
myStunts = entry_plug->integrableObjects; |
| 203 |
< |
|
| 196 |
> |
if (entry_plug->useSolidThermInt && !entry_plug->useLiquidThermInt) { |
| 197 |
> |
|
| 198 |
|
factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK); |
| 199 |
< |
for (i=0; i < myStunts.size(); i++) { |
| 199 |
> |
for (i=0; i < entry_plug->n_atoms; i++) { |
| 200 |
|
for (j=0; j< 3; j++) |
| 201 |
|
frc[3*i + j] *= factor; |
| 202 |
< |
if (myStunts[i]->isDirectional()) { |
| 202 |
> |
if (entry_plug->atoms[i]->isDirectional()) { |
| 203 |
|
for (j=0; j< 3; j++) |
| 204 |
|
trq[3*i + j] *= factor; |
| 205 |
|
} |
| 206 |
|
} |
| 207 |
|
entry_plug->vRaw = entry_plug->lrPot; |
| 208 |
|
entry_plug->lrPot *= factor; |
| 209 |
< |
entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(myStunts); |
| 209 |
> |
entry_plug->lrPot += entry_plug->restraint->Calc_Restraint_Forces(entry_plug->integrableObjects); |
| 210 |
|
entry_plug->vHarm = entry_plug->restraint->getVharm(); |
| 211 |
+ |
} |
| 212 |
+ |
|
| 213 |
+ |
if (entry_plug->useLiquidThermInt) { |
| 214 |
+ |
|
| 215 |
+ |
factor = pow(entry_plug->thermIntLambda, entry_plug->thermIntK); |
| 216 |
+ |
for (i=0; i < entry_plug->n_atoms; i++) { |
| 217 |
+ |
for (j=0; j< 3; j++) |
| 218 |
+ |
frc[3*i + j] *= factor; |
| 219 |
+ |
if (entry_plug->atoms[i]->isDirectional()) { |
| 220 |
+ |
for (j=0; j< 3; j++) |
| 221 |
+ |
trq[3*i + j] *= factor; |
| 222 |
+ |
} |
| 223 |
+ |
} |
| 224 |
+ |
entry_plug->vRaw = entry_plug->lrPot; |
| 225 |
+ |
entry_plug->lrPot *= factor; |
| 226 |
|
} |
| 227 |
|
|
| 228 |
+ |
for(i=0; i<entry_plug->n_mol; i++ ){ |
| 229 |
+ |
entry_plug->molecules[i].atoms2rigidBodies(); |
| 230 |
+ |
} |
| 231 |
+ |
|
| 232 |
+ |
|
| 233 |
|
#ifdef IS_MPI |
| 234 |
|
sprintf( checkPointMsg, |
| 235 |
|
"returned from the force calculation.\n" ); |
| 264 |
|
|
| 265 |
|
|
| 266 |
|
void ForceFields::initRestraints(){ |
| 267 |
< |
|
| 267 |
> |
int i; |
| 268 |
|
// store the initial info. |
| 269 |
< |
entry_plug->restraint->Store_Init_Info(); |
| 269 |
> |
// set the omega values to zero |
| 270 |
> |
for (i=0; i<entry_plug->integrableObjects.size(); i++) |
| 271 |
> |
entry_plug->integrableObjects[i]->setZangle( 0.0 ); |
| 272 |
|
|
| 273 |
+ |
entry_plug->restraint->Store_Init_Info(entry_plug->integrableObjects); |
| 274 |
+ |
|
| 275 |
|
} |
| 276 |
|
|
| 277 |
|
void ForceFields::dumpzAngle(){ |
| 278 |
|
|
| 279 |
|
// store the initial info. |
| 280 |
< |
entry_plug->restraint->Write_zAngle_File(); |
| 280 |
> |
entry_plug->restraint->Write_zAngle_File(entry_plug->integrableObjects); |
| 281 |
|
|
| 282 |
|
} |