My software notes

June 2, 2006

NOE constraints counter

Filed under: softwares and scripts,xplor/xplor-nih/cns — kpwu @ 7:12 pm
Tags: , ,

Yesterday, I spent 1.5 hours writing a shell script which can take xplor-nih NOE table files as inputs and output the numbers of NOEs of each residue and report the numbers of intra residual, sequential, short, medium and long range NOEs after sorting. The current script doesn’t take ambiguous and hydrogen bond constraints as input. To run the script well, users have to remove those ambiguous and hydrogen bond constraints first. Oh, also, I won’t calculate complex structure, the script doesn’t support complex structure constraints as inputs (which means the file has segid “a”, segid “b” in each line).

The example results are like:

residue 5 has 1 NOEs
residue 6 has 2 NOEs
residue 7 has 1 NOEs
residue 8 has 4 NOEs
residue 9 has 0 NOEs
residue 10 has 1 NOEs
residue 11 has 4 NOEs
residue 12 has 7 NOEs
residue 13 has 9 NOEs
residue 14 has 5 NOEs
residue 15 has 6 NOEs
residue 16 has 7 NOEs
residue 17 has 7 NOEs
residue 18 has 13 NOEs
residue 19 has 8 NOEs
residue 20 has 11 NOEs
and the statistics look like:

total counted NOEs are: 717
intra_residual (j-i = 0): 205
sequential (j-i = 1): 263
medium range (j-i = 2 ): 34
medium range (j-i = 3 ): 6
medium range (j-i = 4 ): 3
long range (j-i >= 5 ): 206

Update on May 11th, 2008:

If you are interested in this script, here is the link. Please change the extension from .doc to .sh. This blog system doesn’t allow me to upload a .txt or .sh file. I would like to get some feedback when you try this script. Any comments are welcome.



  1. why don’t you send me the script. It will be helpful for me as well.



    Comment by Jegannath — July 4, 2006 @ 9:34 am | Reply

  2. very interesting. Is it possible to send me this script??

    Comment by COADOU — September 29, 2006 @ 8:43 am | Reply

  3. Hello,

    This looks very useful indeed. Do you provide your code anywhere? Also, would you happen to know what’s the best way to display an NOE restraint file (upl) on a structure (e.g. as lines connecting the involved atoms)

    Thanks and congrats for a very useful blog,


    Comment by Nik — May 9, 2008 @ 12:37 pm | Reply

  4. Hello Nik,

    Now, you can download this file through the blog system. Enjoy it.

    I never try to display NOE restraints on a structure. If you only have few (<10) NOE restraints to display, line connection may be a clear way. You could check VMD-XPLOR, it reads NOE restraint file in XPLOR format and display the connection by lines. If you have more than 10 restraints showing in one structure, I think it’s very hard to clearly illustrate.


    Comment by kpwu — May 11, 2008 @ 7:35 am | Reply

  5. Good stuff Wu,
    You save me from a lot of headache.
    Thank you.

    Comment by Lim — August 5, 2010 @ 3:58 pm | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: