| 11 |
|
#include "fortranWrappers.hpp" |
| 12 |
|
|
| 13 |
|
|
| 14 |
+ |
void ForceFields::calcRcut( void ){ |
| 15 |
+ |
|
| 16 |
+ |
#ifdef IS_MPI |
| 17 |
+ |
double tempBig = bigSigma; |
| 18 |
+ |
MPI::COMM_WORLD.Allreduce( &tempBig, &bigSigma, 1, MPI_DOUBLE, MPI_MAX ); |
| 19 |
+ |
#endif //is_mpi |
| 20 |
+ |
|
| 21 |
+ |
//calc rCut and rList |
| 22 |
+ |
|
| 23 |
+ |
entry_plug->rCut = 2.5 bigSigma; |
| 24 |
+ |
if(entry_plug->rCut > (entry_plug->box_x / 2.0)) |
| 25 |
+ |
entry_plug->rCut = entry_plug->box_x / 2.0; |
| 26 |
+ |
if(entry_plug->rCut > (entry_plug->box_y / 2.0)) |
| 27 |
+ |
entry_plug->rCut = entry_plug->box_y / 2.0; |
| 28 |
+ |
if(entry_plug->rCut > (entry_plug->box_z / 2.0)) |
| 29 |
+ |
entry_plug->rCut = entry_plug->box_z / 2.0; |
| 30 |
+ |
|
| 31 |
+ |
entry_plug->rList = entry_plug->rCut + 1.0; |
| 32 |
+ |
|
| 33 |
+ |
} |
| 34 |
+ |
|
| 35 |
|
void ForceFields::doForces( int calcPot, int calcStress ){ |
| 36 |
|
|
| 37 |
|
int i, isError; |
| 52 |
|
entry_plug->atoms[i]->zeroForces(); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
< |
for(i=0; i<entry_plug->n_SRI; i++ ){ |
| 56 |
< |
entry_plug->sr_interactions[i]->calc_forces(); |
| 55 |
> |
for(i=0; i<entry_plug->n_mol; i++ ){ |
| 56 |
> |
entry_plug->molecules[i]->calc_forces(); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
frc = Atom::getFrcArray(); |