| 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 |
| 32 |
|
#define FF_H2O 3 |
| 33 |
|
|
| 34 |
|
using namespace std; |
| 35 |
+ |
using namespace oopse; |
| 36 |
|
|
| 37 |
|
/** |
| 38 |
|
* Check whether dividend is divisble by divisor or not |
| 909 |
|
} |
| 910 |
|
|
| 911 |
|
for (i = 0; i < nInfo; i++) { |
| 911 |
– |
// get the mixing rule |
| 912 |
– |
|
| 913 |
– |
strcpy(info[i].mixingRule, globals->getMixingRule()); |
| 912 |
|
info[i].usePBC = globals->getPBC(); |
| 913 |
|
} |
| 914 |
|
|
| 1762 |
|
void SimSetup::initFortran(void){ |
| 1763 |
|
info[0].refreshSim(); |
| 1764 |
|
|
| 1765 |
< |
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 |
< |
} |
| 1765 |
> |
the_ff->initForceField(); |
| 1766 |
|
|
| 1780 |
– |
|
| 1767 |
|
#ifdef IS_MPI |
| 1768 |
< |
strcpy(checkPointMsg, "Successfully intialized the mixingRule for Fortran."); |
| 1768 |
> |
strcpy(checkPointMsg, "Successfully intialized the fortran portion of the force field."); |
| 1769 |
|
MPIcheckPoint(); |
| 1770 |
|
#endif // is_mpi |
| 1771 |
|
} |
| 1776 |
|
|
| 1777 |
|
if (globals->haveZconstraintTime()){ |
| 1778 |
|
//add sample time of z-constraint into SimInfo's property list |
| 1779 |
< |
DoubleData* zconsTimeProp = new DoubleData(); |
| 1779 |
> |
DoubleGenericData* zconsTimeProp = new DoubleGenericData(); |
| 1780 |
|
zconsTimeProp->setID(ZCONSTIME_ID); |
| 1781 |
|
zconsTimeProp->setData(globals->getZconsTime()); |
| 1782 |
|
theInfo.addProperty(zconsTimeProp); |
| 1791 |
|
|
| 1792 |
|
//push zconsTol into siminfo, if user does not specify |
| 1793 |
|
//value for zconsTol, a default value will be used |
| 1794 |
< |
DoubleData* zconsTol = new DoubleData(); |
| 1794 |
> |
DoubleGenericData* zconsTol = new DoubleGenericData(); |
| 1795 |
|
zconsTol->setID(ZCONSTOL_ID); |
| 1796 |
|
if (globals->haveZconsTol()){ |
| 1797 |
|
zconsTol->setData(globals->getZconsTol()); |
| 1811 |
|
theInfo.addProperty(zconsTol); |
| 1812 |
|
|
| 1813 |
|
//set Force Subtraction Policy |
| 1814 |
< |
StringData* zconsForcePolicy = new StringData(); |
| 1814 |
> |
StringGenericData* zconsForcePolicy = new StringGenericData(); |
| 1815 |
|
zconsForcePolicy->setID(ZCONSFORCEPOLICY_ID); |
| 1816 |
|
|
| 1817 |
|
if (globals->haveZconsForcePolicy()){ |
| 1830 |
|
theInfo.addProperty(zconsForcePolicy); |
| 1831 |
|
|
| 1832 |
|
//set zcons gap |
| 1833 |
< |
DoubleData* zconsGap = new DoubleData(); |
| 1833 |
> |
DoubleGenericData* zconsGap = new DoubleGenericData(); |
| 1834 |
|
zconsGap->setID(ZCONSGAP_ID); |
| 1835 |
|
|
| 1836 |
|
if (globals->haveZConsGap()){ |
| 1839 |
|
} |
| 1840 |
|
|
| 1841 |
|
//set zcons fixtime |
| 1842 |
< |
DoubleData* zconsFixtime = new DoubleData(); |
| 1842 |
> |
DoubleGenericData* zconsFixtime = new DoubleGenericData(); |
| 1843 |
|
zconsFixtime->setID(ZCONSFIXTIME_ID); |
| 1844 |
|
|
| 1845 |
|
if (globals->haveZConsFixTime()){ |
| 1848 |
|
} |
| 1849 |
|
|
| 1850 |
|
//set zconsUsingSMD |
| 1851 |
< |
IntData* zconsUsingSMD = new IntData(); |
| 1851 |
> |
IntGenericData* zconsUsingSMD = new IntGenericData(); |
| 1852 |
|
zconsUsingSMD->setID(ZCONSUSINGSMD_ID); |
| 1853 |
|
|
| 1854 |
|
if (globals->haveZConsUsingSMD()){ |
| 1864 |
|
|
| 1865 |
|
zconsOutput = zconsOutput.substr(0, zconsOutput.rfind(".")) + ".fz"; |
| 1866 |
|
|
| 1867 |
< |
StringData* zconsFilename = new StringData(); |
| 1867 |
> |
StringGenericData* zconsFilename = new StringGenericData(); |
| 1868 |
|
zconsFilename->setID(ZCONSFILENAME_ID); |
| 1869 |
|
zconsFilename->setData(zconsOutput); |
| 1870 |
|
|