Distance and angle between two amino acids

GROMACS version: 2023.4
GROMACS modification: Yes/No
I have an average pdb file. I want to know the distance and angle between them. I tried some codes but it there were error. I would be grateful if anyone kindly suggest me the code in this regards. Here is the code:
Command line:
gmx distance -f traj_comp.xtc -s average.pdb -n index.ndx -oall distances.xvg

Available static index groups:

  • Group 0 “System” (2307 atoms)*
  • Group 1 “RNA” (2307 atoms)*
  • Group 2 “r_6” (31 atoms)*
  • Group 3 “r_11” (30 atoms)*
    Specify any number of selections for option ‘select’
    (Position pairs to calculate distances for):
    (one per line, for status/groups, ‘help’ for help, Ctrl-D to end)
    > 2
    Selection ‘2’ parsed
    > 3
    Selection ‘3’ parsed
    > q
    Invalid selection ‘q’
  • While parsing ‘q’*
  • Cannot match ‘group “q”’, because no such index group can be found.*
  • ^D*
    WARNING: Masses and atomic (Van der Waals) radii will be guessed

  •     based on residue and atom names, since they could not be*
    
  •     definitively assigned from the information in your input*
    
  •     files. These guessed numbers might deviate from the mass*
    
  •     and radius of the atom type. Please check the output*
    
  •     files if necessary. Note, that this functionality may*
    
  •     be removed in a future GROMACS version. Please, consider*
    
  •     using another file format for your input.*
    

-------------------------------------------------------
Program: gmx distance, version 2023.4
Source file: src/gromacs/trajectoryanalysis/modules/distance.cpp (line 216)
Function: void gmx::analysismodules::(anonymous namespace)::checkSelections(const SelectionList &)

Inconsistency in user input:
Selection ‘r_6’ does not evaluate into an even number of positions (there are
31 positions)

Sincerely,
Ahsan

Hi,
I understand that you would like to calculate the distance between two residues. In that case you could use gmx pairdist.

gmx distance calculates distances between pairs of positions as a function of time. Each selection specifies an independent set of distances to calculate. Each selection should consist of pairs of positions, and the distances are computed between positions 1-2, 3-4, etc…This last point is the reason of the error you got for r_6.

\Alessandra

Hi,
Thank you so much for your suggestion.

Sincerely,
Ahsan