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
10d3930b
Commit
10d3930b
authored
Sep 02, 2014
by
peastman
Browse files
Merge pull request #598 from swails/improve_warnings
Improve warning messages coming from the CHARMM parsers.
parents
e2c272d0
263c1d75
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
wrappers/python/simtk/openmm/app/charmmparameterset.py
wrappers/python/simtk/openmm/app/charmmparameterset.py
+4
-3
wrappers/python/simtk/openmm/app/internal/charmm/topologyobjects.py
...ython/simtk/openmm/app/internal/charmm/topologyobjects.py
+4
-0
No files found.
wrappers/python/simtk/openmm/app/charmmparameterset.py
View file @
10d3930b
...
@@ -341,7 +341,8 @@ class CharmmParameterSet(object):
...
@@ -341,7 +341,8 @@ class CharmmParameterSet(object):
replaced
=
False
replaced
=
False
for
i
,
dtype
in
enumerate
(
self
.
dihedral_types
[
key
]):
for
i
,
dtype
in
enumerate
(
self
.
dihedral_types
[
key
]):
if
dtype
.
per
==
dihedral
.
per
:
if
dtype
.
per
==
dihedral
.
per
:
# Replace. Should we warn here?
# Replace. Warn if they are different
if
dtype
!=
dihedral
:
warnings
.
warn
(
'Replacing dihedral %r with %r'
%
warnings
.
warn
(
'Replacing dihedral %r with %r'
%
(
dtype
,
dihedral
))
(
dtype
,
dihedral
))
self
.
dihedral_types
[
key
]
self
.
dihedral_types
[
key
]
...
...
wrappers/python/simtk/openmm/app/internal/charmm/topologyobjects.py
View file @
10d3930b
...
@@ -926,6 +926,10 @@ class DihedralType(object):
...
@@ -926,6 +926,10 @@ class DihedralType(object):
self
.
per
=
int
(
per
)
self
.
per
=
int
(
per
)
self
.
phase
=
float
(
phase
)
self
.
phase
=
float
(
phase
)
def
__repr__
(
self
):
return
"<DihedralType: k=%s; phase=%s; per=%s>"
%
(
self
.
phi_k
,
self
.
phase
,
self
.
per
)
def
__eq__
(
self
,
other
):
def
__eq__
(
self
,
other
):
return
(
self
.
phi_k
==
other
.
phi_k
and
self
.
per
==
other
.
per
and
return
(
self
.
phi_k
==
other
.
phi_k
and
self
.
per
==
other
.
per
and
self
.
phase
==
other
.
phase
)
self
.
phase
==
other
.
phase
)
...
...
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