diff --git a/pyproject.toml b/pyproject.toml index 5b5d6a621a..d9f9e0accb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ cclib = ["cclib"] mp = ["mp-api>=0.37.5"] phonons = ["phonopy>=1.10.8", "seekpath"] lobster = ["ijson>=3.2.2", "lobsterpy>=0.3.7"] -defects = ["dscribe>=1.2.0", "pymatgen-analysis-defects>=2022.11.30"] +defects = ["dscribe>=1.2.0", "pymatgen-analysis-defects>=2022.11.30", "python-ulid"] forcefields = [ "ase>=3.22.1", "chgnet>=0.2.2", @@ -92,6 +92,7 @@ strict = [ "quippy-ase==0.9.14", "seekpath==2.1.0", "typing-extensions==4.10.0", + "python-ulid==2.2.0" ] [project.scripts] diff --git a/src/atomate2/cli/dev.py b/src/atomate2/cli/dev.py index a51b905d83..2314ec8d56 100644 --- a/src/atomate2/cli/dev.py +++ b/src/atomate2/cli/dev.py @@ -17,13 +17,31 @@ def dev() -> None: @dev.command(context_settings={"help_option_names": ["-h", "--help"]}) -@click.argument("test_dir") -def vasp_test_data(test_dir: Path) -> None: +@click.argument( + "test_dir", +) +@click.option( + "--additional_file", + "-a", + multiple=True, + help="list of additional files to copy from each completed VASP directory. " + "Example: `--additional_file CHGCAR --additional_file LOCPOT`", +) +def vasp_test_data(test_dir: str | Path, additional_file: list[str]) -> None: """Generate test data for VASP unit tests. This script expects there is an outputs.json file and job folders in the current directory. Please refer to the atomate2 documentation on writing unit tests for more information. + + Parameters + ---------- + test_dir + The directory to write the test data to. + Should not contain spaces or punctuation. + additional_files + list of additional files to copy from each completed VASP directory. + Example: `--additional_file CHGCAR --additional_file LOCPOT`, """ import warnings from pathlib import Path @@ -110,6 +128,7 @@ def vasp_test_data(test_dir: Path) -> None: "vasprun*", "OUTCAR*", "*.json*", + *additional_file, ], allow_missing=True, ) diff --git a/src/atomate2/common/flows/electrode.py b/src/atomate2/common/flows/electrode.py new file mode 100644 index 0000000000..cb6a17ee4a --- /dev/null +++ b/src/atomate2/common/flows/electrode.py @@ -0,0 +1,183 @@ +"""Flow for electrode analysis.""" + +from __future__ import annotations + +import logging +from abc import ABC, abstractmethod +from dataclasses import dataclass, field +from typing import TYPE_CHECKING + +from jobflow import Flow, Maker +from pymatgen.analysis.structure_matcher import ElementComparator, StructureMatcher + +from atomate2.common.jobs.electrode import ( + RelaxJobSummary, + get_computed_entries, + get_insertion_electrode_doc, + get_stable_inserted_results, + get_structure_group_doc, +) + +if TYPE_CHECKING: + from pathlib import Path + + from pymatgen.alchemy import ElementLike + from pymatgen.core.structure import Structure + from pymatgen.entries.computed_entries import ComputedEntry + from pymatgen.io.vasp.outputs import VolumetricData + +logger = logging.getLogger(__name__) + +__author__ = "Jimmy Shen" +__email__ = "jmmshn@gmail.com" + + +@dataclass +class ElectrodeInsertionMaker(Maker, ABC): + """Attempt ion insertion into a structure. + + The basic unit for cation insertion is: + [get_stable_inserted_structure]: + (static) -> (chgcar analysis) -> + N x (relax) -> (return best structure) + + The workflow is: + [relax structure] + [get_stable_inserted_structure] + [get_stable_inserted_structure] + [get_stable_inserted_structure] + ... until the insertion is no longer topotactic. + + This workflow requires the users to provide the following functions: + self.get_charge_density(task_doc: TaskDoc): + Get the charge density of a TaskDoc output from a calculation. + self.update_static_maker(): + Ensure that the static maker will store the desired data. + + If you use this workflow please cite the following paper: + Shen, J.-X., Horton, M., & Persson, K. A. (2020). + A charge-density-based general cation insertion algorithm for + generating new Li-ion cathode materials. + npj Computational Materials, 6(161), 1—7. + doi: 10.1038/s41524-020-00422-3 + + Attributes + ---------- + name: str + The name of the flow created by this maker. + relax_maker: RelaxMaker + A maker to perform relaxation calculations. + bulk_relax_maker: Maker + A separate maker to perform the first bulk relaxation calculation. + If None, the relax_maker will be used. + static_maker: Maker + A maker to perform static calculations. + structure_matcher: StructureMatcher + The structure matcher to use to determine if additional insertion is needed. + """ + + relax_maker: Maker + static_maker: Maker + bulk_relax_maker: Maker | None = None + name: str = "ion insertion" + structure_matcher: StructureMatcher = field( + default_factory=lambda: StructureMatcher( + comparator=ElementComparator(), + ) + ) + + def __post_init__(self) -> None: + """Ensure that the static maker will store the desired data.""" + self.update_static_maker() + + def make( + self, + structure: Structure, + inserted_element: ElementLike, + n_steps: int | None, + insertions_per_step: int = 4, + working_ion_entry: ComputedEntry | None = None, + ) -> Flow: + """Make the flow. + + Parameters + ---------- + structure: + Structure to insert ion into. + inserted_species: + Species to insert. + n_steps: int + The maximum number of sequential insertion steps to attempt. + insertions_per_step: int + The maximum number of ion insertion sites to attempt. + + Returns + ------- + Flow for ion insertion. + """ + # First relax the structure + if self.bulk_relax_maker: + relax = self.bulk_relax_maker.make(structure) + else: + relax = self.relax_maker.make(structure) + # add ignored_species to the structure matcher + sm = _add_ignored_species(self.structure_matcher, inserted_element) + # Get the inserted structure + new_entries_job = get_stable_inserted_results( + structure=relax.output.structure, + inserted_element=inserted_element, + structure_matcher=sm, + static_maker=self.static_maker, + relax_maker=self.relax_maker, + get_charge_density=self.get_charge_density, + n_steps=n_steps, + insertions_per_step=insertions_per_step, + ) + relaxed_summary = RelaxJobSummary( + structure=relax.output.structure, + entry=relax.output.entry, + dir_name=relax.output.dir_name, + uuid=relax.output.uuid, + ) + get_entries_job = get_computed_entries(new_entries_job.output, relaxed_summary) + structure_group_job = get_structure_group_doc( + get_entries_job.output, ignored_species=str(inserted_element) + ) + jobs = [relax, new_entries_job, get_entries_job, structure_group_job] + output = structure_group_job.output + if working_ion_entry: + insertion_electrode_job = get_insertion_electrode_doc( + get_entries_job.output, working_ion_entry + ) + jobs.append(insertion_electrode_job) + output = insertion_electrode_job.output + return Flow(jobs=jobs, output=output) + + @abstractmethod + def get_charge_density(self, prev_dir: Path | str) -> VolumetricData: + """Get the charge density of a structure. + + Parameters + ---------- + prev_dir: + The previous directory where the static calculation was performed. + + Returns + ------- + The charge density. + """ + + @abstractmethod + def update_static_maker(self) -> None: + """Ensure that the static maker will store the desired data.""" + + +def _add_ignored_species( + structure_matcher: StructureMatcher, species: ElementLike +) -> StructureMatcher: + """Add an ignored species to a structure matcher.""" + sm_dict = structure_matcher.as_dict() + ignored_species = set(sm_dict.get("ignored_species", set())) + ignored_species.add(str(species)) + sm_dict["ignored_species"] = list(ignored_species) + return StructureMatcher.from_dict(sm_dict) diff --git a/src/atomate2/common/jobs/electrode.py b/src/atomate2/common/jobs/electrode.py new file mode 100644 index 0000000000..1d3786c077 --- /dev/null +++ b/src/atomate2/common/jobs/electrode.py @@ -0,0 +1,305 @@ +"""Jobs for electrode analysis.""" + +from __future__ import annotations + +import logging +from typing import TYPE_CHECKING, Callable, NamedTuple + +from emmet.core.electrode import InsertionElectrodeDoc +from emmet.core.structure_group import StructureGroupDoc +from jobflow import Flow, Maker, Response, job +from pymatgen.analysis.defects.generators import ChargeInterstitialGenerator +from pymatgen.entries.computed_entries import ComputedStructureEntry + +if TYPE_CHECKING: + from pathlib import Path + + from pymatgen.alchemy import ElementLike + from pymatgen.analysis.structure_matcher import StructureMatcher + from pymatgen.core import Structure + from pymatgen.entries.computed_entries import ComputedEntry + from pymatgen.io.vasp.outputs import VolumetricData + + +logger = logging.getLogger(__name__) + +__author__ = "Jimmy Shen" +__email__ = "jmmshn@gmail.com" + + +class RelaxJobSummary(NamedTuple): + """A summary of a relaxation job.""" + + structure: Structure + entry: ComputedEntry + dir_name: str + uuid: str + + +@job +def get_stable_inserted_results( + structure: Structure, + inserted_element: ElementLike, + structure_matcher: StructureMatcher, + static_maker: Maker, + relax_maker: Maker, + get_charge_density: Callable, + insertions_per_step: int = 4, + n_steps: int | None = None, + n_inserted: int = 0, +) -> Response: + """Attempt ion insertion. + + The basic unit for cation insertion is: + [get_stable_inserted_structure]: + (static) -> N x (chgcar analysis -> relax) -> (return best structure) + + Parameters + ---------- + structure: + The structure to insert into. + inserted_species: + The species to insert. + structure_matcher: + The structure matcher to use to determine if additional + insertion is needed. + static_maker: + A maker to perform static calculations. + relax_maker: + A maker to perform relaxation calculations. + get_charge_density: + A function to get the charge density from a previous calculation. + Whether to use the AECCAR0 and AECCAR2 files for the charge density. + This is often necessary since the CHGCAR file has spurious effects near the + core which often breaks the min-filter algorithms used to identify the local + minima. + insertions_per_step: + The maximum number of ion insertion sites to attempt. + n_steps: + The maximum number of steps to perform. + n_inserted: + The number of ions inserted so far, used to help assign a unique name to the + different jobs. + """ + if structure is None: + return [] + if n_steps is not None and n_steps <= 0: + return [] + # append job name + add_name = f"{n_inserted}" + + static_job = static_maker.make(structure=structure) + chg_job = get_charge_density_job(static_job.output.dir_name, get_charge_density) + insertion_job = get_inserted_structures( + chg_job.output, + inserted_species=inserted_element, + insertions_per_step=insertions_per_step, + ) + relax_jobs = get_relaxed_job_summaries( + structures=insertion_job.output, relax_maker=relax_maker, append_name=add_name + ) + + min_en_job = get_min_energy_summary( + relaxed_summaries=relax_jobs.output, + ref_structure=structure, + structure_matcher=structure_matcher, + ) + nn_step = n_steps - 1 if n_steps is not None else None + next_step = get_stable_inserted_results( + structure=min_en_job.output[0], + inserted_element=inserted_element, + structure_matcher=structure_matcher, + static_maker=static_maker, + relax_maker=relax_maker, + get_charge_density=get_charge_density, + insertions_per_step=insertions_per_step, + n_steps=nn_step, + n_inserted=n_inserted + 1, + ) + + for job_ in [static_job, chg_job, insertion_job, min_en_job, relax_jobs, next_step]: + job_.append_name(f" {add_name}") + combine_job = get_computed_entries(next_step.output, min_en_job.output) + replace_flow = Flow( + jobs=[ + static_job, + chg_job, + insertion_job, + relax_jobs, + min_en_job, + next_step, + combine_job, + ], + output=combine_job.output, + ) + return Response(replace=replace_flow) + + +@job +def get_computed_entries( + multi: list[ComputedEntry], single: RelaxJobSummary | None +) -> list[ComputedEntry]: + """Add a single new entry to a list of entries. + + Parameters + ---------- + multi: The list of entries. + single: Possible tuple containing the new entry + + Returns + ------- + The list of entries with the new entry added. + """ + if single is None: + return multi + # keep the [1] for now, if jobflow supports NamedTuple, we can do this much cleaner + s_ = RelaxJobSummary._make(single) + s_.entry.entry_id = s_.uuid + ent = ComputedStructureEntry( + structure=s_.structure, + energy=s_.entry.energy, + parameters=s_.entry.parameters, + data=s_.entry.data, + entry_id=s_.uuid, + ) + return [*multi, ent] + + +@job(output_schema=StructureGroupDoc) +def get_structure_group_doc( + computed_entries: list[ComputedEntry], ignored_species: str +) -> Response: + """Take in `ComputedEntry` and return a `StructureGroupDoc`.""" + for ient in computed_entries: + ient.data["material_id"] = ient.entry_id + return StructureGroupDoc.from_grouped_entries( + computed_entries, ignored_specie=ignored_species + ) + + +@job(output_schema=InsertionElectrodeDoc) +def get_insertion_electrode_doc( + computed_entries: ComputedEntry, working_ion_entry: ComputedEntry +) -> Response: + """Return a `InsertionElectrodeDoc`.""" + for ient in computed_entries: + ient.data["material_id"] = ient.entry_id + return InsertionElectrodeDoc.from_entries( + computed_entries, working_ion_entry, battery_id=None + ) + + +@job +def get_inserted_structures( + chg: VolumetricData, + inserted_species: ElementLike, + insertions_per_step: int = 4, + charge_insertion_generator: ChargeInterstitialGenerator | None = None, +) -> list[Structure]: + """Get the inserted structures. + + Parameters + ---------- + chg: The charge density. + inserted_species: The species to insert. + insertions_per_step: The maximum number of ion insertion sites to attempt. + charge_insertion_generator: The charge insertion generator to use, + tolerances should be set here. + + + Returns + ------- + The inserted structures. + """ + if charge_insertion_generator is None: + charge_insertion_generator = ChargeInterstitialGenerator() + gen = charge_insertion_generator.generate(chg, insert_species=[inserted_species]) + inserted_structures = [defect.defect_structure for defect in gen] + return inserted_structures[:insertions_per_step] + + +@job +def get_relaxed_job_summaries( + structures: list[Structure], + relax_maker: Maker, + append_name: str = "", +) -> Response: + """Spawn relaxation jobs. + + Parameters + ---------- + structures: The structures to relax. + relax_maker: The maker to use to spawn relaxation jobs. + + Returns + ------- + The relaxation jobs. + """ + relax_jobs = [] + outputs = [] + for ii, structure in enumerate(structures): + job_ = relax_maker.make(structure=structure) + relax_jobs.append(job_) + job_.append_name(f" {append_name} ({ii})") + d_ = { + "structure": job_.output.structure, + "entry": job_.output.entry, + "dir_name": job_.output.dir_name, + "uuid": job_.output.uuid, + } + outputs.append(RelaxJobSummary(**d_)) + + replace_flow = Flow(relax_jobs, output=outputs) + return Response(replace=replace_flow, output=outputs) + + +@job +def get_min_energy_summary( + relaxed_summaries: list[RelaxJobSummary], + ref_structure: Structure, + structure_matcher: StructureMatcher, +) -> Response: + """Get the structure with the lowest energy. + + Parameters + ---------- + structures: The structures to compare. + ref_structure: The reference structure to compare to. + structure_matcher: The structure matcher to use to compare structures. + + Returns + ------- + The structure with the lowest energy. + """ + # Since the outputs parser will see a NamedTuple and immediately convert it to + # a list We have to convert the list of lists to a list of NamedTuples + relaxed_summaries = list(map(RelaxJobSummary._make, relaxed_summaries)) + topotactic_summaries = [ + summary + for summary in relaxed_summaries + if structure_matcher.fit(ref_structure, summary.structure) + ] + + if len(topotactic_summaries) == 0: + return None + + return min(topotactic_summaries, key=lambda x: x.entry.energy_per_atom) + + +@job +def get_charge_density_job( + prev_dir: Path | str, + get_charge_density: Callable, +) -> VolumetricData: + """Get the charge density from a task document. + + Parameters + ---------- + prev_dir: The previous directory where the static calculation was performed. + get_charge_density: A function to get the charge density from a task document. + + Returns + ------- + The charge density. + """ + return get_charge_density(prev_dir) diff --git a/src/atomate2/vasp/flows/electrode.py b/src/atomate2/vasp/flows/electrode.py new file mode 100644 index 0000000000..85a40ef19d --- /dev/null +++ b/src/atomate2/vasp/flows/electrode.py @@ -0,0 +1,83 @@ +"""Flow for electrode analysis with specific VASP implementations.""" + +from __future__ import annotations + +import logging +from pathlib import Path +from typing import TYPE_CHECKING + +from pymatgen.io.vasp.outputs import Chgcar + +from atomate2.common.flows import electrode as electrode_flows +from atomate2.utils.path import strip_hostname + +if TYPE_CHECKING: + from pymatgen.io.vasp.outputs import VolumetricData + +logger = logging.getLogger(__name__) + + +class ElectrodeInsertionMaker(electrode_flows.ElectrodeInsertionMaker): + """Attempt ion insertion into a structure. + + The basic unit for cation insertion is: + [get_stable_inserted_structure]: + (static) -> (chgcar analysis) -> + N x (relax) -> (return best structure) + + The workflow is: + [relax structure] + [get_stable_inserted_structure] + [get_stable_inserted_structure] + [get_stable_inserted_structure] + ... until the insertion is no longer topotactic. + + If you use this workflow please cite the following paper: + Shen, J.-X., Horton, M., & Persson, K. A. (2020). + A charge-density-based general cation insertion algorithm for + generating new Li-ion cathode materials. + npj Computational Materials, 6(161), 1—7. + doi: 10.1038/s41524-020-00422-3 + + + Attributes + ---------- + name: str + The name of the flow created by this maker. + relax_maker: RelaxMaker + A maker to perform relaxation calculations. + bulk_relax_maker: Maker + A separate maker to perform the first bulk relaxation calculation. + If None, the relax_maker will be used. + static_maker: Maker + A maker to perform static calculations. + structure_matcher: StructureMatcher + The structure matcher to use to determine if additional insertion is needed. + """ + + def get_charge_density(self, prev_dir: Path | str) -> VolumetricData: + """Get the charge density of a structure. + + Parameters + ---------- + prev_dir: + The previous directory where the static calculation was performed. + + Returns + ------- + The charge density. + """ + prev_dir = Path(strip_hostname(prev_dir)) + aeccar0 = Chgcar.from_file(prev_dir / "AECCAR0.gz") + aeccar2 = Chgcar.from_file(prev_dir / "AECCAR2.gz") + return aeccar0 + aeccar2 + + def update_static_maker(self) -> None: + """Ensure that the static maker will store the desired data.""" + store_volumetric_data = list( + self.static_maker.task_document_kwargs.get("store_volumetric_data", []) + ) + store_volumetric_data.extend(["aeccar0", "aeccar2"]) + self.static_maker.task_document_kwargs[ + "store_volumetric_data" + ] = store_volumetric_data diff --git a/tests/test_data/vasp/H_Graphite/C4.vasp b/tests/test_data/vasp/H_Graphite/C4.vasp new file mode 100644 index 0000000000..8983404e55 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/C4.vasp @@ -0,0 +1,12 @@ +C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +C +4 +direct + 0.0000000000000000 0.0000000000000000 0.7500000000000000 C + 0.0000000000000000 0.0000000000000000 0.2500000000000000 C + 0.3333330000000000 0.6666670000000000 0.7500000000000000 C + 0.6666670000000000 0.3333330000000000 0.2500000000000000 C diff --git a/tests/test_data/vasp/H_Graphite/H_entry.json b/tests/test_data/vasp/H_Graphite/H_entry.json new file mode 100644 index 0000000000..2d1c09dccc --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/H_entry.json @@ -0,0 +1,253 @@ +{ + "@module": "pymatgen.entries.computed_entries", + "@class": "ComputedStructureEntry", + "energy": -27.64089921, + "composition": { + "H": 8.0 + }, + "entry_id": "mp-730101-R2SCAN", + "correction": 0.0, + "energy_adjustments": [], + "parameters": { + "potcar_spec": [ + { + "titel": "PAW_PBE H 15Jun2001", + "hash": "4923e7a833556cc0a96744438c6686b8" + } + ], + "is_hubbard": false, + "hubbards": {}, + "run_type": "R2SCAN" + }, + "data": { + "oxide_type": "None", + "aspherical": true, + "last_updated": { + "@module": "datetime", + "@class": "datetime", + "string": "2021-07-24 01:50:36.696000" + }, + "task_id": "mp-2739144", + "material_id": "mp-730101", + "oxidation_states": { + "H": 0.0 + }, + "run_type": "R2SCAN" + }, + "structure": { + "@module": "pymatgen.core.structure", + "@class": "Structure", + "charge": 0, + "lattice": { + "matrix": [ + [ + 7.17722434, + 0.0, + 0.0 + ], + [ + 0.0, + 7.18692792, + 0.0 + ], + [ + 0.0, + 0.0, + 7.20815403 + ] + ], + "pbc": [ + true, + true, + true + ], + "a": 7.17722434, + "b": 7.18692792, + "c": 7.20815403, + "alpha": 90.0, + "beta": 90.0, + "gamma": 90.0, + "volume": 371.81239953751634 + }, + "properties": {}, + "sites": [ + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.36553261, + 0.72173629, + 0.64725933 + ], + "xyz": [ + 2.6235095455557276, + 5.187066693478216, + 4.6655449479946 + ], + "properties": { + "magmom": 0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.86553261, + 0.77826371, + 0.35274067 + ], + "xyz": [ + 6.212121715555728, + 5.593325186521783, + 2.5426090820054 + ], + "properties": { + "magmom": 0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.63446739, + 0.22173629, + 0.85274067 + ], + "xyz": [ + 4.553714794444272, + 1.5936027334782168, + 6.1466860970054 + ], + "properties": { + "magmom": 0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.13446739, + 0.27826371, + 0.14725933 + ], + "xyz": [ + 0.9651026244442726, + 1.999861226521783, + 1.0614679329946 + ], + "properties": { + "magmom": 0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.64452235, + 0.14925896, + 0.78027071 + ], + "xyz": [ + 4.6258814980939995, + 1.0727133869341632, + 5.624311462777461 + ], + "properties": { + "magmom": -0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.14452235, + 0.35074104, + 0.21972929 + ], + "xyz": [ + 1.037269328093999, + 2.5207505730658366, + 1.5838425672225387 + ], + "properties": { + "magmom": -0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.35547765, + 0.64925896, + 0.71972929 + ], + "xyz": [ + 2.551342841906001, + 4.666177346934163, + 5.187919582222539 + ], + "properties": { + "magmom": -0.0 + }, + "label": "H" + }, + { + "species": [ + { + "element": "H", + "occu": 1 + } + ], + "abc": [ + 0.85547765, + 0.85074104, + 0.28027071 + ], + "xyz": [ + 6.139955011906001, + 6.114214533065836, + 2.020234447777461 + ], + "properties": { + "magmom": -0.0 + }, + "label": "H" + } + ] + }, + "@version": null +} diff --git a/tests/test_data/vasp/H_Graphite/relax/inputs/INCAR b/tests/test_data/vasp/H_Graphite/relax/inputs/INCAR new file mode 100644 index 0000000000..dc4c633f14 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax/inputs/INCAR @@ -0,0 +1,28 @@ +ALGO = All +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +IBRION = 2 +ISIF = 2 +ISMEAR = 0 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = Auto +LVTOT = True +LWAVE = True +MAGMOM = 4*0.6 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 99 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/relax/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/relax/inputs/KPOINTS new file mode 100644 index 0000000000..e61e15ddb1 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +4 4 1 diff --git a/tests/test_data/vasp/H_Graphite/relax/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/relax/inputs/POSCAR new file mode 100644 index 0000000000..8983404e55 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax/inputs/POSCAR @@ -0,0 +1,12 @@ +C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +C +4 +direct + 0.0000000000000000 0.0000000000000000 0.7500000000000000 C + 0.0000000000000000 0.0000000000000000 0.2500000000000000 C + 0.3333330000000000 0.6666670000000000 0.7500000000000000 C + 0.6666670000000000 0.3333330000000000 0.2500000000000000 C diff --git a/tests/test_data/vasp/H_Graphite/relax/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax/inputs/POTCAR.spec new file mode 100644 index 0000000000..3cc58df837 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax/inputs/POTCAR.spec @@ -0,0 +1 @@ +C diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/CONTCAR.gz new file mode 100644 index 0000000000..0d927e336d Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/INCAR.gz new file mode 100644 index 0000000000..644832e9ec Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..9764cae86b Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/KPOINTS.gz new file mode 100644 index 0000000000..900383bc3d Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..c602f38d06 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/OUTCAR.gz new file mode 100644 index 0000000000..f42090c4b8 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/POSCAR.gz new file mode 100644 index 0000000000..4bfe3c2be1 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..b25f5b62ed Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax/outputs/POTCAR.spec new file mode 100644 index 0000000000..3cc58df837 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax/outputs/POTCAR.spec @@ -0,0 +1 @@ +C diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/custodian.json.gz new file mode 100644 index 0000000000..8738ca5374 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/relax/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..bf16084403 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/INCAR b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/INCAR new file mode 100644 index 0000000000..11640b1a7f --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/INCAR @@ -0,0 +1,28 @@ +ALGO = All +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +IBRION = 2 +ISIF = 2 +ISMEAR = 0 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = Auto +LVTOT = True +LWAVE = True +MAGMOM = 5*0.6 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 99 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/KPOINTS new file mode 100644 index 0000000000..9bcad4fb60 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +3 3 1 diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/POSCAR new file mode 100644 index 0000000000..617f9a56fe --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/POSCAR @@ -0,0 +1,13 @@ +H1 C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +H C +1 4 +direct + 0.0000000000000000 0.5000000000000000 0.0000000000000000 H+ + 0.0000000000000000 0.0000000000000000 0.7500000000000000 C0+ + 0.0000000000000000 0.0000000000000000 0.2500000000000000 C0+ + 0.3333330000000000 0.6666670000000000 0.7500000000000000 C0+ + 0.6666670000000000 0.3333330000000000 0.2500000000000000 C0+ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_0_(0)/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/CONTCAR.gz new file mode 100644 index 0000000000..e5ddced932 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/INCAR.gz new file mode 100644 index 0000000000..298597479c Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..f071c7b83f Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/KPOINTS.gz new file mode 100644 index 0000000000..3c32dd3495 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..2e72fdc6cf Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/OUTCAR.gz new file mode 100644 index 0000000000..3d70292be3 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POSCAR.gz new file mode 100644 index 0000000000..84804a9cb1 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..eeee286b38 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/custodian.json.gz new file mode 100644 index 0000000000..c140cd913d Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..9bcab1bd0b Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_0_(0)/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/INCAR b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/INCAR new file mode 100644 index 0000000000..6157886906 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/INCAR @@ -0,0 +1,28 @@ +ALGO = All +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +IBRION = 2 +ISIF = 2 +ISMEAR = 0 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = Auto +LVTOT = True +LWAVE = True +MAGMOM = 6*0.6 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 99 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/KPOINTS new file mode 100644 index 0000000000..9bcad4fb60 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +3 3 1 diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/POSCAR new file mode 100644 index 0000000000..cdb39b39a6 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/POSCAR @@ -0,0 +1,14 @@ +H2 C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +H C +2 4 +direct + 0.3888888888888888 0.1944444444444444 0.8999999999999999 H+ + 0.0000000000000000 0.5000000000000000 0.0000000000000000 H+ + 0.9036950000000000 0.9518480000000000 0.6974110000000000 C0.25- + 0.0963050000000000 0.0481520000000000 0.3025890000000000 C0.25- + 0.2373350000000000 0.6186680000000000 0.6984530000000000 C0.25- + 0.7626650000000000 0.3813320000000000 0.3015470000000000 C0.25- diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(0)/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/CONTCAR.gz new file mode 100644 index 0000000000..ff1c9e2278 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/INCAR.gz new file mode 100644 index 0000000000..929037d3b7 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..148d46c003 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/KPOINTS.gz new file mode 100644 index 0000000000..a721397be0 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..d08cc81c4c Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/OUTCAR.gz new file mode 100644 index 0000000000..2a84739a93 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POSCAR.gz new file mode 100644 index 0000000000..2212c4ca17 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..b5e8c71012 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/custodian.json.gz new file mode 100644 index 0000000000..ab66c701a5 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..d758882c2f Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(0)/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/INCAR b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/INCAR new file mode 100644 index 0000000000..6157886906 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/INCAR @@ -0,0 +1,28 @@ +ALGO = All +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +IBRION = 2 +ISIF = 2 +ISMEAR = 0 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = Auto +LVTOT = True +LWAVE = True +MAGMOM = 6*0.6 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 99 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/KPOINTS new file mode 100644 index 0000000000..9bcad4fb60 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +3 3 1 diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/POSCAR new file mode 100644 index 0000000000..e9f3c43aeb --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/POSCAR @@ -0,0 +1,14 @@ +H2 C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +H C +2 4 +direct + 0.4444444444444444 0.7222222222222223 0.4833333333333334 H+ + 0.0000000000000000 0.5000000000000000 0.0000000000000000 H+ + 0.9036950000000000 0.9518480000000000 0.6974110000000000 C0.25- + 0.0963050000000000 0.0481520000000000 0.3025890000000000 C0.25- + 0.2373350000000000 0.6186680000000000 0.6984530000000000 C0.25- + 0.7626650000000000 0.3813320000000000 0.3015470000000000 C0.25- diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(1)/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/CONTCAR.gz new file mode 100644 index 0000000000..622e8ffcd2 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/INCAR.gz new file mode 100644 index 0000000000..64d0620094 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..0342cc5f6d Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/KPOINTS.gz new file mode 100644 index 0000000000..184eaa70b9 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..074f049c4b Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/OUTCAR.gz new file mode 100644 index 0000000000..3fe72a8827 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POSCAR.gz new file mode 100644 index 0000000000..28f1418840 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..52b84ab1ae Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/custodian.json.gz new file mode 100644 index 0000000000..6ef90ac60b Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..4bcab2b897 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(1)/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/INCAR b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/INCAR new file mode 100644 index 0000000000..6157886906 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/INCAR @@ -0,0 +1,28 @@ +ALGO = All +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +IBRION = 2 +ISIF = 2 +ISMEAR = 0 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = Auto +LVTOT = True +LWAVE = True +MAGMOM = 6*0.6 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 99 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/KPOINTS new file mode 100644 index 0000000000..9bcad4fb60 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +3 3 1 diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/POSCAR new file mode 100644 index 0000000000..e2b2d38465 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/POSCAR @@ -0,0 +1,14 @@ +H2 C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +H C +2 4 +direct + 0.3333333333333333 0.1666666666666667 0.0833333333333333 H+ + 0.0000000000000000 0.5000000000000000 0.0000000000000000 H+ + 0.9036950000000000 0.9518480000000000 0.6974110000000000 C0.25- + 0.0963050000000000 0.0481520000000000 0.3025890000000000 C0.25- + 0.2373350000000000 0.6186680000000000 0.6984530000000000 C0.25- + 0.7626650000000000 0.3813320000000000 0.3015470000000000 C0.25- diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(2)/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/CONTCAR.gz new file mode 100644 index 0000000000..1b4e4e47f9 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/INCAR.gz new file mode 100644 index 0000000000..b2966e940a Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..09448801c4 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/KPOINTS.gz new file mode 100644 index 0000000000..889a8d884e Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..011a9da0c4 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/OUTCAR.gz new file mode 100644 index 0000000000..c49a7c5102 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POSCAR.gz new file mode 100644 index 0000000000..81c080b8f9 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..57ee6331a4 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/custodian.json.gz new file mode 100644 index 0000000000..e6ec78a533 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..9425deecf6 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/relax_1_(2)/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/inputs/INCAR b/tests/test_data/vasp/H_Graphite/static_0/inputs/INCAR new file mode 100644 index 0000000000..e8524053c0 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_0/inputs/INCAR @@ -0,0 +1,27 @@ +ALGO = Fast +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +ISIF = 2 +ISMEAR = -5 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 4*0.0 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 0 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/static_0/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/static_0/inputs/KPOINTS new file mode 100644 index 0000000000..e61e15ddb1 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_0/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +4 4 1 diff --git a/tests/test_data/vasp/H_Graphite/static_0/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/static_0/inputs/POSCAR new file mode 100644 index 0000000000..3a506ad1da --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_0/inputs/POSCAR @@ -0,0 +1,12 @@ +C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +C +4 +direct + 0.0000000000000000 0.0000000000000000 0.7500000000000000 C + 0.0000000000000000 0.0000000000000000 0.2500000000000000 C + 0.3333330000000032 0.6666669999999968 0.7500000000000000 C + 0.6666669999999968 0.3333330000000032 0.2500000000000000 C diff --git a/tests/test_data/vasp/H_Graphite/static_0/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/static_0/inputs/POTCAR.spec new file mode 100644 index 0000000000..3cc58df837 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_0/inputs/POTCAR.spec @@ -0,0 +1 @@ +C diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/AECCAR0.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/AECCAR0.gz new file mode 100644 index 0000000000..e950f36609 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/AECCAR0.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/AECCAR2.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/AECCAR2.gz new file mode 100644 index 0000000000..618526f6b2 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/AECCAR2.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/CONTCAR.gz new file mode 100644 index 0000000000..c8345fb23f Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/INCAR.gz new file mode 100644 index 0000000000..70880fa1a8 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..253baf50c7 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/KPOINTS.gz new file mode 100644 index 0000000000..02e3064371 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..35eb45c3e2 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/OUTCAR.gz new file mode 100644 index 0000000000..f96b57c80f Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/POSCAR.gz new file mode 100644 index 0000000000..0db2e468ba Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..81bcb914f5 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/static_0/outputs/POTCAR.spec new file mode 100644 index 0000000000..3cc58df837 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_0/outputs/POTCAR.spec @@ -0,0 +1 @@ +C diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/custodian.json.gz new file mode 100644 index 0000000000..f7ca5a6796 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_0/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/static_0/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..6a80426414 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_0/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/inputs/INCAR b/tests/test_data/vasp/H_Graphite/static_1/inputs/INCAR new file mode 100644 index 0000000000..7958558086 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_1/inputs/INCAR @@ -0,0 +1,27 @@ +ALGO = Fast +EDIFF = 1e-05 +EDIFFG = -0.1 +ENAUG = 1360 +ENCUT = 680 +ISIF = 2 +ISMEAR = -5 +ISPIN = 2 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 1*-0.331 2*-0.215 2*0.21 +METAGGA = R2scan +NCORE = 12 +NELM = 200 +NGX = 18 +NGY = 18 +NGZ = 60 +NSW = 0 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/H_Graphite/static_1/inputs/KPOINTS b/tests/test_data/vasp/H_Graphite/static_1/inputs/KPOINTS new file mode 100644 index 0000000000..9bcad4fb60 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_1/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 88 / number of atoms +0 +Gamma +3 3 1 diff --git a/tests/test_data/vasp/H_Graphite/static_1/inputs/POSCAR b/tests/test_data/vasp/H_Graphite/static_1/inputs/POSCAR new file mode 100644 index 0000000000..28208eaa87 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_1/inputs/POSCAR @@ -0,0 +1,13 @@ +H1 C4 +1.0 + 1.2338620000000000 -2.1371120000000001 0.0000000000000000 + 1.2338620000000000 2.1371120000000001 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 8.6850380000000005 +H C +1 4 +direct + -0.0000000000000000 0.5000000000000000 -0.0000000000000000 H + -0.0963048435554477 -0.0481524217777239 0.6974110642484505 C + 0.0963048435554477 0.0481524217777239 0.3025889357515497 C + 0.2373351124142039 0.6186680562070971 0.6984529814857299 C + 0.7626648875857960 0.3813319437929029 0.3015470185142700 C diff --git a/tests/test_data/vasp/H_Graphite/static_1/inputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/static_1/inputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_1/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/AECCAR0.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/AECCAR0.gz new file mode 100644 index 0000000000..b9ada34059 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/AECCAR0.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/AECCAR2.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/AECCAR2.gz new file mode 100644 index 0000000000..5dce4754d1 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/AECCAR2.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/CONTCAR.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/CONTCAR.gz new file mode 100644 index 0000000000..d4f1c1da83 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/INCAR.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/INCAR.gz new file mode 100644 index 0000000000..7c494ff739 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/INCAR.orig.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/INCAR.orig.gz new file mode 100644 index 0000000000..640521f55d Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/KPOINTS.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/KPOINTS.gz new file mode 100644 index 0000000000..6b52ac1081 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/KPOINTS.orig.gz new file mode 100644 index 0000000000..8c081e5456 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/OUTCAR.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/OUTCAR.gz new file mode 100644 index 0000000000..e82ac55646 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/POSCAR.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/POSCAR.gz new file mode 100644 index 0000000000..f70c2eb53e Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/POSCAR.orig.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/POSCAR.orig.gz new file mode 100644 index 0000000000..6013829d78 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/POTCAR.spec b/tests/test_data/vasp/H_Graphite/static_1/outputs/POTCAR.spec new file mode 100644 index 0000000000..35025b8b16 --- /dev/null +++ b/tests/test_data/vasp/H_Graphite/static_1/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +H +C diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/custodian.json.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/custodian.json.gz new file mode 100644 index 0000000000..100362efd0 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/H_Graphite/static_1/outputs/vasprun.xml.gz b/tests/test_data/vasp/H_Graphite/static_1/outputs/vasprun.xml.gz new file mode 100644 index 0000000000..ea65a1a889 Binary files /dev/null and b/tests/test_data/vasp/H_Graphite/static_1/outputs/vasprun.xml.gz differ diff --git a/tests/vasp/flows/test_electrode.py b/tests/vasp/flows/test_electrode.py new file mode 100644 index 0000000000..49c18ec005 --- /dev/null +++ b/tests/vasp/flows/test_electrode.py @@ -0,0 +1,122 @@ +from __future__ import annotations + +from unittest import mock + +import pytest +from jobflow.settings import JobflowSettings + + +@pytest.fixture() +def mock_jobflow_settings(memory_jobstore): + """Set the UID_TYPE to "ulid" to make sure the documents can be sorted. + + See: https://github.com/materialsproject/jobflow/issues/519#issuecomment-1906850096 + """ + + settings = JobflowSettings(JOB_STORE=memory_jobstore, UID_TYPE="ulid") + + with mock.patch("jobflow.SETTINGS", settings): + yield + + +def test_electrode_makers(mock_vasp, clean_dir, test_dir, mock_jobflow_settings): + from emmet.core.electrode import InsertionElectrodeDoc + from jobflow import OutputReference, run_locally + from monty.serialization import loadfn + from pymatgen.core import Structure + + from atomate2.vasp.flows.core import RelaxMaker, StaticMaker + from atomate2.vasp.flows.electrode import ElectrodeInsertionMaker + from atomate2.vasp.powerups import ( + update_user_incar_settings, + update_user_kpoints_settings, + ) + from atomate2.vasp.sets.mp import ( + MPMetaGGARelaxSetGenerator, + MPMetaGGAStaticSetGenerator, + ) + # mock the default setting + + # mapping from job name to directory containing test files + ref_paths = { + "relax": "H_Graphite/relax", + "relax 0 (0)": "H_Graphite/relax_0_(0)", + "relax 1 (0)": "H_Graphite/relax_1_(0)", + "relax 1 (1)": "H_Graphite/relax_1_(1)", + "relax 1 (2)": "H_Graphite/relax_1_(2)", + "static 0": "H_Graphite/static_0", + "static 1": "H_Graphite/static_1", + } + + fake_run_vasp_kwargs = { + "relax": { + "incar_settings": ["NSW", "ISIF"], + "check_inputs": ["incar", "poscar"], + }, + "relax 0 (0)": {"incar_settings": ["NSW"], "check_inputs": ["incar"]}, + "relax 1 (0)": {"incar_settings": ["NSW"], "check_inputs": ["incar"]}, + "relax 1 (1)": {"incar_settings": ["NSW"], "check_inputs": ["incar"]}, + "relax 1 (2)": {"incar_settings": ["NSW"], "check_inputs": ["incar"]}, + "static 0": {"incar_settings": ["NSW"], "check_inputs": ["incar"]}, + "static 1": {"incar_settings": ["NSW"], "check_inputs": ["incar"]}, + } + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + # create the workflow + struct = Structure.from_file(test_dir / "vasp/H_Graphite/C4.vasp") + h_entry = loadfn(test_dir / "vasp/H_Graphite/H_entry.json") + single_relax_maker = RelaxMaker(input_set_generator=MPMetaGGARelaxSetGenerator()) + static_maker = StaticMaker( + input_set_generator=MPMetaGGAStaticSetGenerator(), task_document_kwargs={} + ) + + maker = ElectrodeInsertionMaker( + relax_maker=single_relax_maker, static_maker=static_maker + ) + flow = maker.make( + struct, inserted_element="H", n_steps=2, working_ion_entry=h_entry + ) + + flow = update_user_kpoints_settings(flow, {"grid_density": 88}) + flow = update_user_incar_settings( + flow, {"NGX": 18, "NGY": 18, "NGZ": 60, "ISIF": 2, "EDIFFG": -0.1} + ) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally( + flow, create_folders=True, ensure_success=True, raise_immediately=True + ) + + inserted_formulas = [] + ie_doc = None + for res in responses.values(): + for r in res.values(): + if not isinstance(r.output, OutputReference) and hasattr( + r.output, "formula_pretty" + ): + inserted_formulas.append( + f"{r.output.formula_pretty}-{r.output.task_label.split()[0]}" + ) + if isinstance(r.output, InsertionElectrodeDoc): + ie_doc = r.output + + inserted_formulas.sort() + + # C-relax, C-static + # HC4-relax (1x first insertion) + # HC4-static + # HC2-relax, (3x second insertion) + assert inserted_formulas == [ + "C-relax", + "C-static", + "HC2-relax", + "HC2-relax", + "HC2-relax", + "HC4-relax", + "HC4-static", + ] + + # None of the secondary insertions were topotactic + assert len(ie_doc.adj_pairs) == 1