| 99 |
|
* Use the maximum suggested value that was found. |
| 100 |
|
* |
| 101 |
|
* cutoffMethod : (one of HARD, SWITCHED, SHIFTED_FORCE, TAYLOR_SHIFTED, |
| 102 |
< |
* or SHIFTED_POTENTIAL) |
| 102 |
> |
* SHIFTED_POTENTIAL, or EWALD_FULL) |
| 103 |
|
* If cutoffMethod was explicitly set, use that choice. |
| 104 |
|
* If cutoffMethod was not explicitly set, use SHIFTED_FORCE |
| 105 |
|
* |
| 172 |
|
stringToCutoffMethod["SHIFTED_POTENTIAL"] = SHIFTED_POTENTIAL; |
| 173 |
|
stringToCutoffMethod["SHIFTED_FORCE"] = SHIFTED_FORCE; |
| 174 |
|
stringToCutoffMethod["TAYLOR_SHIFTED"] = TAYLOR_SHIFTED; |
| 175 |
+ |
stringToCutoffMethod["EWALD_FULL"] = EWALD_FULL; |
| 176 |
|
|
| 177 |
|
if (simParams_->haveCutoffMethod()) { |
| 178 |
|
string cutMeth = toUpperCopy(simParams_->getCutoffMethod()); |
| 183 |
|
"ForceManager::setupCutoffs: Could not find chosen cutoffMethod %s\n" |
| 184 |
|
"\tShould be one of: " |
| 185 |
|
"HARD, SWITCHED, SHIFTED_POTENTIAL, TAYLOR_SHIFTED,\n" |
| 186 |
< |
"\tor SHIFTED_FORCE\n", |
| 186 |
> |
"\tSHIFTED_FORCE, or EWALD_FULL\n", |
| 187 |
|
cutMeth.c_str()); |
| 188 |
|
painCave.isFatal = 1; |
| 189 |
|
painCave.severity = OPENMD_ERROR; |
| 229 |
|
cutoffMethod_ = SHIFTED_FORCE; |
| 230 |
|
} else if (myMethod == "TAYLOR_SHIFTED") { |
| 231 |
|
cutoffMethod_ = TAYLOR_SHIFTED; |
| 232 |
+ |
} else if (myMethod == "EWALD_FULL") { |
| 233 |
+ |
cutoffMethod_ = EWALD_FULL; |
| 234 |
|
} |
| 235 |
|
|
| 236 |
|
if (simParams_->haveSwitchingRadius()) |
| 237 |
|
rSwitch_ = simParams_->getSwitchingRadius(); |
| 238 |
|
|
| 239 |
|
if (myMethod == "SHIFTED_POTENTIAL" || myMethod == "SHIFTED_FORCE" || |
| 240 |
< |
myMethod == "TAYLOR_SHIFTED") { |
| 240 |
> |
myMethod == "TAYLOR_SHIFTED" || myMethod == "EWALD_FULL") { |
| 241 |
|
if (simParams_->haveSwitchingRadius()){ |
| 242 |
|
sprintf(painCave.errMsg, |
| 243 |
|
"ForceManager::setupCutoffs : DEPRECATED ERROR MESSAGE\n" |
| 925 |
|
|
| 926 |
|
// collects pairwise information |
| 927 |
|
fDecomp_->collectData(); |
| 928 |
+ |
if (cutoffMethod_ == EWALD_FULL) { |
| 929 |
+ |
interactionMan_->doReciprocalSpaceSum(); |
| 930 |
+ |
} |
| 931 |
|
|
| 932 |
|
if (info_->requiresSelfCorrection()) { |
| 933 |
|
for (unsigned int atom1 = 0; atom1 < info_->getNAtoms(); atom1++) { |