| 4 |
|
#include <math.h> |
| 5 |
|
#include <string> |
| 6 |
|
#include <sprng.h> |
| 7 |
< |
#include "SimSetup.hpp" |
| 8 |
< |
#include "ReadWrite.hpp" |
| 9 |
< |
#include "parse_me.h" |
| 10 |
< |
#include "Integrator.hpp" |
| 11 |
< |
#include "simError.h" |
| 12 |
< |
#include "RigidBody.hpp" |
| 13 |
< |
#include "OOPSEMinimizer.hpp" |
| 7 |
> |
#include "brains/SimSetup.hpp" |
| 8 |
> |
#include "io/ReadWrite.hpp" |
| 9 |
> |
#include "io/parse_me.h" |
| 10 |
> |
#include "integrators/Integrator.hpp" |
| 11 |
> |
#include "utils/simError.h" |
| 12 |
> |
#include "primitives/RigidBody.hpp" |
| 13 |
> |
#include "minimizers/OOPSEMinimizer.hpp" |
| 14 |
|
|
| 15 |
|
#ifdef IS_MPI |
| 16 |
< |
#include "mpiBASS.h" |
| 17 |
< |
#include "mpiSimulation.hpp" |
| 16 |
> |
#include "io/mpiBASS.h" |
| 17 |
> |
#include "brains/mpiSimulation.hpp" |
| 18 |
|
#endif |
| 19 |
|
|
| 20 |
|
// some defines for ensemble and Forcefield cases |
| 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; |
| 37 |
|
|
| 38 |
|
/** |
| 39 |
|
* Check whether dividend is divisble by divisor or not |
| 715 |
|
} |
| 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++) { |
| 911 |
– |
// get the mixing rule |
| 912 |
– |
|
| 913 |
– |
strcpy(info[i].mixingRule, globals->getMixingRule()); |
| 916 |
|
info[i].usePBC = globals->getPBC(); |
| 917 |
|
} |
| 918 |
|
|
| 1195 |
|
info[k].finalName = prefix + ".eor"; |
| 1196 |
|
info[k].sampleName = prefix + ".dump"; |
| 1197 |
|
info[k].statusName = prefix + ".stat"; |
| 1198 |
+ |
|
| 1199 |
+ |
if (info[k].useSolidThermInt && !info[k].useLiquidThermInt) |
| 1200 |
+ |
info[k].zAngleName = prefix + ".ang"; |
| 1201 |
|
|
| 1202 |
|
#ifdef IS_MPI |
| 1203 |
|
|
| 1266 |
|
the_ff = new WATER(); |
| 1267 |
|
break; |
| 1268 |
|
|
| 1269 |
+ |
case FF_SHAPES: |
| 1270 |
+ |
the_ff = new Shapes_FF(); |
| 1271 |
+ |
break; |
| 1272 |
+ |
|
| 1273 |
|
default: |
| 1274 |
|
sprintf(painCave.errMsg, |
| 1275 |
|
"SimSetup Error. Unrecognized force field in case statement.\n"); |
| 1773 |
|
void SimSetup::initFortran(void){ |
| 1774 |
|
info[0].refreshSim(); |
| 1775 |
|
|
| 1776 |
< |
if (!strcmp(info[0].mixingRule, "standard")){ |
| 1768 |
< |
the_ff->initForceField(LB_MIXING_RULE); |
| 1769 |
< |
} |
| 1770 |
< |
else if (!strcmp(info[0].mixingRule, "explicit")){ |
| 1771 |
< |
the_ff->initForceField(EXPLICIT_MIXING_RULE); |
| 1772 |
< |
} |
| 1773 |
< |
else{ |
| 1774 |
< |
sprintf(painCave.errMsg, "SimSetup Error: unknown mixing rule -> \"%s\"\n", |
| 1775 |
< |
info[0].mixingRule); |
| 1776 |
< |
painCave.isFatal = 1; |
| 1777 |
< |
simError(); |
| 1778 |
< |
} |
| 1776 |
> |
the_ff->initForceField(); |
| 1777 |
|
|
| 1780 |
– |
|
| 1778 |
|
#ifdef IS_MPI |
| 1779 |
< |
strcpy(checkPointMsg, "Successfully intialized the mixingRule for Fortran."); |
| 1779 |
> |
strcpy(checkPointMsg, "Successfully intialized the fortran portion of the force field."); |
| 1780 |
|
MPIcheckPoint(); |
| 1781 |
|
#endif // is_mpi |
| 1782 |
|
} |
| 1787 |
|
|
| 1788 |
|
if (globals->haveZconstraintTime()){ |
| 1789 |
|
//add sample time of z-constraint into SimInfo's property list |
| 1790 |
< |
DoubleData* zconsTimeProp = new DoubleData(); |
| 1790 |
> |
DoubleGenericData* zconsTimeProp = new DoubleGenericData(); |
| 1791 |
|
zconsTimeProp->setID(ZCONSTIME_ID); |
| 1792 |
|
zconsTimeProp->setData(globals->getZconsTime()); |
| 1793 |
|
theInfo.addProperty(zconsTimeProp); |
| 1802 |
|
|
| 1803 |
|
//push zconsTol into siminfo, if user does not specify |
| 1804 |
|
//value for zconsTol, a default value will be used |
| 1805 |
< |
DoubleData* zconsTol = new DoubleData(); |
| 1805 |
> |
DoubleGenericData* zconsTol = new DoubleGenericData(); |
| 1806 |
|
zconsTol->setID(ZCONSTOL_ID); |
| 1807 |
|
if (globals->haveZconsTol()){ |
| 1808 |
|
zconsTol->setData(globals->getZconsTol()); |
| 1822 |
|
theInfo.addProperty(zconsTol); |
| 1823 |
|
|
| 1824 |
|
//set Force Subtraction Policy |
| 1825 |
< |
StringData* zconsForcePolicy = new StringData(); |
| 1825 |
> |
StringGenericData* zconsForcePolicy = new StringGenericData(); |
| 1826 |
|
zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID); |
| 1827 |
|
|
| 1828 |
|
if (globals->haveZconsForcePolicy()){ |
| 1841 |
|
theInfo.addProperty(zconsForcePolicy); |
| 1842 |
|
|
| 1843 |
|
//set zcons gap |
| 1844 |
< |
DoubleData* zconsGap = new DoubleData(); |
| 1844 |
> |
DoubleGenericData* zconsGap = new DoubleGenericData(); |
| 1845 |
|
zconsGap->setID(ZCONSGAP_ID); |
| 1846 |
|
|
| 1847 |
|
if (globals->haveZConsGap()){ |
| 1850 |
|
} |
| 1851 |
|
|
| 1852 |
|
//set zcons fixtime |
| 1853 |
< |
DoubleData* zconsFixtime = new DoubleData(); |
| 1853 |
> |
DoubleGenericData* zconsFixtime = new DoubleGenericData(); |
| 1854 |
|
zconsFixtime->setID(ZCONSFIXTIME_ID); |
| 1855 |
|
|
| 1856 |
|
if (globals->haveZConsFixTime()){ |
| 1859 |
|
} |
| 1860 |
|
|
| 1861 |
|
//set zconsUsingSMD |
| 1862 |
< |
IntData* zconsUsingSMD = new IntData(); |
| 1862 |
> |
IntGenericData* zconsUsingSMD = new IntGenericData(); |
| 1863 |
|
zconsUsingSMD->setID(ZCONSUSINGSMD_ID); |
| 1864 |
|
|
| 1865 |
|
if (globals->haveZConsUsingSMD()){ |
| 1875 |
|
|
| 1876 |
|
zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz"; |
| 1877 |
|
|
| 1878 |
< |
StringData* zconsFilename = new StringData(); |
| 1878 |
> |
StringGenericData* zconsFilename = new StringGenericData(); |
| 1879 |
|
zconsFilename->setID(ZCONSFILENAME_ID); |
| 1880 |
|
zconsFilename->setData(zconsOutput); |
| 1881 |
|
|