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.