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
5c8644d8
Commit
5c8644d8
authored
Jul 31, 2019
by
peastman
Browse files
Fixed errors with residue insertion codes
parent
2e86184b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
wrappers/python/simtk/openmm/app/charmmpsffile.py
wrappers/python/simtk/openmm/app/charmmpsffile.py
+1
-1
wrappers/python/simtk/openmm/app/pdbfile.py
wrappers/python/simtk/openmm/app/pdbfile.py
+3
-1
No files found.
wrappers/python/simtk/openmm/app/charmmpsffile.py
View file @
5c8644d8
...
@@ -710,7 +710,7 @@ class CharmmPsfFile(object):
...
@@ -710,7 +710,7 @@ class CharmmPsfFile(object):
last_residue
=
None
last_residue
=
None
if
resid
!=
last_residue
:
if
resid
!=
last_residue
:
last_residue
=
resid
last_residue
=
resid
residue
=
topology
.
addResidue
(
atom
.
residue
.
resname
,
chain
,
resid
)
residue
=
topology
.
addResidue
(
atom
.
residue
.
resname
,
chain
,
str
(
atom
.
residue
.
idx
),
atom
.
residue
.
inscode
)
if
atom
.
type
is
not
None
:
if
atom
.
type
is
not
None
:
# This is the most reliable way of determining the element
# This is the most reliable way of determining the element
atomic_num
=
atom
.
type
.
atomic_number
atomic_num
=
atom
.
type
.
atomic_number
...
...
wrappers/python/simtk/openmm/app/pdbfile.py
View file @
5c8644d8
...
@@ -352,9 +352,11 @@ class PDBFile(object):
...
@@ -352,9 +352,11 @@ class PDBFile(object):
resName
=
res
.
name
resName
=
res
.
name
if
keepIds
and
len
(
res
.
id
)
<
5
:
if
keepIds
and
len
(
res
.
id
)
<
5
:
resId
=
res
.
id
resId
=
res
.
id
resIC
=
res
.
insertionCode
else
:
else
:
resId
=
"%4d"
%
((
resIndex
+
1
)
%
10000
)
resId
=
"%4d"
%
((
resIndex
+
1
)
%
10000
)
if
len
(
res
.
insertionCode
)
==
1
:
resIC
=
res
.
insertionCode
else
:
resIC
=
" "
resIC
=
" "
if
res
.
name
in
nonHeterogens
:
if
res
.
name
in
nonHeterogens
:
recordName
=
"ATOM "
recordName
=
"ATOM "
...
...
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