Skip to content

Commit

Permalink
read wolf alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorySchwing committed Feb 18, 2024
1 parent 8b87774 commit 2457d82
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
26 changes: 26 additions & 0 deletions dockerfiles/GOMC_CPU.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Use the Debian base image
FROM debian:bullseye

# Install necessary dependencies
RUN apt-get update && \
apt-get install -y \
build-essential \
git \
wget \
python \
cmake

# Clone the GOMC repository
RUN git clone -b mergedev_w_rcut --single-branch https://github.com/GregorySchwing/GOMC.git /gomc

# Set the working directory to the GOMC repository
WORKDIR /gomc

# Build the code using metamake.sh
RUN ./metamake.sh

# Add /gomc/bin to the PATH
ENV PATH="/gomc/bin:${PATH}"

# Command to run when the container starts
CMD ["bash"]
24 changes: 24 additions & 0 deletions src/ConfigSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ ConfigSetup::ConfigSetup(void) {
sys.elect.tolerance = DBL_MAX;
sys.elect.oneFourScale = DBL_MAX;
sys.elect.dielectric = DBL_MAX;
for(i = 0; i < BOX_TOTAL; i++) {
sys.elect.wolf_alpha[i] = DBL_MAX;
sys.elect.readWolfAlpha[i] = false;
}
sys.memcVal.enable = false;
sys.neMTMCVal.enable = false;
sys.intraMemcVal.enable = false;
Expand Down Expand Up @@ -705,6 +709,26 @@ 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], "WolfAlpha")) {
if (line.size() != 3){
std::cout << "Error: Wolf Alpha incorrectly specified!" << std::endl <<
"Usage : WolfAlpha\tBox(0,1)\tvalue" << std::endl <<
"Example : WolfAlpha\t0\t1.0" << std::endl;
exit(EXIT_FAILURE);
} else {
int b = stringtoi(line[1]);
sys.elect.readWolfAlpha[b] = true;
sys.elect.wolf_alpha[b] = stringtod(line[2]);
if (b == 0)
printf("%-40s %-1.3E \n", "Info: Wolf Alpha Box 0", sys.elect.wolf_alpha[b]);
else if (b == 1)
printf("%-40s %-1.3E \n", "Info: Wolf Alpha Box 1", sys.elect.wolf_alpha[b]);
else{
std::cout << "Error: Only (0/1) for box is supported!" << std::endl <<
"You entered : WolfAlpha\t" << b << "\tvalue" << std::endl;
exit(EXIT_FAILURE);
}
}
} else if (CheckString(line[0], "ElectroStatic")) {
sys.elect.enable = checkBool(line[1]);
sys.elect.readElect = true;
Expand Down
4 changes: 4 additions & 0 deletions src/ConfigSetup.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ struct ElectroStatic {
bool readEwald;
bool readWolf;
bool readDSF;
bool readWolfAlpha[BOX_TOTAL];

bool readElect;
bool readCache;
bool enable;
Expand All @@ -203,6 +205,8 @@ struct ElectroStatic {
std::fill_n(cutoffCoulombRead, BOX_TOTAL, false);
std::fill_n(cutoffCoulomb, BOX_TOTAL, 0.0);
std::fill_n(wolf_alpha, BOX_TOTAL, 0.0);
std::fill_n(readWolfAlpha, BOX_TOTAL, false);

}
};

Expand Down

0 comments on commit 2457d82

Please sign in to comment.