# $CVSHeader: pal8e/etc/ruleset,v 1.5 2005/02/15 01:10:24 indraneel Rel $


* Tag loose helix (oh)
   Based on i,i+3 CA distance(d3) and i,i+1,i+2,i+3 CA torsion
   angle(dih).
   d3 <= 8.0
   -35 <= torsion angle <= 115

* Tag loose strand (os)
   Based on i,i+3 CA distance(d3) and i,i+1,i+2,i+3 CA torsion
   angle(dih).  d3 > 8.0 115 < torsion angle < -35

* Tag strict helix (ohh)
   Based on d3 distance and dih angle using optimal distance and
   standard deviation.  d3 <= 5.83 32.90 <= torsion angle <= 67.31

* Extend loose helix (h)
   Mark five residues as "h" for every two consecutive "oh" tags. 

* Extend loose strands (s)
   Mark four residues as "s" for every "os" tag.

* Extend strict helix (hh)
   Mark six residues as "hh" for every three consecutive "ohh" tags.

* Generate and verify loose helix
   (See process file)

* Generate possible quadruplets
   Do not use stretches of "hh" tagged residues except the edge
   residue (only one) of the stretch.  Allow quadruplets based on
   score. (cutoff is best bad score for parallel and antiparallel)

* Link quads to form ladders

- Quadruplet selection
   Initiate or extend strands starting from the best quadruplet. Start
   with the sorted list of quadruplets. Pick a quadruplet from the top
   of list and check if it can fit any growing ladder at either
   end. If it fits, delete all alternatives from sorted list that
   could have replaced it. If it does not fit, start a new ladder and
   delete all alternatives.

- Link with/without bulges
   Link top and bottom quadruplets when one corner is common and other
   corner is common or consecutive. This allows a single residue bulge
   in either strand.

- Mark bulges
   Decide which residue to call a bulge based on quadruplet score. The
   non-common  consecutive corner that  comes from  the worse  quad is
   tagged as  a bulge with  respect to the  residue it pairs  with. No
   bulges if both corners are common to both quads.

* Add non-strand bulge residues to ladders
   Mark non-quad residue as strand former if it is between two
   quad forming residues. No checks are made except that neighbouring
   residues are part of quadruplets. Thus 'ss.ss' regions are converted
   to 'sssss'.

* Extend ladder edges
   Every quadruplet has a link to it's neighbour, generated during
   generation of ladders. These links enable recreating the ladders
   from the quadruplets. The edges of each ladder are located and
   extra residues are added to both strands. At each step 3 distances
   are found (no bulges, and bulges at either side with the next
   residue a bulge). The smallest distance is used to define a link if
   it is <= 7.5. Progress is stopped if the next residue on either
   side is a 'h' or is not a 's'. Bulge is marked as appropriate (if
   smallest distance is after skipping next residue on either side)
   with respect to the residue with which it is a bulge. Hairpin bends
   are checked for at each step. Extension does not proceed over a
   hairpin bend.

* Generate strands
   Strands are continuous stretches of residues which take part in
   ladders. Thus a single strand can be made up of more than one
   ladder. This step joins ladders which have different stretches of
   residues paired to different strands. This also puts a hairpin bend
   in the same strand if all residues at the hairpin belong to (any)
   ladder.

o [todo] Resolve triplet quads
   Delete quads with residues which do not pass 120 degree rule with
   any of it's pairs.

o [todo] Choose between quads
   Choose between quads based on 120 degree rule where more than one
   quad is equally bad. Prefer extension of longer ladders.

* Add beta hairpin bend residues to strand edges
   For strand edges, search if a hairpin is present and add a residue
   to edge. (Hairpin consists of 2 or 3 residues and edges must be paired.)

* Generate helices
   Helices originate from 'oh' regions only. Different regions of 'oh'
   do not get merged.

* Add helices 'hhh'
   Add upto three loose "h" and strict "hh" to helices. Do not add a
   residue that is embedded in a strand (not edge 2 residues). Change
   tag to 'hhh'.

o [todo] Remove helix edge
   Trim edge residue of helix if residue is already part of two
   strands. (Check if residue comes from quadruplet?)

* Remove < 5 residue helices
   Remove any less than 5 residue helices. (These can occur when
   conversions from 'h' to 'hhh' hit into strands. Also when edge
   residues are removed.)

* Helix break

- Break based on non-"oh"
   Break helix with/without overlap based on absence of "oh" tag. Do
   not break 5 residue helix. Do not break a helix to less than 5
   residues.

- Break based on RMSD (axial)
   Break helix based on recursive assessment of lowest maximum-rmsd
   for any of the broken helix. Minimum helix length is 5
   residues. Helix may be broken, with or without overlap.

* Strand break

- beta hairpin
   Disjoin beta hairpins that have been pooled into the same strand.
   Do not allow residues at hairpin to link with more than 2 residues
   (one of which must be on the other arm, and the other must not link
   with a strand linking the other arm, must substantially link with the
   same arm).

- d3 distance
   Break strands based on d3 distance while checking for bulges. Break
   strand between i+2 and i+3 if d3 > 8.0 and i is not a bulge (angle
   between i-1, (average of i,i+1,i+2,i+3), i+4).

- 45 degree angle
   Break strands based on 45 degree angle while checking for bulges.
   i-1,i,i+1 angle and i-1,(average of i,i+1,i+2,i+3),i+4 angle are
   used. Mark as overlap the residue after the one which fails cutoffs
   (i+1).

* Remove five residue helix

- Overlap with strands
   Remove (5 residue) helices if they overlap on both sides with strands.

- Tag based removal
   Remove (5 residue) helices which do not have any "ohh" or "hh" tags.

o [redo] Remove three residue strands

- Overlap with helix
   Remove three residue strand when it overlaps on both sides
   with helix.

- Bad strands
   Remove three (or less) residue strands that are bad. Check for
   possible breaks and bad pairing. Check for CA-CA distance. (To
   define properly.)

o [todo] Convert overlap to edge based on pairing
   An overlap may be an edge if it interacts only on one side. Check
   neighbouring residues to find best place to break (to eliminate
   single residue strands from forming).

* Plotting

- Discard unused quads
   Change the valid tag for unused quadruplets.

