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
ab1a3891
Commit
ab1a3891
authored
Mar 27, 2020
by
Charlles Abreu
Browse files
Correction of Gaussian width in WellTemperedMetadynamics class
parent
d9dee3c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
wrappers/python/simtk/openmm/app/metadynamics.py
wrappers/python/simtk/openmm/app/metadynamics.py
+2
-1
No files found.
wrappers/python/simtk/openmm/app/metadynamics.py
View file @
ab1a3891
...
@@ -358,7 +358,7 @@ class WellTemperedMetadynamics(Metadynamics):
...
@@ -358,7 +358,7 @@ class WellTemperedMetadynamics(Metadynamics):
dist
=
np
.
abs
(
np
.
linspace
(
0
,
1.0
,
num
=
v
.
gridWidth
)
-
x
)
dist
=
np
.
abs
(
np
.
linspace
(
0
,
1.0
,
num
=
v
.
gridWidth
)
-
x
)
if
v
.
periodic
:
if
v
.
periodic
:
dist
=
np
.
min
(
np
.
array
([
dist
,
np
.
abs
(
dist
-
1
)]),
axis
=
0
)
dist
=
np
.
min
(
np
.
array
([
dist
,
np
.
abs
(
dist
-
1
)]),
axis
=
0
)
axisGaussians
.
append
(
np
.
exp
(
-
dist
*
dist
*
v
.
gridWidth
/
v
.
biasWidth
))
axisGaussians
.
append
(
np
.
exp
(
-
0.5
*
dist
*
dist
/
v
.
_scaledVariance
))
# Compute their outer product.
# Compute their outer product.
...
@@ -419,6 +419,7 @@ class BiasVariable(object):
...
@@ -419,6 +419,7 @@ class BiasVariable(object):
self
.
gridWidth
=
int
(
np
.
ceil
(
5
*
(
maxValue
-
minValue
)
/
biasWidth
))
self
.
gridWidth
=
int
(
np
.
ceil
(
5
*
(
maxValue
-
minValue
)
/
biasWidth
))
else
:
else
:
self
.
gridWidth
=
gridWidth
self
.
gridWidth
=
gridWidth
self
.
_scaledVariance
=
(
biasWidth
/
(
maxValue
-
minValue
))
**
2
_LoadedBias
=
namedtuple
(
'LoadedBias'
,
[
'id'
,
'index'
,
'bias'
])
_LoadedBias
=
namedtuple
(
'LoadedBias'
,
[
'id'
,
'index'
,
'bias'
])
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