Use of gmx select

GROMACS version: GROMACS - gmx, 2022.3
GROMACS modification: Yes/No

I have been trying to understand how the ‘gmx select’ command works, but I still have difficulty, especially when it comes to extracting distance data. For example, I have the structure in the image below: BCD (cyclodextrin), LEV (levodopa), and SOL (water). I want to extract only the trajectory of LEV with a solvation layer between 0.45 and 0.96 nm.

In my tests, I have this sequence:

  • gmx select -f md_0_10.trr -s md_0_10.tpr -select ‘resname SOL and within 0.45 of group “LEV”’ -on trajetorias/index_lev_dist_0.45_de_agua.ndx
  • gmx make_ndx -f md_0_10.gro -n trajetorias/index_lev_dist_0.45_de_agua.ndx -o trajetorias/index_lev_dist_0.45_de_agua_agrupado.ndx
    - ri 0-1000
    - name 1001 LEV_SOLVATADO
    - q
  • echo “LEV_SOLVATADO LEV_SOLVATADO” | gmx trjconv -s md_0_10.tpr -f md_0_10.trr -pbc mol -center -ur compact -o trajetorias/traj_lev_dist_0.45_de_agua_agrupado.pdb -n trajetorias/index_lev_dist_0.45_de_agua_agrupado.ndx

Can someone shed some light on this?

Hello:

The output you are requesting requires dynamic selections. I am not sure if the version of gromacs you are using has the version of gmx trjconv that recognizes dynamic selections.

An alternative is to use gmx trjorder, I think it might work for what you want to show: gmx trjorder - GROMACS 2024.2 documentation

Ok! Thanks! I will read about it!