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

Switch docs theme #4276

Merged
merged 31 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
b52e24d
switch theme
lilyminium Sep 2, 2023
948cee2
reformat bibliography to footbibliograpy for rendering
lilyminium Sep 2, 2023
105dfa5
change bib styling to footbib
lilyminium Sep 2, 2023
46fb6c8
remove indentation blockquote from bat analysis
lilyminium Sep 2, 2023
2e1609a
fixed maths and variable formatting
lilyminium Sep 2, 2023
3b128c7
fix output formatting
lilyminium Sep 2, 2023
08b9a3d
fix formatting
lilyminium Sep 2, 2023
43458b6
fix docs bib...
lilyminium Sep 2, 2023
f1425ea
fix list formatting
lilyminium Sep 2, 2023
0ad0414
add docs for functions and classes
lilyminium Sep 2, 2023
4bed9f6
mass change all bibliograhpies to local
lilyminium Sep 2, 2023
3228103
fix formatting in warning
lilyminium Sep 2, 2023
9f9b07f
remove extra ::
lilyminium Sep 2, 2023
2de8d29
add dlpoly classes to docs
lilyminium Sep 2, 2023
8794df9
fix itp docs formatting
lilyminium Sep 2, 2023
c08aa72
fix class reference
lilyminium Sep 2, 2023
8c728a4
fix docs
lilyminium Sep 2, 2023
430e23d
fix indent
lilyminium Sep 2, 2023
39a8006
fix more indent
lilyminium Sep 2, 2023
02104ef
more indent
lilyminium Sep 2, 2023
938e134
fix all the indents
lilyminium Sep 2, 2023
cdb9ebb
fix code formatting
lilyminium Sep 2, 2023
629482a
fix seealso formatting
lilyminium Sep 2, 2023
dfdc31e
unindent
lilyminium Sep 2, 2023
37ceafe
fix indent and deprecation warnings
lilyminium Sep 2, 2023
00057de
fix formatting
lilyminium Sep 2, 2023
0bdf2ad
add deps
lilyminium Sep 3, 2023
49ca33a
rm logos for now
lilyminium Sep 4, 2023
7664d4c
rm dep pins
lilyminium Sep 4, 2023
7ccfaf4
lower pin rtd theme
lilyminium Sep 4, 2023
a48a41c
wait for 1.0.1...
lilyminium Sep 4, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
with:
micromamba: true
full-deps: true
extra-pip-deps: "docutils<0.18 sphinx<7.0 sphinx-sitemap sphinx_rtd_theme msmb_theme==1.2.0 sphinxcontrib-bibtex pybtex pybtex-docutils"
extra-pip-deps: "docutils sphinx<7 sphinx-sitemap mdanalysis-sphinx-theme>=1.0.1 sphinxcontrib-bibtex pybtex pybtex-docutils"

- name: build_srcs
uses: ./.github/actions/build-src
Expand Down
7 changes: 3 additions & 4 deletions maintainer/conda/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ dependencies:
- chemfiles>=0.10
- codecov
- cython
- docutils <0.18
- docutils
- fasteners
- griddataformats
- gsd
- h5py>=2.10
- hypothesis
- joblib>=0.12
- mdanalysis-sphinx-theme >=1.0.1
- matplotlib>=3.2.2
- mmtf-python
- mock
Expand All @@ -28,11 +29,9 @@ dependencies:
- tidynamics>=1.0.0
- tqdm>=4.43.0
- sphinxcontrib-bibtex
- sphinx_rtd_theme
- pip:
- duecredit
- parmed
- msmb_theme==1.2.0
- sphinx-sitemap==1.0.2
- sphinx-sitemap
- packaging
- pyedr>=0.7.0
16 changes: 5 additions & 11 deletions package/MDAnalysis/analysis/bat.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@

This module contains classes for interconverting between Cartesian and an
internal coordinate system, Bond-Angle-Torsion (BAT) coordinates
:cite:p:`Chang2003`, for a given set of atoms or residues. This coordinate
:footcite:p:`Chang2003`, for a given set of atoms or residues. This coordinate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we document how we do citations anywhere in our docs? We probably should tell folks that cite -> footcite now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any peculiarities to footbibliography that should be stated somewhere? (I don't know how/if it differs from the old approach)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ticked :)

I don't think so, no more than bibliography is. The footbib is used for local bibliographies (on the same page as the reference), so we can remove stuff like the a- and b- prefixes we had before. The normal bibliography is for global bibliographies, so one reference list for the entire repo. This is all readily available on the sphinx bibtex extension docs though. I was planning to add in some notes in the mdanalysis-sphinx-theme -- MDAnalysis/mdanalysis-sphinx-theme#26

The one catch is that there's meant to be one footbib per reference per page, so if footbibliographies are created multiple times for the same reference, then only the first one will ahve the reference and all links will go there. Again I got this from the official docs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you maybe raise an issue in the userguide for docs on this? This is the kind of info any contributor new or old should be told to look at so imho, even if it's just a reference to the theme docs, your above explanation should exist there in some way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done

system is designed to be complete, non-redundant, and minimize correlations
between degrees of freedom. Complete and non-redundant means that for N atoms
there will be 3N Cartesian coordinates and 3N BAT coordinates. Correlations are
minimized by using improper torsions, as described in :cite:p:`Hikiri2016`.
minimized by using improper torsions, as described in :footcite:p:`Hikiri2016`.

More specifically, bond refers to the bond length, or distance between
a pair of bonded atoms. Angle refers to the bond angle, the angle between
Expand All @@ -56,7 +56,7 @@
:math:`\phi`, and azimuthal angle, :math:`\theta`. :math:`\omega` is a third angle
that describes the rotation of the third atom about the axis.

This module was adapted from AlGDock :cite:p:`Minh2020`.
This module was adapted from AlGDock :footcite:p:`Minh2020`.


See Also
Expand Down Expand Up @@ -129,7 +129,7 @@ class to calculate dihedral angles for a given set of atoms or residues

Analysis classes
----------------
.. autoclass:: BAT
.. autoclass:: BAT
:members:
:inherited-members:

Expand All @@ -154,13 +154,7 @@ class to calculate dihedral angles for a given set of atoms or residues
References
----------

.. bibliography::
:filter: False
:style: MDA

Chang2003
Hikiri2016
Minh2020
.. footbibliography::

"""
import logging
Expand Down
27 changes: 7 additions & 20 deletions package/MDAnalysis/analysis/contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@

Analyze a single DIMS transition of AdK between its closed and open
conformation and plot the trajectory projected on q1-q2
:cite:p:`Franklin2007` ::
:footcite:p:`Franklin2007` ::


import MDAnalysis as mda
Expand All @@ -134,7 +134,7 @@
f.show()

Compare the resulting pathway to the `MinActionPath result for AdK`_
:cite:p:`Franklin2007`.
:footcite:p:`Franklin2007`.

.. _MinActionPath result for AdK:
http://lorentz.dynstr.pasteur.fr/joel/adenylate.php
Expand Down Expand Up @@ -204,6 +204,9 @@ def is_any_closer(r, r0, dist=2.5):
.. autoclass:: Contacts
:members:

.. rubric:: References
.. footbibliography::

"""
import os
import errno
Expand All @@ -228,7 +231,7 @@ def is_any_closer(r, r0, dist=2.5):
def soft_cut_q(r, r0, beta=5.0, lambda_constant=1.8):
r"""Calculate fraction of native contacts *Q* for a soft cut off

The native contact function is defined as :cite:p:`Best2013`
The native contact function is defined as :footcite:p:`Best2013`

.. math::

Expand All @@ -254,14 +257,6 @@ def soft_cut_q(r, r0, beta=5.0, lambda_constant=1.8):
-------
Q : float
fraction of native contacts

References
----------
.. bibliography::
:filter: False
:style: MDA

Best2013
"""
r = np.asarray(r)
r0 = np.asarray(r0)
Expand Down Expand Up @@ -313,14 +308,6 @@ def radius_cut_q(r, r0, radius):
Q : float
fraction of contacts

References
----------
.. bibliography::
:filter: False
:style: MDA

Franklin2007

"""
return hard_cut_q(r, radius)

Expand Down Expand Up @@ -521,7 +508,7 @@ def q1q2(u, select='all', radius=4.5):
"""Perform a q1-q2 analysis.

Compares native contacts between the starting structure and final structure
of a trajectory :cite:p:`Franklin2007`.
of a trajectory :footcite:p:`Franklin2007`.

Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions package/MDAnalysis/analysis/data/filenames.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
Reference Ramachandran histogram for
:class:`MDAnalysis.analysis.dihedrals.Ramachandran`. The data were
calculated on a data set of 500 PDB structures taken from
:cite:p:`Lovell2003`. This is a numpy array in the :math:`\phi` and
:footcite:p:`Lovell2003`. This is a numpy array in the :math:`\phi` and
:math:`\psi` backbone dihedral angles.

Load and plot it with ::
Expand Down Expand Up @@ -71,7 +71,7 @@

Reference Janin histogram for :class:`MDAnalysis.analysis.dihedrals.Janin`.
The data were calculated on a data set of 500 PDB structures taken from
:cite:p:`Lovell2003`. This is a numpy array in the :math:`\chi_1` and
:footcite:p:`Lovell2003`. This is a numpy array in the :math:`\chi_1` and
:math:`\chi_2` sidechain dihedral angles.

Load and plot it with ::
Expand Down
26 changes: 9 additions & 17 deletions package/MDAnalysis/analysis/diffusionmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
reduction.

More details about diffusion maps are in
:cite:p:`deLaPorte2008,Coifman-Lafon,Ferguson2011,Clementi2011`.
:footcite:p:`deLaPorte2008,Coifman-Lafon,Ferguson2011,Clementi2011`.

.. _Diffusion-Map-tutorial:

Expand All @@ -63,15 +63,15 @@
from MDAnalysis.tests.datafiles import PSF, DCD

Given a universe or atom group, we can create and eigenvalue decompose
the Diffusion Matrix from that trajectory using :class:`DiffusionMap`:: and get
the Diffusion Matrix from that trajectory using :class:`DiffusionMap` and get
the corresponding eigenvalues and eigenvectors.

.. code-block:: python

u = mda.Universe(PSF,DCD)

We leave determination of the appropriate scale parameter epsilon to the user,
:cite:p:`Clementi2011` uses a complex method involving the k-nearest-neighbors
:footcite:p:`Clementi2011` uses a complex method involving the k-nearest-neighbors
of a trajectory frame, whereas others simple use a trial-and-error approach
with a constant epsilon. Currently, the constant epsilon method is implemented
by MDAnalysis.
Expand Down Expand Up @@ -124,24 +124,16 @@
----------

If you use this Dimension Reduction method in a publication, please
cite :cite:p:`Coifman-Lafon`.
cite :footcite:p:`Coifman-Lafon`.

If you choose the default metric, this module uses the fast QCP algorithm
:cite:p:`Theobald2005` to calculate the root mean square distance (RMSD)
:footcite:p:`Theobald2005` to calculate the root mean square distance (RMSD)
between two coordinate sets (as implemented in
:func:`MDAnalysis.lib.qcprot.CalcRMSDRotationalMatrix`). When using this
module in published work please :cite:p:`Theobald2005`.
module in published work please :footcite:p:`Theobald2005`.


.. bibliography::
:filter: False
:style: MDA

Coifman-Lafon
deLaPorte2008
Clementi2011
Ferguson2011
Theobald2005
.. footbibliography::
"""
import logging
import warnings
Expand Down Expand Up @@ -329,7 +321,7 @@ def __init__(self, u, epsilon=1, **kwargs):
epsilon : Float
Specifies the method used for the choice of scale parameter in the
diffusion map. More information in
:cite:p:`Coifman-Lafon,Ferguson2011,Clementi2011`, Default: 1.
:footcite:p:`Coifman-Lafon,Ferguson2011,Clementi2011`, Default: 1.
**kwargs
Parameters to be passed for the initialization of a
:class:`DistanceMatrix`.
Expand Down Expand Up @@ -395,7 +387,7 @@ def transform(self, n_eigenvectors, time):
Return
------
diffusion_space : array (n_frames, n_eigenvectors)
The diffusion map embedding as defined by :cite:p:`Ferguson2011`.
The diffusion map embedding as defined by :footcite:p:`Ferguson2011`.
"""
return (self._eigenvectors[1:n_eigenvectors+1,].T *
(self.eigenvalues[1:n_eigenvectors+1]**time))
19 changes: 6 additions & 13 deletions package/MDAnalysis/analysis/dihedrals.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
~~~~~~~~~~~~~~~~~~~~~

The :class:`~MDAnalysis.analysis.dihedrals.Ramachandran` class allows for the
quick calculation of classical Ramachandran plots :cite:p:`Ramachandran1963` in
quick calculation of classical Ramachandran plots :footcite:p:`Ramachandran1963` in
the backbone :math:`phi` and :math:`psi` angles. Unlike the
:class:`~MDanalysis.analysis.dihedrals.Dihedral` class which takes a list of
`atomgroups`, this class only needs a list of residues or atoms from those
Expand Down Expand Up @@ -117,7 +117,7 @@
Janin analysis
~~~~~~~~~~~~~~

Janin plots :cite:p:`Janin1978` for side chain conformations (:math:`\chi_1`
Janin plots :footcite:p:`Janin1978` for side chain conformations (:math:`\chi_1`
and :math:`chi_2` angles) can be created with the
:class:`~MDAnalysis.analysis.dihedrals.Janin` class. It works in the same way,
only needing a list of residues; see the :ref:`Janin plot figure
Expand Down Expand Up @@ -158,12 +158,12 @@
(:data:`~MDAnalysis.analysis.data.filenames.Rama_ref`) and Janin reference data
(:data:`~MDAnalysis.analysis.data.filenames.Janin_ref`) were made using data
obtained from a large selection of 500 PDB files, and were analyzed using these
classes :cite:p:`Mull2018`. The allowed and marginally allowed regions of the
classes :footcite:p:`Mull2018`. The allowed and marginally allowed regions of the
Ramachandran reference plot have cutoffs set to include 90% and 99% of the data
points, and the Janin reference plot has cutoffs for 90% and 98% of the data
points. The list of PDB files used for the reference plots was taken from
:cite:p:`Lovell2003` and information about general Janin regions was taken from
:cite:p:`Janin1978`.
:footcite:p:`Lovell2003` and information about general Janin regions was taken from
:footcite:p:`Janin1978`.



Expand Down Expand Up @@ -236,14 +236,7 @@
References
----------

.. bibliography::
:filter: False
:style: MDA

Ramachandran1963
Janin1978
Lovell2003
Mull2018
.. footbibliography::

"""
import numpy as np
Expand Down
23 changes: 8 additions & 15 deletions package/MDAnalysis/analysis/encore/similarity.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
.. versionadded:: 0.16.0

The module contains implementations of similarity measures between protein
ensembles described in :cite:p:`b-LindorffLarsen2009`. The implementation and
examples are described in :cite:p:`b-Tiberti2015`.
ensembles described in :footcite:p:`LindorffLarsen2009`. The implementation and
examples are described in :footcite:p:`Tiberti2015`.

The module includes facilities for handling ensembles and trajectories through
the :class:`Universe` class, performing clustering or dimensionality reduction
Expand All @@ -52,18 +52,11 @@
+ **Clustering based convergence evaluation** : :func:`ces_convergence`
+ **Dimensionality-reduction based convergence evaluation** : :func:`dres_convergence`

When using this module in published work please cite :cite:p:`b-Tiberti2015`.
When using this module in published work please cite :footcite:p:`Tiberti2015`.

.. rubric:: References

.. bibliography::
:filter: False
:style: MDA
:keyprefix: b-
:labelprefix: ᵇ

Tiberti2015
LindorffLarsen2009
.. footbibliography::

.. _Examples:
Examples
Expand Down Expand Up @@ -256,7 +249,7 @@ def harmonic_ensemble_similarity(sigma1,
x2):
"""
Calculate the harmonic ensemble similarity measure
as defined in :cite:p:`b-Tiberti2015`.
as defined in :footcite:p:`Tiberti2015`.

Parameters
----------
Expand Down Expand Up @@ -729,7 +722,7 @@ def hes(ensembles,
r"""Calculates the Harmonic Ensemble Similarity (HES) between ensembles.

The HES is calculated with the symmetrized version of Kullback-Leibler
divergence as described in :cite:p:`b-Tiberti2015`.
divergence as described in :footcite:p:`Tiberti2015`.

Parameters
----------
Expand Down Expand Up @@ -972,7 +965,7 @@ def ces(ensembles,

Calculates the Clustering Ensemble Similarity (CES) between ensembles
using the Jensen-Shannon divergence as described in
:cite:p:`b-Tiberti2015`.
:footcite:p:`Tiberti2015`.

Parameters
----------
Expand Down Expand Up @@ -1240,7 +1233,7 @@ def dres(ensembles,

Calculates the Dimensional Reduction Ensemble Similarity (DRES) between
ensembles using the Jensen-Shannon divergence as described in
:cite:p:`b-Tiberti2015`.
:footcite:p:`Tiberti2015`.


Parameters
Expand Down
10 changes: 3 additions & 7 deletions package/MDAnalysis/analysis/gnm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@


Analyse a trajectory using elastic network models, following the approach of
:cite:p:`Hall2007`.
:footcite:p:`Hall2007`.

An example is provided in the MDAnalysis Cookbook_, listed as GNMExample_.

Expand All @@ -58,15 +58,11 @@


The results are found in :attr:`GNMAnalysis.results`, which can be
used for further processing (see :cite:p:`Hall2007`).
used for further processing (see :footcite:p:`Hall2007`).

.. rubric:: References

.. bibliography::
:filter: False
:style: MDA

Hall2007
.. footbibliography::


Analysis tasks
Expand Down
Loading
Loading