Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pdbfixer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pdbfixer
Commits
ce378635
Commit
ce378635
authored
Sep 10, 2013
by
Peter Eastman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug that would sometimes try to add an OXT to a non-protein residue
parent
fde3a027
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
pdbfixer.py
+6
-0
ui.py
+1
-5
No files found.
pdbfixer.py
View file @
ce378635
...
@@ -60,6 +60,9 @@ substitutions = {
...
@@ -60,6 +60,9 @@ substitutions = {
'SEL'
:
'SER'
,
'SEP'
:
'SER'
,
'SET'
:
'SER'
,
'SHC'
:
'CYS'
,
'SHR'
:
'LYS'
,
'SMC'
:
'CYS'
,
'SOC'
:
'CYS'
,
'STY'
:
'TYR'
,
'SVA'
:
'SER'
,
'TIH'
:
'ALA'
,
'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'
'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'
]
rnaResidues
=
[
'A'
,
'G'
,
'C'
,
'U'
]
dnaResidues
=
[
'DA'
,
'DG'
,
'DC'
,
'DT'
]
def
_overlayPoints
(
points1
,
points2
):
def
_overlayPoints
(
points1
,
points2
):
"""Given two sets of points, determine the translation and rotation that matches them as closely as possible.
"""Given two sets of points, determine the translation and rotation that matches them as closely as possible.
...
@@ -192,7 +195,10 @@ class PDBFixer(object):
...
@@ -192,7 +195,10 @@ class PDBFixer(object):
endPosition
=
startPosition
+
outward
endPosition
=
startPosition
+
outward
self
.
_addMissingResiduesToChain
(
newChain
,
insertHere
,
startPosition
,
endPosition
,
residue
,
newAtoms
,
newPositions
)
self
.
_addMissingResiduesToChain
(
newChain
,
insertHere
,
startPosition
,
endPosition
,
residue
,
newAtoms
,
newPositions
)
newResidue
=
list
(
newChain
.
residues
())[
-
1
]
newResidue
=
list
(
newChain
.
residues
())[
-
1
]
if
newResidue
.
name
in
proteinResidues
:
terminalsToAdd
=
[
'OXT'
]
terminalsToAdd
=
[
'OXT'
]
else
:
terminalsToAdd
=
None
# If a terminal OXT is missing, add it.
# If a terminal OXT is missing, add it.
...
...
ui.py
View file @
ce378635
import
simtk.openmm.app
as
app
import
simtk.openmm.app
as
app
from
simtk.openmm.app.internal.pdbstructure
import
PdbStructure
from
simtk.openmm.app.internal.pdbstructure
import
PdbStructure
from
pdbfixer
import
PDBFixer
,
substitutions
from
pdbfixer
import
PDBFixer
,
substitutions
,
proteinResidues
,
dnaResidues
,
rnaResidues
import
uiserver
import
uiserver
import
webbrowser
import
webbrowser
import
os.path
import
os.path
from
cStringIO
import
StringIO
from
cStringIO
import
StringIO
proteinResidues
=
[
'ALA'
,
'ASN'
,
'CYS'
,
'GLU'
,
'HIS'
,
'LEU'
,
'MET'
,
'PRO'
,
'THR'
,
'TYR'
,
'ARG'
,
'ASP'
,
'GLN'
,
'GLY'
,
'ILE'
,
'LYS'
,
'PHE'
,
'SER'
,
'TRP'
,
'VAL'
]
rnaResidues
=
[
'A'
,
'G'
,
'C'
,
'U'
]
dnaResidues
=
[
'DA'
,
'DG'
,
'DC'
,
'DT'
]
def
loadHtmlFile
(
name
):
def
loadHtmlFile
(
name
):
htmlPath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'html'
)
htmlPath
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'html'
)
file
=
os
.
path
.
join
(
htmlPath
,
name
)
file
=
os
.
path
.
join
(
htmlPath
,
name
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment