Commit 83b6b29e authored by peastman's avatar peastman
Browse files

Merge pull request #1376 from swails/docstring

Hopefully improve the docstring so the generated docs will improve
parents 14cdc9ae a61fd9a9
...@@ -45,11 +45,9 @@ class MTSIntegrator(CustomIntegrator): ...@@ -45,11 +45,9 @@ class MTSIntegrator(CustomIntegrator):
setForceGroup() on them) that should be evaluated at different frequencies. When setForceGroup() on them) that should be evaluated at different frequencies. When
you create the integrator, you provide a tuple for each group specifying the index you create the integrator, you provide a tuple for each group specifying the index
of the force group and the frequency (as a fraction of the outermost time step) at of the force group and the frequency (as a fraction of the outermost time step) at
which to evaluate it. For example: which to evaluate it. For example::
<pre> integrator = MTSIntegrator(4*femtoseconds, [(0,1), (1,2), (2,8)])
integrator = MTSIntegrator(4*femtoseconds, [(0,1), (1,2), (2,8)])
</pre>
This specifies that the outermost time step is 4 fs, so each step of the integrator This specifies that the outermost time step is 4 fs, so each step of the integrator
will advance time by that much. It also says that force group 0 should be evaluated will advance time by that much. It also says that force group 0 should be evaluated
...@@ -60,13 +58,11 @@ class MTSIntegrator(CustomIntegrator): ...@@ -60,13 +58,11 @@ class MTSIntegrator(CustomIntegrator):
less often than the bonded and direct space nonbonded interactions. The following less often than the bonded and direct space nonbonded interactions. The following
example looks up the NonbondedForce, sets the reciprocal space interactions to their example looks up the NonbondedForce, sets the reciprocal space interactions to their
own force group, and then creates an integrator that evaluates them once every 4 fs, own force group, and then creates an integrator that evaluates them once every 4 fs,
but all other interactions every 2 fs. but all other interactions every 2 fs::
<pre> nonbonded = [f for f in system.getForces() if isinstance(f, NonbondedForce)][0]
nonbonded = [f for f in system.getForces() if isinstance(f, NonbondedForce)][0] nonbonded.setReciprocalSpaceForceGroup(1)
nonbonded.setReciprocalSpaceForceGroup(1) integrator = MTSIntegrator(4*femtoseconds, [(1,1), (0,2)])
integrator = MTSIntegrator(4*femtoseconds, [(1,1), (0,2)])
</pre>
For details, see Tuckerman et al., J. Chem. Phys. 97(3) pp. 1990-2001 (1992). For details, see Tuckerman et al., J. Chem. Phys. 97(3) pp. 1990-2001 (1992).
""" """
......
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