26 |
|
#define NPTxyz_ENS 4 |
27 |
|
|
28 |
|
|
29 |
< |
#define FF_DUFF 0 |
30 |
< |
#define FF_LJ 1 |
31 |
< |
#define FF_EAM 2 |
32 |
< |
#define FF_H2O 3 |
29 |
> |
#define FF_DUFF 0 |
30 |
> |
#define FF_LJ 1 |
31 |
> |
#define FF_EAM 2 |
32 |
> |
#define FF_H2O 3 |
33 |
> |
#define FF_SHAPES 4 |
34 |
|
|
35 |
|
using namespace std; |
36 |
|
using namespace oopse; |
716 |
|
else if (!strcasecmp(force_field, "WATER")){ |
717 |
|
ffCase = FF_H2O; |
718 |
|
} |
719 |
+ |
else if (!strcasecmp(force_field, "SHAPES")){ |
720 |
+ |
ffCase = FF_SHAPES; |
721 |
+ |
} |
722 |
|
else{ |
723 |
|
sprintf(painCave.errMsg, "SimSetup Error. Unrecognized force field -> %s\n", |
724 |
|
force_field); |
725 |
< |
painCave.isFatal = 1; |
726 |
< |
simError(); |
725 |
> |
painCave.isFatal = 1; |
726 |
> |
simError(); |
727 |
|
} |
728 |
|
if (globals->haveForceFieldVariant()) { |
729 |
< |
strcpy(forcefield_variant, globals->getForceFieldVariant()); |
729 |
> |
forcefield_variant = globals->getForceFieldVariant(); |
730 |
|
has_forcefield_variant = 1; |
731 |
|
} |
732 |
|
|
913 |
|
} |
914 |
|
|
915 |
|
for (i = 0; i < nInfo; i++) { |
912 |
– |
// get the mixing rule |
913 |
– |
|
914 |
– |
strcpy(info[i].mixingRule, globals->getMixingRule()); |
916 |
|
info[i].usePBC = globals->getPBC(); |
917 |
|
} |
918 |
|
|
1263 |
|
the_ff = new WATER(); |
1264 |
|
break; |
1265 |
|
|
1266 |
+ |
case FF_SHAPES: |
1267 |
+ |
the_ff = new Shapes_FF(); |
1268 |
+ |
break; |
1269 |
+ |
|
1270 |
|
default: |
1271 |
|
sprintf(painCave.errMsg, |
1272 |
|
"SimSetup Error. Unrecognized force field in case statement.\n"); |
1770 |
|
void SimSetup::initFortran(void){ |
1771 |
|
info[0].refreshSim(); |
1772 |
|
|
1773 |
< |
if (!strcmp(info[0].mixingRule, "standard")){ |
1769 |
< |
the_ff->initForceField(LB_MIXING_RULE); |
1770 |
< |
} |
1771 |
< |
else if (!strcmp(info[0].mixingRule, "explicit")){ |
1772 |
< |
the_ff->initForceField(EXPLICIT_MIXING_RULE); |
1773 |
< |
} |
1774 |
< |
else{ |
1775 |
< |
sprintf(painCave.errMsg, "SimSetup Error: unknown mixing rule -> \"%s\"\n", |
1776 |
< |
info[0].mixingRule); |
1777 |
< |
painCave.isFatal = 1; |
1778 |
< |
simError(); |
1779 |
< |
} |
1773 |
> |
the_ff->initForceField(); |
1774 |
|
|
1781 |
– |
|
1775 |
|
#ifdef IS_MPI |
1776 |
< |
strcpy(checkPointMsg, "Successfully intialized the mixingRule for Fortran."); |
1776 |
> |
strcpy(checkPointMsg, "Successfully intialized the fortran portion of the force field."); |
1777 |
|
MPIcheckPoint(); |
1778 |
|
#endif // is_mpi |
1779 |
|
} |