# Protein-Ligand Analysis gmx distance INCONSISTENCY problem

**URL:** <https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954>\
**Category:** User discussions\
**Created:** [October 13, 2020, 4:05pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954 "2020-10-13T16:05:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 13, 2020, 4:05pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/1 "2020-10-13T16:05:18Z")

</div>

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

Hello for the above topic for the below Analysis command:

gmx distance -s md\_0\_10.tpr -f md\_0\_10\_center.xtc -select ‘resname “JZ4” and name OAB plus resid 102 and name OE1’ -oall

I believe I should be outputting a dist.xvg file exhibiting AVERAGE DISTANCE but am not and I received the below message:

Inconsistency in user input:  
Selection ‘resname “JZ4” and name OAB plus resid 102 and name OE1’ does not  
evaluate into an even number of positions (there are 1 positions)

How may I correct this Inconsistency to successfully output dist.xvg?

Thanks:)

---

<div class="post-metadata">

**Author:** ![Dr\_DBW](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/dr_dbw/32/42_2.png) [@Dr\_DBW](https://gromacs.bioexcel.eu/u/Dr_DBW)\
**Post date:** [October 13, 2020, 8:55pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/2 "2020-10-13T20:55:24Z")

</div>

Most likely correct the command you are using to generate the index group. From the error it is stating you have one point defined, not two, which is what is required.

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 14, 2020, 11:04am UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/3 "2020-10-14T11:04:29Z")

</div>

Hello Dr\_DBW and thank you for your kind update and if you have any suggestions on this correction feel free to message this.

Also I only ran the Production MD for 1.0 ns instead of the recommended 10.0 ns due to my Laptop capacity, accordingly when I pymol checked the hydrogen bond distances they were much larger than a hydrogen bond due to improper Production Time, accordingly is this why I may be getting this Inconsistency?

Thanks:)  
Joel

Thanks:)  
Joel

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [October 14, 2020, 1:19pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/4 "2020-10-14T13:19:55Z")

</div>

The tutorial should work cleanly and with no issue. I’ve never heard of this step being a problem. Are you copying your actual command above, or just copying from the tutorial? Is it possible your actual command had a typo that causes the issue?

> [@mjsubach](#):
>
> Also I only ran the Production MD for 1.0 ns instead of the recommended 10.0 ns due to my Laptop capacity, accordingly when I pymol checked the hydrogen bond distances they were much larger than a hydrogen bond due to improper Production Time, accordingly is this why I may be getting this Inconsistency?

That won’t affect the selection mechanics at all, but it will affect the end result.

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 14, 2020, 1:55pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/5 "2020-10-14T13:55:11Z")

</div>

Hi Justin and thank you for your kind update and I just copied the command from the tutorial and pasted this command into my iTerm, here is the entire command and output below:

Joels-MacBook-Pro:Tutorial4 joelsubach$ gmx distance -s md\_0\_10.tpr -f md\_0\_10\_center.xtc -select ‘resname “JZ4” and name OAB plus resid 102 and name OE1’ -oall  
:-) GROMACS - gmx distance, 2020.3-MODIFIED (-:

```
                        GROMACS is written by:
 Emile Apol Rossen Apostolov Paul Bauer Herman J.C. Berendsen
Par Bjelkmar Christian Blau Viacheslav Bolnykh Kevin Boyd

```

Aldert van Buuren Rudi van Drunen Anton Feenstra Alan Gray  
Gerrit Groenhof Anca Hamuraru Vincent Hindriksen M. Eric Irrgang  
Aleksei Iupinov Christoph Junghans Joe Jordan Dimitrios Karkoulis  
Peter Kasson Jiri Kraus Carsten Kutzner Per Larsson  
Justin A. Lemkul Viveca Lindahl Magnus Lundborg Erik Marklund  
Pascal Merz Pieter Meulenhoff Teemu Murtola Szilard Pall  
Sander Pronk Roland Schulz Michael Shirts Alexey Shvetsov  
Alfons Sijbers Peter Tieleman Jon Vincent Teemu Virolainen  
Christian Wennberg Maarten Wolf Artem Zhmurov  
and the project leaders:  
Mark Abraham, Berk Hess, Erik Lindahl, and David van der Spoel

Copyright © 1991-2000, University of Groningen, The Netherlands.  
Copyright © 2001-2019, The GROMACS development team at  
Uppsala University, Stockholm University and  
the Royal Institute of Technology, Sweden.  
check out [http://www.gromacs.org](http://www.gromacs.org) for more information.

GROMACS is free software; you can redistribute it and/or modify it  
under the terms of the GNU Lesser General Public License  
as published by the Free Software Foundation; either version 2.1  
of the License, or (at your option) any later version.

GROMACS: gmx distance, version 2020.3-MODIFIED  
Executable: /usr/local/bin/…/Cellar/gromacs/2020.3/bin/gmx  
Data prefix: /usr/local/bin/…/Cellar/gromacs/2020.3  
Working dir: /Users/joelsubach/Desktop/Tutorial4  
Command line:  
gmx distance -s md\_0\_10.tpr -f md\_0\_10\_center.xtc -select ‘resname “JZ4” and name OAB plus resid 102 and name OE1’ -oall

Reading file md\_0\_10.tpr, VERSION 2020.3-MODIFIED (single precision)  
Reading file md\_0\_10.tpr, VERSION 2020.3-MODIFIED (single precision)

* * *

Program: gmx distance, version 2020.3-MODIFIED  
Source file: src/gromacs/trajectoryanalysis/modules/distance.cpp (line 218)  
Function: void gmx::analysismodules::{anonymous}::checkSelections(const SelectionList&)

Inconsistency in user input:  
Selection ‘resname “JZ4” and name OAB plus resid 102 and name OE1’ does not  
evaluate into an even number of positions (there are 1 positions)

## For more information and tips for troubleshooting, please check the GROMACS website at [http://www.gromacs.org/Documentation/Errors](http://www.gromacs.org/Documentation/Errors)

Joels-MacBook-Pro:Tutorial4 joelsubach$

Maybe from this entire output there is something that you may notice more since the command does not have any typos.

Thanks:)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [October 14, 2020, 3:12pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/6 "2020-10-14T15:12:10Z")

</div>

Sorry, no idea what is going on. The tutorial works for me, and I even checked with version 2020 of GROMACS, no problems.

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 14, 2020, 4:04pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/7 "2020-10-14T16:04:02Z")

</div>

Hi Justin and thank you for your kind update and i will look into this more and if solved update you accordingly.:)

Best

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 15, 2020, 12:04pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/8 "2020-10-15T12:04:50Z")

</div>

Hi Justin I ran the remaining analysis on the Protein-Ligand complex despite my Distance Analysis problem, my GMX angle results were in error because of a problem in my group 13:

> 13 & a OAB | a H12

Copied index group 13 ‘JZ4’  
Found 0 atoms with name OAB  
Found 0 atoms with name H12

Fatal error:  
number of index elements not multiple of 3, these can not be angle triplets

However, the rest of my analysis results were satisfactory i.e. RMSD and Total Interaction Energy.  
Accordingly I am going to complete this tutorial once more from scratch to resolve this issue (and it will be good practice:)). If this new knowledge results in any ideas to resolve my two analysis problems within this tutorial feel free to suggest.

Best:)

---

<div class="post-metadata">

**Author:** ![jalemkul](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/jalemkul/32/18_2.png) [@jalemkul](https://gromacs.bioexcel.eu/u/jalemkul)\
**Post date:** [October 15, 2020, 12:49pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/9 "2020-10-15T12:49:18Z")

</div>

> [@mjsubach](#):
>
> Copied index group 13 ‘JZ4’  
> Found 0 atoms with name OAB  
> Found 0 atoms with name H12

Apparently you’ve somehow renamed the atoms in the ligand. I don’t know how that happened, but it explains the failure of the distance analysis as well as the creation of the index group. OAB is an original atom from the PDB file, so again, it is unclear to me how or why you changed the atom names.

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 15, 2020, 12:52pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/10 "2020-10-15T12:52:15Z")

</div>

Hello and ok i will try and resolve this issue, thanks for the update:)

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 16, 2020, 11:55am UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/11 "2020-10-16T11:55:31Z")

</div>

Hello Justin,

I have started the Protein-Ligand Tutorial from scratch to resolve the analysis issues previously and when generating the the ligand topology my “jz4\_ini.pdb” from cgenff\_charmm2gmx.py jz4\_ini.pdb no longer exhibits the 10 OAB atom name that the jz4\_fix.mol2 had resulting in my complex.gro manufactured file to also not exhibit 10 OAB (both instead exhibiting C5). Accordingly this may be the reason for my analyses errors, would you agree? If yes should i just edit the proper OAB into the files? (I am up the the nvt equilibration step now.)

Much Thanks:)  
Joel

---

<div class="post-metadata">

**Author:** ![mjsubach](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/mjsubach/32/387_2.png) [@mjsubach](https://gromacs.bioexcel.eu/u/mjsubach)\
**Post date:** [October 27, 2020, 3:12pm UTC](https://gromacs.bioexcel.eu/t/protein-ligand-analysis-gmx-distance-inconsistency-problem/954/12 "2020-10-27T15:12:48Z")

</div>

Hi Justin just an update, I ended up able to run and obtain successfully my analysis data of the protein-ligand complex. This time I used the CGenFF generated jz4.str file in lieu of the first time using the given downloaded copy within the website.

Best,  
Joel
