#
# Rules file for sequential residue/residue pattern in hncacb and cbcaconh files
#

####################################################################
#
# First define the IDcol and data columns of the input files 
# IDcol is the data column that identifies an entry (peakId number in our case)
# Data columns need to correspond to the RULES below.
#
# Also define the errors allowed from matching within the
# same file and between files.
#
#       Filename  IDcol    data      intrafile errs   interfile errs

FORMAT: hsqc        1   3:10:17     0.015:0.25:0       0.03:0.5:0
FORMAT: hncacb      1   3:10:17:24  0.015:0.25:0.50:0  0.03:0.5:0.5:0
FORMAT: cbcaconh    1   3:10:17:24  0.015:0.25:0.50:0  0.03:0.5:0.5:0


####################################################################
#
# Connectivity Rules
#
#     Filename    Assign  Connectivity Relation 

RULE1: hsqc            1  H0       N0  I0:0,inf
RULE2: hncacb          1  H0  Ca0  N0  I1:0,inf
RULE3: hncacb          1  H0  Cb0  N0  I2:-inf,0
RULE4: cbcaconh        1  H1  Ca0  N1  I3
RULE5: cbcaconh        1  H1  Cb0  N1  I4
RULE6: hncacb          1  H1  Ca1  N1  I5:0,inf
RULE7: hncacb          1  H1  Cb1  N1  I6:-inf,0
RULE8: hsqc            1  H1       N1  I7:0,inf
RULE9: hncacb          1  H1  Ca0  N1  I8:0,inf
RULE10: hncacb          1  H1  Cb0  N1  I9:-inf,0


####################################################################
#
# Output specification.
# OUTPUT: term  
# A term can be:
#   1) a specific atom in a connectivity relation (eg Ca0), print shift value.
#   2) "RULEn" where n is the nth RULE, value of IDcol is printed (ie, peakId).
#   3) the word "PROB", print out probability fit value
#   4) anything else is considered a string to print on output. 
#
#  is a c formatting string for the term (type 'man sscanf'). 
# if no format given, the term is considered a string.
# i have made up a format 'a' which returns absolute value of the shift.

OUTPUT: RULE1 %3d
OUTPUT: RULE8 %3d
OUTPUT: dxx
OUTPUT: PROB %4.2f
#
OUTPUT: RULE2 %3d
OUTPUT: RULE3 %3d
OUTPUT: RULE6 %3d
OUTPUT: RULE7 %3d
OUTPUT: RULE4 %3d
OUTPUT: RULE5 %3d
OUTPUT: -99
OUTPUT: -99
OUTPUT: -99
#
OUTPUT: 11
OUTPUT: I5  %8.4f
OUTPUT: I6  %8.4a
#
OUTPUT: Ca0 %6.2f
OUTPUT: Cb0 %6.2f
OUTPUT: N0  %6.2f
OUTPUT: H0  %6.2f
OUTPUT: Ca1 %6.2f
OUTPUT: Cb1 %6.2f
OUTPUT: N1  %6.2f
OUTPUT: H1  %6.2f