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; |
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++) { |
912 |
– |
// get the mixing rule |
913 |
– |
|
914 |
– |
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 |
|
|
1264 |
|
|
1265 |
|
case FF_H2O: |
1266 |
|
the_ff = new WATER(); |
1267 |
+ |
break; |
1268 |
+ |
|
1269 |
+ |
case FF_SHAPES: |
1270 |
+ |
the_ff = new Shapes_FF(); |
1271 |
|
break; |
1272 |
|
|
1273 |
|
default: |
1773 |
|
void SimSetup::initFortran(void){ |
1774 |
|
info[0].refreshSim(); |
1775 |
|
|
1776 |
< |
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 |
< |
} |
1776 |
> |
the_ff->initForceField(); |
1777 |
|
|
1781 |
– |
|
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 |
|
|