[lammps-users] local changes which work against 10Nov05 but not 29Nov06

Hi all.

I was hoping someone might have some ideas about why I’m seeing some strange behavior in my locally modified version of LAMMPS. My modifications work as desired when applied to 10Nov05, but not 29Nov06.

The local modifications which might be relevant are 1) I’m using a custom fix, “FixAxialStrain” which is closely modeled on “FixUniaxial” 2) I’m using a custom bonded (breakable) interaction, “BondLJSmooth” which is closely modeled on the breakable bonded interaction “BondQuartic”. I won’t post code for the latter, since it is so close to BondQuartic, but, that said, I have not reproduced the anomalies with BondQuartic.

I noticed that domain.cpp had many modifications from 10Nov05 to 27Nov06 and suspect that these changes might conflict with my “FixAxialStrain” fix.

The behavior is as follows. After running for 6403 timesteps, runs using both 10Nov05 (plus my local changes) and 27Nov06 (plus my local changes) are identical (with respect to global scalars like Eng_vdwl, KineticEnergy, Lx,Ly, etc). At step 6404, the 27Nov06 version reports “Bond atoms missing” and exits, while the 10Nov05 is perfectly happy and keeps on going.

If I hack “neigh_bond.cpp” to make things more forgiving and change

fix_axial_strain.cpp (3.36 KB)

Should have emphasized this:

It seems very strange that one could ever get a “Bond atoms missing” message in a single CPU run with PBCs (unless one of the positions of a particle somehow gets set to NaN). Both of the atom indices reported in the error message seem valid, yet atom->map() must not know about the partner.

Thanks again.

Most of the changes in domain.cpp are due to a different way
the lattice is specified and stored and to how image flags are
stored and updated. Neither should affect you so long as you
are not reading an old restart file (with outdated image flags).

You would need to add a setting in domain::init() that allows
your fix to change the box volume.

Other than that, I would suspect your bond breaking potential
is doing something illegal, since that it must change internal
LAMMPS data structures. Maybe run it under a memory checker
and see what happens.