Skip to content

Commit 8176f79

Browse files
committed
support for phosphoserine mutations in charmm36
1 parent 6230b92 commit 8176f79

File tree

4 files changed

+152
-2
lines changed

4 files changed

+152
-2
lines changed

pmx/library.py

Lines changed: 120 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ def pmx_data_file( filename ):
105105
'F':'PHE',
106106
'P':'PRO',
107107
'S':'SER',
108+
'SP1':'SP1', # phosphoserine
109+
'SP2':'SP2', # phosphoserine
108110
'T':'THR',
109111
'W':'TRP',
110112
'Y':'TYR',
@@ -180,10 +182,13 @@ def pmx_data_file( filename ):
180182
'NLYP','NPRO','NCYN','NCYX','NMET','CALA','CGLY','CSER','CTHR',
181183
'CLEU','CILE','CVAL','CASN','CGLN','CARG','CHID','CHIE','CHIP',
182184
'CTRP','CPHE','CTYR','CGLU','CASP','CLYP','CPRO','CCYN','CCYX',
183-
'CMET','SEP','HISH','HIS1','HISE','GLUH'
185+
'CMET','SEP','HISH','HIS1','HISD','HISE','GLUH',
186+
'SP1','SP2', # phosphoserines in charmm36
184187
)
185188

186189
_one_letter = {
190+
'SP1':'SP1', # phosphoserine in charmm36
191+
'SP2':'SP2', # phosphoserine in charmm36
187192
'ALA':'A',
188193
'ARG':'R',
189194
'ASN':'N',
@@ -1776,6 +1781,10 @@ def pmx_data_file( filename ):
17761781
'HB1':'1HB',
17771782
'HB2':'2HB',
17781783
},
1784+
'HISD': {
1785+
'HB1':'1HB',
1786+
'HB2':'2HB',
1787+
},
17791788
'HSE': {
17801789
'HB1':'1HB',
17811790
'HB2':'2HB',
@@ -2117,6 +2126,16 @@ def pmx_data_file( filename ):
21172126
'HB2':'2HB',
21182127
'HG1':'1HG',
21192128
},
2129+
# phosphoserine in charmm36
2130+
'SP1': {
2131+
'HB1':'1HB',
2132+
'HB2':'2HB',
2133+
},
2134+
# phosphoserine in charmm36
2135+
'SP2': {
2136+
'HB1':'1HB',
2137+
'HB2':'2HB',
2138+
},
21202139
'NSER': {
21212140
'H1':'1H',
21222141
'H2':'2H',
@@ -4628,6 +4647,67 @@ def pmx_data_file( filename ):
46284647
['HB2', 'CB', 'OG', 'HG', 1, -1] ,
46294648
['C', 'CA', 'CB', 'OG', 1, -1] ,
46304649
),
4650+
# phosphoserine in charmm36
4651+
'SP1' : (
4652+
['N', 'CA', 'CB', 'HB1', 1, -1] ,
4653+
['N', 'CA', 'CB', 'HB2', 1, -1] ,
4654+
['N', 'CA', 'CB', 'OG', 1, 1] ,
4655+
['N', 'CA', 'C', 'O', 1, 0] ,
4656+
['H', 'N', 'CA', 'HA', 1, -1] ,
4657+
['H', 'N', 'CA', 'CB', 1, -1] ,
4658+
['C', 'CA', 'N', 'H', 1, -1] ,
4659+
['CA', 'CB', 'OG', 'PD', 1, 2] ,
4660+
['HA', 'CA', 'CB', 'HB1', 1, -1] ,
4661+
['HA', 'CA', 'CB', 'HB2', 1, -1] ,
4662+
['HA', 'CA', 'CB', 'OG', 1, -1] ,
4663+
['HA', 'CA', 'C', 'O', 1, -1] ,
4664+
['CB', 'CA', 'C', 'O', 1, -1] ,
4665+
['C', 'CA', 'CB', 'HB1', 1, -1] ,
4666+
['HB1', 'CB', 'OG', 'PD', 1, -1] ,
4667+
['C', 'CA', 'CB', 'HB2', 1, -1] ,
4668+
['HB2', 'CB', 'OG', 'PD', 1, -1] ,
4669+
['C', 'CA', 'CB', 'OG', 1, -1] ,
4670+
['CB', 'OG', 'PD', 'OE1', 1, 3] ,
4671+
['CB', 'OG', 'PD', 'OE2', 1, -1] ,
4672+
['CB', 'OG', 'PD', 'OE', 1, -1] ,
4673+
['C', 'CA', 'CB', 'HB1', 1, -1] ,
4674+
['HB1', 'CB', 'OG', 'PD', 1, -1] ,
4675+
['C', 'CA', 'CB', 'HB2', 1, -1] ,
4676+
['HB2', 'CB', 'OG', 'PD', 1, -1] ,
4677+
['C', 'CA', 'CB', 'CG', 1, -1] ,
4678+
['OG', 'PD', 'OE', 'HE', 1, 4] ,
4679+
['O1E', 'PD', 'OE', 'HE', 1, -1] ,
4680+
['O2E', 'PD', 'OE', 'HE', 1, -1] ,
4681+
),
4682+
# phosphoserine in charmm36
4683+
'SP2' : (
4684+
['N', 'CA', 'CB', 'HB1', 1, -1] ,
4685+
['N', 'CA', 'CB', 'HB2', 1, -1] ,
4686+
['N', 'CA', 'CB', 'OG', 1, 1] ,
4687+
['N', 'CA', 'C', 'O', 1, 0] ,
4688+
['H', 'N', 'CA', 'HA', 1, -1] ,
4689+
['H', 'N', 'CA', 'CB', 1, -1] ,
4690+
['C', 'CA', 'N', 'H', 1, -1] ,
4691+
['CA', 'CB', 'OG', 'PD', 1, 2] ,
4692+
['HA', 'CA', 'CB', 'HB1', 1, -1] ,
4693+
['HA', 'CA', 'CB', 'HB2', 1, -1] ,
4694+
['HA', 'CA', 'CB', 'OG', 1, -1] ,
4695+
['HA', 'CA', 'C', 'O', 1, -1] ,
4696+
['CB', 'CA', 'C', 'O', 1, -1] ,
4697+
['C', 'CA', 'CB', 'HB1', 1, -1] ,
4698+
['HB1', 'CB', 'OG', 'PD', 1, -1] ,
4699+
['C', 'CA', 'CB', 'HB2', 1, -1] ,
4700+
['HB2', 'CB', 'OG', 'PD', 1, -1] ,
4701+
['C', 'CA', 'CB', 'OG', 1, -1] ,
4702+
['CB', 'OG', 'PD', 'OE1', 1, 3] ,
4703+
['CB', 'OG', 'PD', 'OE2', 1, -1] ,
4704+
['CB', 'OG', 'PD', 'OE', 1, -1] ,
4705+
['C', 'CA', 'CB', 'HB1', 1, -1] ,
4706+
['HB1', 'CB', 'OG', 'PD', 1, -1] ,
4707+
['C', 'CA', 'CB', 'HB2', 1, -1] ,
4708+
['HB2', 'CB', 'OG', 'PD', 1, -1] ,
4709+
['C', 'CA', 'CB', 'CG', 1, -1] ,
4710+
),
46314711
'SEP' : (
46324712
['N', 'CA', 'CB', 'HB1', 1, -1] ,
46334713
['N', 'CA', 'CB', 'HB2', 1, -1] ,
@@ -4650,7 +4730,6 @@ def pmx_data_file( filename ):
46504730
['CB', 'OG', 'P', 'O1P', 1, 3] ,
46514731
['CB', 'OG', 'P', 'O2P', 1, -1] ,
46524732
['CB', 'OG', 'P', 'O3P', 1, -1] ,
4653-
46544733
),
46554734
'THR' : (
46564735
['N', 'CA', 'CB', 'HB', 1, -1] ,
@@ -5008,6 +5087,19 @@ def pmx_data_file( filename ):
50085087
'C':['C.2',0],
50095088
'O':['O.2',0],
50105089
},
5090+
'HISD':
5091+
{
5092+
'N':['N.am',0],
5093+
'CA':['C.3',0],
5094+
'CB':['C.3',0],
5095+
'CG':['C.2',0],
5096+
'ND1':['N.2',0],
5097+
'CE1':['C.2',0],
5098+
'NE2':['N.pl3',0],
5099+
'CD2':['C.2',0],
5100+
'C':['C.2',0],
5101+
'O':['O.2',0],
5102+
},
50115103
'HISE':
50125104
{
50135105
'N':['N.am',0],
@@ -5121,6 +5213,32 @@ def pmx_data_file( filename ):
51215213
'C':['C.2',0],
51225214
'O':['O.2',0],
51235215
},
5216+
'SP1': # phosphoserine in charmm36
5217+
{
5218+
'N':['N.am',0],
5219+
'CA':['C.3',0],
5220+
'CB':['C.3',0],
5221+
'OG':['O.3',0],
5222+
'PD':['P.3',0],
5223+
'OE1':['O.2',0],
5224+
'OE2':['O.3',0],
5225+
'OE':['O.3',0],
5226+
'C':['C.2',0],
5227+
'O':['O.2',0],
5228+
},
5229+
'SP2': # phosphoserine in charmm36
5230+
{
5231+
'N':['N.am',0],
5232+
'CA':['C.3',0],
5233+
'CB':['C.3',0],
5234+
'OG':['O.3',0],
5235+
'PD':['P.3',0],
5236+
'OE1':['O.2',0],
5237+
'OE2':['O.3',0],
5238+
'OE':['O.3',0],
5239+
'C':['C.2',0],
5240+
'O':['O.2',0],
5241+
},
51245242
'ASN':
51255243
{
51265244
'N':['N.am',0],

scripts/generate_hybrid_residue.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,17 @@
387387
'ARG':5,
388388
'LYS':5,
389389
'LYN':5,
390+
'SP1':3,
391+
'SP2':3,
390392
}
391393

394+
noncanonical_aa = {
395+
'S2SP1':'SSP1', # serine to pSer1
396+
'S2SP2':'SSP2', # serine to pSer2
397+
'SP12S':'SP1S', # pSer1 to serine
398+
'SP22S':'SP2S', # pSer2 to setine
399+
}
400+
392401
dna_names = {
393402
'DA5_DT5':'D5K',
394403
'DA5_DC5':'D5L',
@@ -1185,7 +1194,9 @@ def make_rotations( r, resn1_dih, resn2_dih ):
11851194
atoms_to_rotate = find_higher_atoms(atom2, r, oo+1, bb )
11861195
for atom in atoms_to_rotate:
11871196
rot_list.append( atom )
1197+
# print atom.name
11881198
rotations.append( rot_list )
1199+
# sys.exit(0)
11891200
return rotations
11901201

11911202
def parse_ffnonbonded_charmm(ffnonbonded,f):
@@ -1495,6 +1506,8 @@ def get_ff_path( ff ):
14951506
rr_name = dna_mutation_naming(aa1,aa2)
14961507
elif bRNA:
14971508
rr_name = rna_mutation_naming(aa1,aa2)
1509+
elif rr_name in noncanonical_aa.keys():
1510+
rr_name = noncanonical_aa[rr_name]
14981511

14991512
m1.get_symbol()
15001513
m2.get_symbol()

scripts/generate_hybrid_topology.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,9 @@ def is_hybrid_residue( resname ):
731731
if resname in _perturbed_nucleotides or \
732732
resname[1] == '2':
733733
return True
734+
# phosphoserines in charmm36
735+
if resname=='SSP1' or resname=='SSP2' or resname=='SP1S' or resname=='SP2S':
736+
return True
734737
else: return False
735738

736739

scripts/mutate_v2.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,21 @@ def __str__(self):
9999
'PHE':'F',
100100
'PRO':'P',
101101
'SER':'S',
102+
'SP1':'SP1', # phosphoserine in charmm36
103+
'SP2':'SP2', # phosphoserine in charmm36
102104
'THR':'T',
103105
'TRP':'W',
104106
'TYR':'Y',
105107
'VAL':'V',
106108
}
107109

110+
noncanonical_aa = {
111+
'S2SP1':'SSP1', # serine to pSer1
112+
'S2SP2':'SSP2', # serine to pSer2
113+
'SP12S':'SP1S', # pSer1 to serine
114+
'SP22S':'SP2S', # pSer2 to setine
115+
}
116+
108117
dna_names = {
109118
'DA5_DT5':'D5K',
110119
'DA5_DC5':'D5L',
@@ -338,6 +347,10 @@ def rename_to_match_library(res):
338347
atom.name = 'HG'
339348
if ('S2' in atom.resname) and (atom.name == 'HG1'):
340349
atom.name = 'HG'
350+
if ('SP1' in atom.resname) and (atom.name == 'HG1'): # phosphoserine in charmm36
351+
atom.name = 'HG'
352+
if ('SP2' in atom.resname) and (atom.name == 'HG1'): # phosphoserine in charmm36
353+
atom.name = 'HG'
341354
## for cysteine
342355
if (atom.resname == 'CYS') and (atom.name == 'HG1'):
343356
atom.name = 'HG'
@@ -376,6 +389,7 @@ def set_conformation(old_res, new_res, rotdic):
376389
rot = Rotation(a1.x,a2.x)
377390
for atom in atoms:
378391
atom.x = rot.apply(atom.x,diff)
392+
# sys.exit(0)
379393
for atom in new_res.atoms:
380394
if atom.name[0] != 'D':
381395
atom.x = old_res[atom.name].x
@@ -439,6 +453,8 @@ def apply_aa_mutation(m, residue, new_aa_name, mtp_file, bStrB, infileB):
439453
olkey = check_OPLS_LYS( residue )
440454

441455
hybrid_residue_name = olkey+'2'+new_aa_name
456+
if hybrid_residue_name in noncanonical_aa.keys():
457+
hybrid_residue_name = noncanonical_aa[hybrid_residue_name]
442458
print 'log_> Residue to mutate: %d | %s | %s ' % ( residue.id, residue.resname, residue.chain_id)
443459
print 'log_> Mutation to apply: %s->%s' % (olkey, new_aa_name)
444460
print 'log_> Hybrid residue name: %s' % hybrid_residue_name

0 commit comments

Comments
 (0)