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
cc920d6a
Commit
cc920d6a
authored
Jan 08, 2016
by
Rafal P. Wiewiora
Browse files
clean up extraParticleIdentifier None
parent
adb707e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
wrappers/python/simtk/openmm/app/internal/pdbstructure.py
wrappers/python/simtk/openmm/app/internal/pdbstructure.py
+0
-2
wrappers/python/simtk/openmm/app/pdbfile.py
wrappers/python/simtk/openmm/app/pdbfile.py
+3
-5
No files found.
wrappers/python/simtk/openmm/app/internal/pdbstructure.py
View file @
cc920d6a
...
...
@@ -798,8 +798,6 @@ class Atom(object):
# figure out atom element
if
self
.
element_symbol
==
extraParticleIdentifier
:
self
.
element
=
'EP'
elif
not
self
.
element_symbol
and
extraParticleIdentifier
is
None
:
self
.
element
=
'EP'
else
:
try
:
# Try to find a sensible element symbol from columns 76-77
...
...
wrappers/python/simtk/openmm/app/pdbfile.py
View file @
cc920d6a
...
...
@@ -239,7 +239,7 @@ class PDBFile(object):
map
[
atom
.
attrib
[
id
]]
=
name
@
staticmethod
def
writeFile
(
topology
,
positions
,
file
=
sys
.
stdout
,
keepIds
=
False
,
extraParticleIdentifier
=
'
EP
'
):
def
writeFile
(
topology
,
positions
,
file
=
sys
.
stdout
,
keepIds
=
False
,
extraParticleIdentifier
=
'
'
):
"""Write a PDB file containing a single model.
Parameters
...
...
@@ -280,7 +280,7 @@ class PDBFile(object):
a
*
10
,
b
*
10
,
c
*
10
,
alpha
*
RAD_TO_DEG
,
beta
*
RAD_TO_DEG
,
gamma
*
RAD_TO_DEG
),
file
=
file
)
@
staticmethod
def
writeModel
(
topology
,
positions
,
file
=
sys
.
stdout
,
modelIndex
=
None
,
keepIds
=
False
,
extraParticleIdentifier
=
'
EP
'
):
def
writeModel
(
topology
,
positions
,
file
=
sys
.
stdout
,
modelIndex
=
None
,
keepIds
=
False
,
extraParticleIdentifier
=
'
'
):
"""Write out a model to a PDB file.
Parameters
...
...
@@ -331,10 +331,8 @@ class PDBFile(object):
for
atom
in
res
.
atoms
():
if
atom
.
element
is
not
None
:
symbol
=
atom
.
element
.
symbol
elif
atom
.
element
is
None
and
extraParticleIdentifier
is
not
None
:
symbol
=
extraParticleIdentifier
else
:
symbol
=
' '
symbol
=
extraParticleIdentifier
if
len
(
atom
.
name
)
<
4
and
atom
.
name
[:
1
].
isalpha
()
and
len
(
symbol
)
<
2
:
atomName
=
' '
+
atom
.
name
elif
len
(
atom
.
name
)
>
4
:
...
...
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