Skip to content

Commit

Permalink
init wolf
Browse files Browse the repository at this point in the history
  • Loading branch information
GregorySchwing committed Feb 18, 2024
1 parent 2457d82 commit aa4639e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/GOMC_CPU.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN apt-get update && \
cmake

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

# Set the working directory to the GOMC repository
WORKDIR /gomc
Expand Down
30 changes: 29 additions & 1 deletion src/Wolf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,35 @@ using namespace geom;

Wolf::Wolf(StaticVals &stat, System &sys) : Ewald(stat, sys) {}

void Wolf::Init() {}
//void Wolf::Init() {}
void Wolf::Init() {
for (uint m = 0; m < mols.count; ++m) {
const MoleculeKind &molKind = mols.GetKind(m);
for (uint a = 0; a < molKind.NumAtoms(); ++a) {
particleKind.push_back(molKind.AtomKind(a));
particleMol.push_back(m);
particleCharge.push_back(molKind.AtomCharge(a));
if (std::abs(molKind.AtomCharge(a)) < 0.000000001) {
particleHasNoCharge.push_back(true);
} else {
particleHasNoCharge.push_back(false);
}
}
}

// initialize starting index and length index of each molecule
startMol.resize(currentCoords.Count());
lengthMol.resize(currentCoords.Count());

for (int atom = 0; atom < (int)currentCoords.Count(); atom++) {
startMol[atom] = mols.MolStart(particleMol[atom]);
lengthMol[atom] = mols.MolLength(particleMol[atom]);
}

//AllocMem();
// initialize K vectors and reciprocal terms
//UpdateVectorsAndRecipTerms(true);
}

void Wolf::AllocMem() { return; }

Expand Down

0 comments on commit aa4639e

Please sign in to comment.