"openmmapi/vscode:/vscode.git/clone" did not exist on "9f90999c4fd4ad0773ce908648659db7cc5302e3"
Commit b1b4e547 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Increased well depth for HelloArgon.cpp

Decreased step size and simulation time
parent 9fc0fef0
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
// coordinates, defined later in this source file. // coordinates, defined later in this source file.
void writePdb(const OpenMM::OpenMMContext& context); void writePdb(const OpenMM::OpenMMContext& context);
// simulateArgon() subroutine
void simulateArgon() void simulateArgon()
{ {
// Load any shared libraries containing GPU implementations // Load any shared libraries containing GPU implementations
...@@ -34,12 +33,12 @@ void simulateArgon() ...@@ -34,12 +33,12 @@ void simulateArgon()
system.addParticle(39.95); // mass, grams per mole system.addParticle(39.95); // mass, grams per mole
// charge, sigma, well depth // charge, sigma, well depth
nonbond->addParticle(0.0, 0.3350, 0.001603); nonbond->addParticle(0.0, 0.3350, 0.996);
initialPositions[a] = OpenMM::Vec3(0.5*a,0,0); // location, nanometers initialPositions[a] = OpenMM::Vec3(0.5*a,0,0); // location, nanometers
} }
OpenMM::VerletIntegrator integrator(0.020); // step size in picoseconds OpenMM::VerletIntegrator integrator(0.004); // step size in picoseconds
// Let OpenMM Context choose best platform. // Let OpenMM Context choose best platform.
OpenMM::OpenMMContext context(system, integrator); OpenMM::OpenMMContext context(system, integrator);
...@@ -50,7 +49,7 @@ void simulateArgon() ...@@ -50,7 +49,7 @@ void simulateArgon()
context.setPositions(initialPositions); context.setPositions(initialPositions);
// Simulate // Simulate
while(context.getTime() < 500.0) { // picoseconds while(context.getTime() < 10.0) { // picoseconds
writePdb(context); // output coordinates writePdb(context); // output coordinates
// Run 100 steps at a time, for efficient use of OpenMM // Run 100 steps at a time, for efficient use of OpenMM
integrator.step(100); integrator.step(100);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment