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
f00953b7
Commit
f00953b7
authored
Oct 02, 2013
by
peastman
Browse files
Merge pull request #158 from rmcgibbo/pdbbug-bugfix
Fix to PR #152
parents
e0966c78
25d8559f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
wrappers/python/simtk/openmm/app/pdbfile.py
wrappers/python/simtk/openmm/app/pdbfile.py
+5
-1
No files found.
wrappers/python/simtk/openmm/app/pdbfile.py
View file @
f00953b7
...
@@ -287,10 +287,14 @@ class PDBFile(object):
...
@@ -287,10 +287,14 @@ class PDBFile(object):
else
:
else
:
atomName
=
atom
.
name
atomName
=
atom
.
name
coords
=
positions
[
posIndex
]
coords
=
positions
[
posIndex
]
if
atom
.
element
is
not
None
:
symbol
=
atom
.
element
.
symbol
else
:
symbol
=
' '
line
=
"ATOM %5d %-4s %3s %s%4d %s%s%s 1.00 0.00 %2s "
%
(
line
=
"ATOM %5d %-4s %3s %s%4d %s%s%s 1.00 0.00 %2s "
%
(
atomIndex
%
100000
,
atomName
,
resName
,
chainName
,
atomIndex
%
100000
,
atomName
,
resName
,
chainName
,
(
resIndex
+
1
)
%
10000
,
_format_83
(
coords
[
0
]),
(
resIndex
+
1
)
%
10000
,
_format_83
(
coords
[
0
]),
_format_83
(
coords
[
1
]),
_format_83
(
coords
[
2
]),
atom
.
element
.
symbol
)
_format_83
(
coords
[
1
]),
_format_83
(
coords
[
2
]),
symbol
)
assert
len
(
line
)
==
80
,
'Fixed width overflow detected'
assert
len
(
line
)
==
80
,
'Fixed width overflow detected'
print
>>
file
,
line
print
>>
file
,
line
posIndex
+=
1
posIndex
+=
1
...
...
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