| 4 |
|
#include "Integrator.hpp" |
| 5 |
|
#include "Thermo.hpp" |
| 6 |
|
#include "ReadWrite.hpp" |
| 7 |
+ |
#include "ForceFields.hpp" |
| 8 |
+ |
#include "simError.h" |
| 9 |
|
|
| 8 |
– |
|
| 10 |
|
extern "C"{ |
| 11 |
|
|
| 12 |
|
void v_constrain_a_( double &dt, int &n_atoms, double* mass, |
| 35 |
|
isFirst = 1; |
| 36 |
|
|
| 37 |
|
srInteractions = entry_plug->sr_interactions; |
| 37 |
– |
longRange = entry_plug->longRange; |
| 38 |
|
nSRI = entry_plug->n_SRI; |
| 39 |
|
|
| 40 |
|
// give a little love back to the SimInfo object |
| 120 |
|
double dt2; // half the dt |
| 121 |
|
|
| 122 |
|
double vx, vy, vz; // the velocities |
| 123 |
< |
double vx2, vy2, vz2; // the square of the velocities |
| 123 |
> |
// double vx2, vy2, vz2; // the square of the velocities |
| 124 |
|
double rx, ry, rz; // the postitions |
| 125 |
|
|
| 126 |
|
double ji[3]; // the body frame angular momentum |
| 141 |
|
int sample_n = (int)( sampleTime / dt ); |
| 142 |
|
int status_n = (int)( statusTime / dt ); |
| 143 |
|
int vel_n = (int)( thermalTime / dt ); |
| 144 |
+ |
|
| 145 |
+ |
// ForceFields *ff = entry_plug-> |
| 146 |
|
|
| 147 |
|
Thermo *tStats = new Thermo( entry_plug ); |
| 148 |
|
|
| 149 |
|
StatWriter* e_out = new StatWriter( entry_plug ); |
| 150 |
|
DumpWriter* dump_out = new DumpWriter( entry_plug ); |
| 151 |
|
|
| 150 |
– |
|
| 152 |
|
Atom** atoms = entry_plug->atoms; |
| 153 |
|
DirectionalAtom* dAtom; |
| 154 |
|
dt2 = 0.5 * dt; |
| 155 |
|
|
| 156 |
|
// initialize the forces the before the first step |
| 157 |
|
|
| 158 |
+ |
|
| 159 |
|
|
| 160 |
|
for(i = 0; i < nAtoms; i++){ |
| 161 |
|
atoms[i]->zeroForces(); |
| 494 |
|
atoms[i]->set_vy( vy ); |
| 495 |
|
atoms[i]->set_vz( vz ); |
| 496 |
|
|
| 497 |
< |
vx2 = vx * vx; |
| 498 |
< |
vy2 = vy * vy; |
| 499 |
< |
vz2 = vz * vz; |
| 497 |
> |
// vx2 = vx * vx; |
| 498 |
> |
// vy2 = vy * vy; |
| 499 |
> |
// vz2 = vz * vz; |
| 500 |
|
|
| 501 |
|
if( atoms[i]->isDirectional() ){ |
| 502 |
|
|