Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
808504df
Commit
808504df
authored
Sep 03, 2013
by
peastman
Browse files
Minor enhancements/fixes to PDBFile
parent
d0f8db59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
wrappers/python/simtk/openmm/app/pdbfile.py
wrappers/python/simtk/openmm/app/pdbfile.py
+6
-2
No files found.
wrappers/python/simtk/openmm/app/pdbfile.py
View file @
808504df
...
...
@@ -70,7 +70,10 @@ class PDBFile(object):
# Load the PDB file
pdb
=
PdbStructure
(
open
(
file
),
load_all_models
=
True
)
inputfile
=
file
if
isinstance
(
file
,
str
):
inputfile
=
open
(
file
)
pdb
=
PdbStructure
(
inputfile
,
load_all_models
=
True
)
PDBFile
.
_loadNameReplacementTables
()
# Build the topology
...
...
@@ -140,7 +143,8 @@ class PDBFile(object):
for
connect
in
pdb
.
models
[
0
].
connects
:
i
=
connect
[
0
]
for
j
in
connect
[
1
:]:
connectBonds
.
append
((
atomByNumber
[
i
],
atomByNumber
[
j
]))
if
i
in
atomByNumber
and
j
in
atomByNumber
:
connectBonds
.
append
((
atomByNumber
[
i
],
atomByNumber
[
j
]))
if
len
(
connectBonds
)
>
0
:
# Only add bonds that don't already exist.
existingBonds
=
set
(
top
.
bonds
())
...
...
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