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
28a5f81b
"platforms/vscode:/vscode.git/clone" did not exist on "91deada7657a9997f7c299bdace7a7bd6e59f1ce"
Commit
28a5f81b
authored
Jun 10, 2009
by
Christopher Bruns
Browse files
Use AndersenThermostat instead of LangevinIntegrator for thermostat in HelloWaterBox.cpp
parent
3f5d98a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
examples/HelloWaterBox.cpp
examples/HelloWaterBox.cpp
+5
-4
No files found.
examples/HelloWaterBox.cpp
View file @
28a5f81b
...
...
@@ -100,6 +100,10 @@ static void simulateWaterBox() {
OpenMM
::
HarmonicAngleForce
&
bondBend
=
*
new
OpenMM
::
HarmonicAngleForce
();
system
.
addForce
(
&
bondBend
);
OpenMM
::
AndersenThermostat
&
thermostat
=
*
new
OpenMM
::
AndersenThermostat
(
300
,
// temperature in kelvins
91.0
);
// collision frequency in 1/picoseconds
// -------------------------------------------------------------------------
// Specify the atoms and their properties:
// (1) System needs to know the masses.
...
...
@@ -206,10 +210,7 @@ static void simulateWaterBox() {
// positions we collected above. Initial velocities will be zero.
// -------------------------------------------------------------------------
// Use LangevinIntegrator to maintain temperature
OpenMM
::
LangevinIntegrator
integrator
(
300
,
// temperature in kelvins
0.01099
,
// collision interval in picoseconds (1/91)
OpenMM
::
VerletIntegrator
integrator
(
StepSizeInFs
*
OpenMM
::
PsPerFs
);
OpenMM
::
OpenMMContext
context
(
system
,
integrator
);
context
.
setPositions
(
initialPositions
);
...
...
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