64 |
|
Globals* simParams_ = info_->getSimParams(); |
65 |
|
|
66 |
|
summationMap_["HARD"] = esm_HARD; |
67 |
+ |
summationMap_["NONE"] = esm_HARD; |
68 |
|
summationMap_["SWITCHING_FUNCTION"] = esm_SWITCHING_FUNCTION; |
69 |
|
summationMap_["SHIFTED_POTENTIAL"] = esm_SHIFTED_POTENTIAL; |
70 |
|
summationMap_["SHIFTED_FORCE"] = esm_SHIFTED_FORCE; |
117 |
|
sprintf( painCave.errMsg, |
118 |
|
"Electrostatic::initialize: Unknown electrostaticSummationMethod.\n" |
119 |
|
"\t(Input file specified %s .)\n" |
120 |
< |
"\telectrostaticSummationMethod must be one of: \"none\",\n" |
120 |
> |
"\telectrostaticSummationMethod must be one of: \"hard\",\n" |
121 |
|
"\t\"shifted_potential\", \"shifted_force\", or \n" |
122 |
|
"\t\"reaction_field\".\n", myMethod.c_str() ); |
123 |
|
painCave.isFatal = 1; |
584 |
|
if (j_is_Charge) { |
585 |
|
if (screeningMethod_ == DAMPED) { |
586 |
|
// assemble the damping variables |
587 |
< |
res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
588 |
< |
erfcVal = res.first; |
589 |
< |
derfcVal = res.second; |
587 |
> |
//res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
588 |
> |
//erfcVal = res.first; |
589 |
> |
//derfcVal = res.second; |
590 |
> |
|
591 |
> |
erfcVal = erfc(dampingAlpha_ * *(idat.rij)); |
592 |
> |
derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); |
593 |
> |
|
594 |
|
c1 = erfcVal * riji; |
595 |
|
c2 = (-derfcVal + c1) * riji; |
596 |
|
} else { |
677 |
|
|
678 |
|
if (screeningMethod_ == DAMPED) { |
679 |
|
// assemble the damping variables |
680 |
< |
res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
681 |
< |
erfcVal = res.first; |
682 |
< |
derfcVal = res.second; |
680 |
> |
//res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
681 |
> |
//erfcVal = res.first; |
682 |
> |
//derfcVal = res.second; |
683 |
> |
erfcVal = erfc(dampingAlpha_ * *(idat.rij)); |
684 |
> |
derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); |
685 |
|
c1 = erfcVal * ri; |
686 |
|
c2 = (-derfcVal + c1) * ri; |
687 |
|
c3 = -2.0 * derfcVal * alpha2_ + 3.0 * c2 * ri; |
716 |
|
|
717 |
|
if (screeningMethod_ == DAMPED) { |
718 |
|
// assemble the damping variables |
719 |
< |
res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
720 |
< |
erfcVal = res.first; |
721 |
< |
derfcVal = res.second; |
719 |
> |
//res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
720 |
> |
//erfcVal = res.first; |
721 |
> |
//derfcVal = res.second; |
722 |
> |
erfcVal = erfc(dampingAlpha_ * *(idat.rij)); |
723 |
> |
derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); |
724 |
|
c1 = erfcVal * riji; |
725 |
|
c2 = (-derfcVal + c1) * riji; |
726 |
|
c3 = -2.0 * derfcVal * alpha2_ + 3.0 * c2 * riji; |
807 |
|
|
808 |
|
if (screeningMethod_ == DAMPED) { |
809 |
|
// assemble the damping variables |
810 |
< |
res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
811 |
< |
erfcVal = res.first; |
812 |
< |
derfcVal = res.second; |
810 |
> |
//res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
811 |
> |
//erfcVal = res.first; |
812 |
> |
//derfcVal = res.second; |
813 |
> |
erfcVal = erfc(dampingAlpha_ * *(idat.rij)); |
814 |
> |
derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); |
815 |
|
c1 = erfcVal * ri; |
816 |
|
c2 = (-derfcVal + c1) * ri; |
817 |
|
c3 = -2.0 * derfcVal * alpha2_ + 3.0 * c2 * ri; |
888 |
|
} |
889 |
|
if (screeningMethod_ == DAMPED) { |
890 |
|
// assemble damping variables |
891 |
< |
res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
892 |
< |
erfcVal = res.first; |
893 |
< |
derfcVal = res.second; |
891 |
> |
//res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
892 |
> |
//erfcVal = res.first; |
893 |
> |
//derfcVal = res.second; |
894 |
> |
erfcVal = erfc(dampingAlpha_ * *(idat.rij)); |
895 |
> |
derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); |
896 |
|
c1 = erfcVal * ri; |
897 |
|
c2 = (-derfcVal + c1) * ri; |
898 |
|
c3 = -2.0 * derfcVal * alpha2_ + 3.0 * c2 * ri; |
941 |
|
|
942 |
|
if (screeningMethod_ == DAMPED) { |
943 |
|
// assemble the damping variables |
944 |
< |
res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
945 |
< |
erfcVal = res.first; |
946 |
< |
derfcVal = res.second; |
944 |
> |
//res = erfcSpline_->getValueAndDerivativeAt( *(idat.rij) ); |
945 |
> |
//erfcVal = res.first; |
946 |
> |
//derfcVal = res.second; |
947 |
> |
erfcVal = erfc(dampingAlpha_ * *(idat.rij)); |
948 |
> |
derfcVal = - alphaPi_ * exp(-alpha2_ * *(idat.r2)); |
949 |
|
c1 = erfcVal * riji; |
950 |
|
c2 = (-derfcVal + c1) * riji; |
951 |
|
c3 = -2.0 * derfcVal * alpha2_ + 3.0 * c2 * riji; |
1010 |
|
|
1011 |
|
// only accumulate the forces and torques resulting from the |
1012 |
|
// indirect reaction field terms. |
1013 |
+ |
|
1014 |
|
*(idat.vpair) += indirect_vpair; |
1015 |
|
(*(idat.pot))[ELECTROSTATIC_FAMILY] += indirect_Pot; |
1016 |
|
*(idat.f1) += indirect_dVdr; |