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
200534fe
Commit
200534fe
authored
Nov 30, 2018
by
João Rodrigues
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored code to support both old/new versions of OpenMM
parent
eab0d4d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
pdbfixer/pdbfixer.py
+10
-2
No files found.
pdbfixer/pdbfixer.py
View file @
200534fe
...
...
@@ -35,11 +35,19 @@ __version__ = "1.5"
import
simtk.openmm
as
mm
import
simtk.openmm.app
as
app
import
simtk.unit
as
unit
from
simtk.openmm.app.internal
import
compiled
from
simtk.openmm.app.internal.pdbstructure
import
PdbStructure
from
simtk.openmm.app.internal.pdbx.reader.PdbxReader
import
PdbxReader
from
simtk.openmm.app.element
import
hydrogen
,
oxygen
from
simtk.openmm.app.forcefield
import
NonbondedGenerator
# Support Cythonized functions in OpenMM 7.3
# and also implementations in older versions.
try
:
from
simtk.openmm.app.internal
import
compiled
matchResidue
=
compiled
.
matchResidueToTemplate
except
ImportError
:
matchResidue
=
app
.
forcefield
.
_matchResidue
import
numpy
as
np
import
numpy.linalg
as
lin
import
sys
...
...
@@ -1132,7 +1140,7 @@ class PDBFixer(object):
signature
=
app
.
forcefield
.
_createResidueSignature
([
atom
.
element
for
atom
in
residue
.
atoms
()])
if
signature
in
forcefield
.
_templateSignatures
:
if
any
(
compiled
.
matchResidueToTemplate
(
residue
,
t
,
bondedToAtom
,
False
)
is
not
None
for
t
in
forcefield
.
_templateSignatures
[
signature
]):
if
any
(
matchResidue
(
residue
,
t
,
bondedToAtom
)
is
not
None
for
t
in
forcefield
.
_templateSignatures
[
signature
]):
continue
# Create a new template.
...
...
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