Skip to content

Commit

Permalink
Fix documentation (#463)
Browse files Browse the repository at this point in the history
* remove special character for now.
* Improve the output by using napoleon
* trying to tweak the appearance of multilevel dicts.
* Adding more information for release.
  • Loading branch information
mrshirts committed Jul 20, 2022
1 parent 23ee60b commit 58fe32b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
4 changes: 4 additions & 0 deletions docs/fes_with_pymbar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ The method `get_fes` return values of the free energy surface at the
specified coordinates, and when available, returns the uncertainties
in the values as well.

Examples `parallel-tempering-2d` and `umbrella-sampling` have been
rewnamed `parallel-tempering-2dfes and `umbrella-sampling` and
rewritten to demonstrate the new functionality.

.. autoclass:: pymbar.FES
:members:
36 changes: 26 additions & 10 deletions docs/moving_from_pymbar3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ would load in data and calculate free energies, instead of being
:caption: Example of initializing ``MBAR`` in 3.0.5
mbar = MBAR(u_kn, N_k)
results, errors = mbar.getFreeEnergyDifferences()
print(results[0])
print(errors[0])
results, errors = mbar.getFreeEnergyDifferences()
print(results[0])
print(errors[0])
Would now be written as:
Expand All @@ -89,15 +89,15 @@ documentations for these return patterns.

.. code-block:: python
results = bar(w_F, w_R)
results = bar(w_F, w_R)
print(f'Free energy difference is {results['Delta_f']:.3f} +- {results['Delta_f']:.3f} kT')
and:
.. code-block:: python
results = exp(w_F)
results = exp(w_F)
print(f"Forward free energy difference is {results['Delta_f']:.3f} +- {results['dDelta_f']:.3f} kT)
results = exp(w_R)
print(f"Reverse free energy difference is {results['Delta_f']:.3f} +- {results['dDelta_f']:.3f} kT)
Expand Down Expand Up @@ -125,9 +125,9 @@ that previously was set to standard out. Note that for a given method
to produce extensive information, even with logging, the verbose flag
still needs to be set to true.

---------------------
--------------------
Free energy surfaces
---------------------
--------------------

Previously, ``pymbar`` had a method ``PMF`` that estimated a free
energy from a series of umbrella samples using a histogram
Expand All @@ -152,7 +152,7 @@ calculation of biasing weights associated with umbrella samples, and
the estimation of the free energy surface.

For more information on the options for computing free energy surfaces
with the code, please see: :ref:`fes_with_pymbar`.
with the code, please see: :ref:`fes_with_pymbar`.

------------
Acceleration
Expand All @@ -165,4 +165,20 @@ approximately a 2x speed up when performed on most CPUs, and
additional acceleration when a GPU can be detected (pymbar does not
install the appropriate GPU libraries). ``jax`` will be installed when
``pymbar`` in installed via conda, but ``pymbar`` will function with
or without ``jax`` installed.
or without ``jax`` installed if there are issues with the JAX configuration.

-------------
Other changes
-------------

Additional changes not affecting the API:
* Removed legacy `old_mbar.py` support.
* Moved testing framework to pytest, added significant numbers of tests.
* Improved code linting using `black`l
* Bootstrapping for errors in free energies and expectations is now supported; see :ref:`strategies_for_solution` for more information.
* Added a `bar_overlap` function to find overlap when using just `bar`
* Fixed an error in computing expectations of small numbers.
* Improved automated adaptive choice of samplers; see :ref:`strategies_for_solution` for more information.
* Many instances of code cleanup.
* Improved docstring documentation.

1 change: 0 additions & 1 deletion docs/strategies_for_solution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ The solutions for bootstrapped data should be relatively close to the
solutions for the original data set; additionally, they do not need to
be quite as accurate, since they are used to compute the variances.


Bootstrapped uncertainties (using ``uncertainty_method=bootstrap`` is
also available for all functions calculating expectations, but again
requires initialization with "n_bootstraps" when initalizing the MBAR
Expand Down

0 comments on commit 58fe32b

Please sign in to comment.