11 |
|
|
12 |
|
// Basic thermostating via Hoover, Phys.Rev.A, 1985, Vol. 31 (5) 1695-1697 |
13 |
|
|
14 |
< |
NVT::NVT ( SimInfo *theInfo, ForceFields* the_ff): |
15 |
< |
Integrator( theInfo, the_ff ) |
14 |
> |
template<typename T> NVT<T>::NVT ( SimInfo *theInfo, ForceFields* the_ff): |
15 |
> |
T( theInfo, the_ff ) |
16 |
|
{ |
17 |
|
chi = 0.0; |
18 |
|
have_tau_thermostat = 0; |
19 |
|
have_target_temp = 0; |
20 |
|
} |
21 |
|
|
22 |
< |
void NVT::moveA() { |
22 |
> |
template<typename T> void NVT<T>::moveA() { |
23 |
|
|
24 |
|
int i, j; |
25 |
|
DirectionalAtom* dAtom; |
102 |
|
} |
103 |
|
} |
104 |
|
|
105 |
< |
void NVT::moveB( void ){ |
105 |
> |
template<typename T> void NVT<T>::moveB( void ){ |
106 |
|
int i, j; |
107 |
|
DirectionalAtom* dAtom; |
108 |
|
double Tb[3], ji[3]; |
149 |
|
} |
150 |
|
} |
151 |
|
|
152 |
< |
int NVT::readyCheck() { |
153 |
< |
|
152 |
> |
template<typename T> void NVT<T>::resetIntegrator( void ){ |
153 |
> |
|
154 |
> |
chi = 0.0; |
155 |
> |
} |
156 |
> |
|
157 |
> |
template<typename T> int NVT<T>::readyCheck() { |
158 |
> |
|
159 |
> |
//check parent's readyCheck() first |
160 |
> |
if (T::readyCheck() == -1) |
161 |
> |
return -1; |
162 |
> |
|
163 |
|
// First check to see if we have a target temperature. |
164 |
|
// Not having one is fatal. |
165 |
|
|
184 |
|
} |
185 |
|
return 1; |
186 |
|
} |
178 |
– |
|