[lammps-users] wrap by molecular

Dear Lammps community,

Is there a convenient way to wrap whole molecules in a periodic box, not allowing bonds to span the boundaries? For example, wrapping a particular atom or COM of a molecule, and moving the rest of the atoms in the molecule to that location.

I think this is what owrap does in the pizza.py tool? I tried using owrap, but I can get following error:

ERROR*

** d3zis2.lammpstrj contains dump file of atom type

** d3zis3.lammpstrj, I have tried with column of dump type “id” and “mol” for same results

d=dump(“d3zis2.lammpstrj”)

1320000

read 1 snapshots

1 snapshots selected out of 1

assigned columns: id type x y z

Unscaling dump …

d.owrap(“d3zis3.lammpstrj”)

Wrapping to other …

Traceback (most recent call last):

File “”, line 1, in ?

File “/home/hhatch/software/pizza-8Dec09/src/dump.py”, line 538, in owrap

ix = self.names[“ix”]

KeyError: ‘ix’

There is no command in LAMMPS to do this, unless displace_atoms worked
for you. If you moved the molecule to where it did not overlap the
boundary, I think it would work. But if it does overlap, then it will be
wrapped. I.e. LAMMPS is not going to leave the molecule hanging way
outside the box.

So I think this is more a post-processing issue. The Pizza.py dump.owrap()
command is designed for this. See the dump() tool doc page. You do not
appear to be using the command correctly:

owrap() requires a column be defined which contains an atom ID
    name of that column is the argument to owrap()
    x,y,z for each atom is wrapped to same image as the associated atom ID
    useful for wrapping all molecule's atoms the same so it is contiguous

The arg is supposed to be a column - you appear to be using a filename
as the arg, and are getting an error.

Steve