ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/Electrostatic.cpp
(Generate patch)

Comparing branches/development/src/nonbonded/Electrostatic.cpp (file contents):
Revision 1502 by gezelter, Sat Oct 2 19:53:32 2010 UTC vs.
Revision 1504 by gezelter, Sat Oct 2 20:41:53 2010 UTC

# Line 883 | Line 883 | namespace OpenMD {
883  
884        if (i_is_Dipole) {
885          mu_i = data1.dipole_moment;
886 <        uz_i = skdat.eFrame1->getColumn(2);      
886 >        uz_i = skdat.eFrame1.getColumn(2);      
887          ct_i = dot(uz_i, rhat);
888          duduz_i = V3Zero;
889        }
890              
891        if (j_is_Dipole) {
892          mu_j = data2.dipole_moment;
893 <        uz_j = skdat.eFrame2->getColumn(2);      
893 >        uz_j = skdat.eFrame2.getColumn(2);      
894          ct_j = dot(uz_j, rhat);
895          duduz_j = V3Zero;
896        }
# Line 932 | Line 932 | namespace OpenMD {
932        skdat.f1 += dVdr;
933        
934        if (i_is_Dipole)
935 <        *(skdat.t1) -= cross(uz_i, duduz_i);
935 >        skdat.t1 -= cross(uz_i, duduz_i);
936        if (j_is_Dipole)
937 <        *(skdat.t2) -= cross(uz_j, duduz_j);
937 >        skdat.t2 -= cross(uz_j, duduz_j);
938      }
939    }
940      
# Line 957 | Line 957 | namespace OpenMD {
957          scdat.pot -= 0.5 * preVal;
958          
959          // The self-correction term adds into the reaction field vector
960 <        Vector3d uz_i = scdat.eFrame->getColumn(2);
960 >        Vector3d uz_i = scdat.eFrame.getColumn(2);
961          Vector3d ei = preVal * uz_i;
962  
963          // This looks very wrong.  A vector crossed with itself is zero.
964 <        *(scdat.t) -= cross(uz_i, ei);
964 >        scdat.t -= cross(uz_i, ei);
965        }
966      } else if (summationMethod_ == SHIFTED_FORCE || summationMethod_ == SHIFTED_POTENTIAL) {
967        if (i_is_Charge) {        

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines