|
24 | 24 | import numpy as np |
25 | 25 | import scipy.constants as const |
26 | 26 | from monty.json import MSONable |
27 | | -from scipy.optimize import curve_fit |
28 | | - |
29 | 27 | from pymatgen.analysis.structure_matcher import OrderDisorderElementComparator, StructureMatcher |
30 | 28 | from pymatgen.core.periodic_table import get_el_sp |
31 | 29 | from pymatgen.core.structure import Structure |
32 | 30 | from pymatgen.io.vasp.outputs import Vasprun |
33 | 31 | from pymatgen.util.coord import pbc_diff |
34 | 32 | from pymatgen.util.plotting import pretty_plot |
| 33 | +from scipy.optimize import curve_fit |
35 | 34 |
|
36 | 35 | if TYPE_CHECKING: |
37 | 36 | from collections.abc import Generator, Sequence |
38 | 37 |
|
39 | 38 | from matplotlib.axes import Axes |
40 | | - |
41 | 39 | from pymatgen.util.typing import PathLike, SpeciesLike |
42 | 40 |
|
43 | 41 | __author__ = "Will Richards, Shyue Ping Ong" |
@@ -250,7 +248,7 @@ def __init__( |
250 | 248 | # drift corrected position |
251 | 249 | dc = self.disp - drift |
252 | 250 |
|
253 | | - nions, nsteps, dim = dc.shape |
| 251 | + _nions, nsteps, _dim = dc.shape |
254 | 252 |
|
255 | 253 | self.indices = indices |
256 | 254 |
|
@@ -404,7 +402,7 @@ def get_drift_corrected_structures( |
404 | 402 | coords = np.array(self.structure.cart_coords) |
405 | 403 | species = self.structure.species_and_occu |
406 | 404 | lattices = self.lattices |
407 | | - nsites, nsteps, dim = self.corrected_displacements.shape |
| 405 | + _nsites, nsteps, _dim = self.corrected_displacements.shape |
408 | 406 |
|
409 | 407 | for i in range(start or 0, stop or nsteps, step or 1): |
410 | 408 | latt = lattices[0] if len(lattices) == 1 else lattices[i] |
@@ -960,7 +958,7 @@ def weighted_lstsq(a: np.ndarray, b: np.ndarray) -> tuple: |
960 | 958 | # Get self diffusivity |
961 | 959 | a = np.ones((len(dt), 2)) |
962 | 960 | a[:, 0] = dt |
963 | | - (m, c), res, rank, s = weighted_lstsq(a, msd) |
| 961 | + (m, _c), res, _rank, _s = weighted_lstsq(a, msd) |
964 | 962 | # m shouldn't be negative |
965 | 963 | m = max(m, 1e-15) |
966 | 964 |
|
|
0 commit comments