49 |
|
|
50 |
|
#include "brains/ForceManager.hpp" |
51 |
|
#include "primitives/Molecule.hpp" |
52 |
– |
#include "UseTheForce/doForces_interface.h" |
52 |
|
#define __OPENMD_C |
54 |
– |
#include "UseTheForce/DarkSide/fInteractionMap.h" |
53 |
|
#include "utils/simError.h" |
54 |
|
#include "primitives/Bond.hpp" |
55 |
|
#include "primitives/Bend.hpp" |
56 |
|
#include "primitives/Torsion.hpp" |
57 |
|
#include "primitives/Inversion.hpp" |
58 |
|
#include "parallel/ForceMatrixDecomposition.hpp" |
59 |
< |
//#include "parallel/ForceSerialDecomposition.hpp" |
59 |
> |
#include "nonbonded/NonBondedInteraction.hpp" |
60 |
|
|
61 |
|
using namespace std; |
62 |
|
namespace OpenMD { |
266 |
|
} |
267 |
|
|
268 |
|
//initialize data before passing to fortran |
269 |
< |
RealType longRangePotential[LR_POT_TYPES]; |
269 |
> |
RealType longRangePotential[N_INTERACTION_FAMILIES]; |
270 |
|
RealType lrPot = 0.0; |
271 |
|
int isError = 0; |
272 |
|
|
273 |
< |
for (int i=0; i<LR_POT_TYPES;i++){ |
273 |
> |
// dangerous to iterate over enums, but we'll live on the edge: |
274 |
> |
for (int i = NO_FAMILY; i != N_INTERACTION_FAMILIES; ++i){ |
275 |
|
longRangePotential[i]=0.0; //Initialize array |
276 |
|
} |
277 |
|
|
464 |
|
} |
465 |
|
} |
466 |
|
|
467 |
< |
for (int i=0; i<LR_POT_TYPES;i++){ |
467 |
> |
// dangerous to iterate over enums, but we'll live on the edge: |
468 |
> |
for (int i = NO_FAMILY; i != N_INTERACTION_FAMILIES; ++i){ |
469 |
|
lrPot += longRangePotential[i]; //Quick hack |
470 |
|
} |
471 |
|
|
472 |
|
//store the tau and long range potential |
473 |
|
curSnapshot->statData[Stats::LONG_RANGE_POTENTIAL] = lrPot; |
474 |
< |
curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VDW_POT]; |
475 |
< |
curSnapshot->statData[Stats::ELECTROSTATIC_POTENTIAL] = longRangePotential[ELECTROSTATIC_POT]; |
474 |
> |
curSnapshot->statData[Stats::VANDERWAALS_POTENTIAL] = longRangePotential[VANDERWAALS_FAMILY]; |
475 |
> |
curSnapshot->statData[Stats::ELECTROSTATIC_POTENTIAL] = longRangePotential[ELECTROSTATIC_FAMILY]; |
476 |
|
} |
477 |
|
|
478 |
|
|