Skip to content

Commit

Permalink
Merge a05313d into 141ce35
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Aug 1, 2022
2 parents 141ce35 + a05313d commit 40b887b
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- --ignore-init-module-imports

- repo: https://github.com/asottile/pyupgrade
rev: v2.34.0
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand All @@ -46,11 +46,11 @@ repos:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 5.0.2
hooks:
- id: flake8

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.961
rev: v0.971
hooks:
- id: mypy
5 changes: 2 additions & 3 deletions pymatgen/analysis/diffusion/aimd/rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@

import numpy as np
from joblib import Parallel, delayed
from pymatgen.core import Structure
from pymatgen.util.plotting import pretty_plot
from scipy.ndimage import gaussian_filter1d
from scipy.signal import find_peaks
from scipy.stats import norm

from pymatgen.core import Structure
from pymatgen.util.plotting import pretty_plot


class RadialDistributionFunction:
"""
Expand Down
5 changes: 4 additions & 1 deletion pymatgen/analysis/diffusion/aimd/tests/test_pathway.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
from pymatgen.core import Structure
from pymatgen.io.vasp import Chgcar

from pymatgen.analysis.diffusion.aimd.pathway import ProbabilityDensityAnalysis, SiteOccupancyAnalyzer
from pymatgen.analysis.diffusion.aimd.pathway import (
ProbabilityDensityAnalysis,
SiteOccupancyAnalyzer,
)
from pymatgen.analysis.diffusion.analyzer import DiffusionAnalyzer

tests_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
6 changes: 5 additions & 1 deletion pymatgen/analysis/diffusion/aimd/tests/test_van_hove.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
import numpy as np
from monty.serialization import loadfn

from pymatgen.analysis.diffusion.aimd.van_hove import EvolutionAnalyzer, RadialDistributionFunction, VanHoveAnalysis
from pymatgen.analysis.diffusion.aimd.van_hove import (
EvolutionAnalyzer,
RadialDistributionFunction,
VanHoveAnalysis,
)

matplotlib.use("pdf")
tests_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
4 changes: 2 additions & 2 deletions pymatgen/analysis/diffusion/aimd/van_hove.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pds
from scipy.stats import norm

from pymatgen.core import Structure
from pymatgen.util.plotting import pretty_plot
from pymatgen.util.typing import ArrayLike
from scipy.stats import norm

from pymatgen.analysis.diffusion.analyzer import DiffusionAnalyzer

from .rdf import RadialDistributionFunction
Expand Down
5 changes: 4 additions & 1 deletion pymatgen/analysis/diffusion/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
import numpy as np
import scipy.constants as const
from monty.json import MSONable
from pymatgen.analysis.structure_matcher import OrderDisorderElementComparator, StructureMatcher
from pymatgen.analysis.structure_matcher import (
OrderDisorderElementComparator,
StructureMatcher,
)
from pymatgen.core.periodic_table import get_el_sp
from pymatgen.core.structure import Structure
from pymatgen.io.vasp.outputs import Vasprun
Expand Down
5 changes: 4 additions & 1 deletion pymatgen/analysis/diffusion/neb/full_path_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
from pymatgen.symmetry.structure import SymmetrizedStructure

from pymatgen.analysis.diffusion.neb.pathfinder import MigrationHop
from pymatgen.analysis.diffusion.neb.periodic_dijkstra import get_optimal_pathway_rev, periodic_dijkstra
from pymatgen.analysis.diffusion.neb.periodic_dijkstra import (
get_optimal_pathway_rev,
periodic_dijkstra,
)
from pymatgen.analysis.diffusion.utils.parse_entries import process_entries

logger = logging.getLogger(__name__)
Expand Down
5 changes: 4 additions & 1 deletion pymatgen/analysis/diffusion/neb/pathfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
# TODO: (1) ipython notebook example files, unittests
from pymatgen.symmetry.structure import SymmetrizedStructure

from pymatgen.analysis.diffusion.utils.supercells import get_sc_fromstruct, get_start_end_structures
from pymatgen.analysis.diffusion.utils.supercells import (
get_sc_fromstruct,
get_start_end_structures,
)

logger = logging.getLogger(__name__)

Expand Down
6 changes: 5 additions & 1 deletion pymatgen/analysis/diffusion/neb/tests/test_pathfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
from pymatgen.util.testing import PymatgenTest

from pymatgen.analysis.diffusion.neb.full_path_mapper import MigrationGraph
from pymatgen.analysis.diffusion.neb.pathfinder import DistinctPathFinder, IDPPSolver, MigrationHop
from pymatgen.analysis.diffusion.neb.pathfinder import (
DistinctPathFinder,
IDPPSolver,
MigrationHop,
)
from pymatgen.analysis.diffusion.utils.supercells import get_start_end_structures

__author__ = "Iek-Heng Chu"
Expand Down
6 changes: 5 additions & 1 deletion pymatgen/analysis/diffusion/tests/test_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
from pymatgen.core.structure import Structure
from pymatgen.util.testing import PymatgenTest

from pymatgen.analysis.diffusion.analyzer import DiffusionAnalyzer, fit_arrhenius, get_conversion_factor
from pymatgen.analysis.diffusion.analyzer import (
DiffusionAnalyzer,
fit_arrhenius,
get_conversion_factor,
)

module_dir = os.path.dirname(os.path.abspath(__file__))

Expand Down
9 changes: 7 additions & 2 deletions pymatgen/analysis/diffusion/utils/edge_data_from_sc.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@
from pymatgen.core.structure import PeriodicSite, Structure
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer

from pymatgen.analysis.diffusion.neb.full_path_mapper import MigrationGraph, MigrationHop
from pymatgen.analysis.diffusion.utils.parse_entries import get_matched_structure_mapping
from pymatgen.analysis.diffusion.neb.full_path_mapper import (
MigrationGraph,
MigrationHop,
)
from pymatgen.analysis.diffusion.utils.parse_entries import (
get_matched_structure_mapping,
)

logger = logging.getLogger(__name__)

Expand Down
4 changes: 3 additions & 1 deletion pymatgen/analysis/diffusion/utils/supercells.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
# from ase.build import find_optimal_cell_shape, get_deviation_from_optimal_cell_shape
# from pymatgen.io.ase import AseAtomsAdaptor
from pymatgen.core import PeriodicSite, Structure
from pymatgen.transformations.advanced_transformations import CubicSupercellTransformation
from pymatgen.transformations.advanced_transformations import (
CubicSupercellTransformation,
)

__author__ = "Jimmy Shen"
__copyright__ = "Copyright 2019, The Materials Project"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
from pymatgen.core.structure import PeriodicSite, Structure

from pymatgen.analysis.diffusion.neb.full_path_mapper import MigrationGraph
from pymatgen.analysis.diffusion.utils.edge_data_from_sc import add_edge_data_from_sc, get_uc_pos, get_unique_hop
from pymatgen.analysis.diffusion.utils.edge_data_from_sc import (
add_edge_data_from_sc,
get_uc_pos,
get_unique_hop,
)

test_dir = os.path.dirname(os.path.realpath(__file__))

Expand Down

0 comments on commit 40b887b

Please sign in to comment.