Sputtering visualisation

Good day all!

I am trying to simulate deposition using lammps but I am not sure if my molecule file is being read in or not. when I try to assign velocity to group n2 (which is type n2 consisting of nitrogen atoms), I get the error ‘Cannot zero momentum of no atoms’. I am attaching a part of my input file.

echo both
#INITIALISATION-------------------------------

units real
dimension 3
boundary p p f
atom_style charge
read_data input.dat

#SET POTENTIAL--------------------------------

pair_style reax/c NULL checkqeq no
pair_coeff * * ffield.reax C N

#DEFINE GROUPS AND AND VARIABLES--------------

#EQUILIBRATE SYSTEM---------------------------

#DEPOSIT N2------------------------------------------

reset_timestep 0

molecule nitrogen nitrogen.dat
region addatoms block 0 19.6761 0 17.04 ${zhi} 19.00 units box
group n2 type 2

fix 4 n2 nve
fix 5 all deposit 1 0 1 122354 region addatoms mol nitrogen units box
velocity n2 create 300.0 218324 rot yes dist gaussian

dump deposit all atom 1 deposit.lammpstrj

run 100

When I tried to do this without the velocity command but instead specifying velocity(vz) in the fix deposit command, I got no errors but I couldn’t visualize on VMD. Thought I ran for 100 time steps and dumped output every 1 timpestep, I could see only 1 frame on vmd.

In this post dated in 2007, http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/9940.html

I see that 'VMD (currently) cannot handle trajectories with a changing number of atoms.

this is why it stops at the first addition of an atom.’ Is this still the case? I want to visualize the sputtering on VMD.

cheers

Good day all!

I am trying to simulate deposition using lammps but I am not sure if my
molecule file is being read in or not.

You can look at the output log file to see if your group n2 contains any
atoms.

Ray

Good day all!

I am trying to simulate deposition using lammps but I am not sure if my
molecule file is being read in or not. when I try to assign velocity to
group n2 (which is type n2 consisting of nitrogen atoms), I get the error
'Cannot zero momentum of no atoms'. I am attaching a part of my input file.

you *have* to get this error, because the "velocity" command, like all
LAMMPS commands, acts _immediately_. by the time you run the command,
there are no atoms, thus you cannot assign velocities or remove any
net momentum.

[...]

When I tried to do this without the velocity command but instead specifying
velocity(vz) in the fix deposit command, I got no errors but I couldn't
visualize on VMD. Thought I ran for 100 time steps and dumped output every 1
timpestep, I could see only 1 frame on vmd.

In this post dated in 2007,
http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/9940.html

I see that 'VMD (currently) cannot handle trajectories with a changing
number of atoms.

this is why it stops at the first addition of an atom.' Is this still the
case? I want to visualize the sputtering on VMD.

yes, there are some workarounds.

a) you can write out each trajectory frame as a separate file and load
it into VMD as a separate "molecule" and then use the "multimolanim"
plugin to animate the trajectory be showing only one molecule at a
time. http://www.ks.uiuc.edu/Research/vmd/plugins/multimolanim/

b) you write out your trajectory in .xyz format (with dump_modify
elements) and can then use the readvarxyz function of the topotools
plugin to convert it into a fake trajectory with a constant number of
atoms on-the-fly and label the visibility of those atoms via the user
field.
https://sites.google.com/site/akohlmey/software/topotools/topotools---documentation#TOC-readvarxyz-file-name-

c) there also is a hack for the lammps custom trajectory reader plugin
in VMD, but that is not recommended for your case.

axel.

you have to get this error, because the “velocity” command, like all
LAMMPS commands, acts immediately. by the time you run the command,
there are no atoms, thus you cannot assign velocities or remove any
net momentum.

Does this mean that atoms read in by the molecule command are deposited only in the next timestep after using fix deposit? So if I specify ‘deposit every n time steps’ x being the current step, it deposits starting from x+1?

Thanks

you *have* to get this error, because the "velocity" command, like all
LAMMPS commands, acts _immediately_. by the time you run the command,
there are no atoms, thus you cannot assign velocities or remove any
net momentum.

Does this mean that atoms read in by the molecule command are deposited only
in the next timestep after using fix deposit? So if I specify 'deposit every
n time steps' x being the current step, it deposits starting from x+1?

when you issue the fix deposit command, there is no current time step
and the command immediately only creates the fix instance. it will be
activated by the run command and that is where timesteps count and
deposition will happen. if you want to deposit atoms immediately and
not gradually, you have to use the create_atoms command.

axel.

Thank you. That was very helpful.

I was wondering why only one frame of the substrate was loaded? If the molecule couldn’t be loaded, shouldn’t the initial coordinates read in by read_data show up for 100 frames? (since I used ‘run 100’)?

Thank you.

Thank you. That was very helpful.

I was wondering why only one frame of the substrate was loaded? If the
molecule couldn't be loaded, shouldn't the initial coordinates read in by
read_data show up for 100 frames? (since I used 'run 100')?

frame != time step