| 1 |
|
#include <cmath> |
| 2 |
+ |
#include <iostream> |
| 3 |
+ |
|
| 4 |
|
|
| 5 |
|
#ifdef IS_MPI |
| 6 |
|
#include <mpi++.h> |
| 164 |
|
ndf = ndfRaw - n_constraints - 3; |
| 165 |
|
kebar = kb * temperature * (double)ndf / ( 2.0 * (double)ndfRaw ); |
| 166 |
|
|
| 167 |
+ |
printf("Entered Velocitize\n"); |
| 168 |
|
for(vr = 0; vr < n_atoms; vr++){ |
| 169 |
|
|
| 170 |
|
// uses equipartition theory to solve for vbar in angstrom/fs |
| 202 |
|
x = drand48(); |
| 203 |
|
y = drand48(); |
| 204 |
|
vz = vbar * sqrt( -2.0 * log(x)) * cos(2 * M_PI * y); |
| 205 |
+ |
printf("Setting new velocities vx: %f\n",vx); |
| 206 |
|
#endif // use_spring |
| 207 |
|
|
| 208 |
|
#ifdef USE_SPRNG |