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
697ab72e
Commit
697ab72e
authored
Jun 25, 2020
by
Charlles Abreu
Browse files
Fixed TestMetadynamics
parent
82bad78d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
wrappers/python/simtk/openmm/app/metadynamics.py
wrappers/python/simtk/openmm/app/metadynamics.py
+2
-0
wrappers/python/tests/TestMetadynamics.py
wrappers/python/tests/TestMetadynamics.py
+2
-1
No files found.
wrappers/python/simtk/openmm/app/metadynamics.py
View file @
697ab72e
...
...
@@ -293,6 +293,8 @@ class BiasVariable(object):
self
.
minValue
=
self
.
_standardize
(
minValue
)
self
.
maxValue
=
self
.
_standardize
(
maxValue
)
self
.
biasWidth
=
self
.
_standardize
(
biasWidth
)
if
not
isinstance
(
periodic
,
Bool
):
raise
ValueError
(
"BiasVariable: invalid argument"
)
self
.
periodic
=
periodic
if
gridWidth
is
None
:
self
.
gridWidth
=
int
(
np
.
ceil
(
5
*
(
maxValue
-
minValue
)
/
biasWidth
))
...
...
wrappers/python/tests/TestMetadynamics.py
View file @
697ab72e
...
...
@@ -16,9 +16,10 @@ class TestMetadynamics(unittest.TestCase):
system
.
addForce
(
force
)
cv
=
CustomBondForce
(
'r'
)
cv
.
addBond
(
0
,
1
)
bias
=
BiasVariable
(
cv
,
0.94
,
1.06
,
0.0
2
)
bias
=
BiasVariable
(
cv
,
0.94
,
1.06
,
0.0
0431
,
gridWidth
=
31
)
meta
=
Metadynamics
(
system
,
[
bias
],
300
*
kelvin
,
2.0
,
5.0
,
10
)
integrator
=
LangevinIntegrator
(
300
*
kelvin
,
10
/
picosecond
,
0.001
*
picosecond
)
integrator
.
setRandomNumberSeed
(
4321
)
topology
=
Topology
()
chain
=
topology
.
addChain
()
residue
=
topology
.
addResidue
(
'H2'
,
chain
)
...
...
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