Use read_data and lattice command in one script

Dear all,

Is it possible to use both these commands in one script? I need to define dual layer graphene over an fcc metal. Since the graphene layers are a bit offset, I am unable to get proper periodic boundary conditions so I was wondering if this is an option. To define an fcc lattice but import coordinates for graphene.

Thanks!

Dear all,

Is it possible to use both these commands in one script? I need to define
dual layer graphene over an fcc metal. Since the graphene layers are a bit
offset, I am unable to get proper periodic boundary conditions so I was
wondering if this is an option. To define an fcc lattice but import
coordinates for graphene.

​the lattice command itself has no impact on the simulation in any way of
shape. it only overlays the system with a grid of lattice points. you can
have as many lattice commands as you want in your input. any lattice
command will replace the previous lattice. the default is a primitive cubic
lattice with lattice spacings (1.0, 1.0, 1.0), i.e. identical to cartesian
coordinates.

​thus the answer to your question is yes.​

the simplest/safest way to do what you want is to take your graphene data
file and increase the number of atom types with a text editor by one and
then delete the PairCoeff section and adjust the Masses section and set the
pair_coefficients afterwards.

​if you have a *very* recent version of LAMMPS, you can also try to load
the data file after cre​ating the metal lattice, but that is trickier,
because with the create_box command, you have to reserve space for all the
topology data and atom types, and that can get tricky.

in either case, you still will have to resolve the mismatch of the "grids".
if the lattice command is not well commensurate with the box dimensions
determined by your graphene, you'll get a bad metal structure. this you can
only resolve with choosing a suitable supercell, where the mismatch is
small and then do a proper relaxation. typically people define the lattice
of the bulk material and expect the adlayer to relax and reconstruct.

​axel.​

More generally you can use read_data and create_atoms and lattice as

many times as you want to build up a complex system. In your case,

it sounds like there is no bond topology (assuming graphene is modeled

with a manybody potential) so its just atoms and is relatively simple.

As Axel said, the last lattice command is the one that is active

when you invoke a create_atoms command (or any other command

that uses a lattice, e.g. the region command to define the extent

of a region using lattice units).

Steve