# | Line 53 | Line 53 | |
---|---|---|
53 | #include "math/Vector3.hpp" | |
54 | #include "primitives/Molecule.hpp" | |
55 | #include "UseTheForce/fCutoffPolicy.h" | |
56 | < | #include "UseTheForce/fCoulombicCorrection.h" |
56 | > | #include "UseTheForce/Darkside/fElectrostaticSummationMethod.h" |
57 | #include "UseTheForce/doForces_interface.h" | |
58 | #include "UseTheForce/notifyCutoffs_interface.h" | |
59 | #include "utils/MemoryUtils.hpp" | |
# | Line 465 | Line 465 | namespace oopse { | |
465 | /** @deprecate */ | |
466 | int isError = 0; | |
467 | ||
468 | < | setupCoulombicCorrection( isError ); |
468 | > | setupElectrostaticSummationMethod( isError ); |
469 | ||
470 | if(isError){ | |
471 | sprintf( painCave.errMsg, | |
# | Line 522 | Line 522 | namespace oopse { | |
522 | int useElectrostatics = 0; | |
523 | //usePBC and useRF are from simParams | |
524 | int usePBC = simParams_->getPBC(); | |
525 | – | int useRF = simParams_->getUseRF(); |
525 | ||
526 | //loop over all of the atom types | |
527 | for (i = atomTypes.begin(); i != atomTypes.end(); ++i) { | |
# | Line 585 | Line 584 | namespace oopse { | |
584 | temp = useFLARB; | |
585 | MPI_Allreduce(&temp, &useFLARB, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); | |
586 | ||
588 | – | temp = useRF; |
589 | – | MPI_Allreduce(&temp, &useRF, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
590 | – | |
591 | – | temp = useUW; |
592 | – | MPI_Allreduce(&temp, &useUW, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
593 | – | |
594 | – | temp = useDW; |
595 | – | MPI_Allreduce(&temp, &useDW, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD); |
596 | – | |
587 | #endif | |
588 | ||
589 | fInfo_.SIM_uses_PBC = usePBC; | |
# | Line 608 | Line 598 | namespace oopse { | |
598 | fInfo_.SIM_uses_EAM = useEAM; | |
599 | fInfo_.SIM_uses_Shapes = useShape; | |
600 | fInfo_.SIM_uses_FLARB = useFLARB; | |
611 | – | fInfo_.SIM_uses_RF = useRF; |
601 | ||
602 | if( fInfo_.SIM_uses_Dipoles && fInfo_.SIM_uses_RF) { | |
603 | ||
# | Line 870 | Line 859 | namespace oopse { | |
859 | notifyFortranCutoffs(&rcut_, &rsw_, &rnblist, &cp); | |
860 | } | |
861 | ||
862 | < | void SimInfo::setupCoulombicCorrection( int isError ) { |
862 | > | void SimInfo::setupElectrostaticSummationMethod( int isError ) { |
863 | ||
864 | int errorOut; | |
865 | < | int cc = NONE; |
865 | > | int esm = NONE; |
866 | double alphaVal; | |
867 | ||
868 | errorOut = isError; | |
869 | ||
870 | < | if (simParams_->haveCoulombicCorrection()) { |
871 | < | std::string myCorrection = simParams_->getCoulombicCorrection(); |
872 | < | if (myCorrection == "NONE") { |
873 | < | cc = NONE; |
870 | > | if (simParams_->haveElectrostaticSummationMethod()) { |
871 | > | std::string myMethod = simParams_->getElectrostaticSummationMethod(); |
872 | > | if (myMethod == "NONE") { |
873 | > | esm = NONE; |
874 | } else { | |
875 | < | if (myCorrection == "UNDAMPED_WOLF") { |
876 | < | cc = UNDAMPED_WOLF; |
875 | > | if (myMethod == "UNDAMPED_WOLF") { |
876 | > | esm = UNDAMPED_WOLF; |
877 | } else { | |
878 | < | if (myCorrection == "WOLF") { |
879 | < | cc = WOLF; |
878 | > | if (myMethod == "DAMPED_WOLF") { |
879 | > | esm = DAMPED_WOLF; |
880 | if (!simParams_->haveDampingAlpha()) { | |
881 | //throw error | |
882 | sprintf( painCave.errMsg, | |
883 | < | "SimInfo warning: dampingAlpha was not specified in the input file. A default value of %f (1/ang) will be used for the Wolf Coulombic Correction.", simParams_->getDampingAlpha()); |
883 | > | "SimInfo warning: dampingAlpha was not specified in the input file. A default value of %f (1/ang) will be used for the Damped Wolf Method.", simParams_->getDampingAlpha()); |
884 | painCave.isFatal = 0; | |
885 | simError(); | |
886 | } | |
887 | alphaVal = simParams_->getDampingAlpha(); | |
888 | } else { | |
889 | < | if (myCorrection == "REACTION_FIELD") { |
890 | < | cc = REACTION_FIELD; |
889 | > | if (myMethod == "REACTION_FIELD") { |
890 | > | esm = REACTION_FIELD; |
891 | } else { | |
892 | // throw error | |
893 | sprintf( painCave.errMsg, | |
894 | < | "SimInfo error: Unknown coulombicCorrection. (Input file specified %s .)\n\tcoulombicCorrection must be one of: \"none\", \"undamped_wolf\", \"wolf\", or \"reaction_field\".", myCorrection.c_str() ); |
894 | > | "SimInfo error: Unknown electrostaticSummationMethod. (Input file specified %s .)\n\telectrostaticSummationMethod must be one of: \"none\", \"undamped_wolf\", \"damped_wolf\", or \"reaction_field\".", myMethod.c_str() ); |
895 | painCave.isFatal = 1; | |
896 | simError(); | |
897 | } | |
# | Line 910 | Line 899 | namespace oopse { | |
899 | } | |
900 | } | |
901 | } | |
902 | < | initFortranFF( &fInfo_.SIM_uses_RF, &cc, &alphaVal, &errorOut ); |
902 | > | initFortranFF( &fInfo_.SIM_uses_RF, &esm, &alphaVal, &errorOut ); |
903 | } | |
904 | ||
905 | void SimInfo::addProperty(GenericData* genData) { |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |