[lammps-users] How to wrap atoms into simulation box with read_data
Andrew Gibbons <agibbons@...7232...>
Tue, 14 Nov 2017 11:44:44 +0900
I have a script that generates molecule files that can be read into
LAMMPS using read_data. My problem is that this file can generate
molecules that lie outside of the simulation box. When reading into a
periodic boundary system this is not a problem, but trying to read into
a fixed boundary box causes an error. What is the best way to reposition
the atoms when reading the data file?
Here the relevant part of the LAMMPS script:
boundary f f f
This causes an error as the atoms are outside of the box defined in the
atom data file.
I found a way around this, basically I change the atom images and box
boundary conditions after loading the data file.
boundary p p p
set atom * image 0 0 0
change_box all boundary f f f
But I was wondering is a better way?