How to select the first layer of water close to a nanotube

Dear LAMMPS Users

I am trying to calculate some properties of the first hydration shells of a metal oxide nanotube, however I am not sure how to use the “region” and “group” commands to be able to select the first layer of water that is close to the tube and in another group the remaining water group, I have this idea, maybe someone has experience with it, please:

region uno cylinder y 39 39 15 -5.0 EDGE units box # Region includes tube and first shell of water (3 Å)
group tubewater region uno # atoms included in the region “uno”
group water type 1 2 # All atoms of water
group tube type 3 4 # all atoms of tube
group waterfirst subtract tubewater tube # group of water atoms of the first layer (3 Å) that belong to region “uno” but that is not a tube.

group liquidwater subtract all waterfirst tube #group of water atoms that do not belong to the first layer and are not tube.

Sincerely

Eduardo

What do you want people to do with this?

Whether it is syntactically correct, you can see much better for yourself (LAMMPS will complain and you have the complete input)

Whether it does what you expect it to do, you can also see much better for yourself, e.g. you can output the positions of the selected coordinates with different dump commands and visualize and check.

If you have questions about both, group or region command, please ask specific questions.

Also, since you say you want to “compute some properties”, but don’t explain what exactly and how, there is little for anybody else to determine whether what you write is suitable.

P.S.: please choose the correct category when posting. “The Materials Project” is not correct for questions about LAMMPS. This has been adjusted on your behalf this time, but don’t expect it in the future. If you choose the wrong category, your chances to get an answer will drop significantly.