Skip to content

Instantly share code, notes, and snippets.

@derekbrokeit
Created November 20, 2013 05:46
Show Gist options
  • Save derekbrokeit/7558336 to your computer and use it in GitHub Desktop.
Save derekbrokeit/7558336 to your computer and use it in GitHub Desktop.
smooth cutoff function for LAMMPS airebo
diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp
index f655506..b424e91 100644
--- a/src/MANYBODY/pair_airebo.cpp
+++ b/src/MANYBODY/pair_airebo.cpp
@@ -713,9 +713,12 @@ void PairAIREBO::FLJ(int eflag, int vflag)
sigcut = 3.0;
sigmin = sigcut - sigwid;
- rljmin = sigma[itype][jtype];
- rljmax = sigcut * rljmin;
- rljmin = sigmin * rljmin;
+ /* rljmin = sigma[itype][jtype]; */
+ /* rljmax = sigcut * rljmin; */
+ /* rljmin = sigmin * rljmin; */
+
+ rljmin = 3.816370964251868;
+ rljmax = cutlj * sigma[itype][jtype];
if (rij > rljmax) {
slw = 0.0;
diff --git a/src/USER-OMP/pair_airebo_omp.cpp b/src/USER-OMP/pair_airebo_omp.cpp
index ec788fd..0878be2 100644
--- a/src/USER-OMP/pair_airebo_omp.cpp
+++ b/src/USER-OMP/pair_airebo_omp.cpp
@@ -2154,9 +2154,12 @@ void PairAIREBOOMP::FLJ_thr(int ifrom, int ito, int evflag, int eflag,
sigcut = 3.0;
sigmin = sigcut - sigwid;
- rljmin = sigma[itype][jtype];
- rljmax = sigcut * rljmin;
- rljmin = sigmin * rljmin;
+/* rljmin = sigma[itype][jtype]; */
+/* rljmax = sigcut * rljmin; */
+/* rljmin = sigmin * rljmin; */
+
+ rljmin = 3.816370964251868;
+ rljmax = cutlj * sigma[itype][jtype];
if (rij > rljmax) {
slw = 0.0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment