回复: (无主题)

Dear lammps users
Thank you very much for giving me an answer. I still have a problem. When I add the model of diamond tool to the simulation, not only the volume and number of atoms of single silicon change, but also the number of atoms of diamond tool changes. Could you tell me the reason for the change in the number of atoms in diamond tools?
Here are some of my relevant programs
log log.cut
units metal
boundary s s p
atom_style atomic

lattice diamond 3.5656

region weiqieyuan cylinder z {center} {center} {center} 0 {z} units lattice
region zhongxinyuan cylinder z {center} {center} {center1} 0 {z} units lattice side out
region huan intersect 2 weiqieyuan zhongxinyuan
region qianfang block 0 {center} 0 {center} 0 {z} units lattice region dunyuan intersect 2 qianfang huan region qian block 0 {kuan} {center} {yz} 0 {z} units lattice region jiti block {center} {yz} {kua} {ku} 0 {z} units lattice
region tool union 3 qian jiti dunyuan

#lattice diamond 5.431 origin 0.9 0.9 0.9 orient x 0 1 0 orient y 1 0 0 orient z 0 0 -1 #111 -110
lattice diamond 5.431 origin 0.9 0.9 0.9 orient x 1 -1 0 orient y 1 1 1 orient z -1 -1 2 #111 1-10
#lattice diamond 5.431 origin 0.9 0.9 0.9 orient x -1 1 0 orient y 1 1 1 orient z 1 1 -2 #111 -110

region new_w block -80 0 -40 0 0 3 units lattice
region tem_w1 block -82 -81 -40 -0 0 3 units lattice
region tem_w2 block -81 0 -41 -40 0 3 units lattice
region tem_w union 2 tem_w1 tem_w2 units lattice
region bou_w1 block -82 -81 -41 0 0 3 units lattice
region bou_w2 block -82 0 -42 -41 0 3 units lattice
region bou_w union 2 bou_w1 bou_w2 units lattice
region work union 3 new_w tem_w bou_w units lattice

region box union 2 work tool
create_box 4 box
create_atoms 3 region work
group work region work
group new_w region new_w
group tem_w region tem_w
group bou_w region bou_w
set group new_w type 1
set group tem_w type 2
set group bou_w type 3
lattice diamond 3.5656
create_atoms 1 region tool
group tool region tool
#原子质量
mass 1 28.0
mass 2 28.0
mass 3 28.0
mass 4 12.0

Best
Liu Qiqi

Dear lammps users
Thank you very much for giving me an answer. I still have a problem. When I add the model of diamond tool to the simulation, not only the volume and number of atoms of single silicon change, but also the number of atoms of diamond tool changes. Could you tell me the reason for the change in the number of atoms in diamond tools?

this is basically the same kind of situation that you had before, just reversed. Now you are changing the lattice constant and thus the (number) density of the atoms in the selected region. but the region size is unchanged. the region command always uses the lattice spacing settings from the then current lattice setting.

axel.