Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 18, 2024
1 parent 4b22cef commit 9ceca67
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions structuretoolkit/analyse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@

try:
from structuretoolkit.analyse.fitsnap import (
get_snap_descriptor_derivatives as get_snap_descriptor_derivatives_fitsnap,
get_ace_descriptor_derivatives as get_ace_descriptor_derivatives_fitsnap,
get_ace_descriptor_derivatives,
)
from structuretoolkit.analyse.fitsnap import (
get_ace_descriptor_derivatives as get_ace_descriptor_derivatives_fitsnap,
)
from structuretoolkit.analyse.fitsnap import (
get_snap_descriptor_derivatives as get_snap_descriptor_derivatives_fitsnap,
)
except ImportError:
pass

Expand Down
6 changes: 4 additions & 2 deletions structuretoolkit/analyse/fitsnap.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from ase.atoms import Atoms
from typing import Optional, Union
import random
from typing import Optional, Union

import numpy as np
from ase.atoms import Atoms
from fitsnap3lib.fitsnap import FitSnap

from structuretoolkit.analyse.snap import _get_lammps_compatible_cell


Expand Down
6 changes: 2 additions & 4 deletions tests/test_fitsnap.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ def setUpClass(cls):
cls.bzeroflag = False
cls.quadraticflag = False
cls.radelem = [4.0]
cls.type = ['Cu']
cls.type = ["Cu"]
cls.wj = [1.0]

def test_get_snap_descriptor_derivatives(self):
n_coeff = len(stk.analyse.get_snap_descriptor_names(
twojmax=self.twojmax
))
n_coeff = len(stk.analyse.get_snap_descriptor_names(twojmax=self.twojmax))
mat_a = get_snap_descriptor_derivatives(
structure=self.structure,
atom_types=self.type,
Expand Down

0 comments on commit 9ceca67

Please sign in to comment.