# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################## ## 4 # FG -> CG MAPPING ## -> @MAP <- ########################## import functions dnares3 = " DA DC DG DT" dnares1 = " dA dC dG dT" rnares3 = " A C G U" rnares1 = " rA rC rG rU" # Amino acid nucleic acid codes: # The naming (AA and '3') is not strictly correct when adding DNA/RNA, but we keep it like this for consistincy. AA3 = functions.spl( "TRP TYR PHE HIS HIH ARG LYS CYS ASP GLU ILE LEU MET ASN PRO HYP GLN SER THR VAL ALA GLY" + dnares3 + rnares3) #@# AA1 = functions.spl( " W Y F H H R K C D E I L M N P O Q S T V A G" + dnares1 + rnares1) #@# # Dictionaries for conversion from one letter code to three letter code v.v. AA123, AA321 = functions.hash(AA1, AA3), functions.hash(AA3, AA1) # Residue classes: protein = AA3[:-8] # remove eight to get rid of DNA/RNA here. water = functions.spl("HOH SOL TIP") lipids = functions.spl( "DPP DHP DLP DMP DSP POP DOP DAP DUP DPP DHP DLP DMP DSP PPC DSM DSD DSS") nucleic = functions.spl("DAD DCY DGU DTH ADE CYT GUA THY URA DA DC DG DT")
class CoarseGrained: # Class for mapping an atomistic residue list to a coarsegrained one # Should get an __init__ function taking a residuelist, atomlist, Pymol selection or ChemPy model # The result should be stored in a list-type attribute # The class should have pdbstr and grostr methods # Standard mapping groups # Protein backbone bb = "N CA C O H H1 H2 H3 O1 O2" #@# # Lipid tails palmitoyl1 = functions.nsplit("C1B C1C C1D C1E", "C1F C1G C1H C1I", "C1J C1K C1L C1M", "C1N C1O C1P") #@# palmitoyl2 = functions.nsplit("C2B C2C C2D C2E", "C2F C2G C2H C2I", "C2J C2K C2L C2M", "C2N C2O C2P") #@# oleyl1 = functions.nsplit("C1B C1C C1D C1E", "C1F C1G C1H", "C1I C1J", "C1K C1L C1M C1N", "C1O C1P C1Q C1R") #@# oleyl2 = functions.nsplit("C2B C2C C2D C2E", "C2F C2G C2H", "C2I C2J", "C2K C2L C2M C2N", "C2O C2P C2Q C2R") #@# #lauroyl1 = [] #stearoyl1 = [] #arachidonoyl1 = [] #linoleyl1 = [] #hexanoyl1 = [] # Lipid head groups #phoshpatidylcholine = phosphatydilethanolamine = functions.nsplit("N H1 H2 H3 CA", "CB P OA OB OC OD", "CC CD OG C2A OH", "CE OE C1A OF") #@# phosphatidylglycerol = functions.nsplit("H1 O1 CA H2 O2 CB", "CC P OA OB OC OD", "CD CE OG C2A OH", "CF OE C1A OF") #@# #phosphatidylserine = dna_bb = "P OP1 OP2 O5' O3'", "C5' O4' C4'", "C3' O3' C2' C1'" # This is the mapping dictionary # For each residue it returns a list, each element of which # lists the atom names to be mapped to the corresponding bead. # The order should be the standard order of the coarse grained # beads for the residue. Only atom names matching with those # present in the list of atoms for the residue will be used # to determine the bead position. This adds flexibility to the # approach, as a single definition can be used for different # states of a residue (e.g., GLU/GLUH). # For convenience, the list can be specified as a set of strings, # converted into a list of lists by 'functions.nsplit' defined above. mapping = { "ALA": functions.nsplit(bb + " CB"), "CYS": functions.nsplit(bb, "CB SG"), "ASP": functions.nsplit(bb, "CB CG OD1 OD2"), "GLU": functions.nsplit(bb, "CB CG CD OE1 OE2"), "PHE": functions.nsplit(bb, "CB CG CD1 HD1", "CD2 HD2 CE2 HE2", "CE1 HE1 CZ HZ"), "GLY": functions.nsplit(bb), "HIS": functions.nsplit(bb, "CB CG", "CD2 HD2 NE2 HE2", "ND1 HD1 CE1 HE1"), "HIH": functions.nsplit(bb, "CB CG", "CD2 HD2 NE2 HE2", "ND1 HD1 CE1 HE1"), # Charged Histidine. "ILE": functions.nsplit(bb, "CB CG1 CG2 CD CD1"), "LYS": functions.nsplit(bb, "CB CG CD", "CE NZ HZ1 HZ2 HZ3"), "LEU": functions.nsplit(bb, "CB CG CD1 CD2"), "MET": functions.nsplit(bb, "CB CG SD CE"), "ASN": functions.nsplit(bb, "CB CG ND1 ND2 OD1 OD2 HD11 HD12 HD21 HD22"), "PRO": functions.nsplit(bb, "CB CG CD"), "HYP": functions.nsplit(bb, "CB CG CD OD"), "GLN": functions.nsplit(bb, "CB CG CD OE1 OE2 NE1 NE2 HE11 HE12 HE21 HE22"), "ARG": functions.nsplit(bb, "CB CG CD", "NE HE CZ NH1 NH2 HH11 HH12 HH21 HH22"), "SER": functions.nsplit(bb, "CB OG HG"), "THR": functions.nsplit(bb, "CB OG1 HG1 CG2"), "VAL": functions.nsplit(bb, "CB CG1 CG2"), "TRP": functions.nsplit(bb, "CB CG CD2", "CD1 HD1 NE1 HE1 CE2", "CE3 HE3 CZ3 HZ3", "CZ2 HZ2 CH2 HH2"), "TYR": functions.nsplit(bb, "CB CG CD1 HD1", "CD2 HD2 CE2 HE2", "CE1 HE1 CZ OH HH"), "POPE": phosphatydilethanolamine + palmitoyl1 + oleyl2, "DOPE": phosphatydilethanolamine + oleyl1 + oleyl2, "DPPE": phosphatydilethanolamine + palmitoyl1 + palmitoyl2, "POPG": phosphatidylglycerol + palmitoyl1 + oleyl2, "DOPG": phosphatidylglycerol + oleyl1 + oleyl2, "DPPG": phosphatidylglycerol + palmitoyl1 + palmitoyl2, "DA": functions.nsplit("P OP1 OP2 O5' O3' O1P O2P", "C5' O4' C4'", "C3' C2' C1'", "N9 C4", "C8 N7 C5", "C6 N6 N1", "C2 N3"), "DG": functions.nsplit("P OP1 OP2 O5' O3' O1P O2P", "C5' O4' C4'", "C3' C2' C1'", "N9 C4", "C8 N7 C5", "C6 O6 N1", "C2 N2 N3"), "DC": functions.nsplit("P OP1 OP2 O5' O3' O1P O2P", "C5' O4' C4'", "C3' C2' C1'", "N1 C6", "C5 C4 N4", "N3 C2 O2"), "DT": functions.nsplit("P OP1 OP2 O5' O3' O1P O2P", "C5' O4' C4'", "C3' C2' C1'", "N1 C6", "C5 C4 O4 C7 C5M", "N3 C2 O2"), } # Generic names for side chain beads residue_bead_names = functions.spl("BB SC1 SC2 SC3 SC4") # Generic names for DNA beads residue_bead_names_dna = functions.spl("BB1 BB2 BB3 SC1 SC2 SC3 SC4") # This dictionary contains the bead names for all residues, # following the order in 'mapping' names = { "POPE": "NH3 PO4 GL1 GL2 C1A C2A C3A C4A C1B C2B D3B C4B C5B".split(), "POPG": "GLC PO4 GL1 GL2 C1A C2A C3A C4A C1B C2B D3B C4B C5B".split() } # Add default bead names for all amino acids names.update([(i, ("BB", "SC1", "SC2", "SC3", "SC4")) for i in AA3]) # Add the default bead names for all DNA nucleic acids names.update([(i, ("BB1", "BB2", "BB3", "SC1", "SC2", "SC3", "SC4")) for i in nucleic]) # This dictionary allows determining four letter residue names # for ones specified with three letters, e.g., resulting from # truncation to adhere to the PDB format. # Each entry returns a prototypical test, given as a string, # and the residue name to be applied if eval(test) is True. # This is particularly handy to determine lipid types. # The test assumes there is a local or global array 'atoms' # containing the atom names of the residue in correct order. restest = { "POP": [('atoms[0] == "CA"', "POPG"), ('atoms[0] == "N"', "POPE")] } # Crude mass for weighted average. No consideration of united atoms. # This will probably give only minor deviations, while also giving less headache mass = {'H': 1, 'C': 12, 'N': 14, 'O': 16, 'S': 32, 'P': 31, 'M': 0}
def __init__(self): import secstruc,functions,IO # parameters are defined here for the following (protein) forcefields: self.name = 'elnedyn22' # Charged types: self.charges = {"Qd":1, "Qa":-1, "SQd":1, "SQa":-1, "RQd":1, "AQa":-1} #@# #----+---------------------+ ## A | BACKBONE PARAMETERS | #----+---------------------+ # # bbss lists the one letter secondary structure code # bbdef lists the corresponding default backbone beads # bbtyp lists the corresponding residue specific backbone beads # # bbd lists the structure specific backbone bond lengths # bbkb lists the corresponding bond force constants # # bba lists the structure specific angles # bbka lists the corresponding angle force constants # # bbd lists the structure specific dihedral angles # bbkd lists the corresponding force constants # # -=NOTE=- # if the secondary structure types differ between bonded atoms # the bond is assigned the lowest corresponding force constant # # -=NOTE=- # if proline is anywhere in the helix, the BBB angle changes for # all residues # ############################################################################################### ## BEADS ## # # F E H 1 2 3 T S C # secstruc one letter self.bbdef = functions.spl(" N0 Nda N0 Nd Na Nda Nda P5 P5") # Default beads #@# self.bbtyp = { # #@# "ALA": functions.spl(" C5 N0 C5 N0 N0 N0 N0 P4 P4"), # ALA specific #@# "PRO": functions.spl(" C5 N0 C5 N0 Na N0 N0 P4 P4"), # PRO specific #@# "HYP": functions.spl(" C5 N0 C5 N0 N0 N0 N0 P4 P4") # HYP specific #@# } # #@# ## BONDS ## # self.bbldef = (.365, .350, .350, .350, .350, .350, .350, .350, .350) # BB bond lengths #@# self.bbkb = (1250, 1250, 1250, 1250, 1250, 1250, 500, 400, 400) # BB bond kB #@# self.bbltyp = {} # #@# self.bbkbtyp = {} # #@# ## ANGLES ## # self.bbadef = (119.2, 134, 96, 96, 96, 96, 100, 130, 127) # BBB angles #@# self.bbka = ( 150, 25, 700, 700, 700, 700, 25, 25, 25) # BBB angle kB #@# self.bbatyp = { # #@# "PRO": ( 119.2,134, 98, 98, 98, 98, 100, 130, 127), # PRO specific #@# "HYP": ( 119.2,134, 98, 98, 98, 98, 100, 130, 127) # PRO specific #@# } # #@# self.bbkatyp = { # #@# "PRO": ( 150, 25, 100, 100, 100, 100, 25, 25, 25), # PRO specific #@# "HYP": ( 150, 25, 100, 100, 100, 100, 25, 25, 25) # PRO specific #@# } # #@# ## DIHEDRALS ## # self.bbddef = (90.7, 0, -120, -120, -120, -120) # BBBB dihedrals #@# self.bbkd = ( 100, 10, 400, 400, 400, 400) # BBBB kB #@# self.bbdmul = ( 1, 1, 1, 1, 1, 1) # BBBB mltplcty #@# self.bbdtyp = {} # #@# self.bbkdtyp = {} # #@# # ############################################################################################### # Some Forcefields use the Ca position to position the BB-bead (me like!) self.ca2bb = True # BBS angle, equal for all ss types # Connects BB(i-1),BB(i),SC(i), except for first residue: BB(i+1),BB(i),SC(i) # ANGLE Ka self.bbsangle = [ 100, 25] #@# # Bonds for extended structures (more stable than using dihedrals) # LENGTH FORCE self.ebonds = { #@# 'short': [ .640, 2500], #@# 'long' : [ .970, 2500] #@# } #@# #----+-----------------------+ ## B | SIDE CHAIN PARAMETERS | #----+-----------------------+ # Sidechain parameters for Elnedyn. (read from cg-2.1.dat). # For HIS the order of bonds is changed and a bond with fc=0 is added. # In the elnedyn2, TRP has an extra, cross-ring constraint self.sidechains = { #RES# BEADS BONDS ANGLES DIHEDRALS 'TRP': [functions.spl("SC4 SNd SC5 SC5"), [(0.255,73000), (0.220,None), (0.250,None), (0.280,None), (0.255,None), (0.35454,None)], [(142,30), (143,20), (104,50)], [(180,200)]], 'TYR': [functions.spl("SC4 SC4 SP1"), [(0.335, 6000), (0.335,6000), (0.240,None), (0.310,None), (0.310,None)], [(70,100), (130, 50)]], 'PHE': [functions.spl("SC5 SC5 SC5"), [(0.340, 7500), (0.340,7500), (0.240,None), (0.240,None), (0.240,None)], [(70,100), (125,100)]], 'HIS': [functions.spl("SC4 SP1 SP1"), [(0.195,94000), (0.193,None), (0.295,None), (0.216,None)], [(135,100),(115, 50)]], 'HIH': [functions.spl("SC4 SP1 SQd"), [(0.195,94000), (0.193,None), (0.295,None), (0.216,None)], [(135,100),(115, 50)]], 'ARG': [functions.spl("N0 Qd"), [(0.250,12500), (0.350,6200)], [(150,15)]], 'LYS': [functions.spl("C3 Qd"), [(0.250,12500), (0.300,9700)], [(150,20)]], 'CYS': [functions.spl("C5"), [(0.240, None)]], 'ASP': [functions.spl("Qa"), [(0.255, None)]], 'GLU': [functions.spl("Qa"), [(0.310, 2500)]], 'ILE': [functions.spl("AC1"), [(0.225,13250)]], 'LEU': [functions.spl("AC1"), [(0.265, None)]], 'MET': [functions.spl("C5"), [(0.310, 2800)]], 'ASN': [functions.spl("P5"), [(0.250, None)]], 'PRO': [functions.spl("C3"), [(0.190, None)]], 'GLN': [functions.spl("P4"), [(0.300, 2400)]], 'SER': [functions.spl("P1"), [(0.195, None)]], 'THR': [functions.spl("P1"), [(0.195, None)]], 'VAL': [functions.spl("AC2"), [(0.200, None)]], 'GLY': [], 'ALA': [], } # Not all (eg Elnedyn) forcefields use backbone-backbone-sidechain angles and BBBB-dihedrals. self.UseBBSAngles = False self.UseBBBBDihedrals = False # Martini 2.2p has polar and charged residues with seperate charges. self.polar = [] self.charged = [] # If masses or charged diverge from standard (45/72 and -/+1) they are defined here. self.mass_charge = { #RES MAsecstruc CHARGE } # Defines the connectivity between between beads # Connectivity records for Elnedyn (read from cg-2.1.dat). # For HIS the order of bonds is changed and a bond with fc=0 is added. self.connectivity = { #RES BONDS ANGLES DIHEDRALS V-SITE "TRP": [[(0, 1), (1, 2), (2, 4), (4, 3), (3, 1), (1, 4)],[(0, 1, 2), (0, 1, 4), (0, 1, 3)],[(1, 2, 3, 4)]], "TYR": [[(0, 1), (0, 2), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)]], "PHE": [[(0, 1), (0, 2), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)]], "HIS": [[(0, 1), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)]], "HIH": [[(0, 1), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)]], "GLN": [[(0,1)]], "ASN": [[(0,1)]], "SER": [[(0,1)]], "THR": [[(0,1)]], "ARG": [[(0,1),(1,2)], [(0,1,2)]], "LYS": [[(0,1),(1,2)], [(0,1,2)]], "ASP": [[(0,1)]], "GLU": [[(0,1)]], "CYS": [[(0,1)]], "ILE": [[(0,1)]], "LEU": [[(0,1)]], "MET": [[(0,1)]], "PRO": [[(0,1)]], "HYP": [[(0,1)]], "VAL": [[(0,1)]], "ALA": [], "GLY": [], } #----+----------------+ ## C | SPECIAL BONDS | #----+----------------+ self.special = { # Used for sulfur bridges # ATOM 1 ATOM 2 BOND LENGTH FORCE CONSTANT (("SC1","CYS"), ("SC1","CYS")): (0.24, None), } # By default use an elastic network self.ElasticNetwork = True # Elastic networks bond shouldn't lead to exclusions (type 6) # But Elnedyn has been parametrized with type 1. self.EBondType = 1 self.finish()
def __init__(self): # parameters are defined here for the following (protein) forcefields: self.name = 'martini22p' # Charged types: self.charges = { "Qd": 1, "Qa": -1, "SQd": 1, "SQa": -1, "RQd": 1, "AQa": -1 } #@# #----+---------------------+ ## A | BACKBONE PARAMETERS | #----+---------------------+ # # bbss lists the one letter secondary structure code # bbdef lists the corresponding default backbone beads # bbtyp lists the corresponding residue specific backbone beads # # bbd lists the structure specific backbone bond lengths # bbkb lists the corresponding bond force constants # # bba lists the structure specific angles # bbka lists the corresponding angle force constants # # bbd lists the structure specific dihedral angles # bbkd lists the corresponding force constants # # -=NOTE=- # if the secondary structure types differ between bonded atoms # the bond is assigned the lowest corresponding force constant # # -=NOTE=- # if proline is anywhere in the helix, the BBB angle changes for # all residues # ############################################################################################### ## BEADS ## # # F E H 1 2 3 T S C # secstruc one letter self.bbdef = functions.spl( " N0 Nda N0 Nd Na Nda Nda P5 P5" ) # Default beads #@# self.bbtyp = { # #@# "ALA": functions.spl(" C5 N0 C5 N0 N0 N0 N0 P4 P4" ), # ALA specific #@# "PRO": functions.spl(" C5 N0 C5 N0 Na N0 N0 P4 P4" ), # PRO specific #@# "HYP": functions.spl(" C5 N0 C5 N0 N0 N0 N0 P4 P4" ) # HYP specific #@# } # #@# ## BONDS ## # self.bbldef = (.365, .350, .310, .310, .310, .310, .350, .350, .350 ) # BB bond lengths #@# self.bbkb = (1250, 1250, None, None, None, None, 1250, 1250, 1250 ) # BB bond kB #@# self.bbltyp = {} # #@# self.bbkbtyp = {} # #@# ## ANGLES ## # self.bbadef = (119.2, 134, 96, 96, 96, 96, 100, 130, 127 ) # BBB angles #@# self.bbka = (150, 25, 700, 700, 700, 700, 25, 25, 25 ) # BBB angle kB #@# self.bbatyp = { # #@# "PRO": (119.2, 134, 98, 98, 98, 98, 100, 130, 127), # PRO specific #@# "HYP": (119.2, 134, 98, 98, 98, 98, 100, 130, 127) # PRO specific #@# } # #@# self.bbkatyp = { # #@# "PRO": (150, 25, 100, 100, 100, 100, 25, 25, 25), # PRO specific #@# "HYP": (150, 25, 100, 100, 100, 100, 25, 25, 25) # PRO specific #@# } # #@# ## DIHEDRALS ## # self.bbddef = (90.7, 0, -120, -120, -120, -120) # BBBB dihedrals #@# self.bbkd = (100, 10, 400, 400, 400, 400) # BBBB kB #@# self.bbdmul = (1, 1, 1, 1, 1, 1) # BBBB mltplcty #@# self.bbdtyp = {} # #@# self.bbkdtyp = {} # #@# # ############################################################################################### # Some Forcefields use the Ca position to position the BB-bead (me like!) # martini 2.1 doesn't self.ca2bb = False # BBS angle, equal for all ss types # Connects BB(i-1),BB(i),SC(i), except for first residue: BB(i+1),BB(i),SC(i) # ANGLE Ka self.bbsangle = [100, 25] #@# # Bonds for extended structures (more stable than using dihedrals) # LENGTH FORCE self.ebonds = { #@# 'short': [.640, 2500], #@# 'long': [.970, 2500] #@# } #@# #----+-----------------------+ ## B | SIDE CHAIN PARAMETERS | #----+-----------------------+ # To be compatible with Elnedyn, all parameters are explicitly defined, even if they are double. self.sidechains = { #RES# BEADS BONDS ANGLES DIHEDRALS V-SITES # BB-SC SC-SC BB-SC-SC SC-SC-SC "TRP": [ functions.spl("SC4 SNd SC5 SC5"), [(0.300, 5000)] + [(0.270, None) for i in range(5)], [(210, 50), (90, 50), (90, 50)], [(0, 50), (0, 200)] ], "TYR": [ functions.spl("SC4 SC4 SP1"), [(0.320, 5000), (0.270, None), (0.270, None), (0.270, None)], [(150, 50), (150, 50)], [(0, 50)] ], "PHE": [ functions.spl("SC5 SC5 SC5"), [(0.310, 7500), (0.270, None), (0.270, None), (0.270, None)], [(150, 50), (150, 50)], [(0, 50)] ], "HIS": [ functions.spl("SC4 SP1 SP1"), [(0.320, 7500), (0.270, None), (0.270, None), (0.270, None)], [(150, 50), (150, 50)], [(0, 50)] ], "HIH": [ functions.spl("SC4 SP1 SQd D"), [(0.320, 7500), (0.270, None), (0.270, None), (0.270, None), (0.11, None)], [(150, 50), (150, 50)], [(0, 50)] ], "GLN": [ functions.spl("Nda D D"), [(0.400, 5000), (0.280, None)], [], [], [(0.5, )] ], "ASN": [ functions.spl("Nda D D"), [(0.320, 5000), (0.280, None)], [], [], [(0.5, )] ], "SER": [ functions.spl("N0 D D"), [(0.250, 7500), (0.280, None)], [], [], [(0.5, )] ], "THR": [ functions.spl("N0 D D"), [(0.260, 9000), (0.280, None)], [], [], [(0.5, )] ], "ARG": [ functions.spl("N0 Qd D"), [(0.330, 5000), (0.340, 5000), (0.110, None)], [(180, 25)] ], "LYS": [ functions.spl("C3 Qd D"), [(0.330, 5000), (0.280, 5000), (0.110, None)], [(180, 25)] ], "ASP": [functions.spl("Qa D"), [(0.320, 7500), (0.110, None)]], "GLU": [functions.spl("Qa D"), [(0.400, 5000), (0.110, None)]], "CYS": [functions.spl("C5"), [(0.310, 7500)]], "ILE": [functions.spl("C1"), [(0.310, None)]], "LEU": [functions.spl("C1"), [(0.330, 7500)]], "MET": [functions.spl("C5"), [(0.400, 2500)]], "PRO": [functions.spl("C3"), [(0.300, 7500)]], "HYP": [functions.spl("P1"), [(0.300, 7500)]], "VAL": [functions.spl("C2"), [(0.265, None)]], "ALA": [], "GLY": [], } # Not all (eg Elnedyn) forcefields use backbone-backbone-sidechain angles and BBBB-dihedrals. self.UseBBSAngles = True self.UseBBBBDihedrals = True # Martini 2.2p has polar and charged residues with seperate charges. self.polar = ["GLN", "ASN", "SER", "THR"] self.charged = ["ARG", "LYS", "ASP", "GLU", "HIH"] # If masses or charged diverge from standard (45/72 and -/+1) they are defined here. self.mass_charge = { #RES MAsecstruc CHARGE "GLN": [[0, 36, 36], [0, 0.42, -0.42]], "ASN": [[0, 36, 36], [0, 0.46, -0.46]], "SER": [[0, 36, 36], [0, 0.40, -0.40]], "THR": [[0, 36, 36], [0, 0.36, -0.36]], "ARG": [[72, 36, 36], [0, 0, 1]], "LYS": [[72, 36, 36], [0, 0, 1]], "HIH": [[45, 45, 36, 36], [0, 0, 0, 1]], "ASP": [[36, 36], [0, -1]], "GLU": [[36, 36], [0, -1]], } self.connectivity = { #RES BONDS ANGLES DIHEDRALS V-SITE "TRP": [[(0, 1), (1, 2), (1, 3), (2, 3), (2, 4), (3, 4)], [(0, 1, 2), (0, 1, 3)], [(0, 2, 3, 1), (1, 2, 4, 3)]], "TYR": [[(0, 1), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)], [(0, 2, 3, 1)]], "PHE": [[(0, 1), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)], [(0, 2, 3, 1)]], "HIS": [[(0, 1), (1, 2), (1, 3), (2, 3)], [(0, 1, 2), (0, 1, 3)], [(0, 2, 3, 1)]], "HIH": [[(0, 1), (1, 2), (1, 3), (2, 3), (3, 4)], [(0, 1, 2), (0, 1, 3)], [(0, 2, 3, 1)]], "GLN": [[(0, 1), (2, 3)], [], [], [(1, 2, 3)]], "ASN": [[(0, 1), (2, 3)], [], [], [(1, 2, 3)]], "SER": [[(0, 1), (2, 3)], [], [], [(1, 2, 3)]], "THR": [[(0, 1), (2, 3)], [], [], [(1, 2, 3)]], "ARG": [[(0, 1), (1, 2), (2, 3)], [(0, 1, 2)]], "LYS": [[(0, 1), (1, 2), (2, 3)], [(0, 1, 2)]], "ASP": [[(0, 1), (1, 2)]], "GLU": [[(0, 1), (1, 2)]], "CYS": [[(0, 1)]], "ILE": [[(0, 1)]], "LEU": [[(0, 1)]], "MET": [[(0, 1)]], "PRO": [[(0, 1)]], "HYP": [[(0, 1)]], "VAL": [[(0, 1)]], "ALA": [], "GLY": [], } #----+----------------+ ## C | SPECIAL BONDS | #----+----------------+ self.special = { # Used for sulfur bridges # ATOM 1 ATOM 2 BOND LENGTH FORCE CONSTANT (("SC1", "CYS"), ("SC1", "CYS")): (0.24, None), } # By default use an elastic network self.ElasticNetwork = False # Elastic networks bond shouldn't lead to exclusions (type 6) # But Elnedyn has been parametrized with type 1. self.EBondType = 6 self.finish()
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ########################## ## 4 # FG -> CG MAPPING ## -> @MAP <- ########################## import functions dnares3 = " DA DC DG DT" dnares1 = " dA dC dG dT" rnares3 = " A C G U" rnares1 = " rA rC rG rU" # Amino acid nucleic acid codes: # The naming (AA and '3') is not strictly correct when adding DNA/RNA, but we keep it like this for consistincy. AA3 = functions.spl("TRP TYR PHE HIS HIH ARG LYS CYS ASP GLU ILE LEU MET ASN PRO HYP GLN SER THR VAL ALA GLY"+dnares3+rnares3) #@# AA1 = functions.spl(" W Y F H H R K C D E I L M N P O Q S T V A G"+dnares1+rnares1) #@# # Dictionaries for conversion from one letter code to three letter code v.v. AA123, AA321 = functions.hash(AA1, AA3), functions.hash(AA3, AA1) # Residue classes: protein = AA3[:-8] # remove eight to get rid of DNA/RNA here. water = functions.spl("HOH SOL TIP") lipids = functions.spl("DPP DHP DLP DMP DSP POP DOP DAP DUP DPP DHP DLP DMP DSP PPC DSM DSD DSS") nucleic = functions.spl("DAD DCY DGU DTH ADE CYT GUA THY URA DA DC DG DT") residueTypes = dict( [(i, "Protein") for i in protein ] + [(i, "Water") for i in water ] + [(i, "Lipid") for i in lipids ] +
# dihedral definitions, which are not present for coil and termini # ss_names = { "F": "Collagenous Fiber", #@# "E": "Extended structure (beta sheet)", #@# "H": "Helix structure", #@# "1": "Helix start (H-bond donor)", #@# "2": "Helix end (H-bond acceptor)", #@# "3": "Ambivalent helix type (short helices)", #@# "T": "Turn", #@# "S": "Bend", #@# "C": "Coil", #@# } bbss = ss_names.keys() bbss = functions.spl(" F E H 1 2 3 T S C") # SS one letter # The following dictionary contains secondary structure types as assigned by # different programs. The corresponding Martini secondary structure types are # listed in cgss # # NOTE: # Each list of letters in the dictionary ss should exactly match the list # in cgss. # ssdefs = { "dssp": list(".HGIBETSC~"), # DSSP one letter secondary structure code #@# "pymol": list(".H...S...L"), # Pymol one letter secondary structure code #@# "gmx": list(".H...ETS.C"), # Gromacs secondary structure dump code #@# "self": list("FHHHEETSCC") # Internal CG secondary structure codes #@#
# dihedral definitions, which are not present for coil and termini # ss_names = { "F": "Collagenous Fiber", #@# "E": "Extended structure (beta sheet)", #@# "H": "Helix structure", #@# "1": "Helix start (H-bond donor)", #@# "2": "Helix end (H-bond acceptor)", #@# "3": "Ambivalent helix type (short helices)", #@# "T": "Turn", #@# "S": "Bend", #@# "C": "Coil", #@# } bbss = ss_names.keys() bbss = functions.spl(" F E H 1 2 3 T S C") # SS one letter # The following dictionary contains secondary structure types as assigned by # different programs. The corresponding Martini secondary structure types are # listed in cgss # # NOTE: # Each list of letters in the dictionary ss should exactly match the list # in cgss. # ssdefs = { "dssp": list(".123HGIBETSC~"), # DSSP one letter secondary structure code #@# "pymol": list(".123H...S...L"), # Pymol one letter secondary structure code #@# "gmx": list(".123H...ETS.C"), # Gromacs secondary structure dump code #@# "self": list("F123HHHEETSCC") # Internal CG secondary structure codes #@#