Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add phosphorylated residues SEP and PTR (pSer and pTyr) #261

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions devtools/createSoftForcefield.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
"""
from __future__ import print_function
__author__ = "Peter Eastman"
__version__ = "1.0"
__version__ = "1.1"

import openmm.app as app
import openmm.app.element as elem
import openmm.app.forcefield as ff

forcefield = app.ForceField('amber99sbildn.xml', 'tip3p.xml')
forcefield = app.ForceField('amber/ff14SB.xml', 'tip3p.xml', 'amber/phosaa14SB.xml')
bondK = 10000.0
angleK = 10.0

Expand All @@ -51,7 +51,8 @@
omitTypes = set()
omitClasses = set()
for atomType in forcefield._atomTypes:
(atomClass, mass, element) = forcefield._atomTypes[atomType]
aType = forcefield._atomTypes[atomType]
(atomClass, mass, element) = aType.atomClass, aType.mass, aType.element
if element is None or element == elem.hydrogen:
omitTypes.add(atomType)
omitClasses.add(atomClass)
Expand Down Expand Up @@ -86,8 +87,8 @@
type1 = next(iter(bonds.types1[i]))
type2 = next(iter(bonds.types2[i]))
if type1 not in omitTypes and type2 not in omitTypes:
class1 = forcefield._atomTypes[type1][0]
class2 = forcefield._atomTypes[type2][0]
class1 = forcefield._atomTypes[type1].atomClass
class2 = forcefield._atomTypes[type2].atomClass
print(' <Bond class1="%s" class2="%s" length="%g" k="%g"/>' % (class1, class2, bonds.length[i], bondK))
print(' </HarmonicBondForce>')

Expand All @@ -100,9 +101,9 @@
type2 = next(iter(angles.types2[i]))
type3 = next(iter(angles.types3[i]))
if type1 not in omitTypes and type2 not in omitTypes and type3 not in omitTypes:
class1 = forcefield._atomTypes[type1][0]
class2 = forcefield._atomTypes[type2][0]
class3 = forcefield._atomTypes[type3][0]
class1 = forcefield._atomTypes[type1].atomClass
class2 = forcefield._atomTypes[type2].atomClass
class3 = forcefield._atomTypes[type3].atomClass
print(' <Angle class1="%s" class2="%s" class3="%s" angle="%g" k="%g"/>' % (class1, class2, class3, angles.angle[i], angleK))
print(' </HarmonicAngleForce>')

Expand All @@ -116,10 +117,10 @@
type3 = next(iter(torsion.types3))
type4= next(iter(torsion.types4))
if type1 not in omitTypes and type2 not in omitTypes and type3 not in omitTypes and type4 not in omitTypes:
class1 = forcefield._atomTypes[type1][0]
class2 = forcefield._atomTypes[type2][0]
class3 = forcefield._atomTypes[type3][0]
class4 = forcefield._atomTypes[type4][0]
class1 = forcefield._atomTypes[type1].atomClass
class2 = forcefield._atomTypes[type2].atomClass
class3 = forcefield._atomTypes[type3].atomClass
class4 = forcefield._atomTypes[type4].atomClass
print(' <Proper class1="%s" class2="%s" class3="%s" class4="%s"' % (class1, class2, class3, class4), end=' ')
for i in range(len(torsion.k)):
print(' periodicity%d="%d" phase%d="%g" k%d="%g"' % (i+1, torsion.periodicity[i], i+1, torsion.phase[i], i+1, torsion.k[i]), end=' ')
Expand All @@ -130,10 +131,10 @@
type3 = next(iter(torsion.types3))
type4= next(iter(torsion.types4))
if type1 not in omitTypes and type2 not in omitTypes and type3 not in omitTypes and type4 not in omitTypes:
class1 = forcefield._atomTypes[type1][0]
class2 = forcefield._atomTypes[type2][0]
class3 = forcefield._atomTypes[type3][0]
class4 = forcefield._atomTypes[type4][0]
class1 = forcefield._atomTypes[type1].atomClass
class2 = forcefield._atomTypes[type2].atomClass
class3 = forcefield._atomTypes[type3].atomClass
class4 = forcefield._atomTypes[type4].atomClass
print(' <Improper class1="%s" class2="%s" class3="%s" class4="%s"' % (class1, class2, class3, class4), end=' ')
for i in range(len(torsion.k)):
print(' periodicity%d="%d" phase%d="%g" k%d="%g"' % (i+1, torsion.periodicity[i], i+1, torsion.phase[i], i+1, torsion.k[i]), end=' ')
Expand Down
4 changes: 2 additions & 2 deletions pdbfixer/pdbfixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
'SEL':'SER', 'SEP':'SER', 'SET':'SER', 'SHC':'CYS', 'SHR':'LYS', 'SMC':'CYS', 'SOC':'CYS', 'STY':'TYR', 'SVA':'SER', 'TIH':'ALA',
'TPL':'TRP', 'TPO':'THR', 'TPQ':'ALA', 'TRG':'LYS', 'TRO':'TRP', 'TYB':'TYR', 'TYI':'TYR', 'TYQ':'TYR', 'TYS':'TYR', 'TYY':'TYR'
}
proteinResidues = ['ALA', 'ASN', 'CYS', 'GLU', 'HIS', 'LEU', 'MET', 'PRO', 'THR', 'TYR', 'ARG', 'ASP', 'GLN', 'GLY', 'ILE', 'LYS', 'PHE', 'SER', 'TRP', 'VAL']
proteinResidues = ['ALA', 'ASN', 'CYS', 'GLU', 'HIS', 'LEU', 'MET', 'PRO', 'THR', 'TYR', 'PTR', 'ARG', 'ASP', 'GLN', 'GLY', 'ILE', 'LYS', 'PHE', 'SER', 'SEP', 'TRP', 'VAL']
rnaResidues = ['A', 'G', 'C', 'U', 'I']
dnaResidues = ['DA', 'DG', 'DC', 'DT', 'DI']

Expand Down Expand Up @@ -1129,7 +1129,7 @@ def _createForceField(self, newTopology, water):
"""Create a force field to use for optimizing the positions of newly added atoms."""

if water:
forcefield = app.ForceField('amber14-all.xml', 'amber14/tip3p.xml')
forcefield = app.ForceField('amber14-all.xml', 'amber14/tip3p.xml', 'amber/phosaa14SB.xml')
nonbonded = [f for f in forcefield._forces if isinstance(f, NonbondedGenerator)][0]
radii = {'H':0.198, 'Li':0.203, 'C':0.340, 'N':0.325, 'O':0.299, 'F':0.312, 'Na':0.333, 'Mg':0.141,
'P':0.374, 'S':0.356, 'Cl':0.347, 'K':0.474, 'Br':0.396, 'Rb':0.527, 'I':0.419, 'Cs':0.605}
Expand Down
Loading