# Generated from RosettaMRParser.g4 by ANTLR 4.9
# 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():
    with StringIO() as buf:
        buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\39")
        buf.write("\u01ad\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7")
        buf.write("\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4\f\t\f\4\r\t\r\4\16")
        buf.write("\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22\4\23\t\23")
        buf.write("\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31")
        buf.write("\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36")
        buf.write("\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\7")
        buf.write("\2J\n\2\f\2\16\2M\13\2\3\2\3\2\3\3\6\3R\n\3\r\3\16\3S")
        buf.write("\3\4\3\4\3\4\3\4\3\4\3\4\3\4\3\5\6\5^\n\5\r\5\16\5_\3")
        buf.write("\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\6\7l\n\7\r\7\16")
        buf.write("\7m\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\6")
        buf.write("\t|\n\t\r\t\16\t}\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n")
        buf.write("\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3\13\6\13\u0094")
        buf.write("\n\13\r\13\16\13\u0095\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f")
        buf.write("\3\f\3\f\3\r\6\r\u00a3\n\r\r\r\16\r\u00a4\3\16\3\16\3")
        buf.write("\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\16\3\17")
        buf.write("\6\17\u00b4\n\17\r\17\16\17\u00b5\3\20\3\20\3\20\3\20")
        buf.write("\3\20\3\20\3\21\6\21\u00bf\n\21\r\21\16\21\u00c0\3\22")
        buf.write("\3\22\3\22\3\22\3\22\3\22\3\22\3\23\6\23\u00cb\n\23\r")
        buf.write("\23\16\23\u00cc\3\24\3\24\3\24\3\24\3\24\3\25\6\25\u00d5")
        buf.write("\n\25\r\25\16\25\u00d6\3\26\3\26\3\26\3\26\3\26\3\27\6")
        buf.write("\27\u00df\n\27\r\27\16\27\u00e0\3\30\3\30\3\30\3\30\5")
        buf.write("\30\u00e7\n\30\3\30\6\30\u00ea\n\30\r\30\16\30\u00eb\3")
        buf.write("\30\3\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31")
        buf.write("\3\31\5\31\u00fa\n\31\3\32\3\32\3\32\3\32\3\32\3\32\3")
        buf.write("\32\3\32\5\32\u0104\n\32\3\32\5\32\u0107\n\32\3\32\3\32")
        buf.write("\3\32\3\32\3\32\3\32\5\32\u010f\n\32\3\32\5\32\u0112\n")
        buf.write("\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\5\32\u011b\n\32")
        buf.write("\3\32\5\32\u011e\n\32\3\32\3\32\3\32\3\32\3\32\3\32\3")
        buf.write("\32\3\32\3\32\3\32\3\32\6\32\u012b\n\32\r\32\16\32\u012c")
        buf.write("\3\32\3\32\3\32\3\32\3\32\3\32\5\32\u0135\n\32\3\32\3")
        buf.write("\32\3\32\3\32\3\32\6\32\u013c\n\32\r\32\16\32\u013d\3")
        buf.write("\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32")
        buf.write("\3\32\3\32\3\32\3\32\3\32\6\32\u0150\n\32\r\32\16\32\u0151")
        buf.write("\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32")
        buf.write("\7\32\u015f\n\32\f\32\16\32\u0162\13\32\6\32\u0164\n\32")
        buf.write("\r\32\16\32\u0165\5\32\u0168\n\32\3\32\3\32\3\32\3\32")
        buf.write("\3\32\3\32\5\32\u0170\n\32\3\32\3\32\3\32\3\32\3\32\5")
        buf.write("\32\u0177\n\32\3\32\3\32\3\32\3\32\7\32\u017d\n\32\f\32")
        buf.write("\16\32\u0180\13\32\3\32\3\32\3\32\3\32\3\32\3\32\6\32")
        buf.write("\u0188\n\32\r\32\16\32\u0189\3\32\3\32\3\32\3\32\3\32")
        buf.write("\3\32\3\32\3\32\6\32\u0194\n\32\r\32\16\32\u0195\5\32")
        buf.write("\u0198\n\32\3\33\6\33\u019b\n\33\r\33\16\33\u019c\3\34")
        buf.write("\3\34\3\34\3\34\3\34\3\34\3\35\6\35\u01a6\n\35\r\35\16")
        buf.write("\35\u01a7\3\36\3\36\3\36\3\36\2\2\37\2\4\6\b\n\f\16\20")
        buf.write("\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:\2\b\4\2\3")
        buf.write("\4\13\13\3\2\5\6\5\2\24\24\33\33)*\5\2\27\30\34\34\60")
        buf.write("\60\4\2\31\31--\4\2!!./\2\u01da\2K\3\2\2\2\4Q\3\2\2\2")
        buf.write("\6U\3\2\2\2\b]\3\2\2\2\na\3\2\2\2\fk\3\2\2\2\16o\3\2\2")
        buf.write("\2\20{\3\2\2\2\22\177\3\2\2\2\24\u0093\3\2\2\2\26\u0097")
        buf.write("\3\2\2\2\30\u00a2\3\2\2\2\32\u00a6\3\2\2\2\34\u00b3\3")
        buf.write("\2\2\2\36\u00b7\3\2\2\2 \u00be\3\2\2\2\"\u00c2\3\2\2\2")
        buf.write("$\u00ca\3\2\2\2&\u00ce\3\2\2\2(\u00d4\3\2\2\2*\u00d8\3")
        buf.write("\2\2\2,\u00de\3\2\2\2.\u00e6\3\2\2\2\60\u00f9\3\2\2\2")
        buf.write("\62\u0197\3\2\2\2\64\u019a\3\2\2\2\66\u019e\3\2\2\28\u01a5")
        buf.write("\3\2\2\2:\u01a9\3\2\2\2<J\5\4\3\2=J\5\b\5\2>J\5\f\7\2")
        buf.write("?J\5\20\t\2@J\5\24\13\2AJ\5\30\r\2BJ\5\34\17\2CJ\5 \21")
        buf.write("\2DJ\5$\23\2EJ\5(\25\2FJ\5,\27\2GJ\5\64\33\2HJ\58\35\2")
        buf.write("I<\3\2\2\2I=\3\2\2\2I>\3\2\2\2I?\3\2\2\2I@\3\2\2\2IA\3")
        buf.write("\2\2\2IB\3\2\2\2IC\3\2\2\2ID\3\2\2\2IE\3\2\2\2IF\3\2\2")
        buf.write("\2IG\3\2\2\2IH\3\2\2\2JM\3\2\2\2KI\3\2\2\2KL\3\2\2\2L")
        buf.write("N\3\2\2\2MK\3\2\2\2NO\7\2\2\3O\3\3\2\2\2PR\5\6\4\2QP\3")
        buf.write("\2\2\2RS\3\2\2\2SQ\3\2\2\2ST\3\2\2\2T\5\3\2\2\2UV\t\2")
        buf.write("\2\2VW\7\66\2\2WX\7\64\2\2XY\7\66\2\2YZ\7\64\2\2Z[\5\62")
        buf.write("\32\2[\7\3\2\2\2\\^\5\n\6\2]\\\3\2\2\2^_\3\2\2\2_]\3\2")
        buf.write("\2\2_`\3\2\2\2`\t\3\2\2\2ab\t\3\2\2bc\7\66\2\2cd\7\64")
        buf.write("\2\2de\7\66\2\2ef\7\64\2\2fg\7\66\2\2gh\7\64\2\2hi\5\62")
        buf.write("\32\2i\13\3\2\2\2jl\5\16\b\2kj\3\2\2\2lm\3\2\2\2mk\3\2")
        buf.write("\2\2mn\3\2\2\2n\r\3\2\2\2op\7\7\2\2pq\7\66\2\2qr\7\64")
        buf.write("\2\2rs\7\66\2\2st\7\64\2\2tu\7\66\2\2uv\7\64\2\2vw\7\66")
        buf.write("\2\2wx\7\64\2\2xy\5\62\32\2y\17\3\2\2\2z|\5\22\n\2{z\3")
        buf.write("\2\2\2|}\3\2\2\2}{\3\2\2\2}~\3\2\2\2~\21\3\2\2\2\177\u0080")
        buf.write("\7\b\2\2\u0080\u0081\7\66\2\2\u0081\u0082\7\64\2\2\u0082")
        buf.write("\u0083\7\66\2\2\u0083\u0084\7\64\2\2\u0084\u0085\7\66")
        buf.write("\2\2\u0085\u0086\7\64\2\2\u0086\u0087\7\66\2\2\u0087\u0088")
        buf.write("\7\64\2\2\u0088\u0089\7\66\2\2\u0089\u008a\7\64\2\2\u008a")
        buf.write("\u008b\7\66\2\2\u008b\u008c\7\64\2\2\u008c\u008d\7\66")
        buf.write("\2\2\u008d\u008e\7\64\2\2\u008e\u008f\7\66\2\2\u008f\u0090")
        buf.write("\7\64\2\2\u0090\u0091\5\62\32\2\u0091\23\3\2\2\2\u0092")
        buf.write("\u0094\5\26\f\2\u0093\u0092\3\2\2\2\u0094\u0095\3\2\2")
        buf.write("\2\u0095\u0093\3\2\2\2\u0095\u0096\3\2\2\2\u0096\25\3")
        buf.write("\2\2\2\u0097\u0098\7\t\2\2\u0098\u0099\7\66\2\2\u0099")
        buf.write("\u009a\7\66\2\2\u009a\u009b\7\66\2\2\u009b\u009c\7\66")
        buf.write("\2\2\u009c\u009d\7\65\2\2\u009d\u009e\7\65\2\2\u009e\u009f")
        buf.write("\7\65\2\2\u009f\u00a0\5\62\32\2\u00a0\27\3\2\2\2\u00a1")
        buf.write("\u00a3\5\32\16\2\u00a2\u00a1\3\2\2\2\u00a3\u00a4\3\2\2")
        buf.write("\2\u00a4\u00a2\3\2\2\2\u00a4\u00a5\3\2\2\2\u00a5\31\3")
        buf.write("\2\2\2\u00a6\u00a7\7\n\2\2\u00a7\u00a8\7\66\2\2\u00a8")
        buf.write("\u00a9\7\64\2\2\u00a9\u00aa\7\66\2\2\u00aa\u00ab\7\66")
        buf.write("\2\2\u00ab\u00ac\7\66\2\2\u00ac\u00ad\7\64\2\2\u00ad\u00ae")
        buf.write("\7\65\2\2\u00ae\u00af\7\65\2\2\u00af\u00b0\7\65\2\2\u00b0")
        buf.write("\u00b1\5\62\32\2\u00b1\33\3\2\2\2\u00b2\u00b4\5\36\20")
        buf.write("\2\u00b3\u00b2\3\2\2\2\u00b4\u00b5\3\2\2\2\u00b5\u00b3")
        buf.write("\3\2\2\2\u00b5\u00b6\3\2\2\2\u00b6\35\3\2\2\2\u00b7\u00b8")
        buf.write("\7\f\2\2\u00b8\u00b9\7\66\2\2\u00b9\u00ba\7\64\2\2\u00ba")
        buf.write("\u00bb\7\66\2\2\u00bb\u00bc\5\62\32\2\u00bc\37\3\2\2\2")
        buf.write("\u00bd\u00bf\5\"\22\2\u00be\u00bd\3\2\2\2\u00bf\u00c0")
        buf.write("\3\2\2\2\u00c0\u00be\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1")
        buf.write("!\3\2\2\2\u00c2\u00c3\7\r\2\2\u00c3\u00c4\7\64\2\2\u00c4")
        buf.write("\u00c5\7\66\2\2\u00c5\u00c6\7\64\2\2\u00c6\u00c7\7\64")
        buf.write("\2\2\u00c7\u00c8\5\62\32\2\u00c8#\3\2\2\2\u00c9\u00cb")
        buf.write("\5&\24\2\u00ca\u00c9\3\2\2\2\u00cb\u00cc\3\2\2\2\u00cc")
        buf.write("\u00ca\3\2\2\2\u00cc\u00cd\3\2\2\2\u00cd%\3\2\2\2\u00ce")
        buf.write("\u00cf\7\16\2\2\u00cf\u00d0\7\64\2\2\u00d0\u00d1\7\64")
        buf.write("\2\2\u00d1\u00d2\7\65\2\2\u00d2\'\3\2\2\2\u00d3\u00d5")
        buf.write("\5*\26\2\u00d4\u00d3\3\2\2\2\u00d5\u00d6\3\2\2\2\u00d6")
        buf.write("\u00d4\3\2\2\2\u00d6\u00d7\3\2\2\2\u00d7)\3\2\2\2\u00d8")
        buf.write("\u00d9\7\17\2\2\u00d9\u00da\7\64\2\2\u00da\u00db\7\66")
        buf.write("\2\2\u00db\u00dc\7\65\2\2\u00dc+\3\2\2\2\u00dd\u00df\5")
        buf.write(".\30\2\u00de\u00dd\3\2\2\2\u00df\u00e0\3\2\2\2\u00e0\u00de")
        buf.write("\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1-\3\2\2\2\u00e2\u00e7")
        buf.write("\7\20\2\2\u00e3\u00e7\7\21\2\2\u00e4\u00e5\7\22\2\2\u00e5")
        buf.write("\u00e7\7\64\2\2\u00e6\u00e2\3\2\2\2\u00e6\u00e3\3\2\2")
        buf.write("\2\u00e6\u00e4\3\2\2\2\u00e7\u00e9\3\2\2\2\u00e8\u00ea")
        buf.write("\5\60\31\2\u00e9\u00e8\3\2\2\2\u00ea\u00eb\3\2\2\2\u00eb")
        buf.write("\u00e9\3\2\2\2\u00eb\u00ec\3\2\2\2\u00ec\u00ed\3\2\2\2")
        buf.write("\u00ed\u00ee\7\23\2\2\u00ee/\3\2\2\2\u00ef\u00fa\5\6\4")
        buf.write("\2\u00f0\u00fa\5\n\6\2\u00f1\u00fa\5\16\b\2\u00f2\u00fa")
        buf.write("\5\22\n\2\u00f3\u00fa\5\26\f\2\u00f4\u00fa\5\32\16\2\u00f5")
        buf.write("\u00fa\5\36\20\2\u00f6\u00fa\5\"\22\2\u00f7\u00fa\5&\24")
        buf.write("\2\u00f8\u00fa\5*\26\2\u00f9\u00ef\3\2\2\2\u00f9\u00f0")
        buf.write("\3\2\2\2\u00f9\u00f1\3\2\2\2\u00f9\u00f2\3\2\2\2\u00f9")
        buf.write("\u00f3\3\2\2\2\u00f9\u00f4\3\2\2\2\u00f9\u00f5\3\2\2\2")
        buf.write("\u00f9\u00f6\3\2\2\2\u00f9\u00f7\3\2\2\2\u00f9\u00f8\3")
        buf.write("\2\2\2\u00fa\61\3\2\2\2\u00fb\u00fc\t\4\2\2\u00fc\u00fd")
        buf.write("\7\65\2\2\u00fd\u0198\7\65\2\2\u00fe\u00ff\7\35\2\2\u00ff")
        buf.write("\u0100\7\65\2\2\u0100\u0101\7\65\2\2\u0101\u0103\7\65")
        buf.write("\2\2\u0102\u0104\7\65\2\2\u0103\u0102\3\2\2\2\u0103\u0104")
        buf.write("\3\2\2\2\u0104\u0106\3\2\2\2\u0105\u0107\7\66\2\2\u0106")
        buf.write("\u0105\3\2\2\2\u0106\u0107\3\2\2\2\u0107\u0198\3\2\2\2")
        buf.write("\u0108\u0109\7\25\2\2\u0109\u010a\7\65\2\2\u010a\u010b")
        buf.write("\7\65\2\2\u010b\u010c\7\65\2\2\u010c\u010e\7\65\2\2\u010d")
        buf.write("\u010f\7\65\2\2\u010e\u010d\3\2\2\2\u010e\u010f\3\2\2")
        buf.write("\2\u010f\u0111\3\2\2\2\u0110\u0112\7\66\2\2\u0111\u0110")
        buf.write("\3\2\2\2\u0111\u0112\3\2\2\2\u0112\u0198\3\2\2\2\u0113")
        buf.write("\u0114\7\26\2\2\u0114\u0115\7\65\2\2\u0115\u0116\7\65")
        buf.write("\2\2\u0116\u0117\7\65\2\2\u0117\u0118\7\65\2\2\u0118\u011a")
        buf.write("\7\65\2\2\u0119\u011b\7\65\2\2\u011a\u0119\3\2\2\2\u011a")
        buf.write("\u011b\3\2\2\2\u011b\u011d\3\2\2\2\u011c\u011e\7\66\2")
        buf.write("\2\u011d\u011c\3\2\2\2\u011d\u011e\3\2\2\2\u011e\u0198")
        buf.write("\3\2\2\2\u011f\u0120\t\5\2\2\u0120\u0121\7\65\2\2\u0121")
        buf.write("\u0122\7\65\2\2\u0122\u0198\7\65\2\2\u0123\u0124\t\6\2")
        buf.write("\2\u0124\u0125\7\65\2\2\u0125\u0126\7\65\2\2\u0126\u0127")
        buf.write("\7\65\2\2\u0127\u0198\7\65\2\2\u0128\u012a\7\32\2\2\u0129")
        buf.write("\u012b\7\65\2\2\u012a\u0129\3\2\2\2\u012b\u012c\3\2\2")
        buf.write("\2\u012c\u012a\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u0198")
        buf.write("\3\2\2\2\u012e\u012f\7\36\2\2\u012f\u0130\7\65\2\2\u0130")
        buf.write("\u0131\7\65\2\2\u0131\u0134\7\66\2\2\u0132\u0133\7\37")
        buf.write("\2\2\u0133\u0135\7\65\2\2\u0134\u0132\3\2\2\2\u0134\u0135")
        buf.write("\3\2\2\2\u0135\u0198\3\2\2\2\u0136\u0137\7 \2\2\u0137")
        buf.write("\u013b\7\64\2\2\u0138\u0139\7\65\2\2\u0139\u013a\7\65")
        buf.write("\2\2\u013a\u013c\7\65\2\2\u013b\u0138\3\2\2\2\u013c\u013d")
        buf.write("\3\2\2\2\u013d\u013b\3\2\2\2\u013d\u013e\3\2\2\2\u013e")
        buf.write("\u0198\3\2\2\2\u013f\u0140\t\7\2\2\u0140\u0141\7\65\2")
        buf.write("\2\u0141\u0142\7\65\2\2\u0142\u0143\7\65\2\2\u0143\u0144")
        buf.write("\7\65\2\2\u0144\u0145\7\65\2\2\u0145\u0198\7\65\2\2\u0146")
        buf.write("\u0147\7\"\2\2\u0147\u0198\7\65\2\2\u0148\u0198\7#\2\2")
        buf.write("\u0149\u014a\7$\2\2\u014a\u014b\7\65\2\2\u014b\u0198\5")
        buf.write("\62\32\2\u014c\u014d\7%\2\2\u014d\u014f\7\64\2\2\u014e")
        buf.write("\u0150\5\62\32\2\u014f\u014e\3\2\2\2\u0150\u0151\3\2\2")
        buf.write("\2\u0151\u014f\3\2\2\2\u0151\u0152\3\2\2\2\u0152\u0198")
        buf.write("\3\2\2\2\u0153\u0154\7&\2\2\u0154\u0167\7\66\2\2\u0155")
        buf.write("\u0156\7\65\2\2\u0156\u0157\7\65\2\2\u0157\u0168\7\65")
        buf.write("\2\2\u0158\u0159\7\'\2\2\u0159\u015a\7\65\2\2\u015a\u015b")
        buf.write("\7\65\2\2\u015b\u0163\7\65\2\2\u015c\u0160\7\66\2\2\u015d")
        buf.write("\u015f\7\65\2\2\u015e\u015d\3\2\2\2\u015f\u0162\3\2\2")
        buf.write("\2\u0160\u015e\3\2\2\2\u0160\u0161\3\2\2\2\u0161\u0164")
        buf.write("\3\2\2\2\u0162\u0160\3\2\2\2\u0163\u015c\3\2\2\2\u0164")
        buf.write("\u0165\3\2\2\2\u0165\u0163\3\2\2\2\u0165\u0166\3\2\2\2")
        buf.write("\u0166\u0168\3\2\2\2\u0167\u0155\3\2\2\2\u0167\u0158\3")
        buf.write("\2\2\2\u0168\u0198\3\2\2\2\u0169\u016a\7(\2\2\u016a\u016b")
        buf.write("\7\65\2\2\u016b\u016c\7\65\2\2\u016c\u016d\7\65\2\2\u016d")
        buf.write("\u016f\7\65\2\2\u016e\u0170\7\65\2\2\u016f\u016e\3\2\2")
        buf.write("\2\u016f\u0170\3\2\2\2\u0170\u0198\3\2\2\2\u0171\u0172")
        buf.write("\7+\2\2\u0172\u0173\7\65\2\2\u0173\u0174\7\65\2\2\u0174")
        buf.write("\u0176\7\65\2\2\u0175\u0177\7,\2\2\u0176\u0175\3\2\2\2")
        buf.write("\u0176\u0177\3\2\2\2\u0177\u0198\3\2\2\2\u0178\u0179\7")
        buf.write("\61\2\2\u0179\u017a\7\65\2\2\u017a\u017e\7\65\2\2\u017b")
        buf.write("\u017d\7\65\2\2\u017c\u017b\3\2\2\2\u017d\u0180\3\2\2")
        buf.write("\2\u017e\u017c\3\2\2\2\u017e\u017f\3\2\2\2\u017f\u0198")
        buf.write("\3\2\2\2\u0180\u017e\3\2\2\2\u0181\u0182\7\62\2\2\u0182")
        buf.write("\u0187\7\64\2\2\u0183\u0184\7\65\2\2\u0184\u0185\7\65")
        buf.write("\2\2\u0185\u0186\7\65\2\2\u0186\u0188\7\65\2\2\u0187\u0183")
        buf.write("\3\2\2\2\u0188\u0189\3\2\2\2\u0189\u0187\3\2\2\2\u0189")
        buf.write("\u018a\3\2\2\2\u018a\u0198\3\2\2\2\u018b\u018c\7\63\2")
        buf.write("\2\u018c\u0193\7\64\2\2\u018d\u018e\7\65\2\2\u018e\u018f")
        buf.write("\7\65\2\2\u018f\u0190\7\65\2\2\u0190\u0191\7\65\2\2\u0191")
        buf.write("\u0192\7\65\2\2\u0192\u0194\7\65\2\2\u0193\u018d\3\2\2")
        buf.write("\2\u0194\u0195\3\2\2\2\u0195\u0193\3\2\2\2\u0195\u0196")
        buf.write("\3\2\2\2\u0196\u0198\3\2\2\2\u0197\u00fb\3\2\2\2\u0197")
        buf.write("\u00fe\3\2\2\2\u0197\u0108\3\2\2\2\u0197\u0113\3\2\2\2")
        buf.write("\u0197\u011f\3\2\2\2\u0197\u0123\3\2\2\2\u0197\u0128\3")
        buf.write("\2\2\2\u0197\u012e\3\2\2\2\u0197\u0136\3\2\2\2\u0197\u013f")
        buf.write("\3\2\2\2\u0197\u0146\3\2\2\2\u0197\u0148\3\2\2\2\u0197")
        buf.write("\u0149\3\2\2\2\u0197\u014c\3\2\2\2\u0197\u0153\3\2\2\2")
        buf.write("\u0197\u0169\3\2\2\2\u0197\u0171\3\2\2\2\u0197\u0178\3")
        buf.write("\2\2\2\u0197\u0181\3\2\2\2\u0197\u018b\3\2\2\2\u0198\63")
        buf.write("\3\2\2\2\u0199\u019b\5\66\34\2\u019a\u0199\3\2\2\2\u019b")
        buf.write("\u019c\3\2\2\2\u019c\u019a\3\2\2\2\u019c\u019d\3\2\2\2")
        buf.write("\u019d\65\3\2\2\2\u019e\u019f\7\64\2\2\u019f\u01a0\7\66")
        buf.write("\2\2\u01a0\u01a1\7\64\2\2\u01a1\u01a2\7\66\2\2\u01a2\u01a3")
        buf.write("\7\65\2\2\u01a3\67\3\2\2\2\u01a4\u01a6\5:\36\2\u01a5\u01a4")
        buf.write("\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a7\u01a5\3\2\2\2\u01a7")
        buf.write("\u01a8\3\2\2\2\u01a89\3\2\2\2\u01a9\u01aa\7\64\2\2\u01aa")
        buf.write("\u01ab\7\64\2\2\u01ab;\3\2\2\2\'IKS_m}\u0095\u00a4\u00b5")
        buf.write("\u00c0\u00cc\u00d6\u00e0\u00e6\u00eb\u00f9\u0103\u0106")
        buf.write("\u010e\u0111\u011a\u011d\u012c\u0134\u013d\u0151\u0160")
        buf.write("\u0165\u0167\u016f\u0176\u017e\u0189\u0195\u0197\u019c")
        buf.write("\u01a7")
        return buf.getvalue()


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", 
                      "Simple_name", "SPACE", "COMMENT", "LINE_COMMENT" ]

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

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

    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
    Simple_name=52
    SPACE=53
    COMMENT=54
    LINE_COMMENT=55

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




    class Rosetta_mrContext(ParserRuleContext):

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

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

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


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


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


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


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


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


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


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


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


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


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


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


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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_rosetta_mr

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

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




    def rosetta_mr(self):

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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


    class Atom_pair_restraintsContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_atom_pair_restraints

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

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




    def atom_pair_restraints(self):

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

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

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


    class Atom_pair_restraintContext(ParserRuleContext):

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

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

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

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


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

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

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_atom_pair_restraint

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

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




    def atom_pair_restraint(self):

        localctx = RosettaMRParser.Atom_pair_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 4, self.RULE_atom_pair_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 83
            _la = self._input.LA(1)
            if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.AtomPair) | (1 << RosettaMRParser.NamedAtomPair) | (1 << RosettaMRParser.AmbiguousNMRDistance))) != 0)):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 84
            self.match(RosettaMRParser.Simple_name)
            self.state = 85
            self.match(RosettaMRParser.Integer)
            self.state = 86
            self.match(RosettaMRParser.Simple_name)
            self.state = 87
            self.match(RosettaMRParser.Integer)
            self.state = 88
            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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_angle_restraints

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

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




    def angle_restraints(self):

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

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

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


    class Angle_restraintContext(ParserRuleContext):

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

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

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

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


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

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_angle_restraint

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

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




    def angle_restraint(self):

        localctx = RosettaMRParser.Angle_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 8, self.RULE_angle_restraint)
        self._la = 0 # Token type
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 95
            _la = self._input.LA(1)
            if not(_la==RosettaMRParser.Angle or _la==RosettaMRParser.NamedAngle):
                self._errHandler.recoverInline(self)
            else:
                self._errHandler.reportMatch(self)
                self.consume()
            self.state = 96
            self.match(RosettaMRParser.Simple_name)
            self.state = 97
            self.match(RosettaMRParser.Integer)
            self.state = 98
            self.match(RosettaMRParser.Simple_name)
            self.state = 99
            self.match(RosettaMRParser.Integer)
            self.state = 100
            self.match(RosettaMRParser.Simple_name)
            self.state = 101
            self.match(RosettaMRParser.Integer)
            self.state = 102
            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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_restraints

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

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




    def dihedral_restraints(self):

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

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

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


    class Dihedral_restraintContext(ParserRuleContext):

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

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

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

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_restraint

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

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




    def dihedral_restraint(self):

        localctx = RosettaMRParser.Dihedral_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 12, self.RULE_dihedral_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 109
            self.match(RosettaMRParser.Dihedral)
            self.state = 110
            self.match(RosettaMRParser.Simple_name)
            self.state = 111
            self.match(RosettaMRParser.Integer)
            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_pair_restraintsContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_pair_restraints

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

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




    def dihedral_pair_restraints(self):

        localctx = RosettaMRParser.Dihedral_pair_restraintsContext(self, self._ctx, self.state)
        self.enterRule(localctx, 14, self.RULE_dihedral_pair_restraints)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 121 
            self._errHandler.sync(self)
            _alt = 1
            while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                if _alt == 1:
                    self.state = 120
                    self.dihedral_pair_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_pair_restraintContext(ParserRuleContext):

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

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

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

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_dihedral_pair_restraint

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

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




    def dihedral_pair_restraint(self):

        localctx = RosettaMRParser.Dihedral_pair_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 16, self.RULE_dihedral_pair_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 125
            self.match(RosettaMRParser.DihedralPair)
            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.match(RosettaMRParser.Simple_name)
            self.state = 135
            self.match(RosettaMRParser.Integer)
            self.state = 136
            self.match(RosettaMRParser.Simple_name)
            self.state = 137
            self.match(RosettaMRParser.Integer)
            self.state = 138
            self.match(RosettaMRParser.Simple_name)
            self.state = 139
            self.match(RosettaMRParser.Integer)
            self.state = 140
            self.match(RosettaMRParser.Simple_name)
            self.state = 141
            self.match(RosettaMRParser.Integer)
            self.state = 142
            self.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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_coordinate_restraints

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

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




    def coordinate_restraints(self):

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

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

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


    class Coordinate_restraintContext(ParserRuleContext):

        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 Float(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Float)
            else:
                return self.getToken(RosettaMRParser.Float, i)

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_coordinate_restraint

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

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




    def coordinate_restraint(self):

        localctx = RosettaMRParser.Coordinate_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 20, self.RULE_coordinate_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 149
            self.match(RosettaMRParser.CoordinateConstraint)
            self.state = 150
            self.match(RosettaMRParser.Simple_name)
            self.state = 151
            self.match(RosettaMRParser.Simple_name)
            self.state = 152
            self.match(RosettaMRParser.Simple_name)
            self.state = 153
            self.match(RosettaMRParser.Simple_name)
            self.state = 154
            self.match(RosettaMRParser.Float)
            self.state = 155
            self.match(RosettaMRParser.Float)
            self.state = 156
            self.match(RosettaMRParser.Float)
            self.state = 157
            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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_local_coordinate_restraints

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

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




    def local_coordinate_restraints(self):

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

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

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


    class Local_coordinate_restraintContext(ParserRuleContext):

        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 Float(self, i:int=None):
            if i is None:
                return self.getTokens(RosettaMRParser.Float)
            else:
                return self.getToken(RosettaMRParser.Float, i)

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_local_coordinate_restraint

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

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




    def local_coordinate_restraint(self):

        localctx = RosettaMRParser.Local_coordinate_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 24, self.RULE_local_coordinate_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 164
            self.match(RosettaMRParser.LocalCoordinateConstraint)
            self.state = 165
            self.match(RosettaMRParser.Simple_name)
            self.state = 166
            self.match(RosettaMRParser.Integer)
            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.match(RosettaMRParser.Integer)
            self.state = 171
            self.match(RosettaMRParser.Float)
            self.state = 172
            self.match(RosettaMRParser.Float)
            self.state = 173
            self.match(RosettaMRParser.Float)
            self.state = 174
            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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_restraints

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

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




    def site_restraints(self):

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

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

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


    class Site_restraintContext(ParserRuleContext):

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

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

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

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_restraint

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

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




    def site_restraint(self):

        localctx = RosettaMRParser.Site_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 28, self.RULE_site_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 181
            self.match(RosettaMRParser.SiteConstraint)
            self.state = 182
            self.match(RosettaMRParser.Simple_name)
            self.state = 183
            self.match(RosettaMRParser.Integer)
            self.state = 184
            self.match(RosettaMRParser.Simple_name)
            self.state = 185
            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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_residues_restraints

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

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




    def site_residues_restraints(self):

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

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

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


    class Site_residues_restraintContext(ParserRuleContext):

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

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

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

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_site_residues_restraint

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

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




    def site_residues_restraint(self):

        localctx = RosettaMRParser.Site_residues_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 32, self.RULE_site_residues_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 192
            self.match(RosettaMRParser.SiteConstraintResidues)
            self.state = 193
            self.match(RosettaMRParser.Integer)
            self.state = 194
            self.match(RosettaMRParser.Simple_name)
            self.state = 195
            self.match(RosettaMRParser.Integer)
            self.state = 196
            self.match(RosettaMRParser.Integer)
            self.state = 197
            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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_min_residue_atomic_distance_restraints

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

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




    def min_residue_atomic_distance_restraints(self):

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

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

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


    class Min_residue_atomic_distance_restraintContext(ParserRuleContext):

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_min_residue_atomic_distance_restraint

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

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




    def min_residue_atomic_distance_restraint(self):

        localctx = RosettaMRParser.Min_residue_atomic_distance_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 36, self.RULE_min_residue_atomic_distance_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 204
            self.match(RosettaMRParser.MinResidueAtomicDistance)
            self.state = 205
            self.match(RosettaMRParser.Integer)
            self.state = 206
            self.match(RosettaMRParser.Integer)
            self.state = 207
            self.match(RosettaMRParser.Float)
        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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_big_bin_restraints

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

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




    def big_bin_restraints(self):

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

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

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


    class Big_bin_restraintContext(ParserRuleContext):

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_big_bin_restraint

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

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




    def big_bin_restraint(self):

        localctx = RosettaMRParser.Big_bin_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 40, self.RULE_big_bin_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 214
            self.match(RosettaMRParser.BigBin)
            self.state = 215
            self.match(RosettaMRParser.Integer)
            self.state = 216
            self.match(RosettaMRParser.Simple_name)
            self.state = 217
            self.match(RosettaMRParser.Float)
        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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_nested_restraints

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

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




    def nested_restraints(self):

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

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

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


    class Nested_restraintContext(ParserRuleContext):

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

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

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

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

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


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

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_nested_restraint

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

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




    def nested_restraint(self):

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

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

            self.state = 235
            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):

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

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


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


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


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


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


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


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


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


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


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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_any_restraint

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

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




    def any_restraint(self):

        localctx = RosettaMRParser.Any_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 46, self.RULE_any_restraint)
        try:
            self.state = 247
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [RosettaMRParser.AtomPair, RosettaMRParser.NamedAtomPair, RosettaMRParser.AmbiguousNMRDistance]:
                self.enterOuterAlt(localctx, 1)
                self.state = 237
                self.atom_pair_restraint()
                pass
            elif token in [RosettaMRParser.Angle, RosettaMRParser.NamedAngle]:
                self.enterOuterAlt(localctx, 2)
                self.state = 238
                self.angle_restraint()
                pass
            elif token in [RosettaMRParser.Dihedral]:
                self.enterOuterAlt(localctx, 3)
                self.state = 239
                self.dihedral_restraint()
                pass
            elif token in [RosettaMRParser.DihedralPair]:
                self.enterOuterAlt(localctx, 4)
                self.state = 240
                self.dihedral_pair_restraint()
                pass
            elif token in [RosettaMRParser.CoordinateConstraint]:
                self.enterOuterAlt(localctx, 5)
                self.state = 241
                self.coordinate_restraint()
                pass
            elif token in [RosettaMRParser.LocalCoordinateConstraint]:
                self.enterOuterAlt(localctx, 6)
                self.state = 242
                self.local_coordinate_restraint()
                pass
            elif token in [RosettaMRParser.SiteConstraint]:
                self.enterOuterAlt(localctx, 7)
                self.state = 243
                self.site_restraint()
                pass
            elif token in [RosettaMRParser.SiteConstraintResidues]:
                self.enterOuterAlt(localctx, 8)
                self.state = 244
                self.site_residues_restraint()
                pass
            elif token in [RosettaMRParser.MinResidueAtomicDistance]:
                self.enterOuterAlt(localctx, 9)
                self.state = 245
                self.min_residue_atomic_distance_restraint()
                pass
            elif token in [RosettaMRParser.BigBin]:
                self.enterOuterAlt(localctx, 10)
                self.state = 246
                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):

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_func_type_def

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

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




    def func_type_def(self):

        localctx = RosettaMRParser.Func_type_defContext(self, self._ctx, self.state)
        self.enterRule(localctx, 48, self.RULE_func_type_def)
        self._la = 0 # Token type
        try:
            self.state = 405
            self._errHandler.sync(self)
            token = self._input.LA(1)
            if token in [RosettaMRParser.CIRCULARHARMONIC, RosettaMRParser.HARMONIC, RosettaMRParser.SIGMOID, RosettaMRParser.SQUARE_WELL]:
                self.enterOuterAlt(localctx, 1)
                self.state = 249
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.CIRCULARHARMONIC) | (1 << RosettaMRParser.HARMONIC) | (1 << RosettaMRParser.SIGMOID) | (1 << RosettaMRParser.SQUARE_WELL))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 250
                self.match(RosettaMRParser.Float)
                self.state = 251
                self.match(RosettaMRParser.Float)
                pass
            elif token in [RosettaMRParser.BOUNDED]:
                self.enterOuterAlt(localctx, 2)
                self.state = 252
                self.match(RosettaMRParser.BOUNDED)
                self.state = 253
                self.match(RosettaMRParser.Float)
                self.state = 254
                self.match(RosettaMRParser.Float)
                self.state = 255
                self.match(RosettaMRParser.Float)
                self.state = 257
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Float:
                    self.state = 256
                    self.match(RosettaMRParser.Float)


                self.state = 260
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Simple_name:
                    self.state = 259
                    self.match(RosettaMRParser.Simple_name)


                pass
            elif token in [RosettaMRParser.PERIODICBOUNDED]:
                self.enterOuterAlt(localctx, 3)
                self.state = 262
                self.match(RosettaMRParser.PERIODICBOUNDED)
                self.state = 263
                self.match(RosettaMRParser.Float)
                self.state = 264
                self.match(RosettaMRParser.Float)
                self.state = 265
                self.match(RosettaMRParser.Float)
                self.state = 266
                self.match(RosettaMRParser.Float)
                self.state = 268
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Float:
                    self.state = 267
                    self.match(RosettaMRParser.Float)


                self.state = 271
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Simple_name:
                    self.state = 270
                    self.match(RosettaMRParser.Simple_name)


                pass
            elif token in [RosettaMRParser.OFFSETPERIODICBOUNDED]:
                self.enterOuterAlt(localctx, 4)
                self.state = 273
                self.match(RosettaMRParser.OFFSETPERIODICBOUNDED)
                self.state = 274
                self.match(RosettaMRParser.Float)
                self.state = 275
                self.match(RosettaMRParser.Float)
                self.state = 276
                self.match(RosettaMRParser.Float)
                self.state = 277
                self.match(RosettaMRParser.Float)
                self.state = 278
                self.match(RosettaMRParser.Float)
                self.state = 280
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Float:
                    self.state = 279
                    self.match(RosettaMRParser.Float)


                self.state = 283
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Simple_name:
                    self.state = 282
                    self.match(RosettaMRParser.Simple_name)


                pass
            elif token in [RosettaMRParser.AMBERPERIODIC, RosettaMRParser.CHARMMPERIODIC, RosettaMRParser.FLAT_HARMONIC, RosettaMRParser.TOPOUT]:
                self.enterOuterAlt(localctx, 5)
                self.state = 285
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.AMBERPERIODIC) | (1 << RosettaMRParser.CHARMMPERIODIC) | (1 << RosettaMRParser.FLAT_HARMONIC) | (1 << RosettaMRParser.TOPOUT))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 286
                self.match(RosettaMRParser.Float)
                self.state = 287
                self.match(RosettaMRParser.Float)
                self.state = 288
                self.match(RosettaMRParser.Float)
                pass
            elif token in [RosettaMRParser.CIRCULARSIGMOIDAL, RosettaMRParser.LINEAR_PENALTY]:
                self.enterOuterAlt(localctx, 6)
                self.state = 289
                _la = self._input.LA(1)
                if not(_la==RosettaMRParser.CIRCULARSIGMOIDAL or _la==RosettaMRParser.LINEAR_PENALTY):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 290
                self.match(RosettaMRParser.Float)
                self.state = 291
                self.match(RosettaMRParser.Float)
                self.state = 292
                self.match(RosettaMRParser.Float)
                self.state = 293
                self.match(RosettaMRParser.Float)
                pass
            elif token in [RosettaMRParser.CIRCULARSPLINE]:
                self.enterOuterAlt(localctx, 7)
                self.state = 294
                self.match(RosettaMRParser.CIRCULARSPLINE)
                self.state = 296 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 295
                    self.match(RosettaMRParser.Float)
                    self.state = 298 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==RosettaMRParser.Float):
                        break

                pass
            elif token in [RosettaMRParser.GAUSSIANFUNC]:
                self.enterOuterAlt(localctx, 8)
                self.state = 300
                self.match(RosettaMRParser.GAUSSIANFUNC)
                self.state = 301
                self.match(RosettaMRParser.Float)
                self.state = 302
                self.match(RosettaMRParser.Float)
                self.state = 303
                self.match(RosettaMRParser.Simple_name)
                self.state = 306
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.WEIGHT:
                    self.state = 304
                    self.match(RosettaMRParser.WEIGHT)
                    self.state = 305
                    self.match(RosettaMRParser.Float)


                pass
            elif token in [RosettaMRParser.SOGFUNC]:
                self.enterOuterAlt(localctx, 9)
                self.state = 308
                self.match(RosettaMRParser.SOGFUNC)
                self.state = 309
                self.match(RosettaMRParser.Integer)
                self.state = 313 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 310
                    self.match(RosettaMRParser.Float)
                    self.state = 311
                    self.match(RosettaMRParser.Float)
                    self.state = 312
                    self.match(RosettaMRParser.Float)
                    self.state = 315 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==RosettaMRParser.Float):
                        break

                pass
            elif token in [RosettaMRParser.MIXTUREFUNC, RosettaMRParser.KARPLUS, RosettaMRParser.SOEDINGFUNC]:
                self.enterOuterAlt(localctx, 10)
                self.state = 317
                _la = self._input.LA(1)
                if not((((_la) & ~0x3f) == 0 and ((1 << _la) & ((1 << RosettaMRParser.MIXTUREFUNC) | (1 << RosettaMRParser.KARPLUS) | (1 << RosettaMRParser.SOEDINGFUNC))) != 0)):
                    self._errHandler.recoverInline(self)
                else:
                    self._errHandler.reportMatch(self)
                    self.consume()
                self.state = 318
                self.match(RosettaMRParser.Float)
                self.state = 319
                self.match(RosettaMRParser.Float)
                self.state = 320
                self.match(RosettaMRParser.Float)
                self.state = 321
                self.match(RosettaMRParser.Float)
                self.state = 322
                self.match(RosettaMRParser.Float)
                self.state = 323
                self.match(RosettaMRParser.Float)
                pass
            elif token in [RosettaMRParser.CONSTANTFUNC]:
                self.enterOuterAlt(localctx, 11)
                self.state = 324
                self.match(RosettaMRParser.CONSTANTFUNC)
                self.state = 325
                self.match(RosettaMRParser.Float)
                pass
            elif token in [RosettaMRParser.IDENTITY]:
                self.enterOuterAlt(localctx, 12)
                self.state = 326
                self.match(RosettaMRParser.IDENTITY)
                pass
            elif token in [RosettaMRParser.SCALARWEIGHTEDFUNC]:
                self.enterOuterAlt(localctx, 13)
                self.state = 327
                self.match(RosettaMRParser.SCALARWEIGHTEDFUNC)
                self.state = 328
                self.match(RosettaMRParser.Float)
                self.state = 329
                self.func_type_def()
                pass
            elif token in [RosettaMRParser.SUMFUNC]:
                self.enterOuterAlt(localctx, 14)
                self.state = 330
                self.match(RosettaMRParser.SUMFUNC)
                self.state = 331
                self.match(RosettaMRParser.Integer)
                self.state = 333 
                self._errHandler.sync(self)
                _alt = 1
                while _alt!=2 and _alt!=ATN.INVALID_ALT_NUMBER:
                    if _alt == 1:
                        self.state = 332
                        self.func_type_def()

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

                pass
            elif token in [RosettaMRParser.SPLINE]:
                self.enterOuterAlt(localctx, 15)
                self.state = 337
                self.match(RosettaMRParser.SPLINE)
                self.state = 338
                self.match(RosettaMRParser.Simple_name)
                self.state = 357
                self._errHandler.sync(self)
                token = self._input.LA(1)
                if token in [RosettaMRParser.Float]:
                    self.state = 339
                    self.match(RosettaMRParser.Float)
                    self.state = 340
                    self.match(RosettaMRParser.Float)
                    self.state = 341
                    self.match(RosettaMRParser.Float)
                    pass
                elif token in [RosettaMRParser.NONE]:
                    self.state = 342
                    self.match(RosettaMRParser.NONE)
                    self.state = 343
                    self.match(RosettaMRParser.Float)
                    self.state = 344
                    self.match(RosettaMRParser.Float)
                    self.state = 345
                    self.match(RosettaMRParser.Float)
                    self.state = 353 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    while True:
                        self.state = 346
                        self.match(RosettaMRParser.Simple_name)
                        self.state = 350
                        self._errHandler.sync(self)
                        _la = self._input.LA(1)
                        while _la==RosettaMRParser.Float:
                            self.state = 347
                            self.match(RosettaMRParser.Float)
                            self.state = 352
                            self._errHandler.sync(self)
                            _la = self._input.LA(1)

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

                    pass
                else:
                    raise NoViableAltException(self)

                pass
            elif token in [RosettaMRParser.FADE]:
                self.enterOuterAlt(localctx, 16)
                self.state = 359
                self.match(RosettaMRParser.FADE)
                self.state = 360
                self.match(RosettaMRParser.Float)
                self.state = 361
                self.match(RosettaMRParser.Float)
                self.state = 362
                self.match(RosettaMRParser.Float)
                self.state = 363
                self.match(RosettaMRParser.Float)
                self.state = 365
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.Float:
                    self.state = 364
                    self.match(RosettaMRParser.Float)


                pass
            elif token in [RosettaMRParser.SQUARE_WELL2]:
                self.enterOuterAlt(localctx, 17)
                self.state = 367
                self.match(RosettaMRParser.SQUARE_WELL2)
                self.state = 368
                self.match(RosettaMRParser.Float)
                self.state = 369
                self.match(RosettaMRParser.Float)
                self.state = 370
                self.match(RosettaMRParser.Float)
                self.state = 372
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                if _la==RosettaMRParser.DEGREES:
                    self.state = 371
                    self.match(RosettaMRParser.DEGREES)


                pass
            elif token in [RosettaMRParser.ETABLE]:
                self.enterOuterAlt(localctx, 18)
                self.state = 374
                self.match(RosettaMRParser.ETABLE)
                self.state = 375
                self.match(RosettaMRParser.Float)
                self.state = 376
                self.match(RosettaMRParser.Float)
                self.state = 380
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while _la==RosettaMRParser.Float:
                    self.state = 377
                    self.match(RosettaMRParser.Float)
                    self.state = 382
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)

                pass
            elif token in [RosettaMRParser.USOG]:
                self.enterOuterAlt(localctx, 19)
                self.state = 383
                self.match(RosettaMRParser.USOG)
                self.state = 384
                self.match(RosettaMRParser.Integer)
                self.state = 389 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 385
                    self.match(RosettaMRParser.Float)
                    self.state = 386
                    self.match(RosettaMRParser.Float)
                    self.state = 387
                    self.match(RosettaMRParser.Float)
                    self.state = 388
                    self.match(RosettaMRParser.Float)
                    self.state = 391 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==RosettaMRParser.Float):
                        break

                pass
            elif token in [RosettaMRParser.SOG]:
                self.enterOuterAlt(localctx, 20)
                self.state = 393
                self.match(RosettaMRParser.SOG)
                self.state = 394
                self.match(RosettaMRParser.Integer)
                self.state = 401 
                self._errHandler.sync(self)
                _la = self._input.LA(1)
                while True:
                    self.state = 395
                    self.match(RosettaMRParser.Float)
                    self.state = 396
                    self.match(RosettaMRParser.Float)
                    self.state = 397
                    self.match(RosettaMRParser.Float)
                    self.state = 398
                    self.match(RosettaMRParser.Float)
                    self.state = 399
                    self.match(RosettaMRParser.Float)
                    self.state = 400
                    self.match(RosettaMRParser.Float)
                    self.state = 403 
                    self._errHandler.sync(self)
                    _la = self._input.LA(1)
                    if not (_la==RosettaMRParser.Float):
                        break

                pass
            else:
                raise NoViableAltException(self)

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


    class Rdc_restraintsContext(ParserRuleContext):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_rdc_restraints

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

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




    def rdc_restraints(self):

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

                else:
                    raise NoViableAltException(self)
                self.state = 410 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,35,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):

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_rdc_restraint

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

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




    def rdc_restraint(self):

        localctx = RosettaMRParser.Rdc_restraintContext(self, self._ctx, self.state)
        self.enterRule(localctx, 52, self.RULE_rdc_restraint)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 412
            self.match(RosettaMRParser.Integer)
            self.state = 413
            self.match(RosettaMRParser.Simple_name)
            self.state = 414
            self.match(RosettaMRParser.Integer)
            self.state = 415
            self.match(RosettaMRParser.Simple_name)
            self.state = 416
            self.match(RosettaMRParser.Float)
        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):

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

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


        def getRuleIndex(self):
            return RosettaMRParser.RULE_disulfide_bond_linkages

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

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




    def disulfide_bond_linkages(self):

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

                else:
                    raise NoViableAltException(self)
                self.state = 421 
                self._errHandler.sync(self)
                _alt = self._interp.adaptivePredict(self._input,36,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):

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

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

        def getRuleIndex(self):
            return RosettaMRParser.RULE_disulfide_bond_linkage

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

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




    def disulfide_bond_linkage(self):

        localctx = RosettaMRParser.Disulfide_bond_linkageContext(self, self._ctx, self.state)
        self.enterRule(localctx, 56, self.RULE_disulfide_bond_linkage)
        try:
            self.enterOuterAlt(localctx, 1)
            self.state = 423
            self.match(RosettaMRParser.Integer)
            self.state = 424
            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





