Skip to content

Commit bc1e7d5

Browse files
Merge pull request #42 from chrisjonesBSU/fix-rtd
Update doc strings and readthedocs build
2 parents 2ea798d + d5a6c48 commit bc1e7d5

File tree

14 files changed

+452
-360
lines changed

14 files changed

+452
-360
lines changed

.github/workflows/CI.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
run: python -m build && pip install dist/*.whl
4141

4242
- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
43-
run: python -m pytest -v --cov=msibi --cov-report=xml --cov-append --cov-config=setup.cfg --color yes --pyargs msibi
43+
run: python -m pytest -v --cov=msibi --cov-report=xml --cov-append --cov-config=setup.cfg --color yes --pyargs msibi
4444

4545
- name: Upload Coverage Report
4646
uses: codecov/codecov-action@v5
@@ -77,4 +77,4 @@ jobs:
7777
run: python -m build && pip install dist/*.whl
7878

7979
- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
80-
run: python -m pytest -v --color yes --pyargs msibi
80+
run: python -m pytest -v --color yes --pyargs msibi

.readthedocs.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
version: 2
2+
23
formats:
34
- htmlzip
4-
- pdf
5+
56
build:
6-
os: ubuntu-22.04
7+
os: ubuntu-24.04
78
tools:
8-
python: "mambaforge-4.10"
9+
python: "miniconda-latest"
910

1011
conda:
1112
environment: docs/environment-docs.yml
1213

1314
sphinx:
1415
builder: html
15-
configuration: docs/source/conf.py
16-
fail_on_warning: false
16+
configuration: docs/conf.py
17+
fail_on_warning: True
18+
19+
python:
20+
install:
21+
- method: pip
22+
path: .

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ AB_bond.save_potential("AB_bond.csv")
7979

8080
```python
8181
import hoomd
82-
from msibi import MSIBI, State, Pair, Bond, Angle
82+
from msibi import MSIBI, State, Pair, Bond, Angle
8383

8484
optimizer = MSIBI(
8585
nlist=hoomd.md.nlist.Cell,
@@ -99,18 +99,18 @@ optimizer.add_state(stateA)
9999
optimizer.add_state(stateB)
100100
optimizer.add_state(stateC)
101101

102-
# Add bond and set a harmonic force (e.g. fit to Boltzmann inverse of the distribtion)
102+
# Add bond and set a harmonic force (e.g. fit to Boltzmann inverse of the distribtion)
103103
bondAA = Bond(type1="A", type2="A", optimize=False)
104104
bondAA.set_harmonic(r0=1.4, k=800)
105105
optimize.add_force(bondAA)
106106

107-
# Add angle and load previously obtained table potential
107+
# Add angle and load previously obtained table potential
108108
angleAA = Angle(type1="A", type2="A", type3="A", optimize=False)
109109
angleAA.set_from_file("angleAA.csv")
110110
optimize.add_force(angleAA)
111111

112112
# Create a Pair instance to be optimized.
113-
pairAA = Pair(type1="A", type2="A", optimize=True, r_cut=3.0, nbins=100)
113+
pairAA = Pair(type1="A", type2="A", optimize=True, r_cut=3.0, nbins=100)
114114
# Call the set_lj() method to set an initial guess potential
115115
pairAA.set_lj(r_min=0.001, r_cut=3.0, epsilon=1.0, sigma=1.0)
116116
optimizer.add_force(pairAA)

docs/environment-docs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: msibi-docs
22
channels:
33
- conda-forge
44
dependencies:
5-
- sphinx==7.2.4
6-
- sphinx_rtd_theme==1.3.0
5+
- sphinx==8.2
6+
- sphinx_rtd_theme>=3.0
77
- freud >= 3.0
88
- gsd >= 3.0
99
- hoomd >= 4.0
1010
- python >= 3.10
1111
- pandas
12-
- numpy <= 2.0
12+
- numpy < 2.0
1313
- cmeutils >= 1.3
1414
- more-itertools

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"sphinx.ext.mathjax",
2222
]
2323
autodoc_mock_imports = []
24+
# Order class methods and properties as they appear in code
25+
autodoc_member_order = "bysource"
2426

2527
templates_path = ["_templates"]
2628
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

docs/source/examples.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.. _examples:
2+
============
3+
Examples
4+
============
5+
6+
Below are some examples of how to use the ``msibi`` API.
7+
8+
Example 1
9+
---------------------------------------
10+
Example 1 code
11+
12+
Example 2
13+
---------------------------------------
14+
Example 2 code

docs/source/index.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
MSIBI: Multi-state Iterative Boltzmann Inversion
22
=============================================================================================
33

4-
This is a python package that implements the MSIBI coarse-graining method for molecular dynamics.
4+
**MSIBI** is a Python package that implements the Multi-state Iterative Boltzmann Inversion (MS-IBI) method for coarse-graining in molecular dynamics.
5+
6+
This implementation provides an intuitive Python API for running iterative Boltzmann inversion (IBI) across multiple states (MS-IBI) or a single state. It is designed to make it easy to chain together multiple optimization runs—for example, you can first optimize a coarse-grained bond-stretching interaction, then hold it fixed while optimizing other interactions like bond bending or non-bonded pair potentials.
7+
8+
MSIBI uses the HOOMD-blue simulation engine under the hood for coarse-grained simulations; however, it does not require that the target (atomistic) simulations are also performed with HOOMD-blue. The resulting coarse-grained potentials are exported in a tabulated format compatible with other simulation engines such as LAMMPS and GROMACS.
59

610

711
Quick start
812
===========
913
.. toctree::
14+
:maxdepth: 1
15+
16+
examples
1017
installation
1118

1219

@@ -17,6 +24,8 @@ Resources
1724

1825
- `MSIBI paper <https://doi.org/10.1063/1.4880555>`_: Explanation of the MSIBI method.
1926

27+
- `HOOMD-Blue <https://hoomd-blue.readthedocs.io/en/latest/>`_: Python package used to perform molecular dynamics simulations on CPUs and GPUs.
28+
2029

2130
.. toctree::
2231
:maxdepth: 1
@@ -29,7 +38,7 @@ Resources
2938

3039
Citation
3140
========
32-
If you use msibi in your research, please cite the following paper:
41+
If you use the ``msibi`` python package in your research, please cite the following paper:
3342

3443
.. code-block:: bibtex
3544

docs/source/installation.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
Installation
33
============
44

5+
These examples use the `anaconda package manager <https://www.anaconda.com/download>`_.
6+
57
Install from anaconda (Coming Soon)
68
---------------------------------------
9+
710
msibi is available on `conda-forge <https://anaconda.org/conda-forge/msibi>`_
811
::
912

@@ -19,7 +22,7 @@ Install from source
1922
$ git clone git@github.com:mosdef-hub/msibi.git
2023
$ cd msibi
2124

22-
2. Set up and activate environment:
25+
2. Install dependency packages and msibi from source:
2326
::
2427

2528
$ mamba env create -f environment.yml
@@ -28,7 +31,9 @@ Install from source
2831

2932
.. note::
3033

31-
To install a GPU compatible version of HOOMD-blue in your msibi environment, you need to manually set the CUDA version **before installing msibi**.
34+
``msibi`` utilizes HOOMD-Blue under-the-hood to run query simulations. This means that you are able to leverage HOOMD-Blue's GPU capability
35+
in your optimiation runs if your HOOMD-Blue installation is compatible with GPUs.
36+
To install a GPU compatible version of HOOMD-Blue in your msibi environment, you need to manually set the CUDA version **before installing msibi**.
3237
This is to ensure that the HOOMD build pulled from conda-forge is compatible with your CUDA version.
3338
To set the CUDA version, run the following command before installing msibi::
3439

0 commit comments

Comments
 (0)