I am trying to create 2 lattices where one lattice structure lies on top of the other. I am able to simulate and visualize the 2 lattices separately but am having a hard time putting both of them in a single code. Below is a simplified input file which is giving me the following error “Cannot create_box after simulation box is defined”. Could someone let me know how to create two or more lattices?
The command ‘create_box’ defines the global
simulation box of your system together with the number
of all the atom types to be defined. So it should come
only once in a single code.
For the ‘lattice’ command, it deals with the regions
(not the global box) you have defined. So just use the
region ‘box1’ to create the 2nd lattice.
It seems that there are two atom types in your simulation.
The way you specify the masses and pair_coeff should
adjusted accordingly. The doc pages of these commands
should help.
Use create_box once. Use create_atoms as many times
as you want. Use lattice as many times as you want. Whenever
create_atoms operates it uses values from the most recent lattice
command.
Thanks for your responses. I am now able to create 2 lattices but am getting an “Invalid args for pair_coeff” error. I have 2 tersoff files, one associated with the lower lattice consisting of 1 type of atoms and another associated with the upper lattice consisting of another type of atoms. This has been written as,
You can't use 2 Tersoff files, nor even 2 pair_coeff commands with Tersoff.
The doc page is clear on this. You can use one Tersoff and some other
potential (by using pair_style hybrid). Or you can combine the 2 files
into one file, e.g. with different atom types, and define the cross
interactions in some way. You can use multiple atom types in your
LAMMPS model and map them to different "elements" in the single
Tersoff file, however you wish.