From b6d6b2e23167fb2785c513f6483f2a9381169f52 Mon Sep 17 00:00:00 2001 From: stevetorr Date: Mon, 8 Mar 2021 16:09:54 -0500 Subject: [PATCH 1/5] Fixed all pymatgen import statements to be explicitly pathed --- atomate/feff/firetasks/tests/test_tasks.py | 2 +- atomate/feff/fireworks/tests/test_fireworks.py | 2 +- atomate/feff/workflows/tests/test_eels_workflows.py | 2 +- .../workflows/tests/test_exafs_scattering_paths.py | 2 +- atomate/feff/workflows/tests/test_xas_workflows.py | 2 +- atomate/lammps/firetasks/write_inputs.py | 2 +- atomate/utils/utils.py | 2 +- atomate/vasp/builders/boltztrap_materials.py | 2 +- atomate/vasp/builders/file_materials.py | 2 +- atomate/vasp/builders/materials_descriptor.py | 2 +- atomate/vasp/builders/materials_ehull.py | 3 ++- atomate/vasp/builders/tasks_materials.py | 2 +- atomate/vasp/firetasks/exchange.py | 2 +- atomate/vasp/firetasks/glue_tasks.py | 2 +- atomate/vasp/firetasks/parse_outputs.py | 2 +- atomate/vasp/firetasks/tests/test_exchange.py | 2 +- atomate/vasp/fireworks/core.py | 2 +- atomate/vasp/powerups.py | 2 +- atomate/vasp/submission_filter.py | 2 +- atomate/vasp/tests/test_setup.py | 2 +- atomate/vasp/workflows/base/ferroelectric.py | 2 +- .../vasp/workflows/tests/test_adsorbate_workflow.py | 2 +- .../vasp/workflows/tests/test_bulk_modulus_workflow.py | 2 +- atomate/vasp/workflows/tests/test_elastic_workflow.py | 2 +- atomate/vasp/workflows/tests/test_exchange_workflow.py | 2 +- .../workflows/tests/test_ferroelectric_workflow.py | 2 +- .../vasp/workflows/tests/test_magnetism_workflow.py | 2 +- atomate/vasp/workflows/tests/test_nmr.py | 2 +- dev_scripts/gibbs.py | 2 +- docs/_sources/customizing_workflows.rst.txt | 10 +++++----- docs/_sources/gibbs_workflow_tutorial.rst.txt | 4 ++-- docs/_sources/running_workflows.rst.txt | 2 +- docs_rst/customizing_workflows.rst | 10 +++++----- docs_rst/gibbs_workflow_tutorial.rst | 4 ++-- docs_rst/running_workflows.rst | 2 +- scripts/atwf | 3 ++- 36 files changed, 48 insertions(+), 46 deletions(-) diff --git a/atomate/feff/firetasks/tests/test_tasks.py b/atomate/feff/firetasks/tests/test_tasks.py index 0faaa7f1c..270ebfc83 100644 --- a/atomate/feff/firetasks/tests/test_tasks.py +++ b/atomate/feff/firetasks/tests/test_tasks.py @@ -6,7 +6,7 @@ import unittest from glob import glob -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.io.feff.sets import MPEXAFSSet from pymatgen.io.feff.inputs import Paths diff --git a/atomate/feff/fireworks/tests/test_fireworks.py b/atomate/feff/fireworks/tests/test_fireworks.py index 5e9956255..1796e3d6d 100644 --- a/atomate/feff/fireworks/tests/test_fireworks.py +++ b/atomate/feff/fireworks/tests/test_fireworks.py @@ -5,7 +5,7 @@ import shutil import unittest -from pymatgen import Structure +from pymatgen.core import Structure from atomate.feff.fireworks.core import EXAFSPathsFW from atomate.utils.testing import AtomateTest diff --git a/atomate/feff/workflows/tests/test_eels_workflows.py b/atomate/feff/workflows/tests/test_eels_workflows.py index 734c6bcbe..32c152266 100644 --- a/atomate/feff/workflows/tests/test_eels_workflows.py +++ b/atomate/feff/workflows/tests/test_eels_workflows.py @@ -4,7 +4,7 @@ import os import unittest -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.io.feff.inputs import Tags from fireworks.core.fworker import FWorker diff --git a/atomate/feff/workflows/tests/test_exafs_scattering_paths.py b/atomate/feff/workflows/tests/test_exafs_scattering_paths.py index ad1504368..e21fd36fd 100644 --- a/atomate/feff/workflows/tests/test_exafs_scattering_paths.py +++ b/atomate/feff/workflows/tests/test_exafs_scattering_paths.py @@ -4,7 +4,7 @@ import os import unittest -from pymatgen import Structure +from pymatgen.core import Structure from atomate.feff.workflows.core import get_wf_exafs_paths diff --git a/atomate/feff/workflows/tests/test_xas_workflows.py b/atomate/feff/workflows/tests/test_xas_workflows.py index 55b14aab5..e9be4d113 100644 --- a/atomate/feff/workflows/tests/test_xas_workflows.py +++ b/atomate/feff/workflows/tests/test_xas_workflows.py @@ -6,7 +6,7 @@ import numpy as np -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.io.feff.inputs import Tags from fireworks.core.fworker import FWorker diff --git a/atomate/lammps/firetasks/write_inputs.py b/atomate/lammps/firetasks/write_inputs.py index ef126e961..f0ad8eb08 100644 --- a/atomate/lammps/firetasks/write_inputs.py +++ b/atomate/lammps/firetasks/write_inputs.py @@ -6,7 +6,7 @@ parameters file) """ -from pymatgen import Molecule +from pymatgen.core import Molecule # from pymatgen.io.lammps.data import LammpsData # from pymatgen.io.lammps.sets import LammpsInputSet diff --git a/atomate/utils/utils.py b/atomate/utils/utils.py index 27d8a4201..68635f5a3 100644 --- a/atomate/utils/utils.py +++ b/atomate/utils/utils.py @@ -11,7 +11,7 @@ from pymongo import MongoClient from monty.json import MontyDecoder from monty.serialization import loadfn -from pymatgen import Composition +from pymatgen.core import Composition from fireworks import Workflow from pymatgen.alchemy.materials import TransformedStructure diff --git a/atomate/vasp/builders/boltztrap_materials.py b/atomate/vasp/builders/boltztrap_materials.py index dccde456f..0b835c5fc 100644 --- a/atomate/vasp/builders/boltztrap_materials.py +++ b/atomate/vasp/builders/boltztrap_materials.py @@ -5,7 +5,7 @@ from atomate.utils.utils import get_logger , get_database -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.analysis.structure_matcher import StructureMatcher, ElementComparator from pymatgen.electronic_structure.boltztrap import BoltztrapAnalyzer diff --git a/atomate/vasp/builders/file_materials.py b/atomate/vasp/builders/file_materials.py index 57c21efef..92062f7b6 100644 --- a/atomate/vasp/builders/file_materials.py +++ b/atomate/vasp/builders/file_materials.py @@ -5,7 +5,7 @@ from atomate.utils.utils import get_database -from pymatgen import Composition +from pymatgen.core import Composition from atomate.vasp.builders.base import AbstractBuilder from atomate.utils.utils import get_logger diff --git a/atomate/vasp/builders/materials_descriptor.py b/atomate/vasp/builders/materials_descriptor.py index 9d41f6c4c..0784ba146 100644 --- a/atomate/vasp/builders/materials_descriptor.py +++ b/atomate/vasp/builders/materials_descriptor.py @@ -2,7 +2,7 @@ from atomate.utils.utils import get_database -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.analysis.structure_analyzer import get_dimensionality from atomate.utils.utils import get_logger diff --git a/atomate/vasp/builders/materials_ehull.py b/atomate/vasp/builders/materials_ehull.py index c6bd71bb1..f04ef4a58 100644 --- a/atomate/vasp/builders/materials_ehull.py +++ b/atomate/vasp/builders/materials_ehull.py @@ -5,7 +5,8 @@ from atomate.utils.utils import get_database -from pymatgen import MPRester, Structure +from pymatgen.ext.matproj import MPRester +from pymatgen.core import Structure from pymatgen.entries.computed_entries import ComputedEntry from atomate.utils.utils import get_logger diff --git a/atomate/vasp/builders/tasks_materials.py b/atomate/vasp/builders/tasks_materials.py index 866c5b3b0..2f2dd3541 100644 --- a/atomate/vasp/builders/tasks_materials.py +++ b/atomate/vasp/builders/tasks_materials.py @@ -12,7 +12,7 @@ from atomate.vasp.builders.utils import dbid_to_str, dbid_to_int from atomate.utils.utils import get_database from monty.serialization import loadfn -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.analysis.structure_matcher import StructureMatcher, ElementComparator logger = get_logger(__name__) diff --git a/atomate/vasp/firetasks/exchange.py b/atomate/vasp/firetasks/exchange.py index f91498006..7eba9ced7 100644 --- a/atomate/vasp/firetasks/exchange.py +++ b/atomate/vasp/firetasks/exchange.py @@ -8,7 +8,7 @@ from datetime import datetime import numpy as np -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.command_line.bader_caller import bader_analysis_from_path from pymatgen.analysis.magnetism.heisenberg import HeisenbergMapper, HeisenbergModel from pymatgen.analysis.magnetism import CollinearMagneticStructureAnalyzer, Ordering diff --git a/atomate/vasp/firetasks/glue_tasks.py b/atomate/vasp/firetasks/glue_tasks.py index a7f123638..0b36d24ed 100644 --- a/atomate/vasp/firetasks/glue_tasks.py +++ b/atomate/vasp/firetasks/glue_tasks.py @@ -17,7 +17,7 @@ import os import re -from pymatgen import MPRester +from pymatgen.ext.matproj import MPRester from pymatgen.io.vasp.sets import get_vasprun_outcar from pymatgen.core.structure import Structure diff --git a/atomate/vasp/firetasks/parse_outputs.py b/atomate/vasp/firetasks/parse_outputs.py index 85e82a449..d6f375b6c 100644 --- a/atomate/vasp/firetasks/parse_outputs.py +++ b/atomate/vasp/firetasks/parse_outputs.py @@ -16,7 +16,7 @@ from fireworks import FiretaskBase, FWAction, explicit_serialize from fireworks.utilities.fw_serializers import DATETIME_HANDLER -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.analysis.elasticity.elastic import ElasticTensor, ElasticTensorExpansion from pymatgen.analysis.elasticity.strain import Strain, Deformation from pymatgen.analysis.elasticity.stress import Stress diff --git a/atomate/vasp/firetasks/tests/test_exchange.py b/atomate/vasp/firetasks/tests/test_exchange.py index 2ed82d6fc..5f8990dcc 100644 --- a/atomate/vasp/firetasks/tests/test_exchange.py +++ b/atomate/vasp/firetasks/tests/test_exchange.py @@ -20,7 +20,7 @@ from atomate.utils.testing import AtomateTest -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.util.testing import PymatgenTest from pymatgen.io.vasp import Incar, Poscar, Potcar, Kpoints from pymatgen.io.vasp.sets import MPRelaxSet diff --git a/atomate/vasp/fireworks/core.py b/atomate/vasp/fireworks/core.py index 12f081987..e43a1b280 100644 --- a/atomate/vasp/fireworks/core.py +++ b/atomate/vasp/fireworks/core.py @@ -17,7 +17,7 @@ from fireworks import Firework -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.io.vasp.sets import ( MPRelaxSet, MPScanRelaxSet, diff --git a/atomate/vasp/powerups.py b/atomate/vasp/powerups.py index d71196d7c..8c23292cf 100644 --- a/atomate/vasp/powerups.py +++ b/atomate/vasp/powerups.py @@ -20,7 +20,7 @@ from fireworks import Workflow, FileWriteTask from fireworks.core.firework import Tracker from fireworks.utilities.fw_utilities import get_slug -from pymatgen import Structure +from pymatgen.core import Structure __author__ = "Anubhav Jain, Kiran Mathew, Alex Ganose" __email__ = "ajain@lbl.gov, kmathew@lbl.gov" diff --git a/atomate/vasp/submission_filter.py b/atomate/vasp/submission_filter.py index 5688922fb..d88c45600 100644 --- a/atomate/vasp/submission_filter.py +++ b/atomate/vasp/submission_filter.py @@ -3,7 +3,7 @@ from monty.json import MSONable, MontyDecoder -from pymatgen import MPRester +from pymatgen.ext.matproj import MPRester from pymatgen.alchemy.filters import AbstractStructureFilter __author__ = 'Anubhav Jain , Kiran Mathew ' diff --git a/atomate/vasp/tests/test_setup.py b/atomate/vasp/tests/test_setup.py index 93fa1b6ce..ce028f1ae 100644 --- a/atomate/vasp/tests/test_setup.py +++ b/atomate/vasp/tests/test_setup.py @@ -4,7 +4,7 @@ import os import unittest -from pymatgen import IStructure, Lattice +from pymatgen.core import IStructure, Lattice from pymatgen.io.vasp import Incar, Poscar, Potcar, Kpoints from pymatgen.io.vasp.sets import MPRelaxSet diff --git a/atomate/vasp/workflows/base/ferroelectric.py b/atomate/vasp/workflows/base/ferroelectric.py index 078b41c1c..db8723f3b 100644 --- a/atomate/vasp/workflows/base/ferroelectric.py +++ b/atomate/vasp/workflows/base/ferroelectric.py @@ -9,7 +9,7 @@ from atomate.utils.utils import get_logger, get_a_unique_id -from pymatgen import Structure +from pymatgen.core import Structure from atomate.vasp.fireworks.core import OptimizeFW from atomate.vasp.fireworks.polarization import LcalcpolFW diff --git a/atomate/vasp/workflows/tests/test_adsorbate_workflow.py b/atomate/vasp/workflows/tests/test_adsorbate_workflow.py index f54d11185..d20460cb2 100644 --- a/atomate/vasp/workflows/tests/test_adsorbate_workflow.py +++ b/atomate/vasp/workflows/tests/test_adsorbate_workflow.py @@ -13,7 +13,7 @@ get_slab_trans_params, MPSurfaceSet from atomate.utils.testing import AtomateTest -from pymatgen import Structure, Molecule, Lattice +from pymatgen.core import Structure, Molecule, Lattice from pymatgen.util.testing import PymatgenTest from pymatgen.core.surface import generate_all_slabs from pymatgen.transformations.advanced_transformations import SlabTransformation diff --git a/atomate/vasp/workflows/tests/test_bulk_modulus_workflow.py b/atomate/vasp/workflows/tests/test_bulk_modulus_workflow.py index 1bb756e9b..262f76b61 100644 --- a/atomate/vasp/workflows/tests/test_bulk_modulus_workflow.py +++ b/atomate/vasp/workflows/tests/test_bulk_modulus_workflow.py @@ -15,7 +15,7 @@ from atomate.vasp.workflows.presets.core import wf_bulk_modulus from atomate.utils.testing import AtomateTest -from pymatgen import Structure +from pymatgen.core import Structure from pymatgen.util.testing import PymatgenTest from pymatgen.symmetry.analyzer import SpacegroupAnalyzer diff --git a/atomate/vasp/workflows/tests/test_elastic_workflow.py b/atomate/vasp/workflows/tests/test_elastic_workflow.py index f4bb259a2..dad4b7f36 100644 --- a/atomate/vasp/workflows/tests/test_elastic_workflow.py +++ b/atomate/vasp/workflows/tests/test_elastic_workflow.py @@ -19,7 +19,7 @@ from pymatgen.util.testing import PymatgenTest from pymatgen.symmetry.analyzer import SpacegroupAnalyzer -from pymatgen import Structure +from pymatgen.core import Structure __author__ = 'Kiran Mathew, Joseph Montoya' __email__ = 'montoyjh@lbl.gov' diff --git a/atomate/vasp/workflows/tests/test_exchange_workflow.py b/atomate/vasp/workflows/tests/test_exchange_workflow.py index 1286b2a96..b530db2b3 100644 --- a/atomate/vasp/workflows/tests/test_exchange_workflow.py +++ b/atomate/vasp/workflows/tests/test_exchange_workflow.py @@ -21,7 +21,7 @@ from atomate.utils.utils import get_a_unique_id from json import load -from pymatgen import Structure +from pymatgen.core import Structure __author__ = "Nathan C. Frey" __email__ = "ncfrey@lbl.gov" diff --git a/atomate/vasp/workflows/tests/test_ferroelectric_workflow.py b/atomate/vasp/workflows/tests/test_ferroelectric_workflow.py index 7ec83a264..8e02e1bf3 100644 --- a/atomate/vasp/workflows/tests/test_ferroelectric_workflow.py +++ b/atomate/vasp/workflows/tests/test_ferroelectric_workflow.py @@ -2,7 +2,7 @@ from pathlib import Path -from pymatgen import Structure +from pymatgen.core import Structure from fireworks import FWorker from fireworks.core.rocket_launcher import rapidfire diff --git a/atomate/vasp/workflows/tests/test_magnetism_workflow.py b/atomate/vasp/workflows/tests/test_magnetism_workflow.py index 1dedb0fad..647e01f46 100644 --- a/atomate/vasp/workflows/tests/test_magnetism_workflow.py +++ b/atomate/vasp/workflows/tests/test_magnetism_workflow.py @@ -14,7 +14,7 @@ from atomate.utils.testing import AtomateTest, DB_DIR from json import load -from pymatgen import Structure +from pymatgen.core import Structure __author__ = "Matthew Horton" __email__ = "mkhorton@lbl.gov" diff --git a/atomate/vasp/workflows/tests/test_nmr.py b/atomate/vasp/workflows/tests/test_nmr.py index 4f24524a8..f0f9c6438 100644 --- a/atomate/vasp/workflows/tests/test_nmr.py +++ b/atomate/vasp/workflows/tests/test_nmr.py @@ -13,7 +13,7 @@ from atomate.vasp.workflows.presets.core import wf_nmr from atomate.utils.testing import AtomateTest -from pymatgen import Structure +from pymatgen.core import Structure module_dir = os.path.join(os.path.dirname(os.path.abspath(__file__))) db_dir = os.path.join(module_dir, "..", "..", "..", "common", "test_files") diff --git a/dev_scripts/gibbs.py b/dev_scripts/gibbs.py index fa7518933..11a1dd9af 100644 --- a/dev_scripts/gibbs.py +++ b/dev_scripts/gibbs.py @@ -8,7 +8,7 @@ import numpy as np -from pymatgen import Structure +from pymatgen.core import Structure __author__ = "Kiran Mathew" __email__ = "kmathew@lbl.gov" diff --git a/docs/_sources/customizing_workflows.rst.txt b/docs/_sources/customizing_workflows.rst.txt index db641f487..f2f6c8a2d 100644 --- a/docs/_sources/customizing_workflows.rst.txt +++ b/docs/_sources/customizing_workflows.rst.txt @@ -36,7 +36,7 @@ An example for adding an INCAR setting to use a different force convergence crit from atomate.vasp.workflows.presets.core import wf_elastic_constant from atomate.vasp.powerups import add_modify_incar - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') @@ -74,7 +74,7 @@ To use a different functional, for instance in a optimization calculation, you c from fireworks import Workflow from atomate.vasp.fireworks.core import OptimizeFW from pymatgen.io.vasp.sets import MPRelaxSet - from pymatgen import Structure + from pymatgen.core import Structure def get_optimize_wf(structure, name="optimization wf", vasp_input_set=None, vasp_cmd="vasp", db_file=None, user_kpoints_settings=None, @@ -134,7 +134,7 @@ KPOINTS settings can also be similarly customized using the above example. You c .. code-block:: python from pymatgen.io.vasp.sets import MPRelaxSet - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') @@ -151,7 +151,7 @@ If you need more control, create the ``Kpoints`` object directly with pymatgen. from pymatgen.io.vasp.sets import MPRelaxSet from pymatgen.io.vasp.inputs import Kpoints - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') @@ -199,7 +199,7 @@ Which POTCAR file you want to use is controlled by the input set as well. The ea .. code-block:: python from pymatgen.io.vasp.sets import MPRelaxSet - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') diff --git a/docs/_sources/gibbs_workflow_tutorial.rst.txt b/docs/_sources/gibbs_workflow_tutorial.rst.txt index 4788f4ed9..7894ed9ef 100644 --- a/docs/_sources/gibbs_workflow_tutorial.rst.txt +++ b/docs/_sources/gibbs_workflow_tutorial.rst.txt @@ -91,7 +91,7 @@ In the directory you created, make a Python script named ``gibbs.py`` with the f #!/usr/bin/env python import numpy as np - from pymatgen import MPRester + from pymatgen.ext.matproj import MPRester from fireworks import LaunchPad from atomate.vasp.workflows.presets.core import wf_gibbs_free_energy @@ -157,7 +157,7 @@ Simply add the following Python script (``gibbs-analysis.py``) to your folder an .. code-block:: python from atomate.vasp.database import VaspCalcDb - from pymatgen import Structure + from pymatgen.core import Structure import numpy as np import matplotlib.pyplot as plt diff --git a/docs/_sources/running_workflows.rst.txt b/docs/_sources/running_workflows.rst.txt index 32724e60d..f8e9013c3 100644 --- a/docs/_sources/running_workflows.rst.txt +++ b/docs/_sources/running_workflows.rst.txt @@ -128,7 +128,7 @@ In the same directory as the POSCAR, create a Python script named ``mgo_bandstru # Create a bandstructure from the workflow from the atomate presets import numpy as np - from pymatgen import Structure + from pymatgen.core import Structure from fireworks import LaunchPad from atomate.vasp.workflows.presets.core import wf_bandstructure from atomate.vasp.powerups import add_modify_incar diff --git a/docs_rst/customizing_workflows.rst b/docs_rst/customizing_workflows.rst index db641f487..f2f6c8a2d 100644 --- a/docs_rst/customizing_workflows.rst +++ b/docs_rst/customizing_workflows.rst @@ -36,7 +36,7 @@ An example for adding an INCAR setting to use a different force convergence crit from atomate.vasp.workflows.presets.core import wf_elastic_constant from atomate.vasp.powerups import add_modify_incar - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') @@ -74,7 +74,7 @@ To use a different functional, for instance in a optimization calculation, you c from fireworks import Workflow from atomate.vasp.fireworks.core import OptimizeFW from pymatgen.io.vasp.sets import MPRelaxSet - from pymatgen import Structure + from pymatgen.core import Structure def get_optimize_wf(structure, name="optimization wf", vasp_input_set=None, vasp_cmd="vasp", db_file=None, user_kpoints_settings=None, @@ -134,7 +134,7 @@ KPOINTS settings can also be similarly customized using the above example. You c .. code-block:: python from pymatgen.io.vasp.sets import MPRelaxSet - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') @@ -151,7 +151,7 @@ If you need more control, create the ``Kpoints`` object directly with pymatgen. from pymatgen.io.vasp.sets import MPRelaxSet from pymatgen.io.vasp.inputs import Kpoints - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') @@ -199,7 +199,7 @@ Which POTCAR file you want to use is controlled by the input set as well. The ea .. code-block:: python from pymatgen.io.vasp.sets import MPRelaxSet - from pymatgen import Structure + from pymatgen.core import Structure # load your structure, e.g. from a POSCAR struct = Structure.from_file('POSCAR') diff --git a/docs_rst/gibbs_workflow_tutorial.rst b/docs_rst/gibbs_workflow_tutorial.rst index 4788f4ed9..7894ed9ef 100644 --- a/docs_rst/gibbs_workflow_tutorial.rst +++ b/docs_rst/gibbs_workflow_tutorial.rst @@ -91,7 +91,7 @@ In the directory you created, make a Python script named ``gibbs.py`` with the f #!/usr/bin/env python import numpy as np - from pymatgen import MPRester + from pymatgen.ext.matproj import MPRester from fireworks import LaunchPad from atomate.vasp.workflows.presets.core import wf_gibbs_free_energy @@ -157,7 +157,7 @@ Simply add the following Python script (``gibbs-analysis.py``) to your folder an .. code-block:: python from atomate.vasp.database import VaspCalcDb - from pymatgen import Structure + from pymatgen.core import Structure import numpy as np import matplotlib.pyplot as plt diff --git a/docs_rst/running_workflows.rst b/docs_rst/running_workflows.rst index 32724e60d..f8e9013c3 100644 --- a/docs_rst/running_workflows.rst +++ b/docs_rst/running_workflows.rst @@ -128,7 +128,7 @@ In the same directory as the POSCAR, create a Python script named ``mgo_bandstru # Create a bandstructure from the workflow from the atomate presets import numpy as np - from pymatgen import Structure + from pymatgen.core import Structure from fireworks import LaunchPad from atomate.vasp.workflows.presets.core import wf_bandstructure from atomate.vasp.powerups import add_modify_incar diff --git a/scripts/atwf b/scripts/atwf index 4a3a1fca4..a3a6a0ead 100755 --- a/scripts/atwf +++ b/scripts/atwf @@ -19,7 +19,8 @@ from atomate.utils.utils import get_wf_from_spec_dict, load_class from atomate.vasp.powerups import add_namefile, add_tags from atomate.vasp.workflows.presets import core -from pymatgen import Structure, Lattice, MPRester +from pymatgen.core import Structure, Lattice +from pymatgen.ext.matproj import MPRester from pymatgen.util.testing import PymatgenTest default_yaml = """fireworks: From 4e6b64ca965e4b34e4af10b3d875c6aa780fcbee Mon Sep 17 00:00:00 2001 From: Steven Torrisi Date: Wed, 10 Mar 2021 07:34:35 -0500 Subject: [PATCH 2/5] Fix requirements to latest PMG version, and fix settings import --- atomate/vasp/firetasks/tests/test_polarization_to_db.py | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atomate/vasp/firetasks/tests/test_polarization_to_db.py b/atomate/vasp/firetasks/tests/test_polarization_to_db.py index 803684f9a..db16e0d0d 100644 --- a/atomate/vasp/firetasks/tests/test_polarization_to_db.py +++ b/atomate/vasp/firetasks/tests/test_polarization_to_db.py @@ -17,7 +17,7 @@ from atomate.vasp.powerups import use_fake_vasp from atomate.vasp.firetasks.parse_outputs import PolarizationToDb -from pymatgen.settings import SETTINGS +from pymatgen.core import SETTINGS __author__ = 'Tess Smidt' __email__ = 'blondegeek@gmail.com' diff --git a/requirements.txt b/requirements.txt index 805319fda..2e835a215 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ tqdm==4.58.0 pybtex==0.24.0 ruamel.yaml==0.16.12 pandas==1.2.2 -pymatgen==2021.3.3 +pymatgen==2022.0.3 custodian==2021.2.8 networkx==2.5 pydash==4.9.2 From 3afb78a83f8fcc535555b39110aedb965291bc7d Mon Sep 17 00:00:00 2001 From: Steven Torrisi Date: Wed, 10 Mar 2021 07:39:36 -0500 Subject: [PATCH 3/5] Fixed another settings import --- atomate/utils/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atomate/utils/testing.py b/atomate/utils/testing.py index 58e51265a..fbb2c33a5 100644 --- a/atomate/utils/testing.py +++ b/atomate/utils/testing.py @@ -10,7 +10,7 @@ from fireworks import LaunchPad from pymongo import MongoClient -from pymatgen.settings import SETTINGS +from pymatgen.core import SETTINGS __author__ = "Kiran Mathew" __credits__ = "Anubhav Jain" From f5d34768771f5b0ae4c47396ca0eec6d4b058088 Mon Sep 17 00:00:00 2001 From: Alex Ganose Date: Wed, 10 Mar 2021 11:13:26 -0800 Subject: [PATCH 4/5] Update references to master in docs --- CONTRIBUTING.md | 2 +- docs_rst/index.rst | 2 +- docs_rst/installation.rst | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc79f9fc4..20f53517c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ We use github to host code, to track issues and feature requests, as well as acc Pull requests are the best way to propose changes to the codebase. Follow the [Github flow](https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow) for more information on this procedure. The basic procedure for making a PR is: -* Fork the repo and create your branch from master. +* Fork the repo and create your branch from main. * Commit your improvements to your branch and push to your Github fork (repo). * When you're finished, go to your fork and make a Pull Request. It will automatically update if you need to make further changes. diff --git a/docs_rst/index.rst b/docs_rst/index.rst index 160e8a6bf..55387a1c6 100644 --- a/docs_rst/index.rst +++ b/docs_rst/index.rst @@ -109,7 +109,7 @@ The list of contributors to atomate can be found :doc:`here `. There is an `atomate Discourse forum`_ dedicated to discussion and basic support. -For specifics on how to contribute, see our `contribution guidelines. `_ +For specifics on how to contribute, see our `contribution guidelines. `_ .. _atomate Discourse forum: https://discuss.matsci.org/c/atomate diff --git a/docs_rst/installation.rst b/docs_rst/installation.rst index b3a1e1a3b..52f1fd041 100644 --- a/docs_rst/installation.rst +++ b/docs_rst/installation.rst @@ -344,7 +344,7 @@ This is not at all required, but if you want to see what the queue templates loo .. _FireWorks documentation for writing queue adapters: https://materialsproject.github.io/fireworks/qadapter_programming.html?highlight=qadapter -.. _here: https://github.com/materialsproject/fireworks/tree/master/fireworks/user_objects/queue_adapters +.. _here: https://github.com/materialsproject/fireworks/tree/main/fireworks/user_objects/queue_adapters FW_config.yaml @@ -481,7 +481,7 @@ Below are 4 different options for adding a workflow to the database. You only ne All of these function specify (i) a type of workflow and (ii) the structure to feed into that workflow. * The ``-l vasp`` option states to use the ``vasp`` library of workflows. -* The ``-s optimize_only.yaml`` sets the specification of the workflow using the ``optimize_only.yaml`` file in `this directory `_. Alternatively, the ``-p wf_structure_optimization`` sets the workflow specification using the preset Python function located in `this module `_. For now, it's probably best not to worry about the distinction but to know that both libraries of workflows are available to you. +* The ``-s optimize_only.yaml`` sets the specification of the workflow using the ``optimize_only.yaml`` file in `this directory `_. Alternatively, the ``-p wf_structure_optimization`` sets the workflow specification using the preset Python function located in `this module `_. For now, it's probably best not to worry about the distinction but to know that both libraries of workflows are available to you. * The ``-c`` option is used in file-based workflows to make sure that one uses the ``vasp_cmd`` and ``db_file`` that are specified in ``my_fworker.yaml`` that you specified earlier. In the preset workflows, it is the default behavior to take these parameters from the ``my_fworker.yaml`` so this option is not needed. Verify the workflow From dd9ba6fbe3538c29b1373e6aaf9ca60d0207cebe Mon Sep 17 00:00:00 2001 From: Alex Ganose Date: Wed, 10 Mar 2021 11:14:01 -0800 Subject: [PATCH 5/5] Update tests --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f8e1e06b..531ca6322 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -79,6 +79,6 @@ workflows: filters: # don't run dev tests on master branch branches: ignore: - master + main