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
263c1d75
Commit
263c1d75
authored
Aug 22, 2014
by
Jason Swails
Browse files
Improve warning messages coming from the CHARMM parsers.
parent
c4acc7d2
Changes
2
Hide 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 @
263c1d75
...
@@ -341,9 +341,10 @@ class CharmmParameterSet(object):
...
@@ -341,9 +341,10 @@ 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
warnings
.
warn
(
'Replacing dihedral %r with %r'
%
if
dtype
!=
dihedral
:
(
dtype
,
dihedral
))
warnings
.
warn
(
'Replacing dihedral %r with %r'
%
(
dtype
,
dihedral
))
self
.
dihedral_types
[
key
]
self
.
dihedral_types
[
key
]
replaced
=
True
replaced
=
True
break
break
...
...
wrappers/python/simtk/openmm/app/internal/charmm/topologyobjects.py
View file @
263c1d75
...
@@ -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