[lammps-users] Random seed/atoms aound region

Dear Axel,

I have generated random numbers using ipython notebook and saved that as a .txt file. From LAMMPS mailing list
I found your following reply how to read these seed in LAMMPS and understood.

shell ‘rm -f rngs.txt; for s in $(seq 1 100); do echo $RANDOM >>
rngs.txt ; done’
variable seed file rngs.txt

However, I would like to put these seeds/atoms around a region say cylinder or sphere, within certain cut off distance. If the

atoms overlap with the region atoms I would like to omit those atoms. If it doesnt, I would like to keep those atoms.
Your suggestions on this please.

From the morning the LAMMPS page is giving the following error and couldnt find suggestions for the above:
" An error occurred during a connection to lammps.sandia.gov. PR_CONNECT_RESET_ERROR".

However what I have done is using " fix wall region command" with cut off distance but the region wall will act as a bounding wall
and the seed / atoms will be away for the defined cut-off distance. How can I put these seeds around the region.

Dear Axel,

I have generated random numbers using ipython notebook and saved that as a .txt file. From LAMMPS mailing list
I found your following reply how to read these seed in LAMMPS and understood.

shell ‘rm -f rngs.txt; for s in $(seq 1 100); do echo $RANDOM >>
rngs.txt ; done’
variable seed file rngs.txt

However, I would like to put these seeds/atoms around a region say cylinder or sphere, within certain cut off distance. If the

atoms overlap with the region atoms I would like to omit those atoms. If it doesnt, I would like to keep those atoms.
Your suggestions on this please.

a) what you are doing is needlessly convoluted. you would not need a shell escape to have a variable returning random numbers, but that can be done with an equal style variable, where also have a choice of different distributions. but even better, LAMMPS has a method to create atoms at random positions built in in the create_atoms command.
b) if you want to put atoms at random positions within a given distance to a region, then you can just create a second region that is correspondingly larger than the first region and define yet another region that is the intersection of those regions. this intersection region you can then fill with randomly placed atoms.
c) to avoid overlapping newly created atoms with existing atoms you can use the overlap option of the delete_atoms command after placing the two sets of atoms into different groups

axel.

Thanks Axel. Just after writing to you I realised that random atoms can be created using the command create_atoms.
I have learned many things from your comments recently and implementation of certain elegant input
script given by you helped me a lot to understand how one should write a script.

Thanks again.

please note that you can also access the online documentation at: https://docs.lammps.org
the mailing list archive at: https://sourceforge.net/p/lammps/mailman/lammps-users/
or at: https://matsci.org/c/lammps/lammps-users/
and you can download LAMMPS source code releases (patches and stable) from: https://github.com/lammps/lammps/releases

axel.

thank you so much for the timely help Axel. the error page is still there and I was struggling to find help.
Now I can refer these links.