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
c6e1397e
Commit
c6e1397e
authored
Dec 14, 2015
by
Robert McGibbon
Browse files
Add some spacing
parent
c4d95a4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
26 deletions
+6
-26
docs-source/api-c++/index.rst
docs-source/api-c++/index.rst
+0
-26
docs-source/api-c++/library.rst.jinja2
docs-source/api-c++/library.rst.jinja2
+6
-0
No files found.
docs-source/api-c++/index.rst
View file @
c6e1397e
...
...
@@ -42,29 +42,3 @@ in time. It is created by calling a method on a Context. As discussed earlier,
this is a potentially expensive operation. This is the only way to query the
values of state variables, such as particle positions and velocities; Context
does not provide methods for accessing them directly.
Here is an example of what the source code to create a System and run a
simulation might look like:
.. code-block:: c
System system;
for (int i = 0; i < numParticles; ++i)
system.addParticle(particle[i].mass);
HarmonicBondForce* bonds = new HarmonicBondForce();
system.addForce(bonds);
for (int i = 0; i < numBonds; ++i)
bonds->addBond(bond[i].particle1, bond[i].particle2,
bond[i].length, bond[i].k);
HarmonicAngleForce* angles = new HarmonicAngleForce();
system.addForce(angles);
for (int i = 0; i < numAngles; ++i)
angles->addAngle(angle[i].particle1, angle[i].particle2,
angle[i].particle3, angle[i].angle, angle[i].k);
// ...create and initialize other force field terms in the same way
LangevinIntegrator integrator(temperature, friction, stepSize);
Context context(system, integrator);
context.setPositions(initialPositions);
context.setVelocities(initialVelocities);
integrator.step(10000);
docs-source/api-c++/library.rst.jinja2
View file @
c6e1397e
...
...
@@ -9,6 +9,8 @@ Core Objects
~{{obj}}
{% endfor %}
|
|
.. _forces:
Forces
...
...
@@ -21,6 +23,8 @@ Forces
~{{force}}
{% endfor %}
|
|
.. _integrators:
Integrators
...
...
@@ -36,6 +40,8 @@ through time.
~{{integrator}}
{% endfor %}
|
|
.. _extras:
Extras
...
...
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