chore: switches from black and isort to ruff

This commit is contained in:
2026-02-26 17:40:26 -03:00
parent d89124b1e8
commit 5d76e49f89
20 changed files with 286 additions and 77 deletions

View File

@@ -2,6 +2,7 @@ from __future__ import annotations
from typing_extensions import TYPE_CHECKING
if TYPE_CHECKING:
from nptyping import Float, NDArray, Shape
@@ -319,7 +320,7 @@ class Molecule:
self.com[0], self.com[1], self.com[2]
)
)
inertia = self.inertia_tensor()
self.inertia_tensor()
evals, evecs = self.principal_axes()
logger.info(

View File

@@ -1,11 +1,10 @@
from diceplayer import logger
from diceplayer.shared.environment.molecule import Molecule
from diceplayer.shared.utils.misc import BOHR2ANG
from diceplayer.shared.utils.ptable import atomsymb
import numpy as np
from numpy import linalg
from typing_extensions import List, TextIO, Tuple
from typing_extensions import List, Tuple
import math
from copy import deepcopy
@@ -92,8 +91,10 @@ class System:
try:
evals, evecs = linalg.eigh(rr)
except:
raise RuntimeError("Error: diagonalization of RR matrix did not converge")
except Exception as err:
raise RuntimeError(
"Error: diagonalization of RR matrix did not converge"
) from err
a1 = evecs[:, 2].T
a2 = evecs[:, 1].T