Commit 90ddfc31 authored by peastman's avatar peastman
Browse files

Merge pull request #1385 from jing-huang/drudefix

bugfix on the ansiotropic polarizability for Drude force field
parents 394551cc 678cac1c
...@@ -32,7 +32,7 @@ if (k1 != 0) { ...@@ -32,7 +32,7 @@ if (k1 != 0) {
// Compute the second anisotropic force. // Compute the second anisotropic force.
if (k2 != 0) { if (k2 != 0) {
real3 dir = make_real3(pos3.x-pos4.x, pos3.y-pos4.y, pos3.z-pos4.z); real3 dir = make_real3(pos4.x-pos5.x, pos4.y-pos5.y, pos4.z-pos5.z);
real invDist = RSQRT(dot(dir, dir)); real invDist = RSQRT(dot(dir, dir));
dir *= invDist; dir *= invDist;
real rprime = dot(dir, delta); real rprime = dot(dir, delta);
......
...@@ -32,7 +32,7 @@ if (k1 != 0) { ...@@ -32,7 +32,7 @@ if (k1 != 0) {
// Compute the second anisotropic force. // Compute the second anisotropic force.
if (k2 != 0) { if (k2 != 0) {
real4 dir = (real4) (pos3.xyz-pos4.xyz, 0); real4 dir = (real4) (pos4.xyz-pos5.xyz, 0);
real invDist = RSQRT(dot(dir, dir)); real invDist = RSQRT(dot(dir, dir));
dir *= invDist; dir *= invDist;
real rprime = dot(dir, delta); real rprime = dot(dir, delta);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment