| 3 |
|
using namespace std; |
| 4 |
|
|
| 5 |
|
|
| 6 |
< |
#include <cstdlib> |
| 6 |
> |
#include <stdlib.h> |
| 7 |
|
|
| 8 |
|
#ifdef IS_MPI |
| 9 |
|
#include <mpi.h> |
| 10 |
|
#endif // is_mpi |
| 11 |
|
|
| 12 |
|
|
| 13 |
+ |
#ifdef PROFILE |
| 14 |
+ |
#include "mdProfile.hpp" |
| 15 |
+ |
#endif |
| 16 |
+ |
|
| 17 |
|
#include "simError.h" |
| 18 |
|
#include "ForceFields.hpp" |
| 19 |
|
#include "Atom.hpp" |
| 30 |
|
|
| 31 |
|
//calc rCut and rList |
| 32 |
|
|
| 33 |
< |
entry_plug->setRcut( 2.5 * bigSigma ); |
| 33 |
> |
entry_plug->setDefaultRcut( 2.5 * bigSigma ); |
| 34 |
|
|
| 35 |
|
} |
| 36 |
|
|
| 42 |
|
double* trq; |
| 43 |
|
double* A; |
| 44 |
|
double* u_l;; |
| 41 |
– |
DirectionalAtom* dAtom; |
| 45 |
|
SimState* config; |
| 46 |
|
|
| 47 |
|
short int passedCalcPot = (short int)calcPot; |
| 54 |
|
entry_plug->atoms[i]->zeroForces(); |
| 55 |
|
} |
| 56 |
|
|
| 57 |
+ |
#ifdef PROFILE |
| 58 |
+ |
startProfile(pro7); |
| 59 |
+ |
#endif |
| 60 |
+ |
|
| 61 |
|
for(i=0; i<entry_plug->n_mol; i++ ){ |
| 62 |
|
entry_plug->molecules[i].calcForces(); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
+ |
#ifdef PROFILE |
| 66 |
+ |
endProfile( pro7 ); |
| 67 |
+ |
#endif |
| 68 |
+ |
|
| 69 |
|
config = entry_plug->getConfiguration(); |
| 70 |
|
|
| 71 |
|
frc = config->getFrcArray(); |
| 81 |
|
entry_plug->tau[i] = 0.0; |
| 82 |
|
} |
| 83 |
|
|
| 84 |
+ |
|
| 85 |
+ |
#ifdef PROFILE |
| 86 |
+ |
startProfile(pro8); |
| 87 |
+ |
#endif |
| 88 |
+ |
|
| 89 |
|
fortranForceLoop( pos, |
| 90 |
|
A, |
| 91 |
|
u_l, |
| 97 |
|
&passedCalcStress, |
| 98 |
|
&isError ); |
| 99 |
|
|
| 100 |
+ |
#ifdef PROFILE |
| 101 |
+ |
endProfile(pro8); |
| 102 |
+ |
#endif |
| 103 |
+ |
|
| 104 |
+ |
|
| 105 |
|
if( isError ){ |
| 106 |
|
sprintf( painCave.errMsg, |
| 107 |
|
"Error returned from the fortran force calculation.\n" ); |