Atom creation/delition

Dear Lammpsers,

Thanks for your replies to my previous emails!

Now, what I would like to do is to create atoms every N timesteps at a specific position (say 0 0 0) inside a cylinder, and delete atoms that have reached the end of the cylinder, (say 0 0 10)

I have tried doing the following:

Fix 1 group1 deposit 5 2 50 12345 region cylinder target 0 0 0 units box

Fix 2 group1 evaporate 1 1 block 1234

I define a block at the end of my cylinder as a separate region such that all atoms that appear in that region are deleted...

Are there less complicated or more sophisticated ways of doing this- somehow sims tend to crash due to atoms being inside/ on a surface of my region, probably due to high energies... Or the deposited atom is deposited not to the exact position that I need, but further away along the cylinder...

Thank you for your input in advanced!

With best wishes,
Anna

Fix deposit is the way to insert atoms as you say. If you
make the region small and centered at 0,0,0 then
it will insert there. It should check for overlaps when it inserts.
If there are other atoms too near. As the fix deposit doc
page explains:

Once a trial x,y,z location has been computed, the insertion is only
performed if no current particle in the simulation is within a
distance R of the new particle. If this test fails, a new random
position within the insertion volume is chosen and another trial is
made. Up to Q attempts are made. If an atom is not successfully
deposited,
LAMMPS prints a warning message.

You get to choose the value of R with the "near" keyword.

Fix evaporate can also be used to remove particles
as you say.

Steve