Skip to content

Commit

Permalink
all 8 methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorySchwing committed Feb 22, 2024
1 parent 1554f5d commit c4f42f7
Show file tree
Hide file tree
Showing 5 changed files with 373 additions and 55 deletions.
20 changes: 20 additions & 0 deletions src/ConfigSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ ConfigSetup::ConfigSetup(void) {
sys.elect.readEwald = false;
sys.elect.readElect = false;
sys.elect.readCache = false;
sys.elect.readWolf = false;
sys.elect.readDSF = false;
sys.elect.readIntramolecularDSF = false;
sys.elect.simpleself = false;
sys.elect.ewald = false;
sys.elect.wolf = false;
sys.elect.dsf = false;
sys.elect.intramoleculardsf = false;
sys.elect.simpleself = false;
sys.elect.enable = false;
sys.elect.cache = false;
sys.elect.tolerance = DBL_MAX;
Expand Down Expand Up @@ -711,6 +719,18 @@ void ConfigSetup::Init(const char *fileName, MultiSim const *const &multisim) {
if (sys.elect.dsf) {
printf("%-40s %-s \n", "Info: Wolf Summation DSF", "Active");
}
} else if (CheckString(line[0], "IntraDSF")) {
sys.elect.intramoleculardsf = checkBool(line[1]);
sys.elect.readIntramolecularDSF = true;
if (sys.elect.intramoleculardsf) {
printf("%-40s %-s \n", "Info: Wolf Summation INTRAMOLECULAR DSF", "Active");
}
} else if (CheckString(line[0], "SimpleSelf")) {
sys.elect.intramoleculardsf = checkBool(line[1]);
sys.elect.readIntramolecularDSF = true;
if (sys.elect.intramoleculardsf) {
printf("%-40s %-s \n", "Info: Wolf Summation SIMPLE SELF", "Active");
}
} else if (CheckString(line[0], "WolfAlpha")) {
if (line.size() != 3){
std::cout << "Error: Wolf Alpha incorrectly specified!" << std::endl <<
Expand Down
6 changes: 6 additions & 0 deletions src/ConfigSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ struct ElectroStatic {
bool readEwald;
bool readWolf;
bool readDSF;
bool readIntramolecularDSF;
bool readSimpleSelf;

bool readWolfAlpha[BOX_TOTAL];

bool readElect;
Expand All @@ -194,6 +197,9 @@ struct ElectroStatic {
bool ewald;
bool wolf;
bool dsf;
bool intramoleculardsf;
bool simpleself;

bool cache;
bool cutoffCoulombRead[BOX_TOTAL];
double tolerance;
Expand Down
2 changes: 2 additions & 0 deletions src/Forcefield.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ void Forcefield::InitBasicVals(config_setup::SystemVals const &val,
ewald = val.elect.ewald;
wolf = val.elect.wolf;
dsf = val.elect.dsf;
intramoleculardsf = val.elect.intramoleculardsf;
simpleself = val.elect.simpleself;

tolerance = val.elect.tolerance;
rswitch = val.ff.rswitch;
Expand Down
2 changes: 1 addition & 1 deletion src/Forcefield.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Forcefield {
double sc_sigma, sc_sigma_6; // Free energy parameter

bool OneThree, OneFour, OneN; // To include 1-3, 1-4 and more interaction
bool electrostatic, ewald, wolf, dsf; // To consider columb interaction
bool electrostatic, ewald, wolf, dsf, intramoleculardsf, simpleself; // To consider columb interaction
bool vdwGeometricSigma; // For sigma combining rule
bool isMartini;
bool exp6;
Expand Down
Loading

0 comments on commit c4f42f7

Please sign in to comment.