dmorse / simpatico

Molecular dynamics and Monte Carlo simulation package for polymeric and molecular liquids
GNU General Public License v3.0
31 stars 17 forks source link

EwaldCoulomb #39

Closed HuadaLian93 closed 7 years ago

HuadaLian93 commented 7 years ago

Dave:

Here is the summary of changes made. I have tried to be exhaustive.

New classes are added, following the finalized design. potential/coulomb/ MdCoulombPotential MdEwaldPotential EwaldInteraction EwaldRSpaceAccumulator potential/pair MdEwaldPairPotentialImpl

Three minor changes are made on "system" level. MdSystem.cpp (workaround): line 138; copy constructor. Commented lines related to pair potential. Otherwise the code does not copile since coulomb potential for MC has not been created.

PairFactory.cpp_r
   Use "dynamic_cast<MdSystem&>(system)" to initialize MdEwaldPairPotential.

Tensor.h:
   Added a new method setUnitTensor() to return a unit matrix,
   which will be used by MdEwaldPontetial::computeStress().

Two examples are deposited to assist testing of the energy and force calculations in NVE MD runs. Both examples are running OK right before the current "pull request". example/atomic/md_coulomb/ md_coulomb_80 : 80 beads; density 0.07. md_coulomb_800 : 800 beads; density 0.7. The default values of parameters alpha, epsilon, kSpaceCutoff, rSpaceCutoff in both examples are chosen to ensure the convergence coulomb energy.

Please let us know if you run into any issue. Jian and I should be able to address questions timely these few days. Thanks.

Best regards,

Huada