Hello LAMMPS users,
I am using the LAMMPS version 23Jun2022. I dumped the selected atoms of type 1 from a specified region into a text file.
region R block 0 80 INF INF INF INF
group selreg region R
group selatom type 1
group select intersect selreg selatom
variable nn equal “count(select)”
print “Number of atoms selected = ${nn}”
write_dump select custom Selected_Atoms.txt id
Then I used variable type ‘file’ to open the created text file full of atom IDs.
variable atomlist file Selected_Atoms.txt
But I am not sure how to go through the list of atom IDs in that text file line by line. I used the ‘next atomlist’ command followed by ‘jump Selected_Atoms.txt’ to try to go through the lines in the text file, but it gave me an error. What is/are the right way or the right command/s to implement this?
Regards,
Rajesh