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
75b8c17c
"platforms/vscode:/vscode.git/clone" did not exist on "4d823b0a58b8854b9e08ff07ca7d2958750aa30b"
Commit
75b8c17c
authored
Jan 18, 2018
by
Alan Grossfield
Browse files
allow the user to skip parameter condensing
parent
7164109e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
wrappers/python/simtk/openmm/app/charmmparameterset.py
wrappers/python/simtk/openmm/app/charmmparameterset.py
+14
-0
No files found.
wrappers/python/simtk/openmm/app/charmmparameterset.py
View file @
75b8c17c
...
@@ -116,6 +116,9 @@ class CharmmParameterSet(object):
...
@@ -116,6 +116,9 @@ class CharmmParameterSet(object):
self
.
nbfix_types
=
dict
()
self
.
nbfix_types
=
dict
()
self
.
parametersets
=
[]
self
.
parametersets
=
[]
# Allow the user to skip parameter condensing
self
.
_noCondense
=
False
# Load all of the files
# Load all of the files
tops
,
pars
,
strs
=
[],
[],
[]
tops
,
pars
,
strs
=
[],
[],
[]
for
arg
in
args
:
for
arg
in
args
:
...
@@ -603,6 +606,14 @@ class CharmmParameterSet(object):
...
@@ -603,6 +606,14 @@ class CharmmParameterSet(object):
self
.
readParameterFile
(
section
)
self
.
readParameterFile
(
section
)
title
,
section
=
f
.
next_section
()
title
,
section
=
f
.
next_section
()
def
noCondense
(
self
):
"""
If you have a very large number of interaction types, condensing
can be a slow operation. Allow the user to specify that it
should be skipped.
"""
self
.
_noCondense
=
True
def
condense
(
self
):
def
condense
(
self
):
"""
"""
This function goes through each of the parameter type dicts and
This function goes through each of the parameter type dicts and
...
@@ -614,6 +625,9 @@ class CharmmParameterSet(object):
...
@@ -614,6 +625,9 @@ class CharmmParameterSet(object):
-------
-------
>>> params = CharmmParameterSet('charmm.prm').condense()
>>> params = CharmmParameterSet('charmm.prm').condense()
"""
"""
if
self
.
_noCondense
:
return
self
# First scan through all of the bond types
# First scan through all of the bond types
self
.
_condense_types
(
self
.
bond_types
)
self
.
_condense_types
(
self
.
bond_types
)
self
.
_condense_types
(
self
.
angle_types
)
self
.
_condense_types
(
self
.
angle_types
)
...
...
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