Dear Axel,
Thanks for your reply.
I cloned the lammps with
git clone https://github.com/lammps/lammps.git
Then I just looked at the
src/GRANULAR/pair_gran_hertz_history.cpp
src/GRANULAR/pair_gran_hooke.cpp
src/GRANULAR/pair_gran_hooke_history.cpp
They all ALREADY have a line which prevents attractive forces:
i.e.:
if (ccel < 0.0) ccel = 0.0;
So it seems this scheme is ALREADY include in the latest version.
this is not there, when i do it:
[[email protected]... Downloads] git clone git@\.\.\.7012\.\.\.:lammps/lammps\.git lammps
Cloning into 'lammps'\.\.\.
remote: Counting objects: 176504, done\.
remote: Total 176504 \(delta 1\), reused 1 \(delta 1\), pack\-reused 176502
Receiving objects: 100% \(176504/176504\), 405\.52 MiB | 3\.53 MiB/s, done\.
Resolving deltas: 100% \(148881/148881\), done\.
Checking connectivity\.\.\. done\.
\[akohlmey@\.\.\.7011\.\.\. Downloads\] cd lammps/
[[email protected]... lammps]$ grep ccel src/GRANULAR/pair_gran_h*.cpp
src/GRANULAR/pair_gran_hertz_history.cpp: double
mi,mj,meff,damp,ccel,tor1,tor2,tor3;
src/GRANULAR/pair_gran_hertz_history.cpp: ccel =
kn*(radsum-r)*rinv - damp;
src/GRANULAR/pair_gran_hertz_history.cpp: ccel *= polyhertz;
src/GRANULAR/pair_gran_hertz_history.cpp: fn = xmu * fabs(ccel*r);
src/GRANULAR/pair_gran_hertz_history.cpp: fx = delx*ccel + fs1;
src/GRANULAR/pair_gran_hertz_history.cpp: fy = dely*ccel + fs2;
src/GRANULAR/pair_gran_hertz_history.cpp: fz = delz*ccel + fs3;
src/GRANULAR/pair_gran_hertz_history.cpp: double
mi,mj,meff,damp,ccel,polyhertz;
src/GRANULAR/pair_gran_hertz_history.cpp: ccel = kn*(radsum-r)*rinv - damp;
src/GRANULAR/pair_gran_hertz_history.cpp: ccel *= polyhertz;
src/GRANULAR/pair_gran_hertz_history.cpp: fn = xmu * fabs(ccel*r);
src/GRANULAR/pair_gran_hertz_history.cpp: fforce = ccel;
src/GRANULAR/pair_gran_hooke.cpp: double mi,mj,meff,damp,ccel,tor1,tor2,tor3;
src/GRANULAR/pair_gran_hooke.cpp: ccel = kn*(radsum-r)*rinv - damp;
src/GRANULAR/pair_gran_hooke.cpp: fn = xmu * fabs(ccel*r);
src/GRANULAR/pair_gran_hooke.cpp: fx = delx*ccel + fs1;
src/GRANULAR/pair_gran_hooke.cpp: fy = dely*ccel + fs2;
src/GRANULAR/pair_gran_hooke.cpp: fz = delz*ccel + fs3;
src/GRANULAR/pair_gran_hooke.cpp: double mi,mj,meff,damp,ccel;
src/GRANULAR/pair_gran_hooke.cpp: ccel = kn*(radsum-r)*rinv - damp;
src/GRANULAR/pair_gran_hooke.cpp: fn = xmu * fabs(ccel*r);
src/GRANULAR/pair_gran_hooke.cpp: fforce = ccel;
src/GRANULAR/pair_gran_hooke_history.cpp: double
mi,mj,meff,damp,ccel,tor1,tor2,tor3;
src/GRANULAR/pair_gran_hooke_history.cpp: ccel =
kn*(radsum-r)*rinv - damp;
src/GRANULAR/pair_gran_hooke_history.cpp: fn = xmu * fabs(ccel*r);
src/GRANULAR/pair_gran_hooke_history.cpp: fx = delx*ccel + fs1;
src/GRANULAR/pair_gran_hooke_history.cpp: fy = dely*ccel + fs2;
src/GRANULAR/pair_gran_hooke_history.cpp: fz = delz*ccel + fs3;
src/GRANULAR/pair_gran_hooke_history.cpp: double mi,mj,meff,damp,ccel;
src/GRANULAR/pair_gran_hooke_history.cpp: ccel = kn*(radsum-r)*rinv - damp;
src/GRANULAR/pair_gran_hooke_history.cpp: fn = xmu * fabs(ccel*r);
src/GRANULAR/pair_gran_hooke_history.cpp: fforce = ccel;
Now if I install this version Do I have the thing?
we have to figure out which version exactly it is that you have.
i.e. when did you do the clone? what do you get when you do: git branch -v
here is what i get with a fresh clone.
[[email protected]... lammps]$ git branch -v
* master 5c13b08 Merge pull request #592 from akohlmey/reaxc-bugfix
Or should I do the rest of the commands as you explained:
i cannot reproduce what you are claiming. and i am *very* confident,
that this change never made it into the master branch, but was
committed and later reverted on a feature branch of mine before that
was merged. because of how we handle merges, the hash of the reverted
commit is still contained in the history and thus my suggestion to
reapply it can work (this is exactly why we do such "messy" merges).
axel.