| 10 |
|
#include "Integrator.hpp" |
| 11 |
|
#include "simError.h" |
| 12 |
|
|
| 13 |
+ |
|
| 14 |
|
// Basic non-isotropic thermostating and barostating via the Melchionna |
| 15 |
|
// modification of the Hoover algorithm: |
| 16 |
|
// |
| 24 |
|
// The NPTfm variant scales the molecular center-of-mass coordinates |
| 25 |
|
// instead of the atomic coordinates |
| 26 |
|
|
| 27 |
< |
NPTfm::NPTfm ( SimInfo *theInfo, ForceFields* the_ff): |
| 28 |
< |
Integrator( theInfo, the_ff ) |
| 27 |
> |
template<typename T> NPTfm<T>::NPTfm ( SimInfo *theInfo, ForceFields* the_ff): |
| 28 |
> |
T( theInfo, the_ff ) |
| 29 |
|
{ |
| 30 |
|
int i, j; |
| 31 |
|
chi = 0.0; |
| 40 |
|
have_target_pressure = 0; |
| 41 |
|
} |
| 42 |
|
|
| 43 |
< |
void NPTfm::moveA() { |
| 43 |
> |
template<typename T> void NPTfm<T>::moveA() { |
| 44 |
|
|
| 45 |
|
int i, j, k; |
| 46 |
|
DirectionalAtom* dAtom; |
| 247 |
|
} |
| 248 |
|
} |
| 249 |
|
|
| 250 |
< |
void NPTfm::moveB( void ){ |
| 250 |
> |
template<typename T> void NPTfm<T>::moveB( void ){ |
| 251 |
|
|
| 252 |
|
int i, j; |
| 253 |
|
DirectionalAtom* dAtom; |
| 329 |
|
} |
| 330 |
|
} |
| 331 |
|
|
| 332 |
< |
int NPTfm::readyCheck() { |
| 333 |
< |
|
| 332 |
> |
template<typename T> void NPTfm<T>::resetIntegrator() { |
| 333 |
> |
int i,j; |
| 334 |
> |
|
| 335 |
> |
chi = 0.0; |
| 336 |
> |
|
| 337 |
> |
for(i = 0; i < 3; i++) |
| 338 |
> |
for (j = 0; j < 3; j++) |
| 339 |
> |
eta[i][j] = 0.0; |
| 340 |
> |
} |
| 341 |
> |
|
| 342 |
> |
template<typename T> int NPTfm<T>::readyCheck() { |
| 343 |
> |
|
| 344 |
> |
//check parent's readyCheck() first |
| 345 |
> |
if (T::readyCheck() == -1) |
| 346 |
> |
return -1; |
| 347 |
> |
|
| 348 |
|
// First check to see if we have a target temperature. |
| 349 |
|
// Not having one is fatal. |
| 350 |
|
|