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

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", "COMMENT", "Simple_name", 
                      "SPACE", "ENCLOSE_COMMENT", "SECTION_COMMENT", "LINE_COMMENT", 
                      "Atom_pair_selection", "Atom_selection", "Any_name", 
                      "SPACE_CM", "RETURN_CM" ]

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

    ruleNames =  [ "rosetta_mr", "comment", "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
    COMMENT=54
    Simple_name=55
    SPACE=56
    ENCLOSE_COMMENT=57
    SECTION_COMMENT=58
    LINE_COMMENT=59
    Atom_pair_selection=60
    Atom_selection=61
    Any_name=62
    SPACE_CM=63
    RETURN_CM=64

    def __init__(self, input:TokenStream, output:TextIO = sys.stdout):
        super().__init__(input, output)
        self.checkVersion("4.12.0")
        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 comment(self, i:int=None):
            if i is None:
                return self.getTypedRuleContexts(RosettaMRParser.CommentContext)
            else:
                return self.getTypedRuleContext(RosettaMRParser.CommentContext,i)


        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 = 80
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 19140298416455678) != 0):
                self.state = 78
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,0,self._ctx)
                if la_ == 1:
                    self.state = 64
                    self.comment()
                    pass

                elif la_ == 2:
                    self.state = 65
                    self.atom_pair_restraints()
                    pass

                elif la_ == 3:
                    self.state = 66
                    self.angle_restraints()
                    pass

                elif la_ == 4:
                    self.state = 67
                    self.dihedral_restraints()
                    pass

                elif la_ == 5:
                    self.state = 68
                    self.dihedral_pair_restraints()
                    pass

                elif la_ == 6:
                    self.state = 69
                    self.coordinate_restraints()
                    pass

                elif la_ == 7:
                    self.state = 70
                    self.local_coordinate_restraints()
                    pass

                elif la_ == 8:
                    self.state = 71
                    self.site_restraints()
                    pass

                elif la_ == 9:
                    self.state = 72
                    self.site_residues_restraints()
                    pass

                elif la_ == 10:
                    self.state = 73
                    self.min_residue_atomic_distance_restraints()
                    pass

                elif la_ == 11:
                    self.state = 74
                    self.big_bin_restraints()
                    pass

                elif la_ == 12:
                    self.state = 75
                    self.nested_restraints()
                    pass

                elif la_ == 13:
                    self.state = 76
                    self.rdc_restraints()
                    pass

                elif la_ == 14:
                    self.state = 77
                    self.disulfide_bond_linkages()
                    pass


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

            self.state = 83
            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 CommentContext(ParserRuleContext):
        __slots__ = 'parser'

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_comment

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

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




    def comment(self):

        localctx = RosettaMRParser.CommentContext(self, self._ctx, self.state)
        self.enterRule(localctx, 2, self.RULE_comment)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 85
            self.match(RosettaMRParser.COMMENT)
            self.state = 89
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while (((_la) & ~0x3f) == 0 and ((1 << _la) & 8070450532247928832) != 0):
                self.state = 86
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 8070450532247928832) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 91
                self._errHandler.sync(self)
                _la = self._input.LA(1)

            self.state = 92
            _la = self._input.LA(1)
            if not(_la==-1 or _la==64):
                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 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, 4, self.RULE_atom_pair_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.atom_pair_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 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, 6, self.RULE_atom_pair_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 99
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 518) != 0)):
                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.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, 8, self.RULE_angle_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 107 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 106
                    self.angle_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 109 
                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 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, 10, self.RULE_angle_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 111
            _la = self._input.LA(1)
            if not(_la==3 or _la==4):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 112
            self.match(RosettaMRParser.Simple_name)
            self.state = 113
            self.match(RosettaMRParser.Integer)
            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.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, 12, self.RULE_dihedral_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 121 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 120
                    self.dihedral_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 123 
                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_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, 14, self.RULE_dihedral_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125
            self.match(RosettaMRParser.Dihedral)
            self.state = 126
            self.match(RosettaMRParser.Simple_name)
            self.state = 127
            self.match(RosettaMRParser.Integer)
            self.state = 128
            self.match(RosettaMRParser.Simple_name)
            self.state = 129
            self.match(RosettaMRParser.Integer)
            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.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, 16, self.RULE_dihedral_pair_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 137 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 136
                    self.dihedral_pair_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 139 
                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 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, 18, self.RULE_dihedral_pair_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 141
            self.match(RosettaMRParser.DihedralPair)
            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.match(RosettaMRParser.Simple_name)
            self.state = 147
            self.match(RosettaMRParser.Integer)
            self.state = 148
            self.match(RosettaMRParser.Simple_name)
            self.state = 149
            self.match(RosettaMRParser.Integer)
            self.state = 150
            self.match(RosettaMRParser.Simple_name)
            self.state = 151
            self.match(RosettaMRParser.Integer)
            self.state = 152
            self.match(RosettaMRParser.Simple_name)
            self.state = 153
            self.match(RosettaMRParser.Integer)
            self.state = 154
            self.match(RosettaMRParser.Simple_name)
            self.state = 155
            self.match(RosettaMRParser.Integer)
            self.state = 156
            self.match(RosettaMRParser.Simple_name)
            self.state = 157
            self.match(RosettaMRParser.Integer)
            self.state = 158
            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, 20, self.RULE_coordinate_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 161 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 160
                    self.coordinate_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 163 
                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 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, 22, self.RULE_coordinate_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 165
            self.match(RosettaMRParser.CoordinateConstraint)
            self.state = 166
            self.match(RosettaMRParser.Simple_name)
            self.state = 167
            self.match(RosettaMRParser.Simple_name)
            self.state = 168
            self.match(RosettaMRParser.Simple_name)
            self.state = 169
            self.match(RosettaMRParser.Simple_name)
            self.state = 170
            self.number()
            self.state = 171
            self.number()
            self.state = 172
            self.number()
            self.state = 173
            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, 24, self.RULE_local_coordinate_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 176 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 175
                    self.local_coordinate_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 178 
                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 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, 26, self.RULE_local_coordinate_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 180
            self.match(RosettaMRParser.LocalCoordinateConstraint)
            self.state = 181
            self.match(RosettaMRParser.Simple_name)
            self.state = 182
            self.match(RosettaMRParser.Integer)
            self.state = 183
            self.match(RosettaMRParser.Simple_name)
            self.state = 184
            self.match(RosettaMRParser.Simple_name)
            self.state = 185
            self.match(RosettaMRParser.Simple_name)
            self.state = 186
            self.match(RosettaMRParser.Integer)
            self.state = 187
            self.number()
            self.state = 188
            self.number()
            self.state = 189
            self.number()
            self.state = 190
            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, 28, self.RULE_site_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 193 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 192
                    self.site_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 195 
                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_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, 30, self.RULE_site_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 197
            self.match(RosettaMRParser.SiteConstraint)
            self.state = 198
            self.match(RosettaMRParser.Simple_name)
            self.state = 199
            self.match(RosettaMRParser.Integer)
            self.state = 200
            self.match(RosettaMRParser.Simple_name)
            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 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, 32, self.RULE_site_residues_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.site_residues_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 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, 34, self.RULE_site_residues_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 208
            self.match(RosettaMRParser.SiteConstraintResidues)
            self.state = 209
            self.match(RosettaMRParser.Integer)
            self.state = 210
            self.match(RosettaMRParser.Simple_name)
            self.state = 211
            self.match(RosettaMRParser.Integer)
            self.state = 212
            self.match(RosettaMRParser.Integer)
            self.state = 213
            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, 36, self.RULE_min_residue_atomic_distance_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 216 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 215
                    self.min_residue_atomic_distance_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 218 
                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 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, 38, self.RULE_min_residue_atomic_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 220
            self.match(RosettaMRParser.MinResidueAtomicDistance)
            self.state = 221
            self.match(RosettaMRParser.Integer)
            self.state = 222
            self.match(RosettaMRParser.Integer)
            self.state = 223
            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, 40, self.RULE_big_bin_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 226 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 225
                    self.big_bin_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 228 
                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 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, 42, self.RULE_big_bin_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 230
            self.match(RosettaMRParser.BigBin)
            self.state = 231
            self.match(RosettaMRParser.Integer)
            self.state = 232
            self.match(RosettaMRParser.Simple_name)
            self.state = 233
            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, 44, self.RULE_nested_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 236 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 235
                    self.nested_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 238 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,13,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, 46, self.RULE_nested_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 244
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [14]:
                self.state = 240
                self.match(RosettaMRParser.MultiConstraint)
                pass
            elif token in [15]:
                self.state = 241
                self.match(RosettaMRParser.AmbiguousConstraint)
                pass
            elif token in [16]:
                self.state = 242
                self.match(RosettaMRParser.KofNConstraint)
                self.state = 243
                self.match(RosettaMRParser.Integer)
                pass
            else:
                raise NoViableAltException(self)

            self.state = 247 
            self._errHandler.sync(self)
            _la = self._input.LA(1)
            while True:
                self.state = 246
                self.any_restraint()
                self.state = 249 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if not ((((_la) & ~0x3f) == 0 and ((1 << _la) & 16382) != 0)):
                    break

            self.state = 251
            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, 48, self.RULE_any_restraint)
        try:
            self.state = 263
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [1, 2, 9]:
                self.enterOuterAlt(localctx, 1)
                self.state = 253
                self.atom_pair_restraint()
                pass
            elif token in [3, 4]:
                self.enterOuterAlt(localctx, 2)
                self.state = 254
                self.angle_restraint()
                pass
            elif token in [5]:
                self.enterOuterAlt(localctx, 3)
                self.state = 255
                self.dihedral_restraint()
                pass
            elif token in [6]:
                self.enterOuterAlt(localctx, 4)
                self.state = 256
                self.dihedral_pair_restraint()
                pass
            elif token in [7]:
                self.enterOuterAlt(localctx, 5)
                self.state = 257
                self.coordinate_restraint()
                pass
            elif token in [8]:
                self.enterOuterAlt(localctx, 6)
                self.state = 258
                self.local_coordinate_restraint()
                pass
            elif token in [10]:
                self.enterOuterAlt(localctx, 7)
                self.state = 259
                self.site_restraint()
                pass
            elif token in [11]:
                self.enterOuterAlt(localctx, 8)
                self.state = 260
                self.site_residues_restraint()
                pass
            elif token in [12]:
                self.enterOuterAlt(localctx, 9)
                self.state = 261
                self.min_residue_atomic_distance_restraint()
                pass
            elif token in [13]:
                self.enterOuterAlt(localctx, 10)
                self.state = 262
                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 BOUNDED(self):
            return self.getToken(RosettaMRParser.BOUNDED, 0)

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

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

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

        def GAUSSIANFUNC(self):
            return self.getToken(RosettaMRParser.GAUSSIANFUNC, 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 SOGFUNC(self):
            return self.getToken(RosettaMRParser.SOGFUNC, 0)

        def Integer(self):
            return self.getToken(RosettaMRParser.Integer, 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 FADE(self):
            return self.getToken(RosettaMRParser.FADE, 0)

        def SQUARE_WELL2(self):
            return self.getToken(RosettaMRParser.SQUARE_WELL2, 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 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 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 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 comment(self):
            return self.getTypedRuleContext(RosettaMRParser.CommentContext,0)


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

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

        def DEGREES(self):
            return self.getToken(RosettaMRParser.DEGREES, 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, 50, self.RULE_func_type_def)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 442
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [18, 25, 39, 40]:
                self.state = 265
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 1649301258240) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 266
                self.number_f()
                self.state = 267
                self.number_f()
                pass
            elif token in [27]:
                self.state = 269
                self.match(RosettaMRParser.BOUNDED)
                self.state = 270
                self.number_f()
                self.state = 271
                self.number_f()
                self.state = 272
                self.number_f()
                self.state = 274
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,17,self._ctx)
                if la_ == 1:
                    self.state = 273
                    self.number_f()


                self.state = 280
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,19,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 278
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [55]:
                            self.state = 276
                            self.match(RosettaMRParser.Simple_name)
                            pass
                        elif token in [50, 51]:
                            self.state = 277
                            self.number_f()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 282
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,19,self._ctx)

                pass
            elif token in [19]:
                self.state = 283
                self.match(RosettaMRParser.PERIODICBOUNDED)
                self.state = 284
                self.number_f()
                self.state = 285
                self.number_f()
                self.state = 286
                self.number_f()
                self.state = 287
                self.number_f()
                self.state = 289
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,20,self._ctx)
                if la_ == 1:
                    self.state = 288
                    self.number_f()


                self.state = 295
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,22,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 293
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [55]:
                            self.state = 291
                            self.match(RosettaMRParser.Simple_name)
                            pass
                        elif token in [50, 51]:
                            self.state = 292
                            self.number_f()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 297
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,22,self._ctx)

                pass
            elif token in [20]:
                self.state = 298
                self.match(RosettaMRParser.OFFSETPERIODICBOUNDED)
                self.state = 299
                self.number_f()
                self.state = 300
                self.number_f()
                self.state = 301
                self.number_f()
                self.state = 302
                self.number_f()
                self.state = 303
                self.number_f()
                self.state = 305
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,23,self._ctx)
                if la_ == 1:
                    self.state = 304
                    self.number_f()


                self.state = 311
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,25,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 309
                        self._errHandler.sync(self)
                        token = self._input.LA(1)
                        if token in [55]:
                            self.state = 307
                            self.match(RosettaMRParser.Simple_name)
                            pass
                        elif token in [50, 51]:
                            self.state = 308
                            self.number_f()
                            pass
                        else:
                            raise NoViableAltException(self)
                 
                    self.state = 313
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,25,self._ctx)

                pass
            elif token in [21, 22, 26, 46]:
                self.state = 314
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 70368817577984) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 315
                self.number_f()
                self.state = 316
                self.number_f()
                self.state = 317
                self.number_f()
                pass
            elif token in [23, 43]:
                self.state = 319
                _la = self._input.LA(1)
                if not(_la==23 or _la==43):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 320
                self.number_f()
                self.state = 321
                self.number_f()
                self.state = 322
                self.number_f()
                self.state = 323
                self.number_f()
                pass
            elif token in [24]:
                self.state = 325
                self.match(RosettaMRParser.CIRCULARSPLINE)
                self.state = 327 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 326
                        self.number_f()

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

                pass
            elif token in [28]:
                self.state = 331
                self.match(RosettaMRParser.GAUSSIANFUNC)
                self.state = 332
                self.number_f()
                self.state = 333
                self.number_f()
                self.state = 334
                self.match(RosettaMRParser.Simple_name)
                self.state = 337
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==29:
                    self.state = 335
                    self.match(RosettaMRParser.WEIGHT)
                    self.state = 336
                    self.number_f()


                pass
            elif token in [30]:
                self.state = 339
                self.match(RosettaMRParser.SOGFUNC)
                self.state = 340
                self.match(RosettaMRParser.Integer)
                self.state = 345 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 341
                        self.number_f()
                        self.state = 342
                        self.number_f()
                        self.state = 343
                        self.number_f()

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

                pass
            elif token in [31, 44, 45]:
                self.state = 349
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & 52778705616896) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 350
                self.number_f()
                self.state = 351
                self.number_f()
                self.state = 352
                self.number_f()
                self.state = 353
                self.number_f()
                self.state = 354
                self.number_f()
                self.state = 355
                self.number_f()
                pass
            elif token in [32]:
                self.state = 357
                self.match(RosettaMRParser.CONSTANTFUNC)
                self.state = 358
                self.number_f()
                pass
            elif token in [33]:
                self.state = 359
                self.match(RosettaMRParser.IDENTITY)
                pass
            elif token in [34]:
                self.state = 360
                self.match(RosettaMRParser.SCALARWEIGHTEDFUNC)
                self.state = 361
                self.number_f()
                self.state = 362
                self.func_type_def()
                pass
            elif token in [35]:
                self.state = 364
                self.match(RosettaMRParser.SUMFUNC)
                self.state = 365
                self.match(RosettaMRParser.Integer)
                self.state = 367 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 366
                        self.func_type_def()

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

                pass
            elif token in [36]:
                self.state = 371
                self.match(RosettaMRParser.SPLINE)
                self.state = 372
                self.match(RosettaMRParser.Simple_name)
                self.state = 392
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [50, 51]:
                    self.state = 373
                    self.number_f()
                    self.state = 374
                    self.number_f()
                    self.state = 375
                    self.number_f()
                    pass
                elif token in [37]:
                    self.state = 377
                    self.match(RosettaMRParser.NONE)
                    self.state = 378
                    self.number_f()
                    self.state = 379
                    self.number_f()
                    self.state = 380
                    self.number_f()
                    self.state = 388 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while True:
                        self.state = 381
                        self.match(RosettaMRParser.Simple_name)
                        self.state = 385
                        self._errHandler.sync(self)
                        _alt = self._interp.adaptivePredict(self._input,30,self._ctx)
                        while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                            if _alt==1:
                                self.state = 382
                                self.number_f() 
                            self.state = 387
                            self._errHandler.sync(self)
                            _alt = self._interp.adaptivePredict(self._input,30,self._ctx)

                        self.state = 390 
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        if not (_la==55):
                            break

                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [38]:
                self.state = 394
                self.match(RosettaMRParser.FADE)
                self.state = 395
                self.number_f()
                self.state = 396
                self.number_f()
                self.state = 397
                self.number_f()
                self.state = 398
                self.number_f()
                self.state = 400
                self._errHandler.sync(self)
                la_ = self._interp.adaptivePredict(self._input,33,self._ctx)
                if la_ == 1:
                    self.state = 399
                    self.number_f()


                pass
            elif token in [41]:
                self.state = 402
                self.match(RosettaMRParser.SQUARE_WELL2)
                self.state = 403
                self.number_f()
                self.state = 404
                self.number_f()
                self.state = 405
                self.number_f()
                self.state = 407
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==42:
                    self.state = 406
                    self.match(RosettaMRParser.DEGREES)


                pass
            elif token in [47]:
                self.state = 409
                self.match(RosettaMRParser.ETABLE)
                self.state = 410
                self.number_f()
                self.state = 411
                self.number_f()
                self.state = 415
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,35,self._ctx)
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt==1:
                        self.state = 412
                        self.number_f() 
                    self.state = 417
                    self._errHandler.sync(self)
                    _alt = self._interp.adaptivePredict(self._input,35,self._ctx)

                pass
            elif token in [48]:
                self.state = 418
                self.match(RosettaMRParser.USOG)
                self.state = 419
                self.match(RosettaMRParser.Integer)
                self.state = 425 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 420
                        self.number_f()
                        self.state = 421
                        self.number_f()
                        self.state = 422
                        self.number_f()
                        self.state = 423
                        self.number_f()

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

                pass
            elif token in [49]:
                self.state = 429
                self.match(RosettaMRParser.SOG)
                self.state = 430
                self.match(RosettaMRParser.Integer)
                self.state = 438 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 431
                        self.number_f()
                        self.state = 432
                        self.number_f()
                        self.state = 433
                        self.number_f()
                        self.state = 434
                        self.number_f()
                        self.state = 435
                        self.number_f()
                        self.state = 436
                        self.number_f()

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

                pass
            else:
                raise NoViableAltException(self)

            self.state = 445
            self._errHandler.sync(self)
            la_ = self._interp.adaptivePredict(self._input,39,self._ctx)
            if la_ == 1:
                self.state = 444
                self.comment()


        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, 52, self.RULE_rdc_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 448 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 447
                    self.rdc_restraint()

                else:
                    raise NoViableAltException(self)
                self.state = 450 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,40,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, 54, self.RULE_rdc_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 452
            self.match(RosettaMRParser.Integer)
            self.state = 453
            self.match(RosettaMRParser.Simple_name)
            self.state = 454
            self.match(RosettaMRParser.Integer)
            self.state = 455
            self.match(RosettaMRParser.Simple_name)
            self.state = 456
            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, 56, self.RULE_disulfide_bond_linkages)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 459 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 458
                    self.disulfide_bond_linkage()

                else:
                    raise NoViableAltException(self)
                self.state = 461 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,41,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, 58, self.RULE_disulfide_bond_linkage)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 463
            self.match(RosettaMRParser.Integer)
            self.state = 464
            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, 60, self.RULE_number)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 466
            _la = self._input.LA(1)
            if not(_la==50 or _la==51):
                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, 62, self.RULE_number_f)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 468
            _la = self._input.LA(1)
            if not(_la==50 or _la==51):
                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





