Gmx rdf selection (selrpos and seltype)

GROMACS version: 2021.5
GROMACS modification: Yes/No
Here post your question

Hello anyone, i want to ask about selection (selrpos and seltype) in rdf analysis

Currently i am working on polymer and run MD simulation for pre-polymerization mixture

I want to analyze rdf in 2 component in my system

In molecule 1 i have voriconazole, C16H14F3N5O (39 atom)
In molecule 2 i have acrylic acid C3H4O2 (9 atom)

I want to analyze hydrogen bond between atom F10 (in molecule 1) and atom H9 (in molecule 2)

Can u help suggest how to set -selrpos and -seltype for that 2 atom?

I already try using gmx_mpi rdf -f md.xtc -o tesrdf.xvg -s md.tpr -selrpos whole_mol_com -seltype whole_mol_com -bin 0.01 but there is for whole molecule

when i change to gmx_mpi rdf -f md.xtc -o tesrdf.xvg -s md.tpr -selrpos atom -seltype atom -bin 0.01 how to insert atom F10 as selrpos and H9 as seltype?

I already use -selrpos atom F10 -selrpos atom 10 -selrpos atom “10” -selrpos atom (10) etc but invalid

It said that Invalid command-line options
In command-line option -selrpos
Invalid value: 10

Can you help the command for input atom F9 (in selrpos) and H9 (in seltype)?

Thank you so much for your help

Regards

You don’t need to change -selrpos and -seltype from atom - and they don’t take any additional arguments. Use the -ref and -sel options instead.

I think gmx_mpi rdf -f md.xtc -o tesrdf.xvg -s md.tpr -ref 'atomname F10' -sel 'atomname H9' should work.

If you have atoms named H9 in molecule 1 you will have to rethink this.

Hi Sir, thank you so much for the suggestion, appreciate it for me as new gromacs and MD user (less than 1 month)

Unfortunately i also have atoms named H9 in molecule 1

Can i use ‘atomnumber’ insted of atom name? If it possible how to input it?

I already try gmx_mpi rdf -f md.xtc -o tesrdf.xvg -s md.tpr -ref ‘atomnumber 10’ -sel 'atomnumber 48` but there is an error, it said:

Error in user input → In command-line option -ref → Invalid selection ‘atomnumber 10’ → Near ‘10’ → syntax error

I also have read another discussion and some people usually used indexing

It is good for use indexing for my case?

If you don’t mind, would you please help how to configure/setting up indexing for my case?

Thank you very much for your help Sir

Regards

Hi,
You can use atom numbers, but the syntax is slightly different:
gmx_mpi rdf -f md.xtc -o tesrdf.xvg -s md.tpr -ref 'atomnr 10' -sel 'atomnr 48'

If you want to learn more about the selection syntax you can read the help from the interactive selection by running gmx_mpi rdf -f md.xtc -o tesrdf.xvg -s md.tpr and then typing help or, e.g. help keywords.

Thank you very much for the helpful feedback Sir!

I will learn more about the selection syntax and trying to solve the problem

Regards