Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic documentation for readthedocs #191

Merged
merged 30 commits into from
May 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
fc63129
Purge old broken docs framework
jchodera May 13, 2017
60bb20f
Use sphinx-quickstart docs skeleton
jchodera May 13, 2017
12ce5eb
Draft documentation
jchodera May 13, 2017
e9486c8
Fix typo
jchodera May 13, 2017
f4707c9
Fix typos
jchodera May 13, 2017
6c4b697
Add alchemy section
jchodera May 13, 2017
67aeb61
Add google analytics tracking ID
jchodera May 13, 2017
90f5a2a
Misc docs cleanup
jchodera May 13, 2017
7e5ff54
Clean up MCMC docs
jchodera May 13, 2017
7cddd93
Fix paths for RTD
jchodera May 13, 2017
4f61abd
Add YAML files for readthedocs
jchodera May 13, 2017
646d2ee
Update RTD file
jchodera May 13, 2017
e59e33c
Update RTD config
jchodera May 13, 2017
8c7aa18
More RTD configuration
jchodera May 13, 2017
9063cd1
Disable sphinx githubpages
jchodera May 13, 2017
0a18764
Add RTD badge
jchodera May 13, 2017
453120b
Add Zenodo badge
jchodera May 13, 2017
b49276f
Merge remote-tracking branch 'origin/master' into docs
jchodera May 13, 2017
27b5d10
Suppress function signatures from API indices
jchodera May 14, 2017
bf80548
Update test system categories
jchodera May 14, 2017
b4b4f00
Add states docs
jchodera May 14, 2017
3d5cbf8
Clean up links to OpenMM classes.
jchodera May 14, 2017
d58c0af
Recommend Python 3
jchodera May 14, 2017
34ce3e9
Add scripts docs
jchodera May 14, 2017
152bfeb
Clean up README now that docs are online.
jchodera May 14, 2017
e6c95e7
Fix links in README
jchodera May 14, 2017
d9d40a6
Clean up README
jchodera May 14, 2017
6ea5961
More README link fixes
jchodera May 14, 2017
733c5bd
Fix MCMC docs page
jchodera May 14, 2017
30e5b98
Only run fast testsystem potential energy tests to prevent travis tim…
jchodera May 14, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2015-2017 Chodera lab // Memorial Sloan Kettering Cancer Center

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
58 changes: 15 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,26 @@
[![Windows Build status](https://ci.appveyor.com/api/projects/status/70knpvcgvmah2qin?svg=true)](https://ci.appveyor.com/project/jchodera/openmmtools)
[![Anaconda Badge](https://anaconda.org/omnia/openmmtools/badges/version.svg)](https://anaconda.org/omnia/openmmtools)
[![Downloads Badge](https://anaconda.org/omnia/openmmtools/badges/downloads.svg)](https://anaconda.org/omnia/openmmtools/files)
[![ReadTheDocs Badge](https://readthedocs.org/projects/openmmtools/badge/?version=latest)](http://openmmtools.readthedocs.io/en/latest/?badge=latest)
[![Zenodo DOI Badge](https://zenodo.org/badge/25416166.svg)](https://zenodo.org/badge/latestdoi/25416166)

# Various Python tools for OpenMM
## OpenMMTools

## Integrators
A batteries-included toolkit for the GPU-accelerated OpenMM molecular simulation engine.

This repository contains a number of additional integrators for OpenMM in `openmmtools.integrators`, including
* `MTSIntegrator` - a multiple timestep integrator
* `DummyIntegrator` - a "dummy" integrator that does not update positions
* `GradientDescentMinimizationIntegrator` - a simple gradient descent minimizer (without line search)
* `VelocityVerletIntegrator` - a velocity Verlet integrator
* `AndersenVelocityVerletIntegrator` - a velocity Verlet integrator with Andersen thermostat using per-particle collisions
* `MetropolisMonteCarloIntegrator` - a Metropolis Monte Carlo integrator that uses Gaussian displacement trials
* `HMCIntegrator` - a hybrid Monte Carlo (HMC) integrator
* `GHMCIntegrator` - a generalized hybrid Monte Carlo (GHMC) integrator
* `VVVRIntegrator` - a velocity Verlet with velocity randomization (VVVR) integrator
`openmmtools` is a Python library layer that sits on top of [OpenMM](http://openmm.org) to provide access to a variety of useful tools for building full-featured molecular simulation packages.

## Test system suite
Features include:

The `openmmtools.testsystems` module contains a large suite of test systems---including many with simple exactly-computable properties---that can be used to test molecular simulation algorithms
- high-quality Langevin integrators, including [g-BAOAB](http://rspa.royalsocietypublishing.org/content/472/2189/20160138), [VVVR](http://pubs.acs.org/doi/abs/10.1021/jp411770f), and other splittings
- nonequilibrium integrators for free energy calculations or [nonequilibrium candidate Monte Carlo (NCMC)](http://dx.doi.org/10.1073/pnas.1106094108)
- an extensible Markov chain Monte Carlo (MCMC) framework for molecular simulations
- enhanced sampling methods, including replica-exchange (REMD) and self-adjusted mixture sampling (SAMS)
- factories for generating [alchemically-modified](http://alchemistry.org) systems for absolute and relative free energy calculations
- a suite of test systems for benchmarking, validation, and debugging

## Markov chain Monte Carlo proposal schemes and move compositions
An implementation of an `MCMCMove` encodes how to propagate an OpenMM `System` to generate a new sample. Different `MCMCMove`s can be combined for more advanced schemes.
- `LangevinDynamicsMove`: Langevin dynamics segment as a (pseudo) Monte Carlo move (WARNING: Does not preserve the true target distribution.).
- `HMCMove`: Assigns velocities from the Maxwell-Boltzmann distribution and propagate through velocity Verlet steps.
- `GHMCMove`: Generalized hybrid Monte Carlo Markov chain Monte Carlo.
- `MonteCarloBarostatMove`: Attempts to update the box volume using Metropolis-Hastings Monte Carlo updates.
- `SequenceMove`: Combine multiple `MCMCMove`s to apply in sequence at each iteration.
- `WeightedMove`: At each iteration, select one `MCMCMove`s to apply from a set with given probability.
See the [documentation](http://openmmtools.readthedocs.io) at [ReadTheDocs](http://openmmtools.readthedocs.io).

## States
#### License

The module `openmmtools.states` contains classes to maintain a consistent state of the simulation.
- `ThermodynamicState`: Represent and manipulate the thermodynamic state of OpenMM `System`s and `Context`s.
- `SamplerState`: Represent and cache the state of the simulation that changes when the `System` is integrated.
- `CompoundThermodynamicState`: Extend the `ThermodynamicState` to handle parameters other than temperature and pressure through the implementations of the `IComposableState` abstract class.

## Cache

The module `openmmtools.cache` implements a shared LRU cache for `Context` objects that tries to minimize the number of `Context` in memory at the same time.
- `LRUCache`: A simple LRU cache with a dictionary-like interface. It supports a maximum capacity and expiration.
- `ContextCache`: A LRU cache for OpenMM `Context` objects.
- `global_context_cache`: A shared `ContextCache` that minimizes the number of `Context` creations when employing `MCMCMove`s.

## OpenMM testing scripts

`scripts/` contains a script that may be useful in testing your OpenMM installation is installed:

* `test-openmm-platforms` will test the various platforms available to OpenMM to ensure that all systems in `openmmtools.testsystems` give consistent potential energies.
If differences in energies in excess of `ENERGY_TOLERANCE` (default: 0.06 kcal/mol) are detected, these systems will be serialized to XML for further debugging.

This is installed onto the command line when the repository is installed.
OpenMMTools is distributed under the MIT License.
2 changes: 1 addition & 1 deletion devtools/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ test:

about:
home: https://github.com/choderalab/openmmtools
license: GNU Lesser General Public License v2 or later (LGPLv2+)
license: MIT License
177 changes: 10 additions & 167 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,177 +1,20 @@
# Makefile for Sphinx documentation
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
SPHINXPROJ = openmmtools
SOURCEDIR = .
BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif

# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext

# Put it first so that "make" without argument is like "make help".
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."

singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."

pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."

json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."

htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."

qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pymbar.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pymbar.qhc"

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/pymbar"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pymbar"
@echo "# devhelp"

epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."

latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."

latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."

text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."

man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."

texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."

info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."

gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."

changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."

linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."

doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: help Makefile

pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_static/images/logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/_static/openmm-testsystems-logo.jpg
Binary file not shown.
Binary file removed docs/_static/openmm-testsystems-logo.png
Binary file not shown.
26 changes: 26 additions & 0 deletions docs/alchemy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.. _alchemy::

Alchemical factories
====================

:mod:`openmmtools.alchemy` contains factories for generating `alchemically-modified <http://alchemistry.org>`_ versions of OpenMM `System <http://docs.openmm.org/7.1.0/api-python/generated/simtk.openmm.openmm.System.html>`_ objects for use in alchemical free energy calculations.

Absolute alchemical factories
-----------------------------

Absolute alchical factories modify the ``System`` object to allow part of the system to be alchemically annihilated or decoupled.
This is useful for computing free energies of transfer, solvation, or binding for small molecules.

.. currentmodule:: openmmtools.alchemy
.. autosummary::
:nosignatures:
:toctree: api/generated/

AlchemicalFunction
AlchemicalState
AlchemicalFactory

Relative alchemical factories
-----------------------------

Coming soon!
21 changes: 21 additions & 0 deletions docs/cache.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _cache::

Cache
=====

The module :mod:`openmmtools.cache` implements a shared LRU cache for OpenMM `Context <http://docs.openmm.org/7.1.0/api-python/generated/simtk.openmm.openmm.Context.html>`_ objects that tries to minimize the number of objects in memory at the same time.

- :class:`LRUCache`: A simple LRU cache with a dictionary-like interface. It supports a maximum capacity and expiration.
- :class:`ContextCache`: A LRU cache for OpenMM `Context <http://docs.openmm.org/7.1.0/api-python/generated/simtk.openmm.openmm.Context.html>`_ objects.
- ``global_context_cache``: A shared :class:`ContextCache` that minimizes the number of `Context <http://docs.openmm.org/7.1.0/api-python/generated/simtk.openmm.openmm.Context.html>`_ creations when employing :class:`MCMCMove`s.

Cache objects
-------------

.. currentmodule:: openmmtools.cache
.. autosummary::
:nosignatures:
:toctree: api/generated/

LRUCache
ContextCache
Loading