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 Jun 6, 2022
1 parent 9ffae0a commit 5f38b8e
Show file tree
Hide file tree
Showing 17 changed files with 57 additions and 25 deletions.
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
1 change: 0 additions & 1 deletion pymatgen/analysis/diffusion/aimd/tests/test_rdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def test_rdf(self):
structure_list.append(s)
if i == 9:
break
species = ["Na", "P", "S"]

# Test from_species
obj = RadialDistributionFunctionFast(structures=structure_list, ngrid=101, rmax=10.0, sigma=0.1)
Expand Down
7 changes: 5 additions & 2 deletions pymatgen/analysis/diffusion/aimd/tests/test_van_hove.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +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.analyzer import DiffusionAnalyzer
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
2 changes: 1 addition & 1 deletion requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ flake8
pylint
black
treon==0.1.3
maggma==0.39.1
maggma==0.39.1
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pymatgen==2022.5.19
joblib==1.1.0
ase==3.22.1
ase==3.22.1
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Copyright (c) Materials Virtual Lab
# Distributed under the terms of the Modified BSD License.

from setuptools import setup, find_namespace_packages

import os

from setuptools import find_namespace_packages, setup

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

with open(os.path.join(SETUP_PTH, "README.rst")) as f:
Expand Down
6 changes: 3 additions & 3 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"""


import glob
import datetime
import re
import glob
import json
import requests
import os
import re

import requests
from invoke import task
from monty.os import cd

Expand Down

0 comments on commit 5f38b8e

Please sign in to comment.