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
8bcc9b3d
"platforms/vscode:/vscode.git/clone" did not exist on "a993d7abb91b2403c5834ff15fae7bf431d0227b"
Commit
8bcc9b3d
authored
Feb 27, 2015
by
peastman
Browse files
PdbStructure handles byte streams correctly in Python 3
parent
f816d961
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
wrappers/python/simtk/openmm/app/internal/pdbstructure.py
wrappers/python/simtk/openmm/app/internal/pdbstructure.py
+2
-0
No files found.
wrappers/python/simtk/openmm/app/internal/pdbstructure.py
View file @
8bcc9b3d
...
@@ -150,6 +150,8 @@ class PdbStructure(object):
...
@@ -150,6 +150,8 @@ class PdbStructure(object):
self
.
_reset_residue_numbers
()
self
.
_reset_residue_numbers
()
# Read one line at a time
# Read one line at a time
for
pdb_line
in
input_stream
:
for
pdb_line
in
input_stream
:
if
not
isinstance
(
pdb_line
,
str
):
pdb_line
=
pdb_line
.
decode
(
'utf-8'
)
# Look for atoms
# Look for atoms
if
(
pdb_line
.
find
(
"ATOM "
)
==
0
)
or
(
pdb_line
.
find
(
"HETATM"
)
==
0
):
if
(
pdb_line
.
find
(
"ATOM "
)
==
0
)
or
(
pdb_line
.
find
(
"HETATM"
)
==
0
):
self
.
_add_atom
(
Atom
(
pdb_line
,
self
))
self
.
_add_atom
(
Atom
(
pdb_line
,
self
))
...
...
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