Question on how fix deposit works

Hi all,

I am experimenting with a few scripts as a personal project to understand fix deposit.

Below is an input script I have generated but have a few questions to make sure I understand what is going on.

  • In this case I create a large simulation box first 0 5 0 10 0 5
  • Next I create a substrate that fills the x and z components but only 0 5 in the y: region substrate block 0 5 0 5 0 5 and assign atom type 1 to the substrate
  • I then create a fixed region that fills x and z but only 0 to 1 in the y. Why do I need to do this?
  • I then build a region insert that atoms will be put into. It almost fills x and z and is the top part of y (above the substrate)
  • I then set velocity and forces in the substrate to zero and NVE on all atoms.
  • then I deposit type 2 in the insert region at a rate of -1. However, in the manual it says that this is the z direction. However, from what I can tell wouldn’t I want to be inserting in the -1 y direction as the insert region is in x and z but above y?
  • Finally, the boundary in the beginning is shrink wrapped in x and y and periodic in z. Why not make it like the example script and have it p f p?

Overall this script appears to be inserting in the y direction where I think it would be easier to make the fixed region 0 5 0 10 0 1 and then have the insert region 0 5 0 10 4 5

Thanks very much. There is a lot of info on the fix deposit command, but no tutorial or explanation on what is needed in terms of substrate etc.

Liam

Input script below:

sample surface deposition script for atoms

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

units real
boundary s s p
atom_style full
variable latparam equal 2.85

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

lattice bcc {latparam} region box block 0 5 0 10 0 5 create_box 2 box lattice bcc {latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

mass 1 55.85
mass 2 16.02

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

pair_style reax/c NULL checkqeq yes
pair_coeff * * ffield.reax.Fe_O_C_H Fe O
fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c

neigh_modify delay 0

#substrate
region substrate block 0 5 0 5 0 5
create_atoms 1 region substrate

#fixed region
region fixed block 0 5 0 1 0 5
group fixed region fixed
set group fixed type 1

#insert region
region insert block 1 4 7 9 1 4

compute new2d substrate temp

velocity substrate set 0 0 0
fix 2 all nve
fix 3 fixed setforce 0 0 0
fix 4 all deposit 10 2 100 12345 region insert rate -1 units box

timestep 0.25

dump 1 all atom 100 dump.deposit

thermo_style custom step atoms temp epair etotal press
thermo 100
thermo_modify temp new2d

run 1000

Comments below.

Steve

Thanks Steve,

I am following everything you said, I got the script as a posted input file but am thinking I am best moving away from it and doing it more similar to the provided example.

One other general question is why is a fix nve typically use with a deposition? I am assuming it is to allow us to see temperature fluctuations?

If I wanted to say set the substrate at a temperature first could I run an nvt equilibration on the entire system, unfix this, then run my deposition allowing for temperatures to change from this original nvt?

Finally, in the example script they run a fix nve on the substrate and mobile region, and then a langevin on the mobile region. This mobile region includes the entire simulation box apart from a fixed bottom layer. What is accomplished by doing the langevin? The temperature is 300, but there is not time to allow the system to reach the 300 before deposition is done. It seems to be treated very differently than an equilibration as the fix is run during the deposition.

nve on the addatoms and nve/langevin on mobile

fix 2 addatoms nve
fix 3 mobile langevin 300 300 25 587283
fix 4 mobile nve

Thanks very much this is very helpful in my understanding.

Just as a follow up to my last question:

based on my understanding of thermostats the lines:

fix 2 addatoms nve
fix 3 mobile langevin 300 300 25 587283
fix 4 mobile nve

Can be replaced by:

fix 2 addatoms nve
fix 3 mobile nvt 300 300 25

As a nve/langevin is essentially an nvt.

Liam

I would not agree. Langevin dynamics and Nosé-Hoover dynamics will both, given a stable integration time step and periodic boundary conditions, sample the canonical distribution, but the way in which they achieve that is very different.

Thanks Stefan for the clarification on the difference. Please see my questions on deposition above if you have any thoughts:

One other general question is why is a fix nve typically use with a deposition? I am assuming it is to allow us to see temperature fluctuations?

If I wanted to say set the substrate at a temperature first could I run an nvt equilibration on the entire system, unfix this, then run my deposition allowing for temperatures to change from this original nvt?

Finally, in the example script they run a fix nve on the substrate and mobile region, and then a langevin on the mobile region. This mobile region includes the entire simulation box apart from a fixed bottom layer. What is accomplished by doing the langevin? The temperature is 300, but there is not time to allow the system to reach the 300 before deposition is done. It seems to be treated very differently than an equilibration as the fix is run during the deposition.

nve on the addatoms and nve/langevin on mobile

fix 2 addatoms nve
fix 3 mobile langevin 300 300 25 587283
fix 4 mobile nve

Liam

You use NVE because typically you don’t want to alter the equation of motion of atoms that are undergoing reactions. If you want to regulate the temperature, use the heatbath configuration. The example is only an example – if the surface is expected to react with addatoms, then the surface should not be thermostated. If not, then you should allow enough relaxation time before the next incident.

Ok, as per advice I have received and read on the forum, the best way to learn is replicate some published data. I am studying atomic oxygen impact leading to mass loss on a substrate. In this paper they set up the substrate, equilibrate it to 200K for 20000 timesteps (.5 fs timestep) and then run an NVE deposit. I am hoping for surface erosion/reaction, so I don’t want it regulated during deposition, just want it at that temp before deposition.

My biggest confusion though is what the langevin is doing in the example problem?

nve on the addatoms and nve/langevin on mobile

fix 2 addatoms nve
fix 3 mobile langevin 300 300 25 587283
fix 4 mobile nve

It seems that running the langevin after the nve eliminates the nve? Therefore in this case it is a thermostat on the surface? Also, the Tstart Tstop isn’t given any time to equilibrate to this temperature before the deposition so it seems to be irrelevant as temperatures spike upon impact.

As a follow up to my previous question, the steps in the paper run and NVT to equilibrate at 200K then run NVE deposit. They then track how the substrate erodes. To do this I assume I run an NVT equilibration on my substrate (the mobile part only), then do the deposition with a fix nve (no langevin at this point?) on the entire simulation region (excluding the fixed part of the substrate).

I don’t want my simulation to stop when atoms on the surface shoot off, instead I want to track them. A few ideas I had are to track the mass of the substrate region, or perhaps some kind of count on this region? However, when these atoms shoot off will I get an error saying lost atoms? If so is this why INF is used in some examples?

Thanks for the help. Like I said above I am following advice by trying to replicate published results before trying something my own.

You can choose how LAMMPS handles atoms that leave the surface by using

the boundary command appropriately. And the thermo_modify lost setting.

If you try to grow the simuation box to encompass atoms that far

away, the simulation will be inefficient. If something is shooting off

to infinity, then something is wrong with your dynamics.

Steve

Ok, I took a look at that setting and modified my script below. I have also added the NVT equilibration. While it does add the atoms, when I look at the movie they just appear above the substrate but don’t seem to be impacting. Are there any glaring errors in my script or is it just a visualization issue?

Thanks again, this forum is very helpful and I am trying this as a learning example for deposit/erosion.

sample surface deposition script for atoms

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

units real
dimension 3
boundary p p f
atom_style full
variable latparam equal 2.85

define lattice and large simulation box

lattice bcc {latparam} region box block 0 10 0 10 0 20 create_box 2 box lattice bcc {latparam} orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

make substrate region

region substrate block 0 10 0 10 0 5
create_atoms 2 region substrate

#make a region called mobile that I think ultimately fixes the bottom portion of Z
group addatoms type 1
region mobile block 0 10 0 10 2 20
group mobile region mobile

mass 1 16.12
mass 2 55.85

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

pair_style reax/c NULL checkqeq yes
pair_coeff * * ffield.reax.Fe_O_C_H O Fe
fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c

neigh_modify delay 0

####################################### EQUILIBRATION

#set timestep
reset_timestep 0
timestep 0.25

#set temperature
velocity mobile create 300 12345 mom yes rot no
fix 2 mobile nvt temp 300 300 25

Set thermo output

thermo 100
thermo_style custom step lx ly lz press pxx pyy pzz pe temp

Run for at least 10 picosecond (assuming 1 fs timestep)

run 1000
unfix 2

------------------------ NVE ------------------------------

reset_timestep 0

compute due to extra atoms added

compute add addatoms temp
compute_modify add dynamic/dof yes extra/dof 0

nve on all but fixed

fix 2 addatoms nve
fix 3 mobile nve

#make the slab for insertion
region slab block 0 10 0 10 18 20

add the atoms, 10 atoms in total, 1 every 100 steps, no closer than 1 and -1z velocity

fix 4 addatoms deposit 10 1 100 12345 region slab vz -.074 -.074
fix 5 addatoms wall/reflect zhi EDGE

handling of atoms the get bounced back from surface or sputtered off the surface.

thermo 100
fix 100 all dt/reset 1 NULL 0.001 0.01 units box
thermo_style custom step atoms temp etotal
thermo_modify lost ignore
thermo_modify temp add

dump 3 all movie 50 movie.mpg type type axes yes 0.8 0.02 view 80 -30

timestep 0.25

run 5000

Sorry, no one wants to look at long input scripts and “verify” them for someone else.

In general you need to ask a very specific Q or work with your own script youself

to figure out what it is doing.

Steve