From 763a00e8b02e902afe8ccad7c81884b6b12cf387 Mon Sep 17 00:00:00 2001
From: Tim Mattox <timothy.mattox@engilitycorp.com>
Date: Fri, 3 Mar 2017 09:29:17 -0500
Subject: [PATCH] USER-DPD: pair_multi_lucy_rx bugfix for systems with multiple
 atom types

---
 src/USER-DPD/pair_multi_lucy_rx.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/USER-DPD/pair_multi_lucy_rx.cpp b/src/USER-DPD/pair_multi_lucy_rx.cpp
index 0a15796666..43d4114741 100644
--- a/src/USER-DPD/pair_multi_lucy_rx.cpp
+++ b/src/USER-DPD/pair_multi_lucy_rx.cpp
@@ -923,15 +923,15 @@ void PairMultiLucyRX::computeLocalDensity()
           rho_i += factor;
           if (newton_pair || j < nlocal)
             rho[j] += factor;
-        } else if (rsq < cutsq[itype][jtype]) {
-          const double rcut = sqrt(cutsq[itype][jtype]);
-          const double tmpFactor = 1.0-sqrt(rsq)/rcut;
-          const double tmpFactor4 = tmpFactor*tmpFactor*tmpFactor*tmpFactor;
-          const double factor = (84.0/(5.0*pi*rcut*rcut*rcut))*(1.0+3.0*sqrt(rsq)/(2.0*rcut))*tmpFactor4;
-          rho_i += factor;
-          if (newton_pair || j < nlocal)
-            rho[j] += factor;
         }
+      } else if (rsq < cutsq[itype][jtype]) {
+        const double rcut = sqrt(cutsq[itype][jtype]);
+        const double tmpFactor = 1.0-sqrt(rsq)/rcut;
+        const double tmpFactor4 = tmpFactor*tmpFactor*tmpFactor*tmpFactor;
+        const double factor = (84.0/(5.0*pi*rcut*rcut*rcut))*(1.0+3.0*sqrt(rsq)/(2.0*rcut))*tmpFactor4;
+        rho_i += factor;
+        if (newton_pair || j < nlocal)
+          rho[j] += factor;
       }
     }
 
-- 
GitLab