A worldwide e-Infrastructure for NMR and structural biology

This site uses cookies for a better experience. By continuing to browse you agree to the use of cookies.

Residue selection in XPLOR distance restraints lists

The script is a simple python script that allows the user to select 2 ranges of residues in XPLOR distance restraint lists with the common XPLOR format:

assign (resid 17 and name HA ) (resid 21 and name HG2 ) 4.08 0.5 0.5
assign (resid 12 and name HA ) (resid 12 and name HB1 ) 4.66 0.5 0.5
assign (resid 8 and name HG2 ) (resid 9 and name HA2 ) 3.94 0.5 0.5

It is very useful for getting a quick overview of the distance restraints between specific residues for inspection.

The script will ask you for input filename, output filename, and 2 residue ranges. A residue range can be a single residue specified as a number, or a range specified as two numbers separated with a "-"

chris:/Users/chris/Desktop> python selectResiduesXplorRestraints.py
Please enter the input XPLOR distance restraints filename: xplor.tbl
Please enter the output XPLOR distance restraints filename: select.tbl
Please enter the first residue range (e.g.: 1 - 5 or 5) : 21-24
Please enter the second residue range (e.g.: 19 - 32 or 9) : 21

- Requires python version 3 or higher
- Extract the file selectResiduesXplorRestraints.py
- run as:
> python selectResiduesXplorRestraints.py

If you want to learn how to create python scripts to improve your workflow, have a look at our python courses.


Chris Spronk

Cite WeNMR/WestLife

Usage of the WeNMR/WestLife portals should be acknowledged in any publication:
"The FP7 WeNMR (project# 261572), H2020 West-Life (project# 675858) and the EOSC-hub (project# 777536) European e-Infrastructure projects are acknowledged for the use of their web portals, which make use of the EGI infrastructure with the dedicated support of CESNET-MetaCloud, INFN-PADOVA, NCG-INGRID-PT, TW-NCHC, SURFsara and NIKHEF, and the additional support of the national GRID Initiatives of Belgium, France, Italy, Germany, the Netherlands, Poland, Portugal, Spain, UK, Taiwan and the US Open Science Grid."
And the following article describing the WeNMR portals should be cited:
Wassenaar et al. (2012). WeNMR: Structural Biology on the Grid.J. Grid. Comp., 10:743-767.


The WeNMR Virtual Research Community has been the first to be officially recognized by the EGI.

European Union

WeNMR is an e-Infrastructure project funded under the 7th framework of the EU. Contract no. 261572

WestLife, the follow up project of WeNMR is a Virtual Research Environment e-Infrastructure project funded under Horizon 2020. Contract no. 675858