5 |
|
#include <iostream> |
6 |
|
using namespace std; |
7 |
|
|
8 |
< |
#include "SimInfo.hpp" |
8 |
> |
#include "brains/SimInfo.hpp" |
9 |
|
#define __C |
10 |
< |
#include "fSimulation.h" |
11 |
< |
#include "simError.h" |
10 |
> |
#include "brains/fSimulation.h" |
11 |
> |
#include "utils/simError.h" |
12 |
> |
#include "UseTheForce/DarkSide/simulation_interface.h" |
13 |
> |
#include "UseTheForce/notifyCutoffs_interface.h" |
14 |
|
|
15 |
< |
#include "fortranWrappers.hpp" |
15 |
> |
//#include "UseTheForce/fortranWrappers.hpp" |
16 |
|
|
17 |
< |
#include "MatVec3.h" |
17 |
> |
#include "math/MatVec3.h" |
18 |
|
|
19 |
|
#ifdef IS_MPI |
20 |
< |
#include "mpiSimulation.hpp" |
20 |
> |
#include "brains/mpiSimulation.hpp" |
21 |
|
#endif |
22 |
|
|
23 |
|
inline double roundMe( double x ){ |
57 |
|
useInitXSstate = true; |
58 |
|
|
59 |
|
usePBC = 0; |
60 |
< |
useLJ = 0; |
61 |
< |
useSticky = 0; |
60 |
> |
useDirectionalAtoms = 0; |
61 |
> |
useLennardJones = 0; |
62 |
> |
useElectrostatics = 0; |
63 |
|
useCharges = 0; |
64 |
|
useDipoles = 0; |
65 |
< |
useReactionField = 0; |
66 |
< |
useGB = 0; |
65 |
> |
useSticky = 0; |
66 |
> |
useGayBerne = 0; |
67 |
|
useEAM = 0; |
68 |
+ |
useShapes = 0; |
69 |
+ |
useFLARB = 0; |
70 |
+ |
|
71 |
|
useSolidThermInt = 0; |
72 |
|
useLiquidThermInt = 0; |
73 |
|
|
82 |
|
|
83 |
|
ngroup = 0; |
84 |
|
|
79 |
– |
wrapMeSimInfo( this ); |
85 |
|
} |
86 |
|
|
87 |
|
|
137 |
|
} |
138 |
|
} |
139 |
|
|
140 |
< |
setFortranBoxSize(FortranHmat, FortranHmatInv, &orthoRhombic); |
140 |
> |
setFortranBox(FortranHmat, FortranHmatInv, &orthoRhombic); |
141 |
|
|
142 |
|
} |
143 |
|
|
437 |
|
} |
438 |
|
|
439 |
|
fInfo.SIM_uses_PBC = usePBC; |
440 |
< |
//fInfo.SIM_uses_LJ = 0; |
441 |
< |
fInfo.SIM_uses_LJ = useLJ; |
442 |
< |
fInfo.SIM_uses_sticky = useSticky; |
443 |
< |
//fInfo.SIM_uses_sticky = 0; |
444 |
< |
fInfo.SIM_uses_charges = useCharges; |
445 |
< |
fInfo.SIM_uses_dipoles = useDipoles; |
446 |
< |
//fInfo.SIM_uses_dipoles = 0; |
447 |
< |
fInfo.SIM_uses_RF = useReactionField; |
448 |
< |
//fInfo.SIM_uses_RF = 0; |
449 |
< |
fInfo.SIM_uses_GB = useGB; |
440 |
> |
|
441 |
> |
if (useSticky || useDipoles || useGayBerne || useShapes) { |
442 |
> |
useDirectionalAtoms = 1; |
443 |
> |
fInfo.SIM_uses_DirectionalAtoms = useDirectionalAtoms; |
444 |
> |
} |
445 |
> |
|
446 |
> |
fInfo.SIM_uses_LennardJones = useLennardJones; |
447 |
> |
|
448 |
> |
if (useCharges || useDipoles) { |
449 |
> |
useElectrostatics = 1; |
450 |
> |
fInfo.SIM_uses_Electrostatics = useElectrostatics; |
451 |
> |
} |
452 |
> |
|
453 |
> |
fInfo.SIM_uses_Charges = useCharges; |
454 |
> |
fInfo.SIM_uses_Dipoles = useDipoles; |
455 |
> |
fInfo.SIM_uses_Sticky = useSticky; |
456 |
> |
fInfo.SIM_uses_GayBerne = useGayBerne; |
457 |
|
fInfo.SIM_uses_EAM = useEAM; |
458 |
+ |
fInfo.SIM_uses_Shapes = useShapes; |
459 |
+ |
fInfo.SIM_uses_FLARB = useFLARB; |
460 |
+ |
fInfo.SIM_uses_RF = useReactionField; |
461 |
|
|
462 |
|
n_exclude = excludes->getSize(); |
463 |
|
excl = excludes->getFortranArray(); |
474 |
|
//it may not be a good idea to pass the address of first element in vector |
475 |
|
//since c++ standard does not require vector to be stored continuously in meomory |
476 |
|
//Most of the compilers will organize the memory of vector continuously |
477 |
< |
setFsimulation( &fInfo, &n_global, &n_atoms, identArray, &n_exclude, excl, |
477 |
> |
setFortranSim( &fInfo, &n_global, &n_atoms, identArray, &n_exclude, excl, |
478 |
|
&nGlobalExcludes, globalExcludes, molMembershipArray, |
479 |
|
&mfact[0], &ngroup, &FglobalGroupMembership[0], &isError); |
480 |
|
|
504 |
|
rCut = theRcut; |
505 |
|
rList = rCut + 1.0; |
506 |
|
|
507 |
< |
notifyFortranCutOffs( &rCut, &rSw, &rList ); |
507 |
> |
notifyFortranCutoffs( &rCut, &rSw, &rList ); |
508 |
|
} |
509 |
|
|
510 |
|
void SimInfo::setDefaultRcut( double theRcut, double theRsw ){ |
572 |
|
|
573 |
|
} |
574 |
|
|
575 |
< |
GenericData* SimInfo::getProperty(const string& propName){ |
575 |
> |
GenericData* SimInfo::getPropertyByName(const string& propName){ |
576 |
|
|
577 |
|
map<string, GenericData*>::iterator result; |
578 |
|
|