using two different material with read_data comment

hello dear all lammps user,
i have some problems with defining two different materials in lammps input

I have a nanosheet with boundary condition of (p p s) and in its lammps input i want to add another material which must be placed in the top of it. (Si cluster)

First i defined the nanosheet with this comment

atom_style atomic
neighbor 2.0 nsq
neigh_modify delay 1
read_data ./data.out
pair_style tersoff
pair_coeff * * ./C.tersoff C

then for the cluster, apparently i have to add an “add” comment after the file name

neighbor 2.5 nsq
neigh_modify delay 1
read_data ./SphereUnit.xyz add
pair_style tersoff
pair_coeff * * ./Si.tersoff Si

now i encounter an error which is " Did not assign all atoms correctly " .
could anyone help to pass this error?

Thank you so much for your help in advace.

Best regards,
Rouzbeh

hello dear all lammps user,
i have some problems with defining two different materials in lammps input

I have a nanosheet with boundary condition of (p p s) and in its lammps
input i want to add another material which must be placed in the top of it.
(Si cluster)

First i defined the nanosheet with this comment

atom_style atomic
neighbor 2.0 nsq
neigh_modify delay 1
read_data ./data.out
pair_style tersoff
pair_coeff * * ./C.tersoff C

then for the cluster, apparently i have to add an "add" comment after the
file name

neighbor 2.5 nsq
neigh_modify delay 1
read_data ./SphereUnit.xyz add
pair_style tersoff
pair_coeff * * ./Si.tersoff Si

now i encounter an error which is " Did not assign all atoms correctly " .
could anyone help to pass this error?

please read the documentation for read_data very carefully and pay
attention to the parts related to reading multiple data files,
specifically the comments about atom types. your quoted inputs
indicate, that you haven't understood the implications of what you are
trying to do here.

for your system, you may find it easier to just create a combined data
file with external tools and then just use that.

axel.

Thank you so much dear Axel.
just i have a question, the problem come from the atom_style comment or it’s all about read_data comment?
because both comments have a lot of options, in which one should i focus it?

Thank you so much for help. I really appreciate

Thank you so much dear Axel.
just i have a question, the problem come from the atom_style comment or it's
all about read_data comment?
because both comments have a lot of options, in which one should i focus it?

i have given you a very specific reply.
please also note, that comment != command, which is a quite important
distinction in the context of working with computers and scripts.

axel.

Dear Axel,
your help is greatly appreciated, and sorry, it was my mistake.
With your help, i already defined two different materials with read_data command. There is just one problem, my final model should include three types of atom (Boron and nitrogen atom from the first read_data and Si atom from the second read_data), but it still has two types os atoms, even with using " extra/atom/type" command nothing change. I will be grateful, if you can help me on this.

atom_style atomic
neighbor 2.0 nsq
read_data ./data.out extra/atom/types 1

read_data ./SphereUnit.xyz add append
pair_style tersoff
pair_coeff * * ./BN2.tersoff B N NULL
pair_coeff * * ./Si.tersoff Si Si Si

for more information, i should say that i have a boron nitride nanosheet and a Si cluster, that is why i use two different tersoff potentials.
Thank you so much for your time .

With the best regards,
Rouzbeh

Dear Axel,
your help is greatly appreciated, and sorry, it was my mistake.
With your help, i already defined two different materials with read_data
command. There is just one problem, my final model should include three
types of atom (Boron and nitrogen atom from the first read_data and Si atom
from the second read_data), but it still has two types os atoms, even with
using " extra/atom/type" command nothing change. I will be grateful, if you
can help me on this.

it works for me with the current version of LAMMPS (17 Nov 2016).

axel.

Dear Axel,
your help is greatly appreciated, and sorry, it was my mistake.
With your help, i already defined two different materials with read_data
command. There is just one problem, my final model should include three
types of atom (Boron and nitrogen atom from the first read_data and Si atom
from the second read_data), but it still has two types os atoms, even with
using " extra/atom/type" command nothing change. I will be grateful, if you
can help me on this.

atom_style atomic
neighbor 2.0 nsq
read_data ./data.out extra/atom/types 1
read_data ./SphereUnit.xyz add append

pair_style tersoff
pair_coeff * * ./BN2.tersoff B N NULL
pair_coeff * * ./Si.tersoff Si Si Si

BTW: this tersoff setup most definitely cannot work. the second
pair_coeff statement will wipe out the first. tersoff potentials
cannot be mixed.

for more information, i should say that i have a boron nitride nanosheet and
a Si cluster, that is why i use two different tersoff potentials.

for that kind of system, the second pair_coeff line would be
incorrect, and as mentioned before, you cannot do this. the only way
to have two tersoff potentials in the same calculation is via
pair_style hybrid, which can combine two different sub-systems, but
for that, you need to provide the interactions between the two
sub-systems in a pairwise additive potential, e.g. morse, lj/cut,
buckingham or similar.

axel.

Dear Axel,
Thank you so much for helps, i'm really appreciated.

Best regards,
Rouzbeh