From 36fa601fe08a9727f9dbc53bfe696bf10a53e8f3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 22 Feb 2024 13:33:04 -0500 Subject: [PATCH] cutoff calculation inherited from but only required for AIREBO. up to 2x speedup --- src/MANYBODY/pair_rebomos.cpp | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/src/MANYBODY/pair_rebomos.cpp b/src/MANYBODY/pair_rebomos.cpp index 3e46f86a20..8ba1437aca 100644 --- a/src/MANYBODY/pair_rebomos.cpp +++ b/src/MANYBODY/pair_rebomos.cpp @@ -259,29 +259,8 @@ double PairREBOMoS::init_one(int i, int j) cut3rebo = 3.0 * rcmax[0][0]; - // cutljrebosq = furthest distance from an owned atom a ghost atom can be - // to need its REBO neighs computed - // interaction = M-K-I-J-L-N with I = owned and J = ghost - // this insures N is in the REBO neigh list of L - // since I-J < rcLJmax and J-L < rmax - - double cutljrebo = rcLJmax[0][0] + rcmax[0][0]; - cutljrebosq = cutljrebo * cutljrebo; - - // cutmax = furthest distance from an owned atom - // at which another atom will feel force, i.e. the ghost cutoff - // for REBO term in potential: - // interaction = M-K-I-J-L-N with I = owned and J = ghost - // I to N is max distance = 3 REBO distances - // for LJ term in potential: - // short interaction = M-K-I-J-L-N with I = owned, J = ghost, I-J < rcLJmax - // rcLJmax + 2*rcmax, since I-J < rcLJmax and J-L,L-N = REBO distances - // long interaction = I-J with I = owned and J = ghost - // cutlj*sigma, since I-J < LJ cutoff // cutghost = REBO cutoff used in REBO_neigh() for neighbors of ghosts - double cutmax = MAX(cut3rebo,rcLJmax[0][0] + 2.0*rcmax[0][0]); - cutghost[i][j] = rcmax[ii][jj]; lj1[ii][jj] = 48.0 * epsilon[ii][jj] * powint(sigma[ii][jj],12); lj2[ii][jj] = 24.0 * epsilon[ii][jj] * powint(sigma[ii][jj],6); @@ -294,7 +273,7 @@ double PairREBOMoS::init_one(int i, int j) lj3[jj][ii] = lj3[ii][jj]; lj4[jj][ii] = lj4[ii][jj]; - return cutmax; + return cut3rebo; } /* ----------------------------------------------------------------------