# Generated from RosettaMRParser.g4 by ANTLR 4.10.1
# encoding: utf-8
from antlr4 import *
from io import StringIO
import sys
if sys.version_info[1] > 5:
	from typing import TextIO
else:
	from typing.io import TextIO

def serializedATN():
    return [
        4,1,59,456,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,
        6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,
        2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,
        7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,
        2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,1,0,1,0,1,0,1,0,1,0,1,0,
        1,0,1,0,1,0,1,0,1,0,1,0,1,0,5,0,76,8,0,10,0,12,0,79,9,0,1,0,1,0,
        1,1,4,1,84,8,1,11,1,12,1,85,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,3,4,3,
        96,8,3,11,3,12,3,97,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,4,1,5,4,5,
        110,8,5,11,5,12,5,111,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
        6,1,7,4,7,126,8,7,11,7,12,7,127,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,
        1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,4,9,150,8,9,11,9,
        12,9,151,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,11,
        4,11,165,8,11,11,11,12,11,166,1,12,1,12,1,12,1,12,1,12,1,12,1,12,
        1,12,1,12,1,12,1,12,1,12,1,13,4,13,182,8,13,11,13,12,13,183,1,14,
        1,14,1,14,1,14,1,14,1,14,1,15,4,15,193,8,15,11,15,12,15,194,1,16,
        1,16,1,16,1,16,1,16,1,16,1,16,1,17,4,17,205,8,17,11,17,12,17,206,
        1,18,1,18,1,18,1,18,1,18,1,19,4,19,215,8,19,11,19,12,19,216,1,20,
        1,20,1,20,1,20,1,20,1,21,4,21,225,8,21,11,21,12,21,226,1,22,1,22,
        1,22,1,22,3,22,233,8,22,1,22,4,22,236,8,22,11,22,12,22,237,1,22,
        1,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,23,3,23,252,
        8,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,3,24,263,8,24,
        1,24,1,24,5,24,267,8,24,10,24,12,24,270,9,24,1,24,1,24,1,24,1,24,
        1,24,1,24,3,24,278,8,24,1,24,1,24,5,24,282,8,24,10,24,12,24,285,
        9,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,3,24,294,8,24,1,24,1,24,
        5,24,298,8,24,10,24,12,24,301,9,24,1,24,1,24,1,24,1,24,1,24,1,24,
        1,24,1,24,1,24,1,24,1,24,1,24,1,24,4,24,316,8,24,11,24,12,24,317,
        1,24,1,24,1,24,1,24,1,24,1,24,3,24,326,8,24,1,24,1,24,1,24,1,24,
        1,24,1,24,4,24,334,8,24,11,24,12,24,335,1,24,1,24,1,24,1,24,1,24,
        1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,24,
        4,24,356,8,24,11,24,12,24,357,1,24,1,24,1,24,1,24,1,24,1,24,1,24,
        1,24,1,24,1,24,1,24,1,24,5,24,372,8,24,10,24,12,24,375,9,24,4,24,
        377,8,24,11,24,12,24,378,3,24,381,8,24,1,24,1,24,1,24,1,24,1,24,
        1,24,3,24,389,8,24,1,24,1,24,1,24,1,24,1,24,3,24,396,8,24,1,24,1,
        24,1,24,1,24,5,24,402,8,24,10,24,12,24,405,9,24,1,24,1,24,1,24,1,
        24,1,24,1,24,1,24,4,24,414,8,24,11,24,12,24,415,1,24,1,24,1,24,1,
        24,1,24,1,24,1,24,1,24,1,24,4,24,427,8,24,11,24,12,24,428,3,24,431,
        8,24,1,25,4,25,434,8,25,11,25,12,25,435,1,26,1,26,1,26,1,26,1,26,
        1,26,1,27,4,27,445,8,27,11,27,12,27,446,1,28,1,28,1,28,1,29,1,29,
        1,30,1,30,1,30,0,0,31,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,
        32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,0,7,2,0,1,2,9,9,1,0,
        3,4,3,0,18,18,25,25,39,40,3,0,21,22,26,26,46,46,2,0,23,23,43,43,
        2,0,31,31,44,45,1,0,50,51,502,0,77,1,0,0,0,2,83,1,0,0,0,4,87,1,0,
        0,0,6,95,1,0,0,0,8,99,1,0,0,0,10,109,1,0,0,0,12,113,1,0,0,0,14,125,
        1,0,0,0,16,129,1,0,0,0,18,149,1,0,0,0,20,153,1,0,0,0,22,164,1,0,
        0,0,24,168,1,0,0,0,26,181,1,0,0,0,28,185,1,0,0,0,30,192,1,0,0,0,
        32,196,1,0,0,0,34,204,1,0,0,0,36,208,1,0,0,0,38,214,1,0,0,0,40,218,
        1,0,0,0,42,224,1,0,0,0,44,232,1,0,0,0,46,251,1,0,0,0,48,430,1,0,
        0,0,50,433,1,0,0,0,52,437,1,0,0,0,54,444,1,0,0,0,56,448,1,0,0,0,
        58,451,1,0,0,0,60,453,1,0,0,0,62,76,3,2,1,0,63,76,3,6,3,0,64,76,
        3,10,5,0,65,76,3,14,7,0,66,76,3,18,9,0,67,76,3,22,11,0,68,76,3,26,
        13,0,69,76,3,30,15,0,70,76,3,34,17,0,71,76,3,38,19,0,72,76,3,42,
        21,0,73,76,3,50,25,0,74,76,3,54,27,0,75,62,1,0,0,0,75,63,1,0,0,0,
        75,64,1,0,0,0,75,65,1,0,0,0,75,66,1,0,0,0,75,67,1,0,0,0,75,68,1,
        0,0,0,75,69,1,0,0,0,75,70,1,0,0,0,75,71,1,0,0,0,75,72,1,0,0,0,75,
        73,1,0,0,0,75,74,1,0,0,0,76,79,1,0,0,0,77,75,1,0,0,0,77,78,1,0,0,
        0,78,80,1,0,0,0,79,77,1,0,0,0,80,81,5,0,0,1,81,1,1,0,0,0,82,84,3,
        4,2,0,83,82,1,0,0,0,84,85,1,0,0,0,85,83,1,0,0,0,85,86,1,0,0,0,86,
        3,1,0,0,0,87,88,7,0,0,0,88,89,5,55,0,0,89,90,5,50,0,0,90,91,5,55,
        0,0,91,92,5,50,0,0,92,93,3,48,24,0,93,5,1,0,0,0,94,96,3,8,4,0,95,
        94,1,0,0,0,96,97,1,0,0,0,97,95,1,0,0,0,97,98,1,0,0,0,98,7,1,0,0,
        0,99,100,7,1,0,0,100,101,5,55,0,0,101,102,5,50,0,0,102,103,5,55,
        0,0,103,104,5,50,0,0,104,105,5,55,0,0,105,106,5,50,0,0,106,107,3,
        48,24,0,107,9,1,0,0,0,108,110,3,12,6,0,109,108,1,0,0,0,110,111,1,
        0,0,0,111,109,1,0,0,0,111,112,1,0,0,0,112,11,1,0,0,0,113,114,5,5,
        0,0,114,115,5,55,0,0,115,116,5,50,0,0,116,117,5,55,0,0,117,118,5,
        50,0,0,118,119,5,55,0,0,119,120,5,50,0,0,120,121,5,55,0,0,121,122,
        5,50,0,0,122,123,3,48,24,0,123,13,1,0,0,0,124,126,3,16,8,0,125,124,
        1,0,0,0,126,127,1,0,0,0,127,125,1,0,0,0,127,128,1,0,0,0,128,15,1,
        0,0,0,129,130,5,6,0,0,130,131,5,55,0,0,131,132,5,50,0,0,132,133,
        5,55,0,0,133,134,5,50,0,0,134,135,5,55,0,0,135,136,5,50,0,0,136,
        137,5,55,0,0,137,138,5,50,0,0,138,139,5,55,0,0,139,140,5,50,0,0,
        140,141,5,55,0,0,141,142,5,50,0,0,142,143,5,55,0,0,143,144,5,50,
        0,0,144,145,5,55,0,0,145,146,5,50,0,0,146,147,3,48,24,0,147,17,1,
        0,0,0,148,150,3,20,10,0,149,148,1,0,0,0,150,151,1,0,0,0,151,149,
        1,0,0,0,151,152,1,0,0,0,152,19,1,0,0,0,153,154,5,7,0,0,154,155,5,
        55,0,0,155,156,5,55,0,0,156,157,5,55,0,0,157,158,5,55,0,0,158,159,
        3,58,29,0,159,160,3,58,29,0,160,161,3,58,29,0,161,162,3,48,24,0,
        162,21,1,0,0,0,163,165,3,24,12,0,164,163,1,0,0,0,165,166,1,0,0,0,
        166,164,1,0,0,0,166,167,1,0,0,0,167,23,1,0,0,0,168,169,5,8,0,0,169,
        170,5,55,0,0,170,171,5,50,0,0,171,172,5,55,0,0,172,173,5,55,0,0,
        173,174,5,55,0,0,174,175,5,50,0,0,175,176,3,58,29,0,176,177,3,58,
        29,0,177,178,3,58,29,0,178,179,3,48,24,0,179,25,1,0,0,0,180,182,
        3,28,14,0,181,180,1,0,0,0,182,183,1,0,0,0,183,181,1,0,0,0,183,184,
        1,0,0,0,184,27,1,0,0,0,185,186,5,10,0,0,186,187,5,55,0,0,187,188,
        5,50,0,0,188,189,5,55,0,0,189,190,3,48,24,0,190,29,1,0,0,0,191,193,
        3,32,16,0,192,191,1,0,0,0,193,194,1,0,0,0,194,192,1,0,0,0,194,195,
        1,0,0,0,195,31,1,0,0,0,196,197,5,11,0,0,197,198,5,50,0,0,198,199,
        5,55,0,0,199,200,5,50,0,0,200,201,5,50,0,0,201,202,3,48,24,0,202,
        33,1,0,0,0,203,205,3,36,18,0,204,203,1,0,0,0,205,206,1,0,0,0,206,
        204,1,0,0,0,206,207,1,0,0,0,207,35,1,0,0,0,208,209,5,12,0,0,209,
        210,5,50,0,0,210,211,5,50,0,0,211,212,3,58,29,0,212,37,1,0,0,0,213,
        215,3,40,20,0,214,213,1,0,0,0,215,216,1,0,0,0,216,214,1,0,0,0,216,
        217,1,0,0,0,217,39,1,0,0,0,218,219,5,13,0,0,219,220,5,50,0,0,220,
        221,5,55,0,0,221,222,3,58,29,0,222,41,1,0,0,0,223,225,3,44,22,0,
        224,223,1,0,0,0,225,226,1,0,0,0,226,224,1,0,0,0,226,227,1,0,0,0,
        227,43,1,0,0,0,228,233,5,14,0,0,229,233,5,15,0,0,230,231,5,16,0,
        0,231,233,5,50,0,0,232,228,1,0,0,0,232,229,1,0,0,0,232,230,1,0,0,
        0,233,235,1,0,0,0,234,236,3,46,23,0,235,234,1,0,0,0,236,237,1,0,
        0,0,237,235,1,0,0,0,237,238,1,0,0,0,238,239,1,0,0,0,239,240,5,17,
        0,0,240,45,1,0,0,0,241,252,3,4,2,0,242,252,3,8,4,0,243,252,3,12,
        6,0,244,252,3,16,8,0,245,252,3,20,10,0,246,252,3,24,12,0,247,252,
        3,28,14,0,248,252,3,32,16,0,249,252,3,36,18,0,250,252,3,40,20,0,
        251,241,1,0,0,0,251,242,1,0,0,0,251,243,1,0,0,0,251,244,1,0,0,0,
        251,245,1,0,0,0,251,246,1,0,0,0,251,247,1,0,0,0,251,248,1,0,0,0,
        251,249,1,0,0,0,251,250,1,0,0,0,252,47,1,0,0,0,253,254,7,2,0,0,254,
        255,3,60,30,0,255,256,3,60,30,0,256,431,1,0,0,0,257,258,5,27,0,0,
        258,259,3,60,30,0,259,260,3,60,30,0,260,262,3,60,30,0,261,263,3,
        60,30,0,262,261,1,0,0,0,262,263,1,0,0,0,263,268,1,0,0,0,264,267,
        5,55,0,0,265,267,3,60,30,0,266,264,1,0,0,0,266,265,1,0,0,0,267,270,
        1,0,0,0,268,266,1,0,0,0,268,269,1,0,0,0,269,431,1,0,0,0,270,268,
        1,0,0,0,271,272,5,19,0,0,272,273,3,60,30,0,273,274,3,60,30,0,274,
        275,3,60,30,0,275,277,3,60,30,0,276,278,3,60,30,0,277,276,1,0,0,
        0,277,278,1,0,0,0,278,283,1,0,0,0,279,282,5,55,0,0,280,282,3,60,
        30,0,281,279,1,0,0,0,281,280,1,0,0,0,282,285,1,0,0,0,283,281,1,0,
        0,0,283,284,1,0,0,0,284,431,1,0,0,0,285,283,1,0,0,0,286,287,5,20,
        0,0,287,288,3,60,30,0,288,289,3,60,30,0,289,290,3,60,30,0,290,291,
        3,60,30,0,291,293,3,60,30,0,292,294,3,60,30,0,293,292,1,0,0,0,293,
        294,1,0,0,0,294,299,1,0,0,0,295,298,5,55,0,0,296,298,3,60,30,0,297,
        295,1,0,0,0,297,296,1,0,0,0,298,301,1,0,0,0,299,297,1,0,0,0,299,
        300,1,0,0,0,300,431,1,0,0,0,301,299,1,0,0,0,302,303,7,3,0,0,303,
        304,3,60,30,0,304,305,3,60,30,0,305,306,3,60,30,0,306,431,1,0,0,
        0,307,308,7,4,0,0,308,309,3,60,30,0,309,310,3,60,30,0,310,311,3,
        60,30,0,311,312,3,60,30,0,312,431,1,0,0,0,313,315,5,24,0,0,314,316,
        3,60,30,0,315,314,1,0,0,0,316,317,1,0,0,0,317,315,1,0,0,0,317,318,
        1,0,0,0,318,431,1,0,0,0,319,320,5,28,0,0,320,321,3,60,30,0,321,322,
        3,60,30,0,322,325,5,55,0,0,323,324,5,29,0,0,324,326,3,60,30,0,325,
        323,1,0,0,0,325,326,1,0,0,0,326,431,1,0,0,0,327,328,5,30,0,0,328,
        333,5,50,0,0,329,330,3,60,30,0,330,331,3,60,30,0,331,332,3,60,30,
        0,332,334,1,0,0,0,333,329,1,0,0,0,334,335,1,0,0,0,335,333,1,0,0,
        0,335,336,1,0,0,0,336,431,1,0,0,0,337,338,7,5,0,0,338,339,3,60,30,
        0,339,340,3,60,30,0,340,341,3,60,30,0,341,342,3,60,30,0,342,343,
        3,60,30,0,343,344,3,60,30,0,344,431,1,0,0,0,345,346,5,32,0,0,346,
        431,3,60,30,0,347,431,5,33,0,0,348,349,5,34,0,0,349,350,3,60,30,
        0,350,351,3,48,24,0,351,431,1,0,0,0,352,353,5,35,0,0,353,355,5,50,
        0,0,354,356,3,48,24,0,355,354,1,0,0,0,356,357,1,0,0,0,357,355,1,
        0,0,0,357,358,1,0,0,0,358,431,1,0,0,0,359,360,5,36,0,0,360,380,5,
        55,0,0,361,362,3,60,30,0,362,363,3,60,30,0,363,364,3,60,30,0,364,
        381,1,0,0,0,365,366,5,37,0,0,366,367,3,60,30,0,367,368,3,60,30,0,
        368,376,3,60,30,0,369,373,5,55,0,0,370,372,3,60,30,0,371,370,1,0,
        0,0,372,375,1,0,0,0,373,371,1,0,0,0,373,374,1,0,0,0,374,377,1,0,
        0,0,375,373,1,0,0,0,376,369,1,0,0,0,377,378,1,0,0,0,378,376,1,0,
        0,0,378,379,1,0,0,0,379,381,1,0,0,0,380,361,1,0,0,0,380,365,1,0,
        0,0,381,431,1,0,0,0,382,383,5,38,0,0,383,384,3,60,30,0,384,385,3,
        60,30,0,385,386,3,60,30,0,386,388,3,60,30,0,387,389,3,60,30,0,388,
        387,1,0,0,0,388,389,1,0,0,0,389,431,1,0,0,0,390,391,5,41,0,0,391,
        392,3,60,30,0,392,393,3,60,30,0,393,395,3,60,30,0,394,396,5,42,0,
        0,395,394,1,0,0,0,395,396,1,0,0,0,396,431,1,0,0,0,397,398,5,47,0,
        0,398,399,3,60,30,0,399,403,3,60,30,0,400,402,3,60,30,0,401,400,
        1,0,0,0,402,405,1,0,0,0,403,401,1,0,0,0,403,404,1,0,0,0,404,431,
        1,0,0,0,405,403,1,0,0,0,406,407,5,48,0,0,407,413,5,50,0,0,408,409,
        3,60,30,0,409,410,3,60,30,0,410,411,3,60,30,0,411,412,3,60,30,0,
        412,414,1,0,0,0,413,408,1,0,0,0,414,415,1,0,0,0,415,413,1,0,0,0,
        415,416,1,0,0,0,416,431,1,0,0,0,417,418,5,49,0,0,418,426,5,50,0,
        0,419,420,3,60,30,0,420,421,3,60,30,0,421,422,3,60,30,0,422,423,
        3,60,30,0,423,424,3,60,30,0,424,425,3,60,30,0,425,427,1,0,0,0,426,
        419,1,0,0,0,427,428,1,0,0,0,428,426,1,0,0,0,428,429,1,0,0,0,429,
        431,1,0,0,0,430,253,1,0,0,0,430,257,1,0,0,0,430,271,1,0,0,0,430,
        286,1,0,0,0,430,302,1,0,0,0,430,307,1,0,0,0,430,313,1,0,0,0,430,
        319,1,0,0,0,430,327,1,0,0,0,430,337,1,0,0,0,430,345,1,0,0,0,430,
        347,1,0,0,0,430,348,1,0,0,0,430,352,1,0,0,0,430,359,1,0,0,0,430,
        382,1,0,0,0,430,390,1,0,0,0,430,397,1,0,0,0,430,406,1,0,0,0,430,
        417,1,0,0,0,431,49,1,0,0,0,432,434,3,52,26,0,433,432,1,0,0,0,434,
        435,1,0,0,0,435,433,1,0,0,0,435,436,1,0,0,0,436,51,1,0,0,0,437,438,
        5,50,0,0,438,439,5,55,0,0,439,440,5,50,0,0,440,441,5,55,0,0,441,
        442,3,58,29,0,442,53,1,0,0,0,443,445,3,56,28,0,444,443,1,0,0,0,445,
        446,1,0,0,0,446,444,1,0,0,0,446,447,1,0,0,0,447,55,1,0,0,0,448,449,
        5,50,0,0,449,450,5,50,0,0,450,57,1,0,0,0,451,452,7,6,0,0,452,59,
        1,0,0,0,453,454,7,6,0,0,454,61,1,0,0,0,40,75,77,85,97,111,127,151,
        166,183,194,206,216,226,232,237,251,262,266,268,277,281,283,293,
        297,299,317,325,335,357,373,378,380,388,395,403,415,428,430,435,
        446
    ]

class RosettaMRParser ( Parser ):

    grammarFileName = "RosettaMRParser.g4"

    atn = ATNDeserializer().deserialize(serializedATN())

    decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ]

    sharedContextCache = PredictionContextCache()

    literalNames = [ "<INVALID>", "'AtomPair'", "'NamedAtomPair'", "'Angle'", 
                     "'NamedAngle'", "'Dihedral'", "'DihedralPair'", "'CoordinateConstraint'", 
                     "'LocalCoordinateConstraint'", "'AmbiguousNMRDistance'", 
                     "'SiteConstraint'", "'SiteConstraintResidues'", "'MinResidueAtomicDistance'", 
                     "'BigBin'", "'MultiConstraint'", "'AmbiguousConstraint'", 
                     "'KofNConstraint'", "'END'", "'CIRCULARHARMONIC'", 
                     "'PERIODICBOUNDED'", "'OFFSETPERIODICBOUNDED'", "'AMBERPERIODIC'", 
                     "'CHARMMPERIODIC'", "'CIRCULARSIGMOIDAL'", "'CIRCULARSPLINE'", 
                     "'HARMONIC'", "'FLAT_HARMONIC'", "'BOUNDED'", "'GAUSSIANFUNC'", 
                     "'WEIGHT'", "'SOGFUNC'", "'MIXTUREFUNC'", "'CONSTANTFUNC'", 
                     "'IDENTITY'", "'SCALARWEIGHTEDFUNC'", "'SUMFUNC'", 
                     "'SPLINE'", "'NONE'", "'FADE'", "'SIGMOID'", "'SQUARE_WELL'", 
                     "'SQUARE_WELL2'", "'DEGREES'", "'LINEAR_PENALTY'", 
                     "'KARPLUS'", "'SOEDINGFUNC'", "'TOPOUT'", "'ETABLE'", 
                     "'USOG'", "'SOG'" ]

    symbolicNames = [ "<INVALID>", "AtomPair", "NamedAtomPair", "Angle", 
                      "NamedAngle", "Dihedral", "DihedralPair", "CoordinateConstraint", 
                      "LocalCoordinateConstraint", "AmbiguousNMRDistance", 
                      "SiteConstraint", "SiteConstraintResidues", "MinResidueAtomicDistance", 
                      "BigBin", "MultiConstraint", "AmbiguousConstraint", 
                      "KofNConstraint", "END", "CIRCULARHARMONIC", "PERIODICBOUNDED", 
                      "OFFSETPERIODICBOUNDED", "AMBERPERIODIC", "CHARMMPERIODIC", 
                      "CIRCULARSIGMOIDAL", "CIRCULARSPLINE", "HARMONIC", 
                      "FLAT_HARMONIC", "BOUNDED", "GAUSSIANFUNC", "WEIGHT", 
                      "SOGFUNC", "MIXTUREFUNC", "CONSTANTFUNC", "IDENTITY", 
                      "SCALARWEIGHTEDFUNC", "SUMFUNC", "SPLINE", "NONE", 
                      "FADE", "SIGMOID", "SQUARE_WELL", "SQUARE_WELL2", 
                      "DEGREES", "LINEAR_PENALTY", "KARPLUS", "SOEDINGFUNC", 
                      "TOPOUT", "ETABLE", "USOG", "SOG", "Integer", "Float", 
                      "SHARP_COMMENT", "EXCLM_COMMENT", "SMCLN_COMMENT", 
                      "Simple_name", "SPACE", "ENCLOSE_COMMENT", "SECTION_COMMENT", 
                      "LINE_COMMENT" ]

    RULE_rosetta_mr = 0
    RULE_atom_pair_restraints = 1
    RULE_atom_pair_restraint = 2
    RULE_angle_restraints = 3
    RULE_angle_restraint = 4
    RULE_dihedral_restraints = 5
    RULE_dihedral_restraint = 6
    RULE_dihedral_pair_restraints = 7
    RULE_dihedral_pair_restraint = 8
    RULE_coordinate_restraints = 9
    RULE_coordinate_restraint = 10
    RULE_local_coordinate_restraints = 11
    RULE_local_coordinate_restraint = 12
    RULE_site_restraints = 13
    RULE_site_restraint = 14
    RULE_site_residues_restraints = 15
    RULE_site_residues_restraint = 16
    RULE_min_residue_atomic_distance_restraints = 17
    RULE_min_residue_atomic_distance_restraint = 18
    RULE_big_bin_restraints = 19
    RULE_big_bin_restraint = 20
    RULE_nested_restraints = 21
    RULE_nested_restraint = 22
    RULE_any_restraint = 23
    RULE_func_type_def = 24
    RULE_rdc_restraints = 25
    RULE_rdc_restraint = 26
    RULE_disulfide_bond_linkages = 27
    RULE_disulfide_bond_linkage = 28
    RULE_number = 29
    RULE_number_f = 30

    ruleNames =  [ "rosetta_mr", "atom_pair_restraints", "atom_pair_restraint", 
                   "angle_restraints", "angle_restraint", "dihedral_restraints", 
                   "dihedral_restraint", "dihedral_pair_restraints", "dihedral_pair_restraint", 
                   "coordinate_restraints", "coordinate_restraint", "local_coordinate_restraints", 
                   "local_coordinate_restraint", "site_restraints", "site_restraint", 
                   "site_residues_restraints", "site_residues_restraint", 
                   "min_residue_atomic_distance_restraints", "min_residue_atomic_distance_restraint", 
                   "big_bin_restraints", "big_bin_restraint", "nested_restraints", 
                   "nested_restraint", "any_restraint", "func_type_def", 
                   "rdc_restraints", "rdc_restraint", "disulfide_bond_linkages", 
                   "disulfide_bond_linkage", "number", "number_f" ]

    EOF = Token.EOF
    AtomPair=1
    NamedAtomPair=2
    Angle=3
    NamedAngle=4
    Dihedral=5
    DihedralPair=6
    CoordinateConstraint=7
    LocalCoordinateConstraint=8
    AmbiguousNMRDistance=9
    SiteConstraint=10
    SiteConstraintResidues=11
    MinResidueAtomicDistance=12
    BigBin=13
    MultiConstraint=14
    AmbiguousConstraint=15
    KofNConstraint=16
    END=17
    CIRCULARHARMONIC=18
    PERIODICBOUNDED=19
    OFFSETPERIODICBOUNDED=20
    AMBERPERIODIC=21
    CHARMMPERIODIC=22
    CIRCULARSIGMOIDAL=23
    CIRCULARSPLINE=24
    HARMONIC=25
    FLAT_HARMONIC=26
    BOUNDED=27
    GAUSSIANFUNC=28
    WEIGHT=29
    SOGFUNC=30
    MIXTUREFUNC=31
    CONSTANTFUNC=32
    IDENTITY=33
    SCALARWEIGHTEDFUNC=34
    SUMFUNC=35
    SPLINE=36
    NONE=37
    FADE=38
    SIGMOID=39
    SQUARE_WELL=40
    SQUARE_WELL2=41
    DEGREES=42
    LINEAR_PENALTY=43
    KARPLUS=44
    SOEDINGFUNC=45
    TOPOUT=46
    ETABLE=47
    USOG=48
    SOG=49
    Integer=50
    Float=51
    SHARP_COMMENT=52
    EXCLM_COMMENT=53
    SMCLN_COMMENT=54
    Simple_name=55
    SPACE=56
    ENCLOSE_COMMENT=57
    SECTION_COMMENT=58
    LINE_COMMENT=59

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.10.1")
        self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache)
        self._predicates = None




    class Rosetta_mrContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def EOF(self):
            return self.getToken(RosettaMRParser.EOF, 0)

        def atom_pair_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Atom_pair_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Atom_pair_restraintsContext,i)


        def angle_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Angle_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Angle_restraintsContext,i)


        def dihedral_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Dihedral_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Dihedral_restraintsContext,i)


        def dihedral_pair_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Dihedral_pair_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Dihedral_pair_restraintsContext,i)


        def coordinate_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Coordinate_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Coordinate_restraintsContext,i)


        def local_coordinate_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Local_coordinate_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Local_coordinate_restraintsContext,i)


        def site_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Site_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Site_restraintsContext,i)


        def site_residues_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Site_residues_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Site_residues_restraintsContext,i)


        def min_residue_atomic_distance_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Min_residue_atomic_distance_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Min_residue_atomic_distance_restraintsContext,i)


        def big_bin_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Big_bin_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Big_bin_restraintsContext,i)


        def nested_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Nested_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Nested_restraintsContext,i)


        def rdc_restraints(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Rdc_restraintsContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Rdc_restraintsContext,i)


        def disulfide_bond_linkages(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Disulfide_bond_linkagesContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Disulfide_bond_linkagesContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_rosetta_mr

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRosetta_mr" ):
                listener.enterRosetta_mr(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRosetta_mr" ):
                listener.exitRosetta_mr(self)




    def rosetta_mr(self):

        localctx = RosettaMRParser.Rosetta_mrContext(self, self._ctx, self.state)
        self.enterRule(localctx, 0, self.RULE_rosetta_mr)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 77
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.AtomPair) | (1 << RosettaMRParser.NamedAtomPair) | (1 << RosettaMRParser.Angle) | (1 << RosettaMRParser.NamedAngle) | (1 << RosettaMRParser.Dihedral) | (1 << RosettaMRParser.DihedralPair) | (1 << RosettaMRParser.CoordinateConstraint) | (1 << RosettaMRParser.LocalCoordinateConstraint) | (1 << RosettaMRParser.AmbiguousNMRDistance) | (1 << RosettaMRParser.SiteConstraint) | (1 << RosettaMRParser.SiteConstraintResidues) | (1 << RosettaMRParser.MinResidueAtomicDistance) | (1 << RosettaMRParser.BigBin) | (1 << RosettaMRParser.MultiConstraint) | (1 << RosettaMRParser.AmbiguousConstraint) | (1 << RosettaMRParser.KofNConstraint) | (1 << RosettaMRParser.Integer))) != 0):
                self.state = 75
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
                if la_ == 1:
                    self.state = 62
                    self.atom_pair_restraints()
                    pass

                elif la_ == 2:
                    self.state = 63
                    self.angle_restraints()
                    pass

                elif la_ == 3:
                    self.state = 64
                    self.dihedral_restraints()
                    pass

                elif la_ == 4:
                    self.state = 65
                    self.dihedral_pair_restraints()
                    pass

                elif la_ == 5:
                    self.state = 66
                    self.coordinate_restraints()
                    pass

                elif la_ == 6:
                    self.state = 67
                    self.local_coordinate_restraints()
                    pass

                elif la_ == 7:
                    self.state = 68
                    self.site_restraints()
                    pass

                elif la_ == 8:
                    self.state = 69
                    self.site_residues_restraints()
                    pass

                elif la_ == 9:
                    self.state = 70
                    self.min_residue_atomic_distance_restraints()
                    pass

                elif la_ == 10:
                    self.state = 71
                    self.big_bin_restraints()
                    pass

                elif la_ == 11:
                    self.state = 72
                    self.nested_restraints()
                    pass

                elif la_ == 12:
                    self.state = 73
                    self.rdc_restraints()
                    pass

                elif la_ == 13:
                    self.state = 74
                    self.disulfide_bond_linkages()
                    pass


                self.state = 79
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 80
            self.match(RosettaMRParser.EOF)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Atom_pair_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atom_pair_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Atom_pair_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Atom_pair_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_atom_pair_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAtom_pair_restraints" ):
                listener.enterAtom_pair_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAtom_pair_restraints" ):
                listener.exitAtom_pair_restraints(self)




    def atom_pair_restraints(self):

        localctx = RosettaMRParser.Atom_pair_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_atom_pair_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 83 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 82
                    self.atom_pair_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 85 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,2,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Atom_pair_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def AtomPair(self):
            return self.getToken(RosettaMRParser.AtomPair, 0)

        def NamedAtomPair(self):
            return self.getToken(RosettaMRParser.NamedAtomPair, 0)

        def AmbiguousNMRDistance(self):
            return self.getToken(RosettaMRParser.AmbiguousNMRDistance, 0)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_atom_pair_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAtom_pair_restraint" ):
                listener.enterAtom_pair_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAtom_pair_restraint" ):
                listener.exitAtom_pair_restraint(self)




    def atom_pair_restraint(self):

        localctx = RosettaMRParser.Atom_pair_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_atom_pair_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 87
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.AtomPair) | (1 << RosettaMRParser.NamedAtomPair) | (1 << RosettaMRParser.AmbiguousNMRDistance))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 88
            self.match(RosettaMRParser.Simple_name)
            self.state = 89
            self.match(RosettaMRParser.Integer)
            self.state = 90
            self.match(RosettaMRParser.Simple_name)
            self.state = 91
            self.match(RosettaMRParser.Integer)
            self.state = 92
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Angle_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def angle_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Angle_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Angle_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_angle_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAngle_restraints" ):
                listener.enterAngle_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAngle_restraints" ):
                listener.exitAngle_restraints(self)




    def angle_restraints(self):

        localctx = RosettaMRParser.Angle_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 6, self.RULE_angle_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 95 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 94
                    self.angle_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 97 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,3,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Angle_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def Angle(self):
            return self.getToken(RosettaMRParser.Angle, 0)

        def NamedAngle(self):
            return self.getToken(RosettaMRParser.NamedAngle, 0)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_angle_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAngle_restraint" ):
                listener.enterAngle_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAngle_restraint" ):
                listener.exitAngle_restraint(self)




    def angle_restraint(self):

        localctx = RosettaMRParser.Angle_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_angle_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 99
            _la = self._input.LA(1)
            if not(_la==RosettaMRParser.Angle or _la==RosettaMRParser.NamedAngle):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 100
            self.match(RosettaMRParser.Simple_name)
            self.state = 101
            self.match(RosettaMRParser.Integer)
            self.state = 102
            self.match(RosettaMRParser.Simple_name)
            self.state = 103
            self.match(RosettaMRParser.Integer)
            self.state = 104
            self.match(RosettaMRParser.Simple_name)
            self.state = 105
            self.match(RosettaMRParser.Integer)
            self.state = 106
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Dihedral_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def dihedral_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Dihedral_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Dihedral_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDihedral_restraints" ):
                listener.enterDihedral_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDihedral_restraints" ):
                listener.exitDihedral_restraints(self)




    def dihedral_restraints(self):

        localctx = RosettaMRParser.Dihedral_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 10, self.RULE_dihedral_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 109 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 108
                    self.dihedral_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 111 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,4,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Dihedral_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Dihedral(self):
            return self.getToken(RosettaMRParser.Dihedral, 0)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDihedral_restraint" ):
                listener.enterDihedral_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDihedral_restraint" ):
                listener.exitDihedral_restraint(self)




    def dihedral_restraint(self):

        localctx = RosettaMRParser.Dihedral_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_dihedral_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 113
            self.match(RosettaMRParser.Dihedral)
            self.state = 114
            self.match(RosettaMRParser.Simple_name)
            self.state = 115
            self.match(RosettaMRParser.Integer)
            self.state = 116
            self.match(RosettaMRParser.Simple_name)
            self.state = 117
            self.match(RosettaMRParser.Integer)
            self.state = 118
            self.match(RosettaMRParser.Simple_name)
            self.state = 119
            self.match(RosettaMRParser.Integer)
            self.state = 120
            self.match(RosettaMRParser.Simple_name)
            self.state = 121
            self.match(RosettaMRParser.Integer)
            self.state = 122
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Dihedral_pair_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def dihedral_pair_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Dihedral_pair_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Dihedral_pair_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_pair_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDihedral_pair_restraints" ):
                listener.enterDihedral_pair_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDihedral_pair_restraints" ):
                listener.exitDihedral_pair_restraints(self)




    def dihedral_pair_restraints(self):

        localctx = RosettaMRParser.Dihedral_pair_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_dihedral_pair_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 124
                    self.dihedral_pair_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 127 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,5,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Dihedral_pair_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def DihedralPair(self):
            return self.getToken(RosettaMRParser.DihedralPair, 0)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_pair_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDihedral_pair_restraint" ):
                listener.enterDihedral_pair_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDihedral_pair_restraint" ):
                listener.exitDihedral_pair_restraint(self)




    def dihedral_pair_restraint(self):

        localctx = RosettaMRParser.Dihedral_pair_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_dihedral_pair_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 129
            self.match(RosettaMRParser.DihedralPair)
            self.state = 130
            self.match(RosettaMRParser.Simple_name)
            self.state = 131
            self.match(RosettaMRParser.Integer)
            self.state = 132
            self.match(RosettaMRParser.Simple_name)
            self.state = 133
            self.match(RosettaMRParser.Integer)
            self.state = 134
            self.match(RosettaMRParser.Simple_name)
            self.state = 135
            self.match(RosettaMRParser.Integer)
            self.state = 136
            self.match(RosettaMRParser.Simple_name)
            self.state = 137
            self.match(RosettaMRParser.Integer)
            self.state = 138
            self.match(RosettaMRParser.Simple_name)
            self.state = 139
            self.match(RosettaMRParser.Integer)
            self.state = 140
            self.match(RosettaMRParser.Simple_name)
            self.state = 141
            self.match(RosettaMRParser.Integer)
            self.state = 142
            self.match(RosettaMRParser.Simple_name)
            self.state = 143
            self.match(RosettaMRParser.Integer)
            self.state = 144
            self.match(RosettaMRParser.Simple_name)
            self.state = 145
            self.match(RosettaMRParser.Integer)
            self.state = 146
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coordinate_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def coordinate_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Coordinate_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Coordinate_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_coordinate_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCoordinate_restraints" ):
                listener.enterCoordinate_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCoordinate_restraints" ):
                listener.exitCoordinate_restraints(self)




    def coordinate_restraints(self):

        localctx = RosettaMRParser.Coordinate_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 18, self.RULE_coordinate_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 149 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 148
                    self.coordinate_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 151 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,6,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Coordinate_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def CoordinateConstraint(self):
            return self.getToken(RosettaMRParser.CoordinateConstraint, 0)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.NumberContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.NumberContext,i)


        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_coordinate_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterCoordinate_restraint" ):
                listener.enterCoordinate_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitCoordinate_restraint" ):
                listener.exitCoordinate_restraint(self)




    def coordinate_restraint(self):

        localctx = RosettaMRParser.Coordinate_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_coordinate_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 153
            self.match(RosettaMRParser.CoordinateConstraint)
            self.state = 154
            self.match(RosettaMRParser.Simple_name)
            self.state = 155
            self.match(RosettaMRParser.Simple_name)
            self.state = 156
            self.match(RosettaMRParser.Simple_name)
            self.state = 157
            self.match(RosettaMRParser.Simple_name)
            self.state = 158
            self.number()
            self.state = 159
            self.number()
            self.state = 160
            self.number()
            self.state = 161
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Local_coordinate_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def local_coordinate_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Local_coordinate_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Local_coordinate_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_local_coordinate_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLocal_coordinate_restraints" ):
                listener.enterLocal_coordinate_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLocal_coordinate_restraints" ):
                listener.exitLocal_coordinate_restraints(self)




    def local_coordinate_restraints(self):

        localctx = RosettaMRParser.Local_coordinate_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 22, self.RULE_local_coordinate_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 164 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 163
                    self.local_coordinate_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 166 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,7,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Local_coordinate_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def LocalCoordinateConstraint(self):
            return self.getToken(RosettaMRParser.LocalCoordinateConstraint, 0)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def number(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.NumberContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.NumberContext,i)


        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_local_coordinate_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterLocal_coordinate_restraint" ):
                listener.enterLocal_coordinate_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitLocal_coordinate_restraint" ):
                listener.exitLocal_coordinate_restraint(self)




    def local_coordinate_restraint(self):

        localctx = RosettaMRParser.Local_coordinate_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_local_coordinate_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 168
            self.match(RosettaMRParser.LocalCoordinateConstraint)
            self.state = 169
            self.match(RosettaMRParser.Simple_name)
            self.state = 170
            self.match(RosettaMRParser.Integer)
            self.state = 171
            self.match(RosettaMRParser.Simple_name)
            self.state = 172
            self.match(RosettaMRParser.Simple_name)
            self.state = 173
            self.match(RosettaMRParser.Simple_name)
            self.state = 174
            self.match(RosettaMRParser.Integer)
            self.state = 175
            self.number()
            self.state = 176
            self.number()
            self.state = 177
            self.number()
            self.state = 178
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Site_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def site_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Site_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Site_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSite_restraints" ):
                listener.enterSite_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSite_restraints" ):
                listener.exitSite_restraints(self)




    def site_restraints(self):

        localctx = RosettaMRParser.Site_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 26, self.RULE_site_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 181 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 180
                    self.site_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 183 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,8,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Site_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SiteConstraint(self):
            return self.getToken(RosettaMRParser.SiteConstraint, 0)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 0)

        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSite_restraint" ):
                listener.enterSite_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSite_restraint" ):
                listener.exitSite_restraint(self)




    def site_restraint(self):

        localctx = RosettaMRParser.Site_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_site_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 185
            self.match(RosettaMRParser.SiteConstraint)
            self.state = 186
            self.match(RosettaMRParser.Simple_name)
            self.state = 187
            self.match(RosettaMRParser.Integer)
            self.state = 188
            self.match(RosettaMRParser.Simple_name)
            self.state = 189
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Site_residues_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def site_residues_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Site_residues_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Site_residues_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_residues_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSite_residues_restraints" ):
                listener.enterSite_residues_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSite_residues_restraints" ):
                listener.exitSite_residues_restraints(self)




    def site_residues_restraints(self):

        localctx = RosettaMRParser.Site_residues_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 30, self.RULE_site_residues_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 192 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 191
                    self.site_residues_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 194 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,9,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Site_residues_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def SiteConstraintResidues(self):
            return self.getToken(RosettaMRParser.SiteConstraintResidues, 0)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def Simple_name(self):
            return self.getToken(RosettaMRParser.Simple_name, 0)

        def func_type_def(self):
            return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_residues_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterSite_residues_restraint" ):
                listener.enterSite_residues_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitSite_residues_restraint" ):
                listener.exitSite_residues_restraint(self)




    def site_residues_restraint(self):

        localctx = RosettaMRParser.Site_residues_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_site_residues_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 196
            self.match(RosettaMRParser.SiteConstraintResidues)
            self.state = 197
            self.match(RosettaMRParser.Integer)
            self.state = 198
            self.match(RosettaMRParser.Simple_name)
            self.state = 199
            self.match(RosettaMRParser.Integer)
            self.state = 200
            self.match(RosettaMRParser.Integer)
            self.state = 201
            self.func_type_def()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Min_residue_atomic_distance_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def min_residue_atomic_distance_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Min_residue_atomic_distance_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Min_residue_atomic_distance_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_min_residue_atomic_distance_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMin_residue_atomic_distance_restraints" ):
                listener.enterMin_residue_atomic_distance_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMin_residue_atomic_distance_restraints" ):
                listener.exitMin_residue_atomic_distance_restraints(self)




    def min_residue_atomic_distance_restraints(self):

        localctx = RosettaMRParser.Min_residue_atomic_distance_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 34, self.RULE_min_residue_atomic_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 204 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 203
                    self.min_residue_atomic_distance_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 206 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,10,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Min_residue_atomic_distance_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def MinResidueAtomicDistance(self):
            return self.getToken(RosettaMRParser.MinResidueAtomicDistance, 0)

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def number(self):
            return self.getTypedRuleContext(RosettaMRParser.NumberContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_min_residue_atomic_distance_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterMin_residue_atomic_distance_restraint" ):
                listener.enterMin_residue_atomic_distance_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitMin_residue_atomic_distance_restraint" ):
                listener.exitMin_residue_atomic_distance_restraint(self)




    def min_residue_atomic_distance_restraint(self):

        localctx = RosettaMRParser.Min_residue_atomic_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_min_residue_atomic_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 208
            self.match(RosettaMRParser.MinResidueAtomicDistance)
            self.state = 209
            self.match(RosettaMRParser.Integer)
            self.state = 210
            self.match(RosettaMRParser.Integer)
            self.state = 211
            self.number()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Big_bin_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def big_bin_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Big_bin_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Big_bin_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_big_bin_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterBig_bin_restraints" ):
                listener.enterBig_bin_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitBig_bin_restraints" ):
                listener.exitBig_bin_restraints(self)




    def big_bin_restraints(self):

        localctx = RosettaMRParser.Big_bin_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 38, self.RULE_big_bin_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 214 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 213
                    self.big_bin_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 216 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,11,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Big_bin_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def BigBin(self):
            return self.getToken(RosettaMRParser.BigBin, 0)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 0)

        def Simple_name(self):
            return self.getToken(RosettaMRParser.Simple_name, 0)

        def number(self):
            return self.getTypedRuleContext(RosettaMRParser.NumberContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_big_bin_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterBig_bin_restraint" ):
                listener.enterBig_bin_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitBig_bin_restraint" ):
                listener.exitBig_bin_restraint(self)




    def big_bin_restraint(self):

        localctx = RosettaMRParser.Big_bin_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_big_bin_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 218
            self.match(RosettaMRParser.BigBin)
            self.state = 219
            self.match(RosettaMRParser.Integer)
            self.state = 220
            self.match(RosettaMRParser.Simple_name)
            self.state = 221
            self.number()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Nested_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def nested_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Nested_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Nested_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_nested_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNested_restraints" ):
                listener.enterNested_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNested_restraints" ):
                listener.exitNested_restraints(self)




    def nested_restraints(self):

        localctx = RosettaMRParser.Nested_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 42, self.RULE_nested_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 224 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 223
                    self.nested_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 226 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,12,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Nested_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def END(self):
            return self.getToken(RosettaMRParser.END, 0)

        def MultiConstraint(self):
            return self.getToken(RosettaMRParser.MultiConstraint, 0)

        def AmbiguousConstraint(self):
            return self.getToken(RosettaMRParser.AmbiguousConstraint, 0)

        def any_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Any_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Any_restraintContext,i)


        def KofNConstraint(self):
            return self.getToken(RosettaMRParser.KofNConstraint, 0)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 0)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_nested_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNested_restraint" ):
                listener.enterNested_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNested_restraint" ):
                listener.exitNested_restraint(self)




    def nested_restraint(self):

        localctx = RosettaMRParser.Nested_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 44, self.RULE_nested_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 232
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [RosettaMRParser.MultiConstraint]:
                self.state = 228
                self.match(RosettaMRParser.MultiConstraint)
                pass
            elif token in [RosettaMRParser.AmbiguousConstraint]:
                self.state = 229
                self.match(RosettaMRParser.AmbiguousConstraint)
                pass
            elif token in [RosettaMRParser.KofNConstraint]:
                self.state = 230
                self.match(RosettaMRParser.KofNConstraint)
                self.state = 231
                self.match(RosettaMRParser.Integer)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 235 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 234
                self.any_restraint()
                self.state = 237 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.AtomPair) | (1 << RosettaMRParser.NamedAtomPair) | (1 << RosettaMRParser.Angle) | (1 << RosettaMRParser.NamedAngle) | (1 << RosettaMRParser.Dihedral) | (1 << RosettaMRParser.DihedralPair) | (1 << RosettaMRParser.CoordinateConstraint) | (1 << RosettaMRParser.LocalCoordinateConstraint) | (1 << RosettaMRParser.AmbiguousNMRDistance) | (1 << RosettaMRParser.SiteConstraint) | (1 << RosettaMRParser.SiteConstraintResidues) | (1 << RosettaMRParser.MinResidueAtomicDistance) | (1 << RosettaMRParser.BigBin))) != 0)):
                    break

            self.state = 239
            self.match(RosettaMRParser.END)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Any_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def atom_pair_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Atom_pair_restraintContext,0)


        def angle_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Angle_restraintContext,0)


        def dihedral_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Dihedral_restraintContext,0)


        def dihedral_pair_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Dihedral_pair_restraintContext,0)


        def coordinate_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Coordinate_restraintContext,0)


        def local_coordinate_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Local_coordinate_restraintContext,0)


        def site_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Site_restraintContext,0)


        def site_residues_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Site_residues_restraintContext,0)


        def min_residue_atomic_distance_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Min_residue_atomic_distance_restraintContext,0)


        def big_bin_restraint(self):
            return self.getTypedRuleContext(RosettaMRParser.Big_bin_restraintContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_any_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterAny_restraint" ):
                listener.enterAny_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitAny_restraint" ):
                listener.exitAny_restraint(self)




    def any_restraint(self):

        localctx = RosettaMRParser.Any_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_any_restraint)
        try:
            self.state = 251
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [RosettaMRParser.AtomPair, RosettaMRParser.NamedAtomPair, RosettaMRParser.AmbiguousNMRDistance]:
                self.enterOuterAlt(localctx, 1)
                self.state = 241
                self.atom_pair_restraint()
                pass
            elif token in [RosettaMRParser.Angle, RosettaMRParser.NamedAngle]:
                self.enterOuterAlt(localctx, 2)
                self.state = 242
                self.angle_restraint()
                pass
            elif token in [RosettaMRParser.Dihedral]:
                self.enterOuterAlt(localctx, 3)
                self.state = 243
                self.dihedral_restraint()
                pass
            elif token in [RosettaMRParser.DihedralPair]:
                self.enterOuterAlt(localctx, 4)
                self.state = 244
                self.dihedral_pair_restraint()
                pass
            elif token in [RosettaMRParser.CoordinateConstraint]:
                self.enterOuterAlt(localctx, 5)
                self.state = 245
                self.coordinate_restraint()
                pass
            elif token in [RosettaMRParser.LocalCoordinateConstraint]:
                self.enterOuterAlt(localctx, 6)
                self.state = 246
                self.local_coordinate_restraint()
                pass
            elif token in [RosettaMRParser.SiteConstraint]:
                self.enterOuterAlt(localctx, 7)
                self.state = 247
                self.site_restraint()
                pass
            elif token in [RosettaMRParser.SiteConstraintResidues]:
                self.enterOuterAlt(localctx, 8)
                self.state = 248
                self.site_residues_restraint()
                pass
            elif token in [RosettaMRParser.MinResidueAtomicDistance]:
                self.enterOuterAlt(localctx, 9)
                self.state = 249
                self.min_residue_atomic_distance_restraint()
                pass
            elif token in [RosettaMRParser.BigBin]:
                self.enterOuterAlt(localctx, 10)
                self.state = 250
                self.big_bin_restraint()
                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Func_type_defContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def number_f(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Number_fContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Number_fContext,i)


        def CIRCULARHARMONIC(self):
            return self.getToken(RosettaMRParser.CIRCULARHARMONIC, 0)

        def HARMONIC(self):
            return self.getToken(RosettaMRParser.HARMONIC, 0)

        def SIGMOID(self):
            return self.getToken(RosettaMRParser.SIGMOID, 0)

        def SQUARE_WELL(self):
            return self.getToken(RosettaMRParser.SQUARE_WELL, 0)

        def BOUNDED(self):
            return self.getToken(RosettaMRParser.BOUNDED, 0)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def PERIODICBOUNDED(self):
            return self.getToken(RosettaMRParser.PERIODICBOUNDED, 0)

        def OFFSETPERIODICBOUNDED(self):
            return self.getToken(RosettaMRParser.OFFSETPERIODICBOUNDED, 0)

        def AMBERPERIODIC(self):
            return self.getToken(RosettaMRParser.AMBERPERIODIC, 0)

        def CHARMMPERIODIC(self):
            return self.getToken(RosettaMRParser.CHARMMPERIODIC, 0)

        def FLAT_HARMONIC(self):
            return self.getToken(RosettaMRParser.FLAT_HARMONIC, 0)

        def TOPOUT(self):
            return self.getToken(RosettaMRParser.TOPOUT, 0)

        def CIRCULARSIGMOIDAL(self):
            return self.getToken(RosettaMRParser.CIRCULARSIGMOIDAL, 0)

        def LINEAR_PENALTY(self):
            return self.getToken(RosettaMRParser.LINEAR_PENALTY, 0)

        def CIRCULARSPLINE(self):
            return self.getToken(RosettaMRParser.CIRCULARSPLINE, 0)

        def GAUSSIANFUNC(self):
            return self.getToken(RosettaMRParser.GAUSSIANFUNC, 0)

        def WEIGHT(self):
            return self.getToken(RosettaMRParser.WEIGHT, 0)

        def SOGFUNC(self):
            return self.getToken(RosettaMRParser.SOGFUNC, 0)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 0)

        def MIXTUREFUNC(self):
            return self.getToken(RosettaMRParser.MIXTUREFUNC, 0)

        def KARPLUS(self):
            return self.getToken(RosettaMRParser.KARPLUS, 0)

        def SOEDINGFUNC(self):
            return self.getToken(RosettaMRParser.SOEDINGFUNC, 0)

        def CONSTANTFUNC(self):
            return self.getToken(RosettaMRParser.CONSTANTFUNC, 0)

        def IDENTITY(self):
            return self.getToken(RosettaMRParser.IDENTITY, 0)

        def SCALARWEIGHTEDFUNC(self):
            return self.getToken(RosettaMRParser.SCALARWEIGHTEDFUNC, 0)

        def func_type_def(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Func_type_defContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Func_type_defContext,i)


        def SUMFUNC(self):
            return self.getToken(RosettaMRParser.SUMFUNC, 0)

        def SPLINE(self):
            return self.getToken(RosettaMRParser.SPLINE, 0)

        def NONE(self):
            return self.getToken(RosettaMRParser.NONE, 0)

        def FADE(self):
            return self.getToken(RosettaMRParser.FADE, 0)

        def SQUARE_WELL2(self):
            return self.getToken(RosettaMRParser.SQUARE_WELL2, 0)

        def DEGREES(self):
            return self.getToken(RosettaMRParser.DEGREES, 0)

        def ETABLE(self):
            return self.getToken(RosettaMRParser.ETABLE, 0)

        def USOG(self):
            return self.getToken(RosettaMRParser.USOG, 0)

        def SOG(self):
            return self.getToken(RosettaMRParser.SOG, 0)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_func_type_def

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterFunc_type_def" ):
                listener.enterFunc_type_def(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitFunc_type_def" ):
                listener.exitFunc_type_def(self)




    def func_type_def(self):

        localctx = RosettaMRParser.Func_type_defContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_func_type_def)
        self._la = 0 # Token type
        try:
            self.state = 430
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [RosettaMRParser.CIRCULARHARMONIC, RosettaMRParser.HARMONIC, RosettaMRParser.SIGMOID, RosettaMRParser.SQUARE_WELL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 253
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.CIRCULARHARMONIC) | (1 << RosettaMRParser.HARMONIC) | (1 << RosettaMRParser.SIGMOID) | (1 << RosettaMRParser.SQUARE_WELL))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 254
                self.number_f()
                self.state = 255
                self.number_f()
                pass
            elif token in [RosettaMRParser.BOUNDED]:
                self.enterOuterAlt(localctx, 2)
                self.state = 257
                self.match(RosettaMRParser.BOUNDED)
                self.state = 258
                self.number_f()
                self.state = 259
                self.number_f()
                self.state = 260
                self.number_f()
                self.state = 262
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,16,self._ctx)
                if la_ == 1:
                    self.state = 261
                    self.number_f()


                self.state = 268
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,18,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 266
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [RosettaMRParser.Simple_name]:
                            self.state = 264
                            self.match(RosettaMRParser.Simple_name)
                            pass
                        elif token in [RosettaMRParser.Integer, RosettaMRParser.Float]:
                            self.state = 265
                            self.number_f()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 270
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,18,self._ctx)

                pass
            elif token in [RosettaMRParser.PERIODICBOUNDED]:
                self.enterOuterAlt(localctx, 3)
                self.state = 271
                self.match(RosettaMRParser.PERIODICBOUNDED)
                self.state = 272
                self.number_f()
                self.state = 273
                self.number_f()
                self.state = 274
                self.number_f()
                self.state = 275
                self.number_f()
                self.state = 277
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,19,self._ctx)
                if la_ == 1:
                    self.state = 276
                    self.number_f()


                self.state = 283
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,21,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 281
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [RosettaMRParser.Simple_name]:
                            self.state = 279
                            self.match(RosettaMRParser.Simple_name)
                            pass
                        elif token in [RosettaMRParser.Integer, RosettaMRParser.Float]:
                            self.state = 280
                            self.number_f()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 285
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,21,self._ctx)

                pass
            elif token in [RosettaMRParser.OFFSETPERIODICBOUNDED]:
                self.enterOuterAlt(localctx, 4)
                self.state = 286
                self.match(RosettaMRParser.OFFSETPERIODICBOUNDED)
                self.state = 287
                self.number_f()
                self.state = 288
                self.number_f()
                self.state = 289
                self.number_f()
                self.state = 290
                self.number_f()
                self.state = 291
                self.number_f()
                self.state = 293
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,22,self._ctx)
                if la_ == 1:
                    self.state = 292
                    self.number_f()


                self.state = 299
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,24,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 297
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [RosettaMRParser.Simple_name]:
                            self.state = 295
                            self.match(RosettaMRParser.Simple_name)
                            pass
                        elif token in [RosettaMRParser.Integer, RosettaMRParser.Float]:
                            self.state = 296
                            self.number_f()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 301
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,24,self._ctx)

                pass
            elif token in [RosettaMRParser.AMBERPERIODIC, RosettaMRParser.CHARMMPERIODIC, RosettaMRParser.FLAT_HARMONIC, RosettaMRParser.TOPOUT]:
                self.enterOuterAlt(localctx, 5)
                self.state = 302
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.AMBERPERIODIC) | (1 << RosettaMRParser.CHARMMPERIODIC) | (1 << RosettaMRParser.FLAT_HARMONIC) | (1 << RosettaMRParser.TOPOUT))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 303
                self.number_f()
                self.state = 304
                self.number_f()
                self.state = 305
                self.number_f()
                pass
            elif token in [RosettaMRParser.CIRCULARSIGMOIDAL, RosettaMRParser.LINEAR_PENALTY]:
                self.enterOuterAlt(localctx, 6)
                self.state = 307
                _la = self._input.LA(1)
                if not(_la==RosettaMRParser.CIRCULARSIGMOIDAL or _la==RosettaMRParser.LINEAR_PENALTY):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 308
                self.number_f()
                self.state = 309
                self.number_f()
                self.state = 310
                self.number_f()
                self.state = 311
                self.number_f()
                pass
            elif token in [RosettaMRParser.CIRCULARSPLINE]:
                self.enterOuterAlt(localctx, 7)
                self.state = 313
                self.match(RosettaMRParser.CIRCULARSPLINE)
                self.state = 315 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 314
                        self.number_f()

                    else:
                        raise NoViableAltException(self)
                    self.state = 317 
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

                pass
            elif token in [RosettaMRParser.GAUSSIANFUNC]:
                self.enterOuterAlt(localctx, 8)
                self.state = 319
                self.match(RosettaMRParser.GAUSSIANFUNC)
                self.state = 320
                self.number_f()
                self.state = 321
                self.number_f()
                self.state = 322
                self.match(RosettaMRParser.Simple_name)
                self.state = 325
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.WEIGHT:
                    self.state = 323
                    self.match(RosettaMRParser.WEIGHT)
                    self.state = 324
                    self.number_f()


                pass
            elif token in [RosettaMRParser.SOGFUNC]:
                self.enterOuterAlt(localctx, 9)
                self.state = 327
                self.match(RosettaMRParser.SOGFUNC)
                self.state = 328
                self.match(RosettaMRParser.Integer)
                self.state = 333 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 329
                        self.number_f()
                        self.state = 330
                        self.number_f()
                        self.state = 331
                        self.number_f()

                    else:
                        raise NoViableAltException(self)
                    self.state = 335 
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,27,self._ctx)

                pass
            elif token in [RosettaMRParser.MIXTUREFUNC, RosettaMRParser.KARPLUS, RosettaMRParser.SOEDINGFUNC]:
                self.enterOuterAlt(localctx, 10)
                self.state = 337
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.MIXTUREFUNC) | (1 << RosettaMRParser.KARPLUS) | (1 << RosettaMRParser.SOEDINGFUNC))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 338
                self.number_f()
                self.state = 339
                self.number_f()
                self.state = 340
                self.number_f()
                self.state = 341
                self.number_f()
                self.state = 342
                self.number_f()
                self.state = 343
                self.number_f()
                pass
            elif token in [RosettaMRParser.CONSTANTFUNC]:
                self.enterOuterAlt(localctx, 11)
                self.state = 345
                self.match(RosettaMRParser.CONSTANTFUNC)
                self.state = 346
                self.number_f()
                pass
            elif token in [RosettaMRParser.IDENTITY]:
                self.enterOuterAlt(localctx, 12)
                self.state = 347
                self.match(RosettaMRParser.IDENTITY)
                pass
            elif token in [RosettaMRParser.SCALARWEIGHTEDFUNC]:
                self.enterOuterAlt(localctx, 13)
                self.state = 348
                self.match(RosettaMRParser.SCALARWEIGHTEDFUNC)
                self.state = 349
                self.number_f()
                self.state = 350
                self.func_type_def()
                pass
            elif token in [RosettaMRParser.SUMFUNC]:
                self.enterOuterAlt(localctx, 14)
                self.state = 352
                self.match(RosettaMRParser.SUMFUNC)
                self.state = 353
                self.match(RosettaMRParser.Integer)
                self.state = 355 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 354
                        self.func_type_def()

                    else:
                        raise NoViableAltException(self)
                    self.state = 357 
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,28,self._ctx)

                pass
            elif token in [RosettaMRParser.SPLINE]:
                self.enterOuterAlt(localctx, 15)
                self.state = 359
                self.match(RosettaMRParser.SPLINE)
                self.state = 360
                self.match(RosettaMRParser.Simple_name)
                self.state = 380
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [RosettaMRParser.Integer, RosettaMRParser.Float]:
                    self.state = 361
                    self.number_f()
                    self.state = 362
                    self.number_f()
                    self.state = 363
                    self.number_f()
                    pass
                elif token in [RosettaMRParser.NONE]:
                    self.state = 365
                    self.match(RosettaMRParser.NONE)
                    self.state = 366
                    self.number_f()
                    self.state = 367
                    self.number_f()
                    self.state = 368
                    self.number_f()
                    self.state = 376 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while True:
                        self.state = 369
                        self.match(RosettaMRParser.Simple_name)
                        self.state = 373
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,29,self._ctx)
                        while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                            if _alt==1:
                                self.state = 370
                                self.number_f() 
                            self.state = 375
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,29,self._ctx)

                        self.state = 378 
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if not (_la==RosettaMRParser.Simple_name):
                            break

                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [RosettaMRParser.FADE]:
                self.enterOuterAlt(localctx, 16)
                self.state = 382
                self.match(RosettaMRParser.FADE)
                self.state = 383
                self.number_f()
                self.state = 384
                self.number_f()
                self.state = 385
                self.number_f()
                self.state = 386
                self.number_f()
                self.state = 388
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,32,self._ctx)
                if la_ == 1:
                    self.state = 387
                    self.number_f()


                pass
            elif token in [RosettaMRParser.SQUARE_WELL2]:
                self.enterOuterAlt(localctx, 17)
                self.state = 390
                self.match(RosettaMRParser.SQUARE_WELL2)
                self.state = 391
                self.number_f()
                self.state = 392
                self.number_f()
                self.state = 393
                self.number_f()
                self.state = 395
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.DEGREES:
                    self.state = 394
                    self.match(RosettaMRParser.DEGREES)


                pass
            elif token in [RosettaMRParser.ETABLE]:
                self.enterOuterAlt(localctx, 18)
                self.state = 397
                self.match(RosettaMRParser.ETABLE)
                self.state = 398
                self.number_f()
                self.state = 399
                self.number_f()
                self.state = 403
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,34,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 400
                        self.number_f() 
                    self.state = 405
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,34,self._ctx)

                pass
            elif token in [RosettaMRParser.USOG]:
                self.enterOuterAlt(localctx, 19)
                self.state = 406
                self.match(RosettaMRParser.USOG)
                self.state = 407
                self.match(RosettaMRParser.Integer)
                self.state = 413 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 408
                        self.number_f()
                        self.state = 409
                        self.number_f()
                        self.state = 410
                        self.number_f()
                        self.state = 411
                        self.number_f()

                    else:
                        raise NoViableAltException(self)
                    self.state = 415 
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,35,self._ctx)

                pass
            elif token in [RosettaMRParser.SOG]:
                self.enterOuterAlt(localctx, 20)
                self.state = 417
                self.match(RosettaMRParser.SOG)
                self.state = 418
                self.match(RosettaMRParser.Integer)
                self.state = 426 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 419
                        self.number_f()
                        self.state = 420
                        self.number_f()
                        self.state = 421
                        self.number_f()
                        self.state = 422
                        self.number_f()
                        self.state = 423
                        self.number_f()
                        self.state = 424
                        self.number_f()

                    else:
                        raise NoViableAltException(self)
                    self.state = 428 
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,36,self._ctx)

                pass
            else:
                raise NoViableAltException(self)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Rdc_restraintsContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def rdc_restraint(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Rdc_restraintContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Rdc_restraintContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_rdc_restraints

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRdc_restraints" ):
                listener.enterRdc_restraints(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRdc_restraints" ):
                listener.exitRdc_restraints(self)




    def rdc_restraints(self):

        localctx = RosettaMRParser.Rdc_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 50, self.RULE_rdc_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 433 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 432
                    self.rdc_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 435 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,38,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Rdc_restraintContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def Simple_name(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Simple_name)
            else:
                return self.getToken(RosettaMRParser.Simple_name, i)

        def number(self):
            return self.getTypedRuleContext(RosettaMRParser.NumberContext,0)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_rdc_restraint

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterRdc_restraint" ):
                listener.enterRdc_restraint(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitRdc_restraint" ):
                listener.exitRdc_restraint(self)




    def rdc_restraint(self):

        localctx = RosettaMRParser.Rdc_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_rdc_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 437
            self.match(RosettaMRParser.Integer)
            self.state = 438
            self.match(RosettaMRParser.Simple_name)
            self.state = 439
            self.match(RosettaMRParser.Integer)
            self.state = 440
            self.match(RosettaMRParser.Simple_name)
            self.state = 441
            self.number()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Disulfide_bond_linkagesContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def disulfide_bond_linkage(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.Disulfide_bond_linkageContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.Disulfide_bond_linkageContext,i)


        def getRuleIndex(self):
            return RosettaMRParser.RULE_disulfide_bond_linkages

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDisulfide_bond_linkages" ):
                listener.enterDisulfide_bond_linkages(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDisulfide_bond_linkages" ):
                listener.exitDisulfide_bond_linkages(self)




    def disulfide_bond_linkages(self):

        localctx = RosettaMRParser.Disulfide_bond_linkagesContext(self, self._ctx, self.state)
        self.enterRule(localctx, 54, self.RULE_disulfide_bond_linkages)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 444 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 443
                    self.disulfide_bond_linkage()

                else:
                    raise NoViableAltException(self)
                self.state = 446 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,39,self._ctx)

        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Disulfide_bond_linkageContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Integer(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Integer)
            else:
                return self.getToken(RosettaMRParser.Integer, i)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_disulfide_bond_linkage

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterDisulfide_bond_linkage" ):
                listener.enterDisulfide_bond_linkage(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitDisulfide_bond_linkage" ):
                listener.exitDisulfide_bond_linkage(self)




    def disulfide_bond_linkage(self):

        localctx = RosettaMRParser.Disulfide_bond_linkageContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_disulfide_bond_linkage)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448
            self.match(RosettaMRParser.Integer)
            self.state = 449
            self.match(RosettaMRParser.Integer)
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class NumberContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Float(self):
            return self.getToken(RosettaMRParser.Float, 0)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 0)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_number

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNumber" ):
                listener.enterNumber(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNumber" ):
                listener.exitNumber(self)




    def number(self):

        localctx = RosettaMRParser.NumberContext(self, self._ctx, self.state)
        self.enterRule(localctx, 58, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 451
            _la = self._input.LA(1)
            if not(_la==RosettaMRParser.Integer or _la==RosettaMRParser.Float):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx


    class Number_fContext(ParserRuleContext):
        __slots__ = 'parser'

        def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1):
            super().__init__(parent, invokingState)
            self.parser = parser

        def Float(self):
            return self.getToken(RosettaMRParser.Float, 0)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 0)

        def getRuleIndex(self):
            return RosettaMRParser.RULE_number_f

        def enterRule(self, listener:ParseTreeListener):
            if hasattr( listener, "enterNumber_f" ):
                listener.enterNumber_f(self)

        def exitRule(self, listener:ParseTreeListener):
            if hasattr( listener, "exitNumber_f" ):
                listener.exitNumber_f(self)




    def number_f(self):

        localctx = RosettaMRParser.Number_fContext(self, self._ctx, self.state)
        self.enterRule(localctx, 60, self.RULE_number_f)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 453
            _la = self._input.LA(1)
            if not(_la==RosettaMRParser.Integer or _la==RosettaMRParser.Float):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
        except RecognitionException as re:
            localctx.exception = re
            self._errHandler.reportError(self, re)
            self._errHandler.recover(self, re)
        finally:
            self.exitRule()
        return localctx





