I want to simulate the slm process with lammps and for this purpose I define a dynamic cylindrical region with a diameter of 5.0 nm and a height 7.0 nm with initially positioned at (x,y)=(80,80) and this region moved with constant speed 2.0 angstrom/ps in the x direction and I use this command for this region:
variable dx equal 2.0
region laser cylinder z 80 80 25 112 182 move v_dx Null Null
group laser dynamic all region laser
and in order to simulate the laser heating process I use “fix heat” command with 270 eV/ps laser power:
fix 1 laser heat 1 270
and I got this error: Fix heat group has no atoms
How can I fix this problem?
This error is pretty self-explanatory. Your region and thus your group is defined in such a way that there are no atoms in the region and thus in the group.
A common mistake is to forget that positions and lengths for many commands in LAMMPS are given by default in multiples of the lattice spacing (units lattice), which may be different from the absolute coordinates (units box).
A simple trick to visualize a region is to use a create_atoms command to fill that region and then use the write dump command to output a dump file or an image.
I defined particles in this region with other region commands and I want to region laser act like a laser and melt atoms in other regions.
also when I delete move style in region laser The number of atoms in the laser group is no longer zero.
The situation is straightforward:
- fix heat won’t work without atoms in its group
- since your group depends on the region, you have to make sure the region is located where there are atoms
This is for you to sort out.
That is a strong hint where the issue is.
BTW: I doubt that fix heat will work with a dynamic group since it has a region keyword.
I am sure that the region is located where there are atoms.
There are two possible explanations:
a) your input is not doing what you think it does
b) there is a bug in LAMMPS
“I am sure” is no proof for a bug. I am very certain that the group selection and region positioning works exactly as documented. I wrote a whole bunch of unit tests for it.
So you have to go back to the beginning and build your input step-by-step and validate at each step that the commands and parameters do what you think they do. In other words, just follow standard debugging procedure. You can hope, but it is not very likely that somebody here will do this for you and figure out for you where you are overlooking something. I for one am done with this topic.