linear chain with harmonic bonds and periodic boundary conditions

Dear users/developers

I have a very simple system consisting of a linear chain of atoms
interacting via harmonic bonds with periodic boundary conditions. My
problem is that I'm facing an inconsistent behaviour in two versions of
lammps. The version from 17.Jun.2012 behaves as I expect and the chain
remains streched throughout the simulation, with the end atoms
apparently interacting with the images of each other. Instead, in the
latest version 09.Sept.2013, the system appears to immediately collapse
into a ring, almost as if ignoring the interaction with periodic images.

I understand there have been some changes in the way bonds across
periodic boundaries are dealt with, but it seems that the latest version
does not treat these appropriately. The presence of these bonds between
images should prevent the chain from collapsing into a ring, as it was
the case in the 17.Jun.2012 version.

I am attaching a simple input script and data file which reproduce the
observed behaviour.

My question is: is the current version of lammps really producing the
"correct" behaviour? If so, how is it then possible to simulate a simple
harmonic chain with periodic boundary conditions?

Cheers,
  -felipe.

in.bond.lj (944 Bytes)

data.1d.chain (546 Bytes)

Your problem has been discussed many times in the past.

See for example:
http://sourceforge.net/mailarchive/message.php?msg_id=30616745

Carlos

Thanks, Carlos.

To avoid the infinite loop with which this question appears to be often
answered, let me point out that the reason for this problem and the
solution are explained here: http://lammps.sandia.gov/doc/communicate.html

In particular in the paragraph:

"IMPORTANT NOTE: In these scenarios, if you do not set the ghost cutoff
long enough, and if there is only one processor in a periodic dimension
(e.g. you are running in serial), then LAMMPS may "find" the atom it is
looking for (e.g. the partner atom in a bond), that is on the far side
of the simulation box, across a periodic boundary. This will typically
lead to bad dynamics (i.e. the bond length is now the simulation box
length). To detect if this is happening, see the neigh_modify cluster
<http://lammps.sandia.gov/doc/neigh_modify.html> command."

  -felipe.