examples/srd clarification

Hello all,

I have a question with the in.srd.pure example given with the lammps distribution. I am attaching it at the end of this email.

  1. Is there a specific reason why lattice has been defined three times? Out of which, twice the scale factor is the exact same (0.4)

  2. I am not completely able to understand how the no communication is achieved. There is no atom of type 2, yet we are creating a group of type 2? What exactly does the atom_modify command acheive?

Thanks,

John

2d SRD only test

units lj
atom_style atomic
atom_modify first empty
dimension 2

create box with big lattice

lattice sq 0.4
region box block 0 10 0 10 -0.5 0.5
create_box 1 box

add SRD particles as hi density lattice

lattice sq 0.4
region plane block 0 10 0 10 -0.001 0.001
lattice sq 85.0
create_atoms 1 region plane

group empty type 2

mass 1 0.01
velocity all create 1.0 593849 loop geom

settings - need dummy empty group to enable no communication

neighbor 0.3 bin
neigh_modify delay 1 every 1 check no

comm_modify group empty

timestep is big and SRD frequency is 1

timestep 0.02

fix 1 all srd 1 NULL 1.0 0.25 49894 collision slip
fix 2 all enforce2d

diagnostics

thermo_style custom step temp f_1[7] etotal press f_1[3] f_1[4] f_1[6]
thermo 100

#dump 1 all atom 250 dump.srd.pure

#dump 2 all image 250 image.*.jpg type type zoom 1.6 adiam 0.2
#dump_modify 2 pad 4

#dump 3 all movie 250 movie.mpg type type zoom 1.6 adiam 0.2
#dump_modify 3 pad 4

run 5000

Hello all,

I have a question with the in.srd.pure example given with the lammps
distribution. I am attaching it at the end of this email.

1) Is there a specific reason why lattice has been defined three times?
Out of which, twice the scale factor is the exact same (0.4)

​i presume for clarity (or just through cut-n-paste). the lattice command
determines the units for x, y, and z measurements for many commands
including the region commands.

please note, that the argument to the lattice command has a different
meaning for reduced units than for other unit choices.​

2) I am not completely able to understand how the no communication is
achieved. There is no atom of type 2, yet we are creating a group of type
2? What exactly does the atom_modify command acheive?

​since there are no atoms of type 2, group em​pty is empty. since
comm_modify group <groupid> tells to communicate only atoms in the group
groupid between processors, there are no atoms communicated: the group
itself is empty and all others are ignores. obvious, isn't it?

​axel.​

Thank you for your reply. I have one more question. In this simulation, the lattice command is defined twice as

lattice sq 0.4

Each time, aren’t the default values the same? From documentation: origin = 0.0 0.0 0.0, orient = x 1 0 0, orient = y 0 1 0, orient = z 0 0 1, a1 = 1 0 0, a2 = 0 1 0, and a3 = 0 0 1. Intuitively, I feel that when using create_atoms, the second time the ‘lattice sq 0.4’ command is used, it is redundant. However, when I visualise the output, they are not the same as using the command only once. Is there some offset done when the command is used for the second time?

Thanks,

John

Not sure what you are asking.

If I run examples/srd/in.srd.pure twice,

once as is, once with the second “lattice sq 0.4”

commented out, the thermo output is identical after

5000 steps, and the two final images (uncomment

the dump image lines) are also identical.

So why do you think commenting out the 2nd one

makes a difference?

Steve

Here, I have commented out the ‘lattice sq 85’ line in both cases and got the initial configuration for two cases

  1. with only one ‘lattice sq 0.4’

  2. with both ‘lattice sq 0.4’ commands left as is

Here is the difference in the initial configuration, images using VMD. My question is, what is causing the change in the two images when the same command is being used twice, given that all other values are the default and thus, the same?

lattice.jpg

Which of the 2 identical lattice commands did you comment out?

If you commented out the first one, it is used

by the region and create_box commands which immediately
follow it and you ended

up changing the size of box you created (which

you can see from the LAMMPS output to the

screen which tells you the box size).

If you commented out the 2nd one, then

that’s the test I did and saw no difference.

If that’s what you did, was there any difference

in the number of particles created, or the thermo

output? There wasn’t in my run.

Steve