multiple clusters deposition onto a substrate

Dear LAMMPS users,

My goal is to simulate a thin film growth by multiple Ag clusters deposition onto Ag substrate.

I have struggled so far to insert new clusters while continuing previous cluster deposition .

I have tried to add 2 moving clusters one after the other, but when the second insertion starts, the first cluster stops moving, even if it appears, when I still want the first simulation to be continued.

I wish I could create a sort of loop on the number of clusters to be inserted.

Here is posted my current script :

------------------------ INITIALIZATION ----------------------------

units metal
dimension 3
boundary p p p
atom_style atomic
variable latparam equal 4.09

----------------------- ATOM DEFINITION ----------------------------

lattice fcc ${latparam}
region box block 0 20 0 20 -5 40
create_box 1 box

region substrate block 0 20 0 20 0 10
lattice fcc ${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region substrate

------------------------ FORCE FIELDS ------------------------------

pair_style eam/alloy
pair_coeff * * Ag.eam.fs Ag

----------------------- FIRST CLUSTER ----------------------------

NP sphere with lattice rotated 45° about the z axis from the substrate

region NP sphere 2 10 20 3
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP

timestep 0.001
group NP region NP
velocity NP set 0 0 -1
fix 1 all npt temp 300 300 100 iso 0 0 1 drag 1
dump 1 all image 50 image.*.jpg type type &
axes yes 0.8 0.02 view 80 -30
dump_modify 1 pad 5
run 1000

----------------------- SECOND CLUSTER ----------------------------

NP sphere with lattice rotated 45° about the z axis from the substrate

region NP1 sphere 2 10 25 3
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP1
group NP1 region NP1
velocity NP1 set 0 0 -1
fix 1 all npt temp 300 300 100 iso 0 0 1 drag 1
dump 2 all image 50 output2/image.*.jpg type type &
axes yes 0.8 0.02 view 80 -30
dump_modify 2 pad 5
run 1000

SIMULATION DONE

print “All done”

Dear LAMMPS users,

My goal is to simulate a thin film growth by multiple Ag clusters deposition
onto Ag substrate.
I have struggled so far to insert new clusters while continuing previous
cluster deposition .

I have tried to add 2 moving clusters one after the other, but when the
second insertion starts, the first cluster stops moving, even if it appears,
when I still want the first simulation to be continued.

the problem is that you use fix npt for all atoms and all periodic
boundary conditions. both are very bad choices for your kind of
simulation.

I wish I could create a sort of loop on the number of clusters to be
inserted.

you can. why should it not be possible?

axel.

Dear Axel,

Thank you for your answer. I am still confused about the way to create a loop which inserts a finite number of clusters that I define as a spherical region in my simulation at a certain rate.

I tried different ways, but it didn’t do it properly.
First, I inserted atoms in a spherical region using fix_deposit, but it doesn’t allow me to add the same periodic clusters structure.

group addatoms type 2

region sphere block 0 4 0 4 10 15

fix 4 addatoms deposit 1 2 1 12345 region sphere near 1.0 &
vz -8 -8

My second thought was to use read_restart to save the data for the first insertion and continue it when the second one starts , here is what I did :
This was added at the end of the first insertion:
read_restart save.in

This was added at the beginning of the second insertion :
restart 1000 save.in

But I got an error saying “cannot read_restart after creating simulation box”.

Please let me know if you have suggestions,

Best,
Nawel

Dear Axel,

Thank you for your answer. I am still confused about the way to create a
loop which inserts a finite number of clusters that I define as a spherical
region in my simulation at a certain rate.

I tried different ways, but it didn't do it properly.

sorry, but the only possible advice to "it doesn't work" is "you did it wrong"

have you tried writing your script in stages, e.g. to first build a
loop that only inserts a single atom?

First, I inserted atoms in a spherical region using fix_deposit, but it
doesn't allow me to add the same periodic clusters structure.

group addatoms type 2
region sphere block 0 4 0 4 10 15
fix 4 addatoms deposit 1 2 1 12345 region sphere near 1.0 &
                vz -8 -8

My second thought was to use read_restart to save the data for the first
insertion and continue it when the second one starts , here is what I did :
This was added at the end of the first insertion:
read_restart save.in
This was added at the beginning of the second insertion :
restart 1000 save.in

But I got an error saying "cannot read_restart after creating simulation
box".

yes, and that is well documented.

Please let me know if you have suggestions,

building a loop around the code construct you had should work, if you
do it right. but i cannot read people's minds, so i cannot tell you
what you did wrong.

you should also be able to build templates using the molecule command
and then insert those.

but first and foremost, you have to change your ill conceived overall
simulation setup.

axel.

Dear Axel,

Thank you very much for your help. I made some changes to my input script to be able to introduce multiple clusters, here is my updated script.
You mentioned before that I was applying my fix_nvt to both clusters and periodic boundaries, could you explain me more what you meant please?

I also create a fix_deposit to insert several clusters, but when I ran my simulation, I get the error “incorrect args for pair coefficients”. Does it mean that my input file for potential is no longer correct when I don’t use periodic boundaries on z-direction?

Please let me know if you have suggestions, and thank you again for your time.

Best,
Nawel

------------------------ INITIALIZATION ----------------------------

units metal
dimension 3
boundary p p f
atom_style atomic
variable latparam equal 4.09

----------------------- ATOM DEFINITION ----------------------------

lattice fcc ${latparam}
region box block 0 20 0 20 -5 40
create_box 2 box

region substrate block 0 20 0 20 0 10
lattice fcc ${latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 region substrate
group substrate region substrate

------------------------ FORCE FIELDS ------------------------------

pair_style eam/alloy
pair_coeff * * Ag.eam.fs Ag

----------------------- IMPACTION LOOP ----------------------------

region NP sphere 2 10 18 3
lattice fcc ${latparam} orient x 1 1 0 orient y -1 1 0 orient z 0 0 1
create_atoms 1 region NP
group NP region NP
groupe NP type 2

fix 1 NP deposit 100 2 100 12235 region NP near 1.0 vx 0.0 0.0 vy 0.0 0.0 vz -1.0 -1.0 units box

fix 2 all nvt temp 300.0 300.0 100.0
fix 3 substrate wall/reflect zlo EDGE zhi EDGE units box

dump 1 all image 200 output1/image.*.jpg type type &
axes yes 0.8 0.02 view 80 -30
dump_modify 1 pad 5

run 1000
unfix 1
unfix 2
unfix 3

SIMULATION DONE

print “All done”

Dear Axel,

Thank you very much for your help. I made some changes to my input script to be able to introduce multiple clusters, here is my updated script.
You mentioned before that I was applying my fix_nvt to both clusters and periodic boundaries, could you explain me more what you meant please?

What is there to “mean”? Both a very bad idea for your system.

I also create a fix_deposit to insert several clusters, but when I ran my simulation, I get the error “incorrect args for pair coefficients”. Does it mean that my input file for potential is no longer correct when I don’t use periodic boundaries on z-direction?

That is complete nonsense.

Please let me know if you have suggestions, and thank you again for your time.

You obviously need to talk to your adviser about properly designing your simulations. It don’t have time and don’t get paid to do that for you. Your problems are not lammps problems, but general simulation concept problems.

Axel