Skip to content

Commit

Permalink
update api doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fishjojo committed Apr 27, 2024
1 parent a524557 commit 228c14b
Show file tree
Hide file tree
Showing 23 changed files with 332 additions and 24 deletions.
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ipython
jinja2
sphinx
numpydoc
sphinx_copybutton
Expand Down
3 changes: 2 additions & 1 deletion doc/scripts/gendoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PYSCFAD_PATH=$(python -c "import pyscfad; print(pyscfad.__path__[0])")
# Run sphinx
DESTINATION=source/api_reference/apidoc
LOGFILE=_api_docs.log
TEMPLATEDIR=source/_templates

mkdir -p $DESTINATION
sphinx-apidoc -d 1 -T -e -f -o $DESTINATION $PYSCFAD_PATH "test" > ${LOGFILE}
sphinx-apidoc -d 1 -T -e -f -t $TEMPLATEDIR -o $DESTINATION $PYSCFAD_PATH "test" > ${LOGFILE}
28 changes: 28 additions & 0 deletions doc/source/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{ fullname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}
:show-inheritance:

{% block attributes %}
{% if attributes %}

{% endif %}
{% endblock %}

{% block methods %}
{% if methods %}
.. rubric:: {{ _('Methods') }}

.. autosummary::
:toctree: methods/

{% for item in methods %}
{% if item not in inherited_members and (not item.startswith('_') or item in ['__call__']) %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}

{% endif %}
{% endblock %}
64 changes: 64 additions & 0 deletions doc/source/_templates/autosummary/module.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{{ fullname | escape | underline}}

.. automodule:: {{ fullname }}

{% block attributes %}
{% if attributes %}

{% endif %}
{% endblock %}

{% block classes %}
{% if classes %}
.. rubric:: {{ _('Classes') }}

.. autosummary::
:toctree: classes/

{% for item in classes %}
{{ item }}
{%- endfor %}

{% endif %}
{% endblock %}

{% block functions %}
{% if functions %}
.. rubric:: {{ _('Functions') }}

.. autosummary::
:toctree: functions/

{% for item in functions %}
{{ item }}
{%- endfor %}

{% endif %}
{% endblock %}


{% block exceptions %}
{% if exceptions %}
.. rubric:: {{ _('Exceptions') }}

.. autosummary::
{% for item in exceptions %}
{{ item }}
{%- endfor %}
{% endif %}
{% endblock %}

{% block modules %}
{% if modules %}
.. rubric:: Modules

.. autosummary::
:toctree:
:recursive:
{% for item in modules %}
{% if not 'test' in item %}
{{ item }}
{% endif %}
{%- endfor %}
{% endif %}
{% endblock %}
13 changes: 13 additions & 0 deletions doc/source/api_reference/ao2mo.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _ao2mo:

======================
Orbital transformation
======================

The :mod:`pyscfad.ao2mo` subpackage defines the orbital transformation methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.ao2mo
13 changes: 13 additions & 0 deletions doc/source/api_reference/cc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _cc:

=======================
Coupled cluster methods
=======================

The :mod:`pyscfad.cc` subpackage defines the coupled cluster methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.cc
13 changes: 13 additions & 0 deletions doc/source/api_reference/df.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _scf:

===============
Density fitting
===============

The :mod:`pyscfad.df` subpackage defines the density fitting methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.df
13 changes: 13 additions & 0 deletions doc/source/api_reference/dft.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _dft:

===========
DFT methods
===========

The :mod:`pyscfad.dft` subpackage defines the DFT methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.dft
13 changes: 13 additions & 0 deletions doc/source/api_reference/fci.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _fci:

=======
Full CI
=======

The :mod:`pyscfad.fci` subpackage defines the full CI methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.fci
13 changes: 13 additions & 0 deletions doc/source/api_reference/geomopt.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _geomopt:

=====================
Geometry optimization
=====================

The :mod:`pyscfad.geomopt` subpackage defines the geometry optimization methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.geomopt
14 changes: 14 additions & 0 deletions doc/source/api_reference/gto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _gto:

=====================
Molecular information
=====================

The :mod:`pyscfad.gto` subpackage defines the molecular information
and ERI methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.gto
13 changes: 13 additions & 0 deletions doc/source/api_reference/gw.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _gw:

==========
GW methods
==========

The :mod:`pyscfad.gw` subpackage defines the GW methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.gw
20 changes: 19 additions & 1 deletion doc/source/api_reference/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,26 @@
=============
API reference
=============
.. currentmodule:: pyscfad

This page gives an overview of all public pyscfad objects, functions and methods.
All classes and functions exposed in pyscfad.* namespace are public.

.. toctree::
:maxdepth: 1

apidoc/pyscfad
ao2mo
cc
df
dft
fci
geomopt
gto
gw
mp
pbc
prop
scf
tdscf
tools
util
13 changes: 13 additions & 0 deletions doc/source/api_reference/mp.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _mp:

===========
MP2 methods
===========

The :mod:`pyscfad.mp` subpackage defines the MP2 methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.mp
13 changes: 13 additions & 0 deletions doc/source/api_reference/pbc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _pbc:

==================
Methods for Solids
==================

The :mod:`pyscfad.pbc` subpackage defines the methods for solid calculations.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.pbc
13 changes: 13 additions & 0 deletions doc/source/api_reference/prop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _prop:

================
Property methods
================

The :mod:`pyscfad.prop` subpackage defines the property calculation methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.prop
13 changes: 13 additions & 0 deletions doc/source/api_reference/scf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _scf:

====================
Hartree-Fock methods
====================

The :mod:`pyscfad.scf` subpackage defines the Hartree-Fock methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.scf
13 changes: 13 additions & 0 deletions doc/source/api_reference/tdscf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _tdscf:

=============
TDSCF methods
=============

The :mod:`pyscfad.tdscf` subpackage defines the linear-response mean-field methods.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.tdscf
13 changes: 13 additions & 0 deletions doc/source/api_reference/tools.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _tools:

=====
Tools
=====

The :mod:`pyscfad.tools` subpackage provides useful tools.

.. autosummary::
:toctree: api/
:recursive:

pyscfad.tools
13 changes: 13 additions & 0 deletions doc/source/api_reference/util.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _util:

=================
Utility functions
=================
.. currentmodule:: pyscfad

The :mod:`pyscfad.util` module provides useful utility functions.

.. autosummary::
:toctree: api/

util.pytree_node
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def linkcode_resolve(domain, info) -> str | None:

return (
f"https://github.com/fishjojo/pyscfad/blob/"
f"v{pyscfad.__version__}/pyscfad/{fn}{linespec}"
f"doc/pyscfad/{fn}{linespec}" # direct to the doc branch for now
)

def rstjinja(app, docname, source) -> None:
Expand Down
Loading

0 comments on commit 228c14b

Please sign in to comment.