Deleted 1 atom but Created 0 atoms in the same region

Hi everyone!
I continued a simulation by reading a restart file. But the script can delete one atom but create zero atom in the same defined region.
I used ‘echo both’ command and one section of the log file is:
lattice fcc 3.615
Lattice spacing in x,y,z = 3.615 3.615 3.615
region Ball sphere r 0 (v_l/2) 0.1 side in
region Ball sphere 5 0 $(v_l/2) 0.1 side in
region Ball sphere 5 0 7 0.1 side in
delete_atoms region Ball
Deleted 1 atoms, new total = 4409
create_atoms 1 single r 0 (v_l/2)
create_atoms 1 single 5 0 $(v_l/2)
create_atoms 1 single 5 0 7
Created 0 atoms
group Ball_Cu region Ball
0 atoms in group Ball
This section of my input file is:
lattice fcc 3.615
region Ball sphere r 0 (v_l/2) 0.1 side in
delete_atoms region Ball
create_atoms 1 single r 0 (v_l/2)
group Ball_Cu region Ball
In addition, the use of ‘create_atoms 1 region Ball’ instead of ‘create_atoms 1 single r 0 (v_l/2)’ doesn’t create any atoms either.
But if I put all the commands in one script , i.e., put all commands of the two scripts all together, it works well,.
I can not work this out. Can anybody help me? Any help would be appreciated!

Wenqiang Liu

Create_atoms single will not create an atom if the point you specify
is not inside any proc’s sub-domain. Is the size of your
simulation box the same in the 2 cases - it might not
be if you have shrink-wrap boundaries.

Steve

Hi Steve!
Thank you very much! That is the problem.
In my simulation (it is a cylinder simulation box defined by ‘region rwire cylinder z $r $r $r 0 $l’) the boundary condition is defined by ‘boundary s s p’. The simulation box changed slightly and became smaller in all directions, i.e., from ‘(0 0 0) to (36.15 36.15 50.61)’ in the first script to ‘(0.20601 0.205984 0.173838) to (35.948 35.9733 50.4362)’ in the script which read the restart file.
And could you please help me with my further questions? Since the simulation box can not be redefined in the second script which read the restart file. How can I create a atom at the boundary of the cylinder, e.g. like position (18.075, 0, z) in the restart script. Is this possible?
Thanks very much!

Best Regars
Wenqiang Liu

You can use the change_box command after you read the restart file.

Steve

Hi Steve!
Thanks very much!
I tried change_box command after I read the restart file, but I still have some problems in creating the atom. Could you please help me more?
I used command ‘change_box all x final 0 10 y final 0 10 z final 0 14’, and from the log file I know the box has changed to ‘orthogonal box = (-0.0108472 -0.00723072 0) to (36.1608 36.1572 50.61)’, I think it is bigger than the initial box ‘(0 0 0) to (36.15 36.15 50.61)’ in my first script. But it still does not create an atom in the former ‘box = (-0.0108472 -0.00723072 0) to (36.1608 36.1572 50.61)’ which is from my restart script, but do create an atom in box=’(0 0 0) to (36.15 36.15 50.61)’ provided that I put all these commands in one script. I do not understand. I think the ‘region Ball’ (defined by following commands) should be in the 'box = (-0.0108472 -0.00723072 0) to (36.1608 36.1572 50.61)’ now. But it still create 0 atoms.
The commands for creating atoms are:
lattice fcc 3.615
region Ball sphere 5 0 7 0.1 side in
delete_atoms region Ball
create_atoms 1 region Ball
#create_atoms 1 single 5 0 7
And the whole region is a cylinder which is defined by:
region rwire cylinder z 5 5 5 0 14

Best Regards
Wenqiang Liu

When you use create_atoms single (your first email)
it will put an atom at the x,y,z you specify if it is inside
the simulation box.

When you use create_atoms region (your last email)
it tiles the region with the lattice you have defined. If no
lattice points happen to be inside the region (or the simulatoin
box) then it will create no atoms. The lattice
command has options like origin that can insure at least
one lattice point is in the region, but if you just want
to create one atom, then use create_atom single - it’s simpler.

Steve

Hi Steve!

Thanks very much!

I’m sorry that I reply you so late. I have some problem with logging in my gmail.

I tried using change_box command several times. I am confused that when change_box used, the point specified like x=5, y=0, z=7(lattice fcc 3.615, create_atoms 1 single 5 0 7*)* should be in the simulation box ‘(-0.0108472 -0.00723072 0) to (36.1608 36.1572 50.61)’ . But neither create_atoms single nor create_atoms region create one atom. I think create_atom single should work now but it doesn’t.

Best Regards

Wenqiang Liu

Can you post as simple an input script as

possible which shows the problem?

Steve