Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ celerybeat.pid

# Environments
.env
.venv
.venv*
env/
venv/
venv*/
ENV/
env.bak/
venv.bak/
Expand Down Expand Up @@ -189,6 +189,13 @@ cython_debug/
# tensorboard
*.pt.trace.json

# AI tools
.benchmarks/
.codegraph/
.pi/
.pi-subagents/
.scratch/

# data
./*.json
./*.csv
Expand Down
9 changes: 5 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
numpy<2
pydantic>=2.0.0
scipy
tad-dftd3==0.5.0
tad-dftd4==0.7.0
tad-mctc==0.5.3
tad-multicharge==0.3.3
tad-mctc==0.7.0
tad-dftd3==0.6.0
tad-multicharge==0.5.0
tad-dftd4==0.8.0
tad-libcint==0.3.0
tomli
tomli-w
torch>=2.10.0
Expand Down
2 changes: 1 addition & 1 deletion docs/source/02_indepth/calculators_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Types of Calculators
GFN2 Calculator <../_autosummary/dxtb.calculators.GFN2Calculator>

.. automodule:: dxtb._src.calculators.types
:members:
:no-index:
:undoc-members:
:show-inheritance:
10 changes: 1 addition & 9 deletions docs/source/02_indepth/integrals_drivers_libcint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,12 @@ Libcint
Drivers
-------

.. automodule:: dxtb._src.integral.driver.libcint.base_driver
:members:
:show-inheritance:

.. automodule:: dxtb._src.integral.driver.libcint.driver
:members:
:show-inheritance:

Implementations
----------------

.. automodule:: dxtb._src.integral.driver.libcint.base_implementation
:members:
:show-inheritance:
---------------

.. automodule:: dxtb._src.integral.driver.libcint.overlap
:members:
Expand Down
8 changes: 0 additions & 8 deletions docs/source/02_indepth/integrals_drivers_pytorch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,13 @@ PyTorch
Drivers
-------

.. automodule:: dxtb._src.integral.driver.pytorch.base_driver
:members:
:show-inheritance:

.. automodule:: dxtb._src.integral.driver.pytorch.driver
:members:
:show-inheritance:

Implementations
---------------

.. automodule:: dxtb._src.integral.driver.pytorch.base_implementation
:members:
:show-inheritance:

.. automodule:: dxtb._src.integral.driver.pytorch.overlap
:members:
:show-inheritance:
11 changes: 5 additions & 6 deletions docs/source/02_indepth/integrals_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ Integral Types
.. toctree::
:maxdepth: 1

HCore <../_autosummary/dxtb.integrals.types.HCore>
Overlap <../_autosummary/dxtb.integrals.types.Overlap>
Dipole <../_autosummary/dxtb.integrals.types.Dipole>
Quadrupole <../_autosummary/dxtb.integrals.types.Quadrupole>
Overlap <../_autosummary/dxtb.integrals.types.OverlapIntegral>
Dipole <../_autosummary/dxtb.integrals.types.DipoleIntegral>
Quadrupole <../_autosummary/dxtb.integrals.types.QuadrupoleIntegral>

.. automodule:: dxtb._src.integral.types.base
:members:
.. automodule:: dxtb._src.integral.types
:no-index:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/source/02_indepth/parametrizations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Parametrizations

BaseModel <parametrizations_base>
Components <parametrizations_components>
Param <../_autosummary/dxtb.Param>
Predefinded <parametrizations_predefined>

.. automodule:: dxtb._src.param
Expand Down
4 changes: 0 additions & 4 deletions docs/source/02_indepth/parametrizations_components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,3 @@ Misc
.. automodule:: dxtb._src.param.meta
:members:
:show-inheritance:

.. automodule:: dxtb._src.param.utils
:members:
:show-inheritance:
13 changes: 6 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,14 @@
extensions = [
"sphinx_design",
"sphinx_copybutton",
"sphinx_design",
"sphinx_togglebutton",
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx_autodoc_typehints", # after autodoc
"sphinx.ext.viewcode",
"sphinx.ext.mathjax",
"sphinx.ext.autosummary",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
]

html_theme = "sphinx_book_theme"
Expand Down Expand Up @@ -77,7 +75,7 @@
intersphinx_mapping = {
"numpy": ("https://numpy.org/doc/stable/", None),
"pandas": ("https://pandas.pydata.org/docs/", None),
"pydantic": ("https://docs.pydantic.dev/latest/", None),
"pydantic": ("https://pydantic.dev/docs/validation/latest/", None),
"python": ("https://docs.python.org/3", None),
"tad_dftd3": ("https://tad-dftd3.readthedocs.io/en/latest/", None),
"tad_dftd4": ("https://tad-dftd4.readthedocs.io/en/latest/", None),
Expand All @@ -87,16 +85,17 @@
"https://tad-multicharge.readthedocs.io/en/latest/",
None,
),
"torch": ("https://pytorch.org/docs/stable/", None),
"torch": ("https://docs.pytorch.org/docs/stable/", None),
}


# Configuration for sphinx-copybutton
copybutton_prompt_text = ">>> |... "
copybutton_prompt_is_regexp = True

napoleon_google_docstring = False
napoleon_use_param = False
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_use_param = True
napoleon_use_ivar = True
napoleon_use_rtype = True

Expand Down
2 changes: 1 addition & 1 deletion src/dxtb/_src/calculators/gfn1.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class GFN1Calculator(Calculator):
Calculator for the GFN1-xTB method.

This is a simple wrapper around the :class:`~dxtb.Calculator` class with
the :data:`GFN1-xTB <dxtb.GFN1_XTB>` parameters passed in as defaults.
the :data:`~dxtb.GFN1_XTB` parameters passed in as defaults.
"""

def __init__(
Expand Down
7 changes: 3 additions & 4 deletions src/dxtb/_src/calculators/gfn2.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@


class GFN2Calculator(Calculator):
"""
Calculator for the GFN2-xTB method.
"""Calculator for the GFN2-xTB method.

This is a simple wrapper around the :class:`dxtb.Calculator` class with the
:data:`GFN2-xTB <dxtb.GFN2_XTB>` parameters passed in as defaults.
This is a simple wrapper around the :class:`~dxtb.Calculator` class with the
:data:`~dxtb.GFN2_XTB` parameters passed in as defaults.
"""

def __init__(
Expand Down
10 changes: 5 additions & 5 deletions src/dxtb/_src/calculators/types/abc.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ def get_forces(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down
21 changes: 11 additions & 10 deletions src/dxtb/_src/calculators/types/analytical.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ def forces_analytical(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -242,11 +242,11 @@ def _forces_analytical(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -506,6 +506,7 @@ def dipole_analytical(
r"""
Analytically calculate the electric dipole moment :math:`\mu`.


.. math::

\mu = \dfrac{\partial E}{\partial F}
Expand Down
71 changes: 36 additions & 35 deletions src/dxtb/_src/calculators/types/autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class AutogradCalculator(EnergyCalculator):
This class provides properties via automatic differentiation.
"""

# Names of implemented methods of the Calculator.
implemented_properties = EnergyCalculator.implemented_properties + [
"forces",
"hessian",
Expand Down Expand Up @@ -100,11 +101,11 @@ def forces(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -353,11 +354,11 @@ def vibration(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -421,11 +422,11 @@ def dipole(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -496,11 +497,11 @@ def dipole_deriv(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -578,11 +579,11 @@ def polarizability(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -686,11 +687,11 @@ def pol_deriv(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down Expand Up @@ -779,11 +780,11 @@ def hyperpolarizability(
:mod:`torch.func`'s function transforms (e.g.,
:func:`torch.func.jacrev`).

Note
----
Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole derivatives
cannot be both calculated with functorch.
.. note::

Using :mod:`torch.func`'s function transforms can apparently be only
used once. Hence, for example, the Hessian and the dipole
derivatives cannot be both calculated with functorch.

Parameters
----------
Expand Down
2 changes: 2 additions & 0 deletions src/dxtb/_src/calculators/types/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,12 +489,14 @@ def __init__(
inferred.
kwargs : Any
Additional keyword arguments.

- ``auto_int_level``: Automatically set the integral level based on
the parametrization. Defaults to ``True``. This should only be
turned off for testing purposes.
- ``timer``: Enable the timer. Defaults to ``False``. The global
timer can also be enabled by setting the environment variable
``DXTB_TIMER`` to ``1``.

"""
if not timer.enabled and kwargs.pop("timer", False):
timer.enable()
Expand Down
Loading
Loading