From d0eb339067294e9124095d3ea99846944abe4b02 Mon Sep 17 00:00:00 2001 From: Hatem Helal Date: Fri, 3 May 2024 11:45:08 +0000 Subject: [PATCH] use raw string for math in docstrings --- mess/orthnorm.py | 8 ++++---- mess/structure.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mess/orthnorm.py b/mess/orthnorm.py index f813edd..c625d6e 100644 --- a/mess/orthnorm.py +++ b/mess/orthnorm.py @@ -1,5 +1,5 @@ # Copyright (c) 2024 Graphcore Ltd. All rights reserved. -"""Orthonormal transformation. +r"""Orthonormal transformation. Evaluates the transformation matrix :math:`X` that satisfies @@ -18,7 +18,7 @@ def canonical(S: FloatNxN) -> FloatNxN: - """Canonical orthonormal transformation + r"""Canonical orthonormal transformation .. math:: \mathbf{X} = \mathbf{U} \mathbf{s}^{-1/2} @@ -37,7 +37,7 @@ def canonical(S: FloatNxN) -> FloatNxN: def symmetric(S: FloatNxN) -> FloatNxN: - """Symmetric orthonormal transformation + r"""Symmetric orthonormal transformation .. math:: \mathbf{X} = \mathbf{U} \mathbf{s}^{-1/2} \mathbf{U}^T @@ -56,7 +56,7 @@ def symmetric(S: FloatNxN) -> FloatNxN: def cholesky(S: FloatNxN) -> FloatNxN: - """Cholesky orthonormal transformation + r"""Cholesky orthonormal transformation .. math:: \mathbf{X} = (\mathbf{L}^{-1})^T diff --git a/mess/structure.py b/mess/structure.py index 0d1b0db..f6aef36 100644 --- a/mess/structure.py +++ b/mess/structure.py @@ -83,7 +83,7 @@ def molecule(name: str) -> Structure: def nuclear_energy(structure: Structure) -> float: - """Nuclear electrostatic interaction energy + r"""Nuclear electrostatic interaction energy Evaluated by taking sum over all unique pairs of atom centers: