
              CHECK RESTRAINTS

A program to check NMR restraints against
a set of PDB files.

Currently:
- only Xplor/CNS format are supported.
- only phi,psi and omega dihedral restraints are supported.
- ambiguous restraints are not supported.

For every selected object on the screen, the
corresponding pdb file is compared against the
restraints file.  Violations are computed,
and the on-screen objects are coloured to
graphically show the violation areas.

When a "violation" is found, a PyMOL object
is created to represent the violation.  From
the users point of view, the violation is a 
colored line on the screen.

--------------------------------------------------

** Dihedral restraint file format: **
assign (resid 9 and name C) (resid 10 and name N) 
   (resid 10 and name CA) (resid 10 and name C) 
   1.0  -79.000 38 2
(line breaks not necessary)

Where -79.000 is the angle restraint, and 38 is the
   standard deviation.

** NOE restraint file format: **
assign (resid   3 and name   HN) 
       (resid   3 and name  HB*)  4.50  1.80  1.79
(line breaks not necessary)

---------------------------------------------------

XPLOR/CNS Averaging:

none - this uses the first atom in any set.
       for example, using the above restraint we know that
       (resid 3 and name HN) matches just one atom, but if
       (resid 3 and name HB*) matches two atoms.
       only the first one will be considered.

closest - this uses the closest atom in any set.
       for example, using the above restraint we know that
       (resid 3 and name HN) matches just one atom, but if
       (resid 3 and name HB*) matches two atoms.
       only the closest one will be considered.

r-6     the distance between selected sets of atoms 
        is averaged according to 
	r = ( < Rij ** -6> ) ** -1/6
	where Rij runs through all possible combinations of 
	distance constraints.

r-3     similar with r-6 with the formula
	r = ( < Rij ** -3> ) ** -1/3

centre  the geometric centres of each set of atoms is taken

sum (n_mono) the calculations use this formula:
         r = ( sum(Rij ** -6) / n_mono ) ** -1/6

---------------------------------------------------
read protons only:  this is for speed.  if you know
   that your noe's are for protons only, then that is
   all the program will read in, giving a slight
   speedup.
---------------------------------------------------

What is a violation?
   A violation is anything that satisfies:
   distance - restraint > cutoff
   Anything that doesn't satisfy this is said to have 
   a violation of 0.

How do I color all restraints?
   Because of the definition of a violation, 
   if you would like to color all of your
   restraints, regarless if they have been violated or not,
   you can ask to "start coloring at : 0", which will then
   highlight all your violations of "0".  This is because 
   restraints that aren't violated are said to have a 
   "violation of 0".

-----------------------------------------------------

COLOR/DRAWING INFORMATION:

this section describes how to colour the molecule 
on the screen if a violation is found.   These
fields should be self-explanatory.

-----------------------------------------------------
BUTTONS

Clear - delete the PyMOL object
representing the violation.  From the user's point
of view, this deletes the coloured lines from
the screen.

Calculate - calculate the violations and bring up
a window listing the violations.  This doesn't
draw the violations on the screen, because sometimes
the drawing takes a lot fo time, so I decided to 
make two separate functions.

Calculate & Draw - if you're sure that drawing won't
take too long, or if time isn't an issue, then you
will want to calculate the violations and view them
immediately.

-----------------------------------------------------
OUTPUT WINDOW - DIHEDRAL VIOLATIONS OUTPUT

->  Clicking on one of the radio buttons will sort
    on that column.  

VIOL# - a sequential number the program gives to
   each violation.  PyMOL creates an "object" with
   the same numbering scheme.
OBJECT - the PyMOL object which contains the violation.
TYPE - the type of violation.  either phi, psi, or omega.
RST - the line number in the restraints file that
   was violated.
RES -  the residue number
EXPECTED - the expected angle from the restraints file.
TOLERANCE - the tolerance value from the restraints file.
ACTUAL - the angle that the program calculated.
VIOLATION - the violation that the program calculated.

-----------------------------------------------------

OUTPUT WINDOW - NOE VIOLATIONS OUTPUT

->  Clicking on one of the radio buttons will sort
    on that column.  

VIOL# - a sequential number the program gives to
   each violation.  PyMOL creates an "object" with
   the same numbering scheme.
OBJECT - the PyMOL object which contains the violation.
TYPE - the type of violation.  either phi, psi, or omega.
RST - the line number in the restraints file that
   was violated.
ATOMS -  the names of the atoms involved in the violation
LOWER LIMIT - the lower noe limit
UPPER LIMIT - the upper noe limit
ACTUAL - the noe that the program calculated.
VIOLATION - the violation that the program calculated.

