diff --git a/pyproject.toml b/pyproject.toml index b7c51bc20..03180aede 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,9 +24,9 @@ classifiers = [ "Topic :: Scientific/Engineering", ] requires-python = '>="3.8"' -dependencies = [ - "pymatgen>=2022.7.8", - "custodian>=2019.8.24", +dependencies =[ + "pymatgen>=2022.8.23", + "custodian>=2022.5.26", "pydantic", "monty", "jobflow>=0.1.5", @@ -38,7 +38,7 @@ dependencies = [ [project.optional-dependencies] amset = ["amset>=0.4.15", "pydash"] cclib = ["cclib"] -phonons = ["phonopy>=1.10.8"] +phonons = ["phonopy>=1.10.8", "seekpath"] docs = [ "numpydoc==1.3.1", "mistune==0.8.4", @@ -62,6 +62,8 @@ strict = [ "click==8.1.3", "PyYAML==6.0", "cclib==1.7.1", + "phonopy==2.15.1", + "seekpath==2.0.1", "numpy", ] diff --git a/src/atomate2/common/jobs.py b/src/atomate2/common/jobs.py index 9a3a6e9ba..e636f9a22 100644 --- a/src/atomate2/common/jobs.py +++ b/src/atomate2/common/jobs.py @@ -6,25 +6,46 @@ from atomate2 import SETTINGS +__all__ = ["structure_to_primitive", "structure_to_conventional"] + @job -def symmetrize_structure( - structure: Structure, symprec: float = SETTINGS.SYMPREC -) -> Structure: +def structure_to_primitive(structure: Structure, symprec: float = SETTINGS.SYMPREC): """ - Symmetrize a structure. + Job that creates a standard primitive structure. Parameters ---------- - structure : .Structure - A structure. - symprec : float - The symmetry precision. + structure: Structure object + input structure that will be transformed + symprec: float + precision to determine symmetry Returns ------- .Structure - A symmetrized structure + """ sga = SpacegroupAnalyzer(structure, symprec=symprec) return sga.get_primitive_standard_structure() + + +@job +def structure_to_conventional(structure: Structure, symprec: float = SETTINGS.SYMPREC): + """ + Job hat creates a standard conventional structure. + + Parameters + ---------- + structure: Structure object + input structure that will be transformed + symprec: float + precision to determine symmetry + + Returns + ------- + .Structure + + """ + sga = SpacegroupAnalyzer(structure, symprec=symprec) + return sga.get_conventional_standard_structure() diff --git a/src/atomate2/vasp/flows/phonons.py b/src/atomate2/vasp/flows/phonons.py new file mode 100644 index 000000000..80f43af28 --- /dev/null +++ b/src/atomate2/vasp/flows/phonons.py @@ -0,0 +1,345 @@ +"""Flows for calculating elastic constants.""" + +from __future__ import annotations + +from dataclasses import dataclass, field +from pathlib import Path +from typing import List + +from jobflow import Flow, Maker +from pymatgen.core.structure import Structure + +from atomate2.common.jobs import structure_to_conventional, structure_to_primitive +from atomate2.common.schemas.math import Matrix3D +from atomate2.vasp.flows.core import DoubleRelaxMaker +from atomate2.vasp.jobs.base import BaseVaspMaker +from atomate2.vasp.jobs.core import DielectricMaker, StaticMaker, TightRelaxMaker +from atomate2.vasp.jobs.phonons import ( + PhononDisplacementMaker, + generate_frequencies_eigenvectors, + generate_phonon_displacements, + get_supercell_size, + get_total_energy_per_cell, + run_phonon_displacements, +) + +__all__ = ["PhononMaker"] + + +@dataclass +class PhononMaker(Maker): + """ + Maker to calculate harmonic phonons with VASP and Phonopy. + + Calculate the harmonic phonons of a material. Initially, a tight structural + relaxation is performed to obtain a structure without forces on the atoms. + Subsequently, supercells with one displaced atom are generated and accurate + forces are computed for these structures. With the help of phonopy, these + forces are then converted into a dynamical matrix. To correct for polarization + effects, a correction of the dynamical matrix based on BORN charges can + be performed. Finally, phonon densities of states, phonon band structures + and thermodynamic properties are computed. + + .. Note:: + It is heavily recommended to symmetrize the structure before passing it to + this flow. Otherwise, a different space group might be detected and too + many displacement calculations will be generated. + It is recommended to check the convergence parameters here and + adjust them if necessary. The default might not be strict enough + for your specific case. + + Parameters + ---------- + name : str + Name of the flows produced by this maker. + sym_reduce : bool + Whether to reduce the number of deformations using symmetry. + symprec : float + Symmetry precision to use in the + reduction of symmetry to find the primitive/conventional cell + (use_primitive_standard_structure, use_conventional_standard_structure) + and to handle all symmetry-related tasks in phonopy + displacement: float + displacement distance for phonons + min_length: float + min length of the supercell that will be built + prefer_90_degrees: bool + if set to True, supercell algorithm will first try to find a supercell + with 3 90 degree angles + get_supercell_size_kwargs: dict + kwargs that will be passed to get_supercell_size to determine supercell size + use_symmetrized_structure: str + allowed strings: "primitive", "conventional", None + + - "primitive" will enforce to start the phonon computation + from the primitive standard structure + according to Setyawan, W., & Curtarolo, S. (2010). + High-throughput electronic band structure calculations: + Challenges and tools. Computational Materials Science, + 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010. + This makes it possible to use certain k-path definitions + with this workflow. Otherwise, we must rely on seekpath + - "conventional" will enforce to start the phonon computation + from the conventional standard structure + according to Setyawan, W., & Curtarolo, S. (2010). + High-throughput electronic band structure calculations: + Challenges and tools. Computational Materials Science, + 49(2), 299-312. doi:10.1016/j.commatsci.2010.05.010. + We will however use seekpath and primitive structures + as determined by from phonopy to compute the phonon band structure + bulk_relax_maker : .BaseVaspMaker or None + A maker to perform a tight relaxation on the bulk. + Set to ``None`` to skip the + bulk relaxation + static_energy_maker : .BaseVaspMaker or None + A maker to perform the computation of the DFT energy on the bulk. + Set to ``None`` to skip the + static energy computation + born_maker: .BaseVaspMaker or None + Maker to compute the BORN charges. + phonon_displacement_maker : .BaseVaspMaker or None + Maker used to compute the forces for a supercell. + generate_frequencies_eigenvectors_kwargs : dict + Keyword arguments passed to :obj:`generate_frequencies_eigenvectors`. + create_thermal_displacements: bool + Bool that determines if thermal_displacement_matrices are computed + kpath_scheme: str + scheme to generate kpoints. Please be aware that + you can only use seekpath with any kind of cell + Otherwise, please use the standard primitive structure + Available schemes are: + "seekpath", "hinuma", "setyawan_curtarolo", "latimer_munro". + "seekpath" and "hinuma" are the same definition but + seekpath can be used with any kind of unit cell as + it relies on phonopy to handle the relationship + to the primitive cell and not pymatgen + code: str + determines the dft code. currently only vasp is implemented. + This keyword might enable the implementation of other codes + in the future + store_force_constants: bool + if True, force constants will be stored + """ + + name: str = "phonon" + sym_reduce: bool = True + symprec: float = 1e-4 + displacement: float = 0.01 + min_length: float | None = 20.0 + prefer_90_degrees: bool = True + get_supercell_size_kwargs: dict = field(default_factory=dict) + use_symmetrized_structure: str | None = None + bulk_relax_maker: BaseVaspMaker | None = field( + default_factory=lambda: DoubleRelaxMaker.from_relax_maker(TightRelaxMaker()) + ) + static_energy_maker: BaseVaspMaker | None = field(default_factory=StaticMaker) + born_maker: BaseVaspMaker | None = field(default_factory=DielectricMaker) + phonon_displacement_maker: BaseVaspMaker = field( + default_factory=PhononDisplacementMaker + ) + create_thermal_displacements: bool = True + generate_frequencies_eigenvectors_kwargs: dict = field(default_factory=dict) + kpath_scheme: str = "seekpath" + code: str = "vasp" + store_force_constants: bool = True + + def make( + self, + structure: Structure, + prev_vasp_dir: str | Path | None = None, + born: List[Matrix3D] | None = None, + epsilon_static: Matrix3D | None = None, + total_dft_energy_per_formula_unit: float | None = None, + supercell_matrix: Matrix3D | None = None, + ): + """ + Make flow to calculate the phonon properties. + + Parameters + ---------- + structure : .Structure + A pymatgen structure. Please start with a structure + that is nearly fully optimized as the internal optimizers + have very strict settings! + prev_vasp_dir : str or Path or None + A previous vasp calculation directory to use for copying outputs. + born: Matrix3D + Instead of recomputing born charges and epsilon, + these values can also be provided manually. + if born, epsilon_static are provided, the born + run will be skipped + this matrix can be provided in the phonopy convention + with born charges for symmetrically + inequivalent atoms only or + it can be provided in the VASP convention with information for + every atom in unit cell. Please be careful when converting + structures within in this workflow as this could lead to errors + epsilon_static: Matrix3D + The high-frequency dielectric constant + Instead of recomputing born charges and epsilon, + these values can also be provided. + if born, epsilon_static are provided, the born + run will be skipped + total_dft_energy_per_formula_unit: float + It has to be given per formula unit (as a result in corresponding Doc) + Instead of recomputing the energy of the bulk structure every time, + this value can also be provided in eV. If it is provided, + the static run will be skipped. This energy is the typical + output dft energy of the dft workflow. No conversion needed. + supercell_matrix: list + instead of min_length, also a supercell_matrix can + be given, e.g. [[1.0,0.0,0.0],[0.0,1.0,0.0],[0.0,0.0,1.0] + """ + if self.use_symmetrized_structure not in [None, "primitive", "conventional"]: + raise ValueError( + "use_symmetrized_structure can only be primitive, conventional, None" + ) + + if ( + not self.use_symmetrized_structure == "primitive" + and self.kpath_scheme != "seekpath" + ): + raise ValueError( + "You can only use other kpath schemes with the primitive standard structure" + ) + + if self.kpath_scheme not in [ + "seekpath", + "hinuma", + "setyawan_curtarolo", + "latimer_munro", + ]: + raise ValueError("kpath scheme is not implemented") + + jobs = [] + + # TODO: should this be after or before structural + # optimization as the optimization could change + # the symmetry + # we could add a tutorial and point out that the structure + # should be nearly optimized before the phonon workflow + if self.use_symmetrized_structure == "primitive": + # These structures are compatible with many + # of the kpath algorithms that are used for Materials Project + prim_job = structure_to_primitive(structure, self.symprec) + jobs.append(prim_job) + structure = prim_job.output + elif self.use_symmetrized_structure == "conventional": + # it could be beneficial to use conventional + # standard structures to arrive faster at supercells with right + # angles + conv_job = structure_to_conventional(structure, self.symprec) + jobs.append(conv_job) + structure = conv_job.output + + if self.bulk_relax_maker is not None: + # optionally relax the structure + bulk = self.bulk_relax_maker.make(structure, prev_vasp_dir=prev_vasp_dir) + jobs.append(bulk) + structure = bulk.output.structure + optimization_run_job_dir = bulk.output.dir_name + optimization_run_uuid = bulk.output.uuid + else: + optimization_run_job_dir = None + optimization_run_uuid = None + + # if supercell_matrix is None, supercell size will be determined + # after relax maker to ensure that cell lengths are really larger + # than threshold + if supercell_matrix is None: + supercell_job = get_supercell_size( + structure, + self.min_length, + self.prefer_90_degrees, + **self.get_supercell_size_kwargs, + ) + jobs.append(supercell_job) + supercell_matrix = supercell_job.output + + # get a phonon object from phonopy + displacements = generate_phonon_displacements( + structure=structure, + supercell_matrix=supercell_matrix, + displacement=self.displacement, + sym_reduce=self.sym_reduce, + symprec=self.symprec, + use_symmetrized_structure=self.use_symmetrized_structure, + kpath_scheme=self.kpath_scheme, + code=self.code, + ) + jobs.append(displacements) + + # perform the phonon displacement calculations + vasp_displacement_calcs = run_phonon_displacements( + displacements=displacements.output, + structure=structure, + supercell_matrix=supercell_matrix, + phonon_maker=self.phonon_displacement_maker, + ) + jobs.append(vasp_displacement_calcs) + + # Computation of static energy + if (self.static_energy_maker is not None) and ( + total_dft_energy_per_formula_unit is None + ): + static_job = self.static_energy_maker.make(structure=structure) + jobs.append(static_job) + total_dft_energy = static_job.output.output.energy + static_run_job_dir = static_job.output.dir_name + static_run_uuid = static_job.output.uuid + else: + if total_dft_energy_per_formula_unit is not None: + # to make sure that one can reuse results from Doc + compute_total_energy_job = get_total_energy_per_cell( + total_dft_energy_per_formula_unit, structure + ) + jobs.append(compute_total_energy_job) + total_dft_energy = compute_total_energy_job.output + else: + total_dft_energy = None + static_run_job_dir = None + static_run_uuid = None + + # Computation of BORN charges + if self.born_maker is not None and (born is None or epsilon_static is None): + born_job = self.born_maker.make(structure) + jobs.append(born_job) + + # I am not happy how we currently access "born" charges + # This is very vasp specific code + epsilon_static = born_job.output.calcs_reversed[0].output.epsilon_static + born = born_job.output.calcs_reversed[0].output.outcar["born"] + born_run_job_dir = born_job.output.dir_name + born_run_uuid = born_job.output.uuid + else: + born_run_job_dir = None + born_run_uuid = None + + phonon_collect = generate_frequencies_eigenvectors( + supercell_matrix=supercell_matrix, + displacement=self.displacement, + sym_reduce=self.sym_reduce, + symprec=self.symprec, + use_symmetrized_structure=self.use_symmetrized_structure, + kpath_scheme=self.kpath_scheme, + code=self.code, + structure=structure, + displacement_data=vasp_displacement_calcs.output, + epsilon_static=epsilon_static, + born=born, + total_dft_energy=total_dft_energy, + static_run_job_dir=static_run_job_dir, + static_run_uuid=static_run_uuid, + born_run_job_dir=born_run_job_dir, + born_run_uuid=born_run_uuid, + optimization_run_job_dir=optimization_run_job_dir, + optimization_run_uuid=optimization_run_uuid, + create_thermal_displacements=self.create_thermal_displacements, + store_force_constants=self.store_force_constants, + **self.generate_frequencies_eigenvectors_kwargs, + ) + + jobs.append(phonon_collect) + # create a flow including all jobs for a phonon computation + flow = Flow(jobs, phonon_collect.output) + return flow diff --git a/src/atomate2/vasp/jobs/phonons.py b/src/atomate2/vasp/jobs/phonons.py new file mode 100644 index 000000000..e00a9096f --- /dev/null +++ b/src/atomate2/vasp/jobs/phonons.py @@ -0,0 +1,367 @@ +from __future__ import annotations + +import logging +from dataclasses import dataclass, field +from typing import List, Union + +import numpy as np +from jobflow import Flow, Response, job +from phonopy import Phonopy +from phonopy.units import VaspToTHz +from pymatgen.core import Structure +from pymatgen.io.phonopy import get_phonopy_structure, get_pmg_structure +from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine +from pymatgen.phonon.dos import PhononDos +from pymatgen.transformations.advanced_transformations import ( + CubicSupercellTransformation, +) + +from atomate2.common.schemas.math import Matrix3D +from atomate2.vasp.jobs.base import BaseVaspMaker +from atomate2.vasp.schemas.phonons import PhononBSDOSDoc +from atomate2.vasp.sets.base import VaspInputGenerator +from atomate2.vasp.sets.core import StaticSetGenerator + +logger = logging.getLogger(__name__) + +__all__ = [ + "get_total_energy_per_cell", + "get_supercell_size", + "generate_phonon_displacements", + "run_phonon_displacements", + "generate_frequencies_eigenvectors", + "PhononDisplacementMaker", +] + + +@job +def get_total_energy_per_cell( + total_dft_energy_per_formula_unit: float, structure: Structure +): + """ + Job that computes total dft energy of the cell. + + Parameters + ---------- + total_dft_energy_per_formula_unit: float + Total DFT energy in eV per formula unit. + structure: Structure object + Corresponding structure object. + """ + formula_units = ( + structure.composition.num_atoms + / structure.composition.reduced_composition.num_atoms + ) + + return total_dft_energy_per_formula_unit * formula_units + + +@job +def get_supercell_size( + structure: Structure, min_length: float, prefer_90_degrees: bool, **kwargs +): + """ + Determine supercell size with given min_length. + + Parameters + ---------- + structure: Structure Object + Input structure that will be used to determine supercell + min_length: float + minimum length of cell in Angstrom + prefer_90_degrees: bool + if True, the algorithm will try to find a cell with 90 degree angles first + **kwargs: + Additional parameters that can be set. + """ + if "min_atoms" not in kwargs: + kwargs["min_atoms"] = None + if "force_diagonal" not in kwargs: + kwargs["force_diagonal"] = False + + if not prefer_90_degrees: + if "max_atoms" not in kwargs: + kwargs["max_atoms"] = None + transformation = CubicSupercellTransformation( + min_length=min_length, + min_atoms=kwargs["min_atoms"], + max_atoms=kwargs["max_atoms"], + force_diagonal=kwargs["force_diagonal"], + force_90_degrees=False, + ) + transformation.apply_transformation(structure=structure) + + else: + if "max_atoms" not in kwargs: + max_atoms = 1000 + else: + max_atoms = kwargs["max_atoms"] + if "angle_tolerance" not in kwargs: + kwargs["angle_tolerance"] = 1e-2 + try: + transformation = CubicSupercellTransformation( + min_length=min_length, + min_atoms=kwargs["min_atoms"], + max_atoms=max_atoms, + force_diagonal=kwargs["force_diagonal"], + force_90_degrees=True, + angle_tolerance=kwargs["angle_tolerance"], + ) + transformation.apply_transformation(structure=structure) + + except AttributeError: + if "max_atoms" not in kwargs: + kwargs["max_atoms"] = None + + transformation = CubicSupercellTransformation( + min_length=min_length, + min_atoms=kwargs["min_atoms"], + max_atoms=kwargs["max_atoms"], + force_diagonal=kwargs["force_diagonal"], + force_90_degrees=False, + ) + transformation.apply_transformation(structure=structure) + + supercell_matrix = transformation.transformation_matrix.tolist() + return supercell_matrix + + +@job +def generate_phonon_displacements( + structure: Structure, + supercell_matrix: np.array, + displacement: float, + sym_reduce: bool, + symprec: float, + use_symmetrized_structure: Union[str, None], + kpath_scheme: str, + code: str, +): + """ + Generate displaced structures with phonopy. + + Parameters + ---------- + structure: Structure object + Fully optimized input structure for phonon run + supercell_matrix: np.array + array to describe supercell matrix + displacement: float + displacement in Angstrom + sym_reduce: bool + if True, symmetry will be used to generate displacements + symprec: float + precision to determine symmetry + use_symmetrized_structure: str or None + primitive, conventional or None + kpath_scheme: str + scheme to generate kpath + code: + code to perform the computations + """ + cell = get_phonopy_structure(structure) + if code == "vasp": + factor = VaspToTHz + # a bit of code repetition here as I currently + # do not see how to pass the phonopy object? + if use_symmetrized_structure == "primitive" and kpath_scheme != "seekpath": + primitive_matrix: Union[List[List[float]], str] = [ + [1.0, 0.0, 0.0], + [0.0, 1.0, 0.0], + [0.0, 0.0, 1.0], + ] + else: + primitive_matrix = "auto" + phonon = Phonopy( + cell, + supercell_matrix, + primitive_matrix=primitive_matrix, + factor=factor, + symprec=symprec, + is_symmetry=sym_reduce, + ) + phonon.generate_displacements(distance=displacement) + + supercells = phonon.supercells_with_displacements + + displacements = [] + for cell in supercells: + displacements.append(get_pmg_structure(cell)) + return displacements + + +@job(output_schema=PhononBSDOSDoc, data=[PhononDos, PhononBandStructureSymmLine]) +def generate_frequencies_eigenvectors( + structure: Structure, + supercell_matrix: np.array, + displacement: float, + sym_reduce: bool, + symprec: float, + use_symmetrized_structure: Union[str, None], + kpath_scheme: str, + code: str, + displacement_data: dict[str, list], + total_dft_energy: float, + epsilon_static: Matrix3D = None, + born: Matrix3D = None, + **kwargs, +): + """ + Analyze the phonon runs and summarize the results. + + Parameters + ---------- + structure: Structure object + Fully optimized structure used for phonon runs + supercell_matrix: np.array + array to describe supercell + displacement: float + displacement in Angstrom used for supercell computation + sym_reduce: bool + if True, symmetry will be used in phonopy + symprec: float + precision to determine symmetry + use_symmetrized_structure: str + primitive, conventional, None are allowed + kpath_scheme: str + kpath scheme for phonon band structure computation + code: str + code to run computations + displacement_data: dict + outputs from displacements + total_dft_energy: float + total dft energy in eV per cell + epsilon_static: Matrix3D + The high-frequency dielectric constant + born: Matrix3D + Born charges + kwargs: dict + Additional parameters that are passed to PhononBSDOSDoc.from_forces_born + + """ + phonon_doc = PhononBSDOSDoc.from_forces_born( + structure=structure, + supercell_matrix=supercell_matrix, + displacement=displacement, + sym_reduce=sym_reduce, + symprec=symprec, + use_symmetrized_structure=use_symmetrized_structure, + kpath_scheme=kpath_scheme, + code=code, + displacement_data=displacement_data, + total_dft_energy=total_dft_energy, + epsilon_static=epsilon_static, + born=born, + **kwargs, + ) + + return phonon_doc + + +@job +def run_phonon_displacements( + displacements, + structure: Structure, + supercell_matrix, + phonon_maker: BaseVaspMaker = None, +): + """ + Run phonon displacements. + + Note, this job will replace itself with N displacement calculations. + + Parameters + ---------- + displacements + structure: Structure object + Fully optimized structure used for phonon computations + supercell_matrix: Matrix3D + supercell matrix for meta data + phonon_maker : .BaseVaspMaker + A VaspMaker to use to generate the elastic relaxation jobs. + """ + if phonon_maker is None: + phonon_maker = PhononDisplacementMaker() + phonon_jobs = [] + outputs: dict[str, list] = { + "displacement_number": [], + "forces": [], + "uuids": [], + "dirs": [], + } + + for i, displacement in enumerate(displacements): + phonon_job = phonon_maker.make(displacement) + phonon_job.append_name(f" {i + 1}/{len(displacements)}") + + # we will add some meta data + info = { + "displacement_number": i, + "original_structure": structure, + "supercell_matrix": supercell_matrix, + } + phonon_job.update_maker_kwargs( + {"_set": {"write_additional_data->phonon_info:json": info}}, dict_mod=True + ) + phonon_jobs.append(phonon_job) + outputs["displacement_number"].append(i) + outputs["uuids"].append(phonon_job.output.uuid) + outputs["dirs"].append(phonon_job.output.dir_name) + outputs["forces"].append(phonon_job.output.output.forces) + + displacement_flow = Flow(phonon_jobs, outputs) + return Response(replace=displacement_flow) + + +@dataclass +class PhononDisplacementMaker(BaseVaspMaker): + """ + Maker to perform a static calculation as a part of the finite displacement method. + + The input set is for a static run with tighter convergence parameters. + Both the k-point mesh density and convergence parameters + are stricter than a normal relaxation. + + Parameters + ---------- + name : str + The job name. + input_set_generator : .VaspInputGenerator + A generator used to make the input set. + write_input_set_kwargs : dict + Keyword arguments that will get passed to :obj:`.write_vasp_input_set`. + copy_vasp_kwargs : dict + Keyword arguments that will get passed to :obj:`.copy_vasp_outputs`. + run_vasp_kwargs : dict + Keyword arguments that will get passed to :obj:`.run_vasp`. + task_document_kwargs : dict + Keyword arguments that will get passed to :obj:`.TaskDocument.from_directory`. + stop_children_kwargs : dict + Keyword arguments that will get passed to :obj:`.should_stop_children`. + write_additional_data : dict + Additional data to write to the current directory. Given as a dict of + {filename: data}. Note that if using FireWorks, dictionary keys cannot contain + the "." character which is typically used to denote file extensions. To avoid + this, use the ":" character, which will automatically be converted to ".". E.g. + ``{"my_file:txt": "contents of the file"}``. + """ + + name: str = "phonon static" + + input_set_generator: VaspInputGenerator = field( + default_factory=lambda: StaticSetGenerator( + user_kpoints_settings={"grid_density": 7000}, + user_incar_settings={ + "IBRION": 2, + "ISIF": 3, + "ENCUT": 700, + "EDIFF": 1e-7, + "LAECHG": False, + "LREAL": False, + "ALGO": "Normal", + "NSW": 0, + "LCHARG": False, + "ISMEAR": 0, + }, + ) + ) diff --git a/src/atomate2/vasp/schemas/phonons.py b/src/atomate2/vasp/schemas/phonons.py new file mode 100644 index 000000000..44f7de5f0 --- /dev/null +++ b/src/atomate2/vasp/schemas/phonons.py @@ -0,0 +1,511 @@ +from __future__ import annotations + +import copy +import logging +from typing import List, Optional, Union + +import numpy as np +from phonopy import Phonopy +from phonopy.phonon.band_structure import get_band_qpoints_and_path_connections +from phonopy.structure.symmetry import elaborate_borns_and_epsilon +from phonopy.units import VaspToTHz +from pydantic import BaseModel, Field +from pymatgen.core import Structure +from pymatgen.io.phonopy import ( + get_ph_bs_symm_line, + get_ph_dos, + get_phonopy_structure, + get_pmg_structure, +) +from pymatgen.io.vasp import Kpoints +from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine +from pymatgen.phonon.dos import PhononDos +from pymatgen.phonon.plotter import PhononBSPlotter, PhononDosPlotter +from pymatgen.symmetry.bandstructure import HighSymmKpath +from pymatgen.symmetry.kpath import KPathSeek + +from atomate2.common.schemas.math import Matrix3D + +logger = logging.getLogger(__name__) + +__all__ = [ + "PhononBSDOSDoc", + "PhononComputationalSettings", + "PhononUUIDs", + "PhononJobDirs", + "ThermalDisplacementData", +] + + +class PhononComputationalSettings(BaseModel): + """Collection to store computational settings for the phonon computation.""" + + # could be optional and implemented at a later stage? + npoints_band: int = Field("number of points for band structure computation") + kpath_scheme: str = Field("indicates the kpath scheme") + kpoint_density_dos: int = Field( + "number of points for computation of free energies and densities of states", + ) + + +class ThermalDisplacementData(BaseModel): + """Collection to store information on the thermal displacement matrices.""" + + freq_min_thermal_displacements: float = Field( + "cutoff frequency in THz to avoid numerical issues in the " + "computation of the thermal displacement parameters" + ) + thermal_displacement_matrix_cif: List[List[Matrix3D]] = Field( + None, description="field including thermal displacement matrices in cif format" + ) + thermal_displacement_matrix: List[List[Matrix3D]] = Field( + None, + description="field including thermal displacement matrices in cartesian coordinate system", + ) + temperatures_thermal_displacements: List[int] = Field( + None, + description="temperatures at which the thermal displacement matrices" + "have been computed", + ) + + +class PhononUUIDs(BaseModel): + """Collection to save all uuids connected to the phonon run.""" + + optimization_run_uuid: str = Field(None, description="optimization run uuid") + displacements_uuids: List[str] = Field( + None, description="The uuids of the displacement jobs." + ) + static_run_uuid: str = Field(None, description="static run uuid") + born_run_uuid: str = Field(None, description="born run uuid") + + +class PhononJobDirs(BaseModel): + """Collection to save all job directories relevant for the phonon run.""" + + displacements_job_dirs: List[str] = Field( + None, description="The directories where the displacement jobs were run." + ) + static_run_job_dir: str = Field( + None, description="Directory where static run was performed." + ) + born_run_job_dir: str = Field( + None, description="Directory where born run was performed." + ) + optimization_run_job_dir: str = Field( + None, description="Directory where optimization run was performed." + ) + + +class PhononBSDOSDoc(BaseModel): + """Collection of all data produced by the phonon workflow.""" + + structure: Structure = Field( + None, + description="Structure of Materials Project.", + ) + + phonon_bandstructure: PhononBandStructureSymmLine = Field( + None, + description="Phonon band structure object.", + ) + + phonon_dos: PhononDos = Field( + None, + description="Phonon density of states object.", + ) + + free_energies: List[float] = Field( + None, + description="vibrational part of the free energies in J/mol per " + "formula unit for temperatures in temperature_list", + ) + + heat_capacities: List[float] = Field( + None, + description="heat capacities in J/K/mol per " + "formula unit for temperatures in temperature_list", + ) + + internal_energies: List[float] = Field( + None, + description="internal energies in J/mol per " + "formula unit for temperatures in temperature_list", + ) + entropies: List[float] = Field( + None, + description="entropies in J/(K*mol) per formula unit" + "for temperatures in temperature_list ", + ) + + temperatures: List[int] = Field( + None, + description="temperatures at which the vibrational" + " part of the free energies" + " and other properties have been computed", + ) + + total_dft_energy: Optional[float] = Field("total DFT energy per formula unit in eV") + + has_imaginary_modes: bool = Field( + None, description="if true, structure has imaginary modes" + ) + + # needed, e.g. to compute Grueneisen parameter etc + force_constants: List[List[Matrix3D]] = Field( + None, description="Force constants between every pair of atoms in the structure" + ) + + born: List[Matrix3D] = Field( + None, + description="born charges as computed from phonopy. Only for symmetrically different atoms", + ) + + epsilon_static: Matrix3D = Field( + None, description="The high-frequency dielectric constant" + ) + + supercell_matrix: Matrix3D = Field("matrix describing the supercell") + primitive_matrix: Matrix3D = Field( + "matrix describing relationship to primitive cell" + ) + + code: str = Field("String describing the code for the computation") + + phonopy_settings: PhononComputationalSettings = Field( + "Field including settings for Phonopy" + ) + + thermal_displacement_data: Optional[ThermalDisplacementData] = Field( + "Includes all data of the " "computation of the thermal displacements" + ) + + jobdirs: PhononJobDirs = Field("Field including all relevant job directories") + + uuids: PhononUUIDs = Field("Field including all relevant uuids") + + @classmethod + def from_forces_born( + cls, + structure: Structure, + supercell_matrix: np.array, + displacement: float, + sym_reduce: bool, + symprec: float, + use_symmetrized_structure: Union[str, None], + kpath_scheme: str, + code: str, + displacement_data: dict[str, list], + total_dft_energy: float, + epsilon_static: Matrix3D = None, + born: Matrix3D = None, + **kwargs, + ): + """ + Generate collection of phonon data. + + Parameters + ---------- + structure: Structure object + supercell_matrix: numpy array describing the supercell + displacement: float + size of displacement in angstrom + sym_reduce: bool + if True, phonopy will use symmetry + symprec: float + precision to determine kpaths, + primitive cells and symmetry in phonopy and pymatgen + use_symmetrized_structure: str + primitive, conentional or None + kpath_scheme: str + kpath scheme to generate phonon band structure + code: str + which code was used for computation + displacement_data: + output of the VASP displacement data + total_dft_energy: float + total energy in eV per cell + epsilon_static: Matrix3D + The high-frequency dielectric constant + born: Matrix3D + born charges + **kwargs: + additional arguments + """ + if code == "vasp": + factor = VaspToTHz + # This opens the opportunity to add support for other codes + # that are supported by phonopy + + cell = get_phonopy_structure(structure) + + if use_symmetrized_structure == "primitive" and kpath_scheme != "seekpath": + primitive_matrix: Union[List[List[float]], str] = [ + [1.0, 0.0, 0.0], + [0.0, 1.0, 0.0], + [0.0, 0.0, 1.0], + ] + else: + primitive_matrix = "auto" + phonon = Phonopy( + cell, + supercell_matrix, + primitive_matrix=primitive_matrix, + factor=factor, + symprec=symprec, + is_symmetry=sym_reduce, + ) + phonon.generate_displacements(distance=displacement) + set_of_forces = [np.array(forces) for forces in displacement_data["forces"]] + + if born is not None and epsilon_static is not None: + if len(structure) == len(born): + borns, epsilon, atom_indices = elaborate_borns_and_epsilon( + ucell=get_phonopy_structure(structure), + borns=np.array(born), + epsilon=np.array(epsilon_static), + symprec=symprec, + primitive_matrix=phonon.primitive_matrix, + supercell_matrix=phonon.supercell_matrix, + ) + else: + borns = np.array(born) + epsilon = np.array(epsilon_static) + if code == "vasp": + if not np.all(np.isclose(borns, 0.0)): + phonon.nac_params = { + "born": borns, + "dielectric": epsilon, + "factor": 14.399652, + } + # Other codes could be added here + else: + borns = None + epsilon = None + + # Produces all force constants + phonon.produce_force_constants(forces=set_of_forces) + + # with phonon.load("phonopy.yaml") the phonopy API can be used + phonon.save("phonopy.yaml") + + # get phonon band structure + kpath_dict, kpath_concrete = cls.get_kpath( + structure=get_pmg_structure(phonon.primitive), + kpath_scheme=kpath_scheme, + symprec=symprec, + ) + + npoints_band = kwargs.get("npoints_band", 101) + qpoints, connections = get_band_qpoints_and_path_connections( + kpath_concrete, npoints=kwargs.get("npoints_band", 101) + ) + + # phonon band structures will always be cmouted + filename_band_yaml = "phonon_band_structure.yaml" + phonon.run_band_structure( + qpoints, path_connections=connections, with_eigenvectors=True + ) + phonon.write_yaml_band_structure(filename=filename_band_yaml) + bs_symm_line = get_ph_bs_symm_line( + filename_band_yaml, labels_dict=kpath_dict, has_nac=born is not None + ) + new_plotter = PhononBSPlotter(bs=bs_symm_line) + + new_plotter.save_plot( + "phonon_band_structure.eps", + img_format=kwargs.get("img_format", "eps"), + units=kwargs.get("units", "THz"), + ) + + # will determine if imaginary modes are present in the structure + imaginary_modes = bs_symm_line.has_imaginary_freq( + tol=kwargs.get("tol_imaginary_modes", 1e-5) + ) + + # gets data for visualization on website - yaml is also enough + bs_symm_line.write_phononwebsite("phonon_website.json") + + # get phonon density of states + filename_dos_yaml = "phonon_dos.yaml" + + kpoint_density_dos = kwargs.get("kpoint_density_dos", 7000) + kpoint = Kpoints.automatic_density( + structure=structure, + kppa=kpoint_density_dos, + force_gamma=True, + ) + phonon.run_mesh(kpoint.kpts[0]) + phonon.run_total_dos() + phonon.write_total_dos(filename=filename_dos_yaml) + dos = get_ph_dos(filename_dos_yaml) + new_plotter_dos = PhononDosPlotter() + new_plotter_dos.add_dos(label="total", dos=dos) + new_plotter_dos.save_plot( + filename="phonon_dos.eps", + img_format=kwargs.get("img_format", "eps"), + units=kwargs.get("units", "THz"), + ) + + # compute vibrational part of free energies per formula unit + temperature_range = np.arange( + kwargs.get("tmin", 0), kwargs.get("tmax", 500), kwargs.get("tstep", 10) + ) + + free_energies = [ + dos.helmholtz_free_energy( + structure=get_pmg_structure(phonon.primitive), t=temperature + ) + for temperature in temperature_range + ] + + entropies = [ + dos.entropy(structure=get_pmg_structure(phonon.primitive), t=temperature) + for temperature in temperature_range + ] + + internal_energies = [ + dos.internal_energy( + structure=get_pmg_structure(phonon.primitive), t=temperature + ) + for temperature in temperature_range + ] + + heat_capacities = [ + dos.cv(structure=get_pmg_structure(phonon.primitive), t=temperature) + for temperature in temperature_range + ] + + # will compute thermal displacement matrices + # for the primitive cell (phonon.primitive!) + # only this is available in phonopy + if kwargs["create_thermal_displacements"]: + + phonon.run_mesh( + kpoint.kpts[0], with_eigenvectors=True, is_mesh_symmetry=False + ) + freq_min_thermal_displacements = kwargs.get( + "freq_min_thermal_displacements", 0.0 + ) + phonon.run_thermal_displacement_matrices( + t_min=kwargs.get("tmin_thermal_displacements", 0), + t_max=kwargs.get("tmax_thermal_displacements", 500), + t_step=kwargs.get("tstep_thermal_displacements", 100), + freq_min=freq_min_thermal_displacements, + ) + + temperature_range_thermal_displacements = np.arange( + kwargs.get("tmin_thermal_displacements", 0), + kwargs.get("tmax_thermal_displacements", 500), + kwargs.get("tstep_thermal_displacements", 100), + ) + for i, temp in enumerate(temperature_range_thermal_displacements): + phonon.thermal_displacement_matrices.write_cif( + phonon.primitive, + i, + filename="tdispmat_" + str(temp) + "K.cif", + ) + tdisp_mat = ( + phonon._thermal_displacement_matrices.thermal_displacement_matrices.tolist() + ) + + tdisp_mat_cif = ( + phonon._thermal_displacement_matrices.thermal_displacement_matrices_cif.tolist() + ) + + else: + tdisp_mat = None + tdisp_mat_cif = None + + formula_units = ( + structure.composition.num_atoms + / structure.composition.reduced_composition.num_atoms + ) + + if total_dft_energy is not None: + total_dft_energy_per_formula_unit = total_dft_energy / formula_units + else: + total_dft_energy_per_formula_unit = None + + return cls( + structure=structure, + phonon_bandstructure=bs_symm_line, + phonon_dos=dos, + free_energies=free_energies, + internal_energies=internal_energies, + heat_capacities=heat_capacities, + entropies=entropies, + temperatures=temperature_range.tolist(), + total_dft_energy=total_dft_energy_per_formula_unit, + has_imaginary_modes=imaginary_modes, + force_constants=phonon.force_constants.tolist() + if kwargs["store_force_constants"] + else None, + born=borns.tolist() if borns is not None else None, + epsilon_static=epsilon.tolist() if epsilon is not None else None, + supercell_matrix=phonon.supercell_matrix.tolist(), + primitive_matrix=phonon.primitive_matrix.tolist(), + code="vasp", + thermal_displacement_data={ + "temperatures_thermal_displacements": temperature_range_thermal_displacements.tolist(), + "thermal_displacement_matrix_cif": tdisp_mat_cif, + "thermal_displacement_matrix": tdisp_mat, + "freq_min_thermal_displacements": freq_min_thermal_displacements, + } + if kwargs["create_thermal_displacements"] + else None, + jobdirs={ + "displacements_job_dirs": displacement_data["dirs"], + "static_run_job_dir": kwargs["static_run_job_dir"], + "born_run_job_dir": kwargs["born_run_job_dir"], + "optimization_run_job_dir": kwargs["optimization_run_job_dir"], + }, + uuids={ + "displacements_uuids": displacement_data["uuids"], + "born_run_uuid": kwargs["born_run_uuid"], + "optimization_run_uuid": kwargs["optimization_run_uuid"], + "static_run_uuid": kwargs["static_run_uuid"], + }, + phonopy_settings={ + "npoints_band": npoints_band, + "kpath_scheme": kpath_scheme, + "kpoint_density_dos": kpoint_density_dos, + }, + ) + + @staticmethod + def get_kpath( + structure: Structure, kpath_scheme: str, symprec: float, **kpath_kwargs + ): + """ + Get high-symmetry points in k-space in phonopy format. + + Parameters + ---------- + structure: Structure Object + kpath_scheme: str + string describing kpath + symprec: float + precision for symmetry determination + **kpath_kwargs: + additional parameters that can be passed to this method as a dict + """ + if kpath_scheme in [ + "setyawan_curtarolo", + "latimer_munro", + "hinuma", + ]: + highsymmkpath = HighSymmKpath( + structure, path_type=kpath_scheme, symprec=symprec, **kpath_kwargs + ) + kpath = highsymmkpath.kpath + elif kpath_scheme == "seekpath": + highsymmkpath = KPathSeek(structure, symprec=symprec, **kpath_kwargs) + kpath = highsymmkpath._kpath + + path = copy.deepcopy(kpath["path"]) + + for ilabelset, labelset in enumerate(kpath["path"]): + for ilabel, label in enumerate(labelset): + path[ilabelset][ilabel] = kpath["kpoints"][label] + return kpath["kpoints"], path diff --git a/src/atomate2/vasp/sets/base.py b/src/atomate2/vasp/sets/base.py index 63af24fc6..7cf694dd9 100644 --- a/src/atomate2/vasp/sets/base.py +++ b/src/atomate2/vasp/sets/base.py @@ -380,6 +380,7 @@ def get_input_set( # type: ignore vasprun=vasprun, outcar=outcar, ) + kspacing = self._kspacing(incar_updates) kpoints = self._get_kpoints(structure, kpoints_updates, kspacing) incar = self._get_incar( @@ -618,6 +619,7 @@ def _get_incar( self.auto_kspacing, bandgap, kpoints, + previous_incar is None, ) # handle auto ISPIN @@ -943,7 +945,13 @@ def _remove_unused_incar_params(incar, skip=None): def _set_kspacing( - incar, incar_settings, user_incar_settings, auto_kspacing, bandgap, kpoints + incar, + incar_settings, + user_incar_settings, + auto_kspacing, + bandgap, + kpoints, + from_prev, ): """ Set KSPACING in an INCAR. @@ -952,6 +960,7 @@ def _set_kspacing( if kspacing set in user_incar_settings then use that if auto_kspacing then do that if kspacing is set in config use that. + if from_prev is True, ISMEAR will be set according to the band gap """ if kpoints is not None: # unset KSPACING as we are using a KPOINTS file @@ -968,15 +977,20 @@ def _set_kspacing( elif "KSPACING" in user_incar_settings: incar["KSPACING"] = user_incar_settings["KSPACING"] elif incar_settings.get("KSPACING") and auto_kspacing: + # will always default to 0.22 in first run as one + # cannot be sure if one treats a metal or + # semiconductor/insulator incar["KSPACING"] = _get_kspacing(bandgap) - - # be careful to not override user_incar_settings - if bandgap == 0: - incar["SIGMA"] = user_incar_settings.get("SIGMA", 0.2) - incar["ISMEAR"] = user_incar_settings.get("ISMEAR", 2) - else: - incar["SIGMA"] = user_incar_settings.get("SIGMA", 0.05) - incar["ISMEAR"] = user_incar_settings.get("ISMEAR", -5) + # This should default to ISMEAR=0 if band gap is not known (first computation) + # if not from_prev: + # # be careful to not override user_incar_settings + if not from_prev: + if bandgap == 0: + incar["SIGMA"] = user_incar_settings.get("SIGMA", 0.2) + incar["ISMEAR"] = user_incar_settings.get("ISMEAR", 2) + else: + incar["SIGMA"] = user_incar_settings.get("SIGMA", 0.05) + incar["ISMEAR"] = user_incar_settings.get("ISMEAR", -5) elif incar_settings.get("KSPACING"): incar["KSPACING"] = incar_settings["KSPACING"] diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/INCAR b/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/INCAR new file mode 100644 index 000000000..d97acffc2 --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/INCAR @@ -0,0 +1,27 @@ +ALGO = Fast +EDIFF = 1e-05 +EDIFFG = -0.02 +ENAUG = 1360 +ENCUT = 680 +GGA = Ps +IBRION = 8 +ISIF = 3 +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LEPSILON = True +LMIXTAU = True +LORBIT = 11 +LPEAD = True +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NSW = 1 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/POSCAR b/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/POSCAR new file mode 100644 index 000000000..197ff210b --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/POSCAR @@ -0,0 +1,16 @@ +Na4 Cl4 +1.0 + 5.6916940000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 5.6916940000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 5.6916940000000000 +Na Cl +4 4 +direct + 0.0000000000000000 0.0000000000000000 0.0000000000000000 Na + 0.0000000000000000 0.5000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.5000000000000000 0.0000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.0000000000000000 Cl + 0.5000000000000000 0.5000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.0000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.5000000000000000 0.0000000000000000 Cl diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/dielectric/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/CONTCAR.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/CONTCAR.gz new file mode 100644 index 000000000..2d40634d8 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/INCAR.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/INCAR.gz new file mode 100644 index 000000000..775fe9ae5 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/INCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/INCAR.orig.gz new file mode 100644 index 000000000..14be72715 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/OUTCAR.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/OUTCAR.gz new file mode 100644 index 000000000..395868028 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POSCAR.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POSCAR.gz new file mode 100644 index 000000000..b2909afbd Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POSCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..4706acfa3 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/custodian.json.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/custodian.json.gz new file mode 100644 index 000000000..9e79c2644 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/vasprun.xml.gz b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/vasprun.xml.gz new file mode 100644 index 000000000..631fe9c7e Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/dielectric/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/INCAR b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/INCAR new file mode 100644 index 000000000..1c97aedb4 --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/INCAR @@ -0,0 +1,24 @@ +ALGO = Normal +EDIFF = 1e-07 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 0 +ISPIN = 2 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/KPOINTS b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/KPOINTS new file mode 100644 index 000000000..5a195a0bf --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 7000 / number of atoms +0 +Gamma +9 9 9 diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/POSCAR b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/POSCAR new file mode 100644 index 000000000..3a9fd5a47 --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/POSCAR @@ -0,0 +1,16 @@ +Na4 Cl4 +1.0 + 5.6916940000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 5.6916940000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 5.6916940000000000 +Na Cl +4 4 +direct + 0.0017569461745484 0.0000000000000000 0.0000000000000000 Na + 0.0000000000000000 0.5000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.5000000000000000 0.0000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.0000000000000000 Cl + 0.5000000000000000 0.5000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.0000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.5000000000000000 0.0000000000000000 Cl diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/CONTCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/CONTCAR.gz new file mode 100644 index 000000000..2452f63dc Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/INCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/INCAR.gz new file mode 100644 index 000000000..fe717c523 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/INCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/INCAR.orig.gz new file mode 100644 index 000000000..f0f4e818d Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/KPOINTS.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/KPOINTS.gz new file mode 100644 index 000000000..489dcee1a Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/KPOINTS.orig.gz new file mode 100644 index 000000000..7c3140462 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/OUTCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/OUTCAR.gz new file mode 100644 index 000000000..8998c5415 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POSCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POSCAR.gz new file mode 100644 index 000000000..9bab534d7 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POSCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..eab1cd619 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/custodian.json.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/custodian.json.gz new file mode 100644 index 000000000..ebe6d72a8 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/phonon_info.json.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/phonon_info.json.gz new file mode 100644 index 000000000..774dd8b2e Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/phonon_info.json.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/vasprun.xml.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/vasprun.xml.gz new file mode 100644 index 000000000..e6e9c9300 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_1_2/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/INCAR b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/INCAR new file mode 100644 index 000000000..1c97aedb4 --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/INCAR @@ -0,0 +1,24 @@ +ALGO = Normal +EDIFF = 1e-07 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 0 +ISPIN = 2 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/KPOINTS b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/KPOINTS new file mode 100644 index 000000000..5a195a0bf --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 7000 / number of atoms +0 +Gamma +9 9 9 diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/POSCAR b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/POSCAR new file mode 100644 index 000000000..e415adbab --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/POSCAR @@ -0,0 +1,16 @@ +Na4 Cl4 +1.0 + 5.6916940000000000 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 5.6916940000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 5.6916940000000000 +Na Cl +4 4 +direct + 0.0000000000000000 0.0000000000000000 0.0000000000000000 Na + 0.0000000000000000 0.5000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.5000000000000000 0.0000000000000000 Na + 0.5017569461745484 0.0000000000000000 0.0000000000000000 Cl + 0.5000000000000000 0.5000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.0000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.5000000000000000 0.0000000000000000 Cl diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/CONTCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/CONTCAR.gz new file mode 100644 index 000000000..8139d349b Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/INCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/INCAR.gz new file mode 100644 index 000000000..ba4ccfb96 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/INCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/INCAR.orig.gz new file mode 100644 index 000000000..ef73a3a26 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/KPOINTS.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/KPOINTS.gz new file mode 100644 index 000000000..b97a66e11 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/KPOINTS.orig.gz new file mode 100644 index 000000000..b4d9368ac Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/OUTCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/OUTCAR.gz new file mode 100644 index 000000000..3ce7fd4b9 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POSCAR.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POSCAR.gz new file mode 100644 index 000000000..2c8776011 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POSCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..4a65713c7 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/custodian.json.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/custodian.json.gz new file mode 100644 index 000000000..fbbfb06ad Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/phonon_info.json.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/phonon_info.json.gz new file mode 100644 index 000000000..cf1289203 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/phonon_info.json.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/vasprun.xml.gz b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/vasprun.xml.gz new file mode 100644 index 000000000..2ef32eb9b Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/phonon_static_2_2/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/inputs/INCAR b/tests/test_data/vasp/NaCl_phonons/static/inputs/INCAR new file mode 100644 index 000000000..0edfdb943 --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/static/inputs/INCAR @@ -0,0 +1,23 @@ +ALGO = Fast +EDIFF = 1e-05 +ENAUG = 1360 +ENCUT = 680 +GGA = Ps +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/NaCl_phonons/static/inputs/POSCAR b/tests/test_data/vasp/NaCl_phonons/static/inputs/POSCAR new file mode 100644 index 000000000..197ff210b --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/static/inputs/POSCAR @@ -0,0 +1,16 @@ +Na4 Cl4 +1.0 + 5.6916940000000000 0.0000000000000000 0.0000000000000000 + -0.0000000000000000 5.6916940000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 5.6916940000000000 +Na Cl +4 4 +direct + 0.0000000000000000 0.0000000000000000 0.0000000000000000 Na + 0.0000000000000000 0.5000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.5000000000000000 Na + 0.5000000000000000 0.5000000000000000 0.0000000000000000 Na + 0.5000000000000000 0.0000000000000000 0.0000000000000000 Cl + 0.5000000000000000 0.5000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.0000000000000000 0.5000000000000000 Cl + 0.0000000000000000 0.5000000000000000 0.0000000000000000 Cl diff --git a/tests/test_data/vasp/NaCl_phonons/static/inputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/static/inputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/static/inputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/CONTCAR.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/CONTCAR.gz new file mode 100644 index 000000000..4541702e2 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/INCAR.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/INCAR.gz new file mode 100644 index 000000000..7d6ca4ab1 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/INCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/INCAR.orig.gz new file mode 100644 index 000000000..7fbf87504 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/OUTCAR.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/OUTCAR.gz new file mode 100644 index 000000000..ff319d92d Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/POSCAR.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/POSCAR.gz new file mode 100644 index 000000000..373721a5a Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/POSCAR.orig.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..61066300d Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/POTCAR.spec b/tests/test_data/vasp/NaCl_phonons/static/outputs/POTCAR.spec new file mode 100644 index 000000000..957a1d97d --- /dev/null +++ b/tests/test_data/vasp/NaCl_phonons/static/outputs/POTCAR.spec @@ -0,0 +1,2 @@ +Na_pv +Cl diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/custodian.json.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/custodian.json.gz new file mode 100644 index 000000000..1d9edd408 Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/NaCl_phonons/static/outputs/vasprun.xml.gz b/tests/test_data/vasp/NaCl_phonons/static/outputs/vasprun.xml.gz new file mode 100644 index 000000000..478b4ea9f Binary files /dev/null and b/tests/test_data/vasp/NaCl_phonons/static/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/INCAR b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/INCAR new file mode 100644 index 000000000..1c97aedb4 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/INCAR @@ -0,0 +1,24 @@ +ALGO = Normal +EDIFF = 1e-07 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 0 +ISPIN = 2 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/KPOINTS b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/KPOINTS new file mode 100644 index 000000000..5a195a0bf --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 7000 / number of atoms +0 +Gamma +9 9 9 diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/POSCAR new file mode 100644 index 000000000..69527787e --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/POSCAR @@ -0,0 +1,16 @@ +Si8 +1.0 + 5.4600000000000000 0.0000000000000001 0.0000000000000005 + -0.0000000000000003 5.4599999999999991 0.0000000000000002 + -0.0000000000000001 -0.0000000000000001 5.4599999999999991 +Si +8 +direct + 0.5018315018315017 0.4999999999999999 0.5000000000000000 Si + 0.4999999999999999 0.0000000000000000 0.0000000000000000 Si + 0.0000000000000000 0.4999999999999999 -0.0000000000000000 Si + 0.0000000000000000 0.0000000000000000 0.5000000000000000 Si + 0.7499999999999999 0.7500000000000000 0.7500000000000000 Si + 0.7499999999999999 0.2499999999999998 0.2500000000000000 Si + 0.2499999999999998 0.7500000000000000 0.2500000000000000 Si + 0.2499999999999998 0.2499999999999998 0.7499999999999998 Si diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/CONTCAR.gz new file mode 100644 index 000000000..112237377 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/INCAR.gz new file mode 100644 index 000000000..7cd67eef6 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/INCAR.orig.gz new file mode 100644 index 000000000..b395f4226 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/KPOINTS.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/KPOINTS.gz new file mode 100644 index 000000000..434b62949 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/KPOINTS.orig.gz new file mode 100644 index 000000000..029e74f40 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/OUTCAR.gz new file mode 100644 index 000000000..b985d66e7 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POSCAR.gz new file mode 100644 index 000000000..02f120254 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..a21c92d7b Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/custodian.json.gz new file mode 100644 index 000000000..988ee47a5 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/phonon_info.json.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/phonon_info.json.gz new file mode 100644 index 000000000..e2a1f8ac0 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/phonon_info.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/vasprun.xml.gz new file mode 100644 index 000000000..321e06415 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_1/phonon_static_1_1/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/INCAR b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/INCAR new file mode 100644 index 000000000..1c97aedb4 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/INCAR @@ -0,0 +1,24 @@ +ALGO = Normal +EDIFF = 1e-07 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 0 +ISPIN = 2 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/KPOINTS b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/KPOINTS new file mode 100644 index 000000000..5a195a0bf --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 7000 / number of atoms +0 +Gamma +9 9 9 diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/POSCAR new file mode 100644 index 000000000..54fa813b2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/POSCAR @@ -0,0 +1,16 @@ +Si8 +1.0 + 5.4600000000000000 0.0000000000000000 0.0000000000000003 + -0.0000000000000003 5.4600000000000000 0.0000000000000003 + 0.0000000000000000 0.0000000000000000 5.4600000000000000 +Si +8 +direct + 0.0018315018315018 0.0000000000000000 0.4999999999999999 Si + 0.2500000000000000 0.7499999999999999 0.2500000000000000 Si + -0.0000000000000000 0.4999999999999999 0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.7499999999999999 Si + 0.4999999999999999 0.0000000000000000 0.0000000000000000 Si + 0.7499999999999999 0.7499999999999999 0.7500000000000000 Si + 0.5000000000000000 0.4999999999999999 0.5000000000000000 Si + 0.7499999999999999 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/CONTCAR.gz new file mode 100644 index 000000000..2185547bd Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/INCAR.gz new file mode 100644 index 000000000..2b6d9f8f9 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/INCAR.orig.gz new file mode 100644 index 000000000..a7a2f7dfb Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/KPOINTS.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/KPOINTS.gz new file mode 100644 index 000000000..520237710 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/KPOINTS.orig.gz new file mode 100644 index 000000000..a35fe69a5 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/OUTCAR.gz new file mode 100644 index 000000000..c859aa12c Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POSCAR.gz new file mode 100644 index 000000000..409a3fd01 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..f7d997cf8 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/custodian.json.gz new file mode 100644 index 000000000..ff14f85cc Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/phonon_info.json.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/phonon_info.json.gz new file mode 100644 index 000000000..10cb591b7 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/phonon_info.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/vasprun.xml.gz new file mode 100644 index 000000000..3e973d72a Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/phonon_static_1_1/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/inputs/INCAR b/tests/test_data/vasp/Si_phonons_2/static/inputs/INCAR new file mode 100644 index 000000000..0edfdb943 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/static/inputs/INCAR @@ -0,0 +1,23 @@ +ALGO = Fast +EDIFF = 1e-05 +ENAUG = 1360 +ENCUT = 680 +GGA = Ps +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/Si_phonons_2/static/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_2/static/inputs/POSCAR new file mode 100644 index 000000000..d4356a81a --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/static/inputs/POSCAR @@ -0,0 +1,16 @@ +Si8 +1.0 + 5.4600000000000000 0.0000000000000000 0.0000000000000003 + -0.0000000000000003 5.4600000000000000 0.0000000000000003 + 0.0000000000000000 0.0000000000000000 5.4600000000000000 +Si +8 +direct + 0.0000000000000000 0.0000000000000000 0.5000000000000000 Si + 0.2500000000000000 0.7500000000000000 0.2500000000000000 Si + 0.0000000000000000 0.5000000000000000 0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.7500000000000000 Si + 0.5000000000000000 0.0000000000000000 0.0000000000000000 Si + 0.7500000000000000 0.7500000000000000 0.7500000000000000 Si + 0.5000000000000000 0.5000000000000000 0.5000000000000000 Si + 0.7500000000000000 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_2/static/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_2/static/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/static/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/CONTCAR.gz new file mode 100644 index 000000000..d36c5e8a5 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/INCAR.gz new file mode 100644 index 000000000..4c136daa4 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/INCAR.orig.gz new file mode 100644 index 000000000..21a7a384b Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/OUTCAR.gz new file mode 100644 index 000000000..8c90ca2b8 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/POSCAR.gz new file mode 100644 index 000000000..99a1d2698 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..69a70f75c Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_2/static/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_2/static/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/custodian.json.gz new file mode 100644 index 000000000..e1b0d40c0 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_2/static/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_2/static/outputs/vasprun.xml.gz new file mode 100644 index 000000000..129001632 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_2/static/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/INCAR b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/INCAR new file mode 100644 index 000000000..1c97aedb4 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/INCAR @@ -0,0 +1,24 @@ +ALGO = Normal +EDIFF = 1e-07 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 0 +ISPIN = 2 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/KPOINTS b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/KPOINTS new file mode 100644 index 000000000..5a195a0bf --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 7000 / number of atoms +0 +Gamma +9 9 9 diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/POSCAR new file mode 100644 index 000000000..04fd80b2b --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/POSCAR @@ -0,0 +1,16 @@ +Si8 +1.0 + 5.4599999999999991 0.0000000000000001 0.0000000000000001 + 0.0000000000000001 5.4599999999999991 -0.0000000000000001 + -0.0000000000000001 -0.0000000000000001 5.4599999999999991 +Si +8 +direct + 0.0018315018315018 -0.0000000000000000 -0.0000000000000000 Si + 1.0000000000000000 0.5000000000000000 0.5000000000000000 Si + 0.5000000000000000 -0.0000000000000000 0.5000000000000000 Si + 0.4999999999999999 0.5000000000000000 0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si + 0.2500000000000000 0.7500000000000001 0.7500000000000000 Si + 0.7500000000000000 0.2500000000000000 0.7500000000000001 Si + 0.7500000000000000 0.7500000000000001 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/CONTCAR.gz new file mode 100644 index 000000000..27c9e11dd Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/INCAR.gz new file mode 100644 index 000000000..079b96cac Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/INCAR.orig.gz new file mode 100644 index 000000000..aefe18fdc Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/KPOINTS.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/KPOINTS.gz new file mode 100644 index 000000000..570222f6f Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/KPOINTS.orig.gz new file mode 100644 index 000000000..948007640 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/OUTCAR.gz new file mode 100644 index 000000000..14ac94de4 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POSCAR.gz new file mode 100644 index 000000000..83a3945fd Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..2d9aea5e5 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/custodian.json.gz new file mode 100644 index 000000000..9bf2ea534 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/phonon_info.json.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/phonon_info.json.gz new file mode 100644 index 000000000..1d3b2191a Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/phonon_info.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/vasprun.xml.gz new file mode 100644 index 000000000..6568863f8 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/phonon_static_1_1/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/inputs/INCAR b/tests/test_data/vasp/Si_phonons_3/static/inputs/INCAR new file mode 100644 index 000000000..90c4454f3 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/static/inputs/INCAR @@ -0,0 +1,23 @@ +ALGO = Fast +EDIFF = 1e-05 +ENAUG = 1360 +ENCUT = 680 +GGA = Ps +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 2*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/Si_phonons_3/static/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_3/static/inputs/POSCAR new file mode 100644 index 000000000..88ce0792f --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/static/inputs/POSCAR @@ -0,0 +1,10 @@ +Si2 +1.0 + 0.0000000000000000 2.7300000000000000 2.7300000000000000 + 2.7300000000000000 0.0000000000000000 2.7300000000000000 + 2.7300000000000000 2.7300000000000000 0.0000000000000000 +Si +2 +direct + 0.0000000000000000 0.0000000000000000 0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_3/static/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_3/static/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/static/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/CONTCAR.gz new file mode 100644 index 000000000..4813b5c71 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/INCAR.gz new file mode 100644 index 000000000..9940377ae Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/INCAR.orig.gz new file mode 100644 index 000000000..0900966a3 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/OUTCAR.gz new file mode 100644 index 000000000..f48b7e917 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/POSCAR.gz new file mode 100644 index 000000000..1b1c5032e Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..275ca0426 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_3/static/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_3/static/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/custodian.json.gz new file mode 100644 index 000000000..740d45a39 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_3/static/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_3/static/outputs/vasprun.xml.gz new file mode 100644 index 000000000..a7356a553 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_3/static/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/INCAR b/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/INCAR new file mode 100644 index 000000000..54d554cdc --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/INCAR @@ -0,0 +1,27 @@ +ALGO = Fast +EDIFF = 1e-05 +EDIFFG = -0.02 +ENAUG = 1360 +ENCUT = 680 +GGA = Ps +IBRION = 8 +ISIF = 3 +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LEPSILON = True +LMIXTAU = True +LORBIT = 11 +LPEAD = True +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 2*0.0 +NELM = 200 +NSW = 1 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/POSCAR new file mode 100644 index 000000000..c417df29c --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/POSCAR @@ -0,0 +1,10 @@ +Si2 +1.0 + 0.0000000000000000 2.7179998699999999 2.7179998699999999 + 2.7179998699999999 -0.0000000000000000 2.7179998699999999 + 2.7179998699999999 2.7179998699999999 0.0000000000000000 +Si +2 +direct + 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/dielectric/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/CONTCAR.gz new file mode 100644 index 000000000..a291cd164 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/INCAR.gz new file mode 100644 index 000000000..2c5f8a995 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/INCAR.orig.gz new file mode 100644 index 000000000..6aa8b03d6 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/OUTCAR.gz new file mode 100644 index 000000000..867ad7201 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POSCAR.gz new file mode 100644 index 000000000..da91080c0 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..f1a372f76 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/custodian.json.gz new file mode 100644 index 000000000..a42b72305 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/vasprun.xml.gz new file mode 100644 index 000000000..137773e9c Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/dielectric/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/INCAR b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/INCAR new file mode 100644 index 000000000..1c97aedb4 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/INCAR @@ -0,0 +1,24 @@ +ALGO = Normal +EDIFF = 1e-07 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 0 +ISPIN = 2 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 8*0.6 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/KPOINTS b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/KPOINTS new file mode 100644 index 000000000..5a195a0bf --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/KPOINTS @@ -0,0 +1,4 @@ +pymatgen with grid density = 7000 / number of atoms +0 +Gamma +9 9 9 diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/POSCAR new file mode 100644 index 000000000..641edb7f6 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/POSCAR @@ -0,0 +1,16 @@ +Si8 +1.0 + 5.4359997399999997 -0.0000000000000002 -0.0000000000000002 + -0.0000000000000002 5.4359997399999997 0.0000000000000002 + 0.0000000000000002 0.0000000000000002 5.4359997399999997 +Si +8 +direct + 0.0018395880202893 -0.0000000000000000 0.0000000000000000 Si + 1.0000000000000000 0.5000000000000000 0.5000000000000000 Si + 0.5000000000000000 -0.0000000000000000 0.5000000000000000 Si + 0.4999999999999999 0.5000000000000000 -0.0000000000000000 Si + 0.2499999999999999 0.2500000000000000 0.2500000000000000 Si + 0.2499999999999999 0.7500000000000000 0.7500000000000000 Si + 0.7499999999999998 0.2500000000000000 0.7500000000000000 Si + 0.7499999999999998 0.7500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/CONTCAR.gz new file mode 100644 index 000000000..80521abea Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/INCAR.gz new file mode 100644 index 000000000..7c689ecda Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/INCAR.orig.gz new file mode 100644 index 000000000..780d833dd Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/KPOINTS.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/KPOINTS.gz new file mode 100644 index 000000000..69c527ecf Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/KPOINTS.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/KPOINTS.orig.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/KPOINTS.orig.gz new file mode 100644 index 000000000..59f63c1b2 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/KPOINTS.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/OUTCAR.gz new file mode 100644 index 000000000..5dcfe167f Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POSCAR.gz new file mode 100644 index 000000000..aacc0b22d Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..4f4154884 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/custodian.json.gz new file mode 100644 index 000000000..a270b0bde Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/phonon_info.json.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/phonon_info.json.gz new file mode 100644 index 000000000..0195a4413 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/phonon_info.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/vasprun.xml.gz new file mode 100644 index 000000000..669d6c560 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/phonon_static_1_1/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/inputs/INCAR b/tests/test_data/vasp/Si_phonons_4/static/inputs/INCAR new file mode 100644 index 000000000..642dcbfe9 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/static/inputs/INCAR @@ -0,0 +1,23 @@ +ALGO = Fast +EDIFF = 1e-05 +ENAUG = 1360 +ENCUT = 680 +GGA = Ps +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = True +LASPH = True +LCHARG = True +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 2*0.0 +NELM = 200 +NPAR = 4 +NSW = 0 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/Si_phonons_4/static/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_4/static/inputs/POSCAR new file mode 100644 index 000000000..c417df29c --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/static/inputs/POSCAR @@ -0,0 +1,10 @@ +Si2 +1.0 + 0.0000000000000000 2.7179998699999999 2.7179998699999999 + 2.7179998699999999 -0.0000000000000000 2.7179998699999999 + 2.7179998699999999 2.7179998699999999 0.0000000000000000 +Si +2 +direct + 0.0000000000000000 -0.0000000000000000 -0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_4/static/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/static/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/static/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/CONTCAR.gz new file mode 100644 index 000000000..c432fa9e2 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/INCAR.gz new file mode 100644 index 000000000..af710aeb5 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/INCAR.orig.gz new file mode 100644 index 000000000..0c0d530ed Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/OUTCAR.gz new file mode 100644 index 000000000..90a5dec8e Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/POSCAR.gz new file mode 100644 index 000000000..d20115c77 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..6db7b23a3 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/static/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/static/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/custodian.json.gz new file mode 100644 index 000000000..91c0b9bcc Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/static/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_4/static/outputs/vasprun.xml.gz new file mode 100644 index 000000000..57f512600 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/static/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/INCAR b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/INCAR new file mode 100644 index 000000000..bc1b937b7 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/INCAR @@ -0,0 +1,25 @@ +ALGO = Fast +EDIFF = 1e-07 +EDIFFG = -0.001 +ENAUG = 1360 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = 2 +ISPIN = 2 +KSPACING = 0.22 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 2*0.6 +NELM = 200 +NSW = 99 +PREC = Accurate +SIGMA = 0.2 diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/POSCAR new file mode 100644 index 000000000..88ce0792f --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/POSCAR @@ -0,0 +1,10 @@ +Si2 +1.0 + 0.0000000000000000 2.7300000000000000 2.7300000000000000 + 2.7300000000000000 0.0000000000000000 2.7300000000000000 + 2.7300000000000000 2.7300000000000000 0.0000000000000000 +Si +2 +direct + 0.0000000000000000 0.0000000000000000 0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/CONTCAR.gz new file mode 100644 index 000000000..092f2bfee Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/INCAR.gz new file mode 100644 index 000000000..a29044e1a Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/INCAR.orig.gz new file mode 100644 index 000000000..c47477dcf Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/OUTCAR.gz new file mode 100644 index 000000000..52b353891 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POSCAR.gz new file mode 100644 index 000000000..089138dc1 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..8e91afc2d Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/custodian.json.gz new file mode 100644 index 000000000..209e77893 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/vasprun.xml.gz new file mode 100644 index 000000000..202258213 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_1/outputs/vasprun.xml.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/INCAR b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/INCAR new file mode 100644 index 000000000..e8d2d7efb --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/INCAR @@ -0,0 +1,25 @@ +ALGO = Fast +EDIFF = 1e-07 +EDIFFG = -0.001 +ENAUG = 1360.0 +ENCUT = 700 +GGA = Ps +IBRION = 2 +ISIF = 3 +ISMEAR = -5 +ISPIN = 2 +KSPACING = 0.282277178618092 +LAECHG = False +LASPH = True +LCHARG = False +LELF = False +LMIXTAU = True +LORBIT = 11 +LREAL = False +LVTOT = True +LWAVE = False +MAGMOM = 2*0.0 +NELM = 200 +NSW = 99 +PREC = Accurate +SIGMA = 0.05 diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/POSCAR b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/POSCAR new file mode 100644 index 000000000..de87a6ba9 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/POSCAR @@ -0,0 +1,10 @@ +Si2 +1.0 + 0.0000000000000000 2.7178629999999999 2.7178629999999999 + 2.7178629999999999 -0.0000000000000000 2.7178629999999999 + 2.7178629999999999 2.7178629999999999 0.0000000000000000 +Si +2 +direct + 0.0000000000000000 -0.0000000000000000 0.0000000000000000 Si + 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/inputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/CONTCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/CONTCAR.gz new file mode 100644 index 000000000..e9a9a6c7a Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/CONTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/INCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/INCAR.gz new file mode 100644 index 000000000..da99e9ea5 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/INCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/INCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/INCAR.orig.gz new file mode 100644 index 000000000..352bfc9ca Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/INCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/OUTCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/OUTCAR.gz new file mode 100644 index 000000000..7bd2516a6 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/OUTCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POSCAR.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POSCAR.gz new file mode 100644 index 000000000..328596616 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POSCAR.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POSCAR.orig.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POSCAR.orig.gz new file mode 100644 index 000000000..3e2edb4de Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POSCAR.orig.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POTCAR.spec b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POTCAR.spec new file mode 100644 index 000000000..e267321d2 --- /dev/null +++ b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/POTCAR.spec @@ -0,0 +1 @@ +Si diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/custodian.json.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/custodian.json.gz new file mode 100644 index 000000000..59a26062e Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/custodian.json.gz differ diff --git a/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/vasprun.xml.gz b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/vasprun.xml.gz new file mode 100644 index 000000000..849d7e939 Binary files /dev/null and b/tests/test_data/vasp/Si_phonons_4/tight_relax_2/outputs/vasprun.xml.gz differ diff --git a/tests/vasp/flows/test_phonon.py b/tests/vasp/flows/test_phonon.py new file mode 100644 index 000000000..d5d717c06 --- /dev/null +++ b/tests/vasp/flows/test_phonon.py @@ -0,0 +1,904 @@ +import numpy as np +import pytest +from pymatgen.core.structure import Structure +from pymatgen.phonon.bandstructure import PhononBandStructureSymmLine +from pymatgen.phonon.dos import PhononDos + +from atomate2.vasp.flows.phonons import PhononMaker +from atomate2.vasp.schemas.phonons import ( + PhononBSDOSDoc, + PhononComputationalSettings, + PhononJobDirs, + PhononUUIDs, + ThermalDisplacementData, +) + + +def test_phonon_wf_only_displacements3(mock_vasp, clean_dir): + from jobflow import run_locally + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = { + "phonon static 1/1": "Si_phonons_2/phonon_static_1_1", + "static": "Si_phonons_2/static", + } + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = { + "phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}, + "static": {"incar_settings": ["NSW", "ISMEAR"]}, + } + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + # !!! Generate job + job = PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + born_maker=None, + use_symmetrized_structure="conventional", + create_thermal_displacements=False, + store_force_constants=False, + prefer_90_degrees=False, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally(job, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + assert isinstance(responses[job.jobs[-1].uuid][1].output, PhononBSDOSDoc) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.free_energies, + [ + 5782.997103024745, + 5626.560247262692, + 4737.407594331182, + 3058.2353930165714, + 710.8101587034118, + ], + ) + + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonon_bandstructure, + PhononBandStructureSymmLine, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.phonon_dos, PhononDos) + assert ( + getattr(responses[job.jobs[-1].uuid][1].output, "thermal_displacement_data") + is None + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.structure, Structure) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.temperatures, [0, 100, 200, 300, 400] + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.has_imaginary_modes, False + ) + assert getattr(responses[job.jobs[-1].uuid][1].output, "force_constants") is None + assert isinstance(responses[job.jobs[-1].uuid][1].output.jobdirs, PhononJobDirs) + assert isinstance(responses[job.jobs[-1].uuid][1].output.uuids, PhononUUIDs) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.total_dft_energy, -5.74555232 + ) + assert getattr(responses[job.jobs[-1].uuid][1].output, "born") is None + assert getattr(responses[job.jobs[-1].uuid][1].output, "epsilon_static") is None + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.supercell_matrix, + [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.primitive_matrix, + ( + (0, 0.5000000000000001, 0.5000000000000001), + (0.5000000000000001, 0.0, 0.5000000000000001), + (0.5000000000000001, 0.5000000000000001, 0.0), + ), + ) + assert responses[job.jobs[-1].uuid][1].output.code == "vasp" + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonopy_settings, + PhononComputationalSettings, + ) + assert responses[job.jobs[-1].uuid][1].output.phonopy_settings.npoints_band == 101 + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpath_scheme + == "seekpath" + ) + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpoint_density_dos + == 7000 + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.entropies, + [ + 0.0, + 4.758835931690624, + 13.006294732918269, + 20.352092580946515, + 26.397942155819845, + ], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.heat_capacities, + [ + 0.0, + 8.049678406519691, + 15.993062329741573, + 19.998721812895262, + 21.90544411094204, + ], + ) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.internal_energies, + [ + 5782.997103024745, + 6102.443839457205, + 7338.666539742863, + 9163.863165837072, + 11269.987019231552, + ], + ) + + +# structure will be kept in the format that was transferred +def test_phonon_wf_only_displacements_no_structural_transformation( + mock_vasp, clean_dir +): + from jobflow import run_locally + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = { + "phonon static 1/1": "Si_phonons_3/phonon_static_1_1", + "static": "Si_phonons_3/static", + } + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = { + "phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}, + "static": {"incar_settings": ["NSW", "ISMEAR"]}, + } + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + # !!! Generate job + job = PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + born_maker=None, + use_symmetrized_structure=None, + create_thermal_displacements=False, + store_force_constants=False, + prefer_90_degrees=False, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally(job, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + assert isinstance(responses[job.jobs[-1].uuid][1].output, PhononBSDOSDoc) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.free_energies, + [ + 5774.566996471001, + 5616.29786373465, + 4724.736849262271, + 3044.193412800876, + 696.3435315493462, + ], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.entropies, + [ + 0.0, + 4.78666294741712, + 13.025332342984333, + 20.36075467024152, + 26.398072464162844, + ], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.heat_capacities, + [ + 0.0, + 8.047497695382027, + 15.971019069215203, + 19.970326488158854, + 21.874752681396565, + ], + ) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.internal_energies, + [ + 5774.566996471001, + 6094.964157503006, + 7329.8033166885825, + 9152.419812411707, + 11255.57251541699, + ], + ) + + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonon_bandstructure, + PhononBandStructureSymmLine, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.phonon_dos, PhononDos) + assert ( + getattr(responses[job.jobs[-1].uuid][1].output, "thermal_displacement_data") + is None + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.structure, Structure) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.temperatures, [0, 100, 200, 300, 400] + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.has_imaginary_modes, False + ) + assert getattr(responses[job.jobs[-1].uuid][1].output, "force_constants") is None + assert isinstance(responses[job.jobs[-1].uuid][1].output.jobdirs, PhononJobDirs) + assert isinstance(responses[job.jobs[-1].uuid][1].output.uuids, PhononUUIDs) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.total_dft_energy, -5.74525804 + ) + assert getattr(responses[job.jobs[-1].uuid][1].output, "born") is None + assert getattr(responses[job.jobs[-1].uuid][1].output, "epsilon_static") is None + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.supercell_matrix, + ((-1.0, 1.0, 1.0), (1.0, -1.0, 1.0), (1.0, 1.0, -1.0)), + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.primitive_matrix, + ( + (1.0000000000000002, 0.0, 0.0), + (0.0, 1.0000000000000002, 0.0), + (0.0, 0.0, 1.0000000000000002), + ), + ) + assert responses[job.jobs[-1].uuid][1].output.code == "vasp" + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonopy_settings, + PhononComputationalSettings, + ) + assert responses[job.jobs[-1].uuid][1].output.phonopy_settings.npoints_band == 101 + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpath_scheme + == "seekpath" + ) + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpoint_density_dos + == 7000 + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.entropies, + [ + 0.0, + 4.78666294741712, + 13.025332342984333, + 20.36075467024152, + 26.398072464162844, + ], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.heat_capacities, + [ + 0.0, + 8.047497695382027, + 15.971019069215203, + 19.970326488158854, + 21.874752681396565, + ], + ) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.internal_energies, + [ + 5774.566996471001, + 6094.964157503006, + 7329.8033166885825, + 9152.419812411707, + 11255.57251541699, + ], + ) + + +# this will test all kpath schemes in combination with primitive cell +@pytest.mark.parametrize( + "kpathscheme", ["seekpath", "hinuma", "setyawan_curtarolo", "latimer_munro"] +) +def test_phonon_wf_only_displacements_kpath(mock_vasp, clean_dir, kpathscheme): + from jobflow import run_locally + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = {"phonon static 1/1": "Si_phonons_1/phonon_static_1_1"} + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = {"phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}} + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + # !!! Generate job + job = PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + static_energy_maker=None, + born_maker=None, + use_symmetrized_structure="primitive", + kpath_scheme=kpathscheme, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally(job, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + # print(type(responses)) + assert isinstance(responses[job.jobs[-1].uuid][1].output, PhononBSDOSDoc) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.free_energies, + [ + 5776.1499503440455, + 5617.747377776762, + 4725.502693639196, + 3043.818276263367, + 694.4907835517783, + ], + ) + + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonon_bandstructure, + PhononBandStructureSymmLine, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.phonon_dos, PhononDos) + assert isinstance( + responses[job.jobs[-1].uuid][1].output.thermal_displacement_data, + ThermalDisplacementData, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.structure, Structure) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.temperatures, [0, 100, 200, 300, 400] + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.has_imaginary_modes, False + ) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.force_constants[0][0][0][0], 13.032324 + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.jobdirs, PhononJobDirs) + assert isinstance(responses[job.jobs[-1].uuid][1].output.uuids, PhononUUIDs) + assert getattr(responses[job.jobs[-1].uuid][1].output, "total_dft_energy") is None + assert getattr(responses[job.jobs[-1].uuid][1].output, "born") is None + assert getattr(responses[job.jobs[-1].uuid][1].output, "epsilon_static") is None + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.supercell_matrix, + [[-1.0, 1.0, 1.0], [1.0, -1.0, 1.0], [1.0, 1.0, -1.0]], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.primitive_matrix, + [[1, 0, 0], [0, 1, 0], [0, 0, 1]], + ) + assert responses[job.jobs[-1].uuid][1].output.code == "vasp" + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonopy_settings, + PhononComputationalSettings, + ) + assert responses[job.jobs[-1].uuid][1].output.phonopy_settings.npoints_band == 101 + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpath_scheme + == kpathscheme + ) + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpoint_density_dos + == 7000 + ) + + +# test supply of born charges, epsilon, dft energy, supercell +def test_phonon_wf_only_displacements_add_inputs(mock_vasp, clean_dir): + from jobflow import run_locally + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = {"phonon static 1/1": "Si_phonons_1/phonon_static_1_1"} + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = {"phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}} + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + born = [ + [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], + [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], + ] + epsilon_static = [ + [5.24520821, 0.0, 0.0], + [0.0, 5.24520817, -0.0], + [0.0, 0.0, 5.27805909], + ] + total_dft_energy_per_formula_unit = -5 + # !!! Generate job + job = PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + static_energy_maker=None, + born_maker=None, + use_symmetrized_structure="primitive", + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make( + structure=structure, + total_dft_energy_per_formula_unit=total_dft_energy_per_formula_unit, + born=born, + epsilon_static=epsilon_static, + ) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally(job, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + # print(type(responses)) + assert isinstance(responses[job.jobs[-1].uuid][1].output, PhononBSDOSDoc) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.free_energies, + [ + 5776.1499503440455, + 5617.747377776762, + 4725.502693639196, + 3043.818276263367, + 694.4907835517783, + ], + ) + + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonon_bandstructure, + PhononBandStructureSymmLine, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.phonon_dos, PhononDos) + assert isinstance( + responses[job.jobs[-1].uuid][1].output.thermal_displacement_data, + ThermalDisplacementData, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.structure, Structure) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.temperatures, [0, 100, 200, 300, 400] + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.has_imaginary_modes, False + ) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.force_constants[0][0][0][0], 13.032324 + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.jobdirs, PhononJobDirs) + assert isinstance(responses[job.jobs[-1].uuid][1].output.uuids, PhononUUIDs) + assert np.allclose(responses[job.jobs[-1].uuid][1].output.born, born) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.total_dft_energy, + total_dft_energy_per_formula_unit, + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.epsilon_static, epsilon_static + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.supercell_matrix, + [[-1.0, 1.0, 1.0], [1.0, -1.0, 1.0], [1.0, 1.0, -1.0]], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.primitive_matrix, + [[1, 0, 0], [0, 1, 0], [0, 0, 1]], + ) + assert responses[job.jobs[-1].uuid][1].output.code == "vasp" + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonopy_settings, + PhononComputationalSettings, + ) + assert responses[job.jobs[-1].uuid][1].output.phonopy_settings.npoints_band == 101 + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpath_scheme + == "seekpath" + ) + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpoint_density_dos + == 7000 + ) + + +# test optional parameters +def test_phonon_wf_only_displacements_optional_settings(mock_vasp, clean_dir): + from jobflow import run_locally + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = {"phonon static 1/1": "Si_phonons_1/phonon_static_1_1"} + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = {"phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}} + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + # !!! Generate job + job = PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + static_energy_maker=None, + born_maker=None, + use_symmetrized_structure="primitive", + create_thermal_displacements=False, + store_force_constants=False, + prefer_90_degrees=False, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally(job, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + assert isinstance(responses[job.jobs[-1].uuid][1].output, PhononBSDOSDoc) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.free_energies, + [ + 5776.1499503440455, + 5617.747377776762, + 4725.502693639196, + 3043.818276263367, + 694.4907835517783, + ], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.entropies, + [ + 0.0, + 4.790668183967239, + 13.034706214127153, + 20.374002842560785, + 26.414254898744545, + ], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.heat_capacities, + [ + 0.0, + 8.053736263830405, + 15.980056690395037, + 19.980312349314378, + 21.885134767453195, + ], + ) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.internal_energies, + [ + 5776.1499503440455, + 6096.814195199836, + 7332.443935293648, + 9156.019127569401, + 11260.192741251365, + ], + ) + + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonon_bandstructure, + PhononBandStructureSymmLine, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.phonon_dos, PhononDos) + assert ( + getattr(responses[job.jobs[-1].uuid][1].output, "thermal_displacement_data") + is None + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.structure, Structure) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.temperatures, [0, 100, 200, 300, 400] + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.has_imaginary_modes, False + ) + assert getattr(responses[job.jobs[-1].uuid][1].output, "force_constants") is None + assert isinstance(responses[job.jobs[-1].uuid][1].output.jobdirs, PhononJobDirs) + assert isinstance(responses[job.jobs[-1].uuid][1].output.uuids, PhononUUIDs) + assert getattr(responses[job.jobs[-1].uuid][1].output, "total_dft_energy") is None + assert getattr(responses[job.jobs[-1].uuid][1].output, "born") is None + assert getattr(responses[job.jobs[-1].uuid][1].output, "epsilon_static") is None + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.supercell_matrix, + [[-1.0, 1.0, 1.0], [1.0, -1.0, 1.0], [1.0, 1.0, -1.0]], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.primitive_matrix, + [[1, 0, 0], [0, 1, 0], [0, 0, 1]], + ) + assert responses[job.jobs[-1].uuid][1].output.code == "vasp" + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonopy_settings, + PhononComputationalSettings, + ) + assert responses[job.jobs[-1].uuid][1].output.phonopy_settings.npoints_band == 101 + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpath_scheme + == "seekpath" + ) + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpoint_density_dos + == 7000 + ) + + +# test run including all steps of the computation for Si +def test_phonon_wf_all_steps(mock_vasp, clean_dir): + from jobflow import run_locally + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = { + "phonon static 1/1": "Si_phonons_4/phonon_static_1_1", + "static": "Si_phonons_4/static", + "tight relax 1": "Si_phonons_4/tight_relax_1", + "tight relax 2": "Si_phonons_4/tight_relax_2", + "dielectric": "Si_phonons_4/dielectric", + } + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = { + "phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}, + "static": {"incar_settings": ["NSW", "ISMEAR"]}, + "tight relax 1": {"incar_settings": ["NSW", "ISMEAR"]}, + "tight relax 2": {"incar_settings": ["NSW", "ISMEAR"]}, + "dielectric": {"incar_settings": ["NSW", "ISMEAR"]}, + } + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + job = PhononMaker( + min_length=3.0, + use_symmetrized_structure=None, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + # run the flow or job and ensure that it finished running successfully + responses = run_locally(job, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + assert isinstance(responses[job.jobs[-1].uuid][1].output, PhononBSDOSDoc) + + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.free_energies, + [ + 5853.741503991992, + 5692.290895556432, + 4798.677849195808, + 3122.482960037922, + 782.1734533334413, + ], + ) + + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonon_bandstructure, + PhononBandStructureSymmLine, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.phonon_dos, PhononDos) + assert isinstance( + responses[job.jobs[-1].uuid][1].output.thermal_displacement_data, + ThermalDisplacementData, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.structure, Structure) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.temperatures, [0, 100, 200, 300, 400] + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.has_imaginary_modes, False + ) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.force_constants[0][0][0][0], + 13.411855999999997, + ) + assert isinstance(responses[job.jobs[-1].uuid][1].output.jobdirs, PhononJobDirs) + assert isinstance(responses[job.jobs[-1].uuid][1].output.uuids, PhononUUIDs) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.born, + [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]], + ) + assert np.isclose( + responses[job.jobs[-1].uuid][1].output.total_dft_energy, -5.746290585 + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.epsilon_static, + ((13.19242034, -0.0, 0.0), (-0.0, 13.19242034, 0.0), (0.0, 0.0, 13.19242034)), + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.supercell_matrix, + [[-1.0, 1.0, 1.0], [1.0, -1.0, 1.0], [1.0, 1.0, -1.0]], + ) + assert np.allclose( + responses[job.jobs[-1].uuid][1].output.primitive_matrix, + [[1, 0, 0], [0, 1, 0], [0, 0, 1]], + ) + assert responses[job.jobs[-1].uuid][1].output.code == "vasp" + assert isinstance( + responses[job.jobs[-1].uuid][1].output.phonopy_settings, + PhononComputationalSettings, + ) + assert responses[job.jobs[-1].uuid][1].output.phonopy_settings.npoints_band == 101 + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpath_scheme + == "seekpath" + ) + assert ( + responses[job.jobs[-1].uuid][1].output.phonopy_settings.kpoint_density_dos + == 7000 + ) + + +# use a structure where born charges are actually useful for the computation and change the values + + +# test raises? +# would be good to check if ValueErrors are raised when certain kpath schemes are combined with +# non-standard-primitive structures +# this will test all kpath schemes in combination with primitive cell +@pytest.mark.parametrize( + "kpathscheme", ["hinuma", "setyawan_curtarolo", "latimer_munro"] +) +def test_phonon_wf_only_displacements_kpath_raises_no_cell_change( + mock_vasp, clean_dir, kpathscheme +): + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = {"phonon static 1/1": "Si_phonons_1/phonon_static_1_1"} + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = {"phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}} + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + with pytest.raises(ValueError): + + PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + static_energy_maker=None, + born_maker=None, + use_symmetrized_structure=None, + kpath_scheme=kpathscheme, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + +@pytest.mark.parametrize( + "kpathscheme", ["hinuma", "setyawan_curtarolo", "latimer_munro"] +) +def test_phonon_wf_only_displacements_kpath_raises(mock_vasp, clean_dir, kpathscheme): + + structure = Structure( + lattice=[[0, 2.73, 2.73], [2.73, 0, 2.73], [2.73, 2.73, 0]], + species=["Si", "Si"], + coords=[[0, 0, 0], [0.25, 0.25, 0.25]], + ) + + # mapping from job name to directory containing test files + ref_paths = {"phonon static 1/1": "Si_phonons_1/phonon_static_1_1"} + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = {"phonon static 1/1": {"incar_settings": ["NSW", "ISMEAR"]}} + + # automatically use fake VASP and write POTCAR.spec during the test + mock_vasp(ref_paths, fake_run_vasp_kwargs) + with pytest.raises(ValueError): + # !!! Generate job + PhononMaker( + min_length=3.0, + bulk_relax_maker=None, + static_energy_maker=None, + born_maker=None, + use_symmetrized_structure="conventional", + kpath_scheme=kpathscheme, + generate_frequencies_eigenvectors_kwargs={"tstep": 100}, + ).make(structure) + + +def test_phonon_wf_all_steps_NaCl(mock_vasp, clean_dir): + from jobflow import run_locally + from pymatgen.core.structure import Structure + + from atomate2.vasp.flows.phonons import PhononMaker + + structure = Structure( + lattice=[ + [5.691694, 0.000000, 0.000000], + [-0.000000, 5.691694, 0.000000], + [0.000000, 0.000000, 5.691694], + ], + species=["Na", "Na", "Na", "Na", "Cl", "Cl", "Cl", "Cl"], + coords=[ + [0.0, 0.0, 0.0], + [0.0, 0.5, 0.5], + [0.5, 0.0, 0.5], + [0.5, 0.5, 0.0], + [0.5, 0.0, 0.0], + [0.5, 0.5, 0.5], + [0.0, 0.0, 0.5], + [0.0, 0.5, 0.0], + ], + ) + + # mapping from job name to directory containing test files + ref_paths = { + "dielectric": "NaCl_phonons/dielectric", + "phonon static 1/2": "NaCl_phonons/phonon_static_1_2", + "phonon static 2/2": "NaCl_phonons/phonon_static_2_2", + "static": "NaCl_phonons/static", + } + + # settings passed to fake_run_vasp; adjust these to check for certain INCAR settings + fake_run_vasp_kwargs = { + "dielectric": {"incar_settings": ["NSW", "ISMEAR"]}, + "phonon static 1/2": {"incar_settings": ["NSW", "ISMEAR"]}, + "phonon static 2/2": {"incar_settings": ["NSW", "ISMEAR"]}, + "static": {"incar_settings": ["NSW", "ISMEAR"]}, + } + + mock_vasp(ref_paths, fake_run_vasp_kwargs) + + phonon_flow = PhononMaker(min_length=3.0, bulk_relax_maker=None).make(structure) + + # run the job + responses = run_locally(phonon_flow, create_folders=True, ensure_success=True) + + # !!! validation on the outputs + assert isinstance(responses[phonon_flow.jobs[-1].uuid][1].output, PhononBSDOSDoc) + assert np.allclose( + responses[phonon_flow.jobs[-1].uuid][1].output.born, + [ + ((1.1033, 0.0, 0.0), (0.0, 1.1033, -0.0), (0.0, 0.0, 1.1033)), + ((-1.1033, 0.0, -0.0), (-0.0, -1.1033, 0.0), (-0.0, 0.0, -1.1033)), + ], + ) diff --git a/tests/vasp/jobs/test_core.py b/tests/vasp/jobs/test_core.py index 45b89a882..cdccc5674 100644 --- a/tests/vasp/jobs/test_core.py +++ b/tests/vasp/jobs/test_core.py @@ -232,7 +232,8 @@ def test_molecular_dynamics(mock_vasp, clean_dir, si_structure): # run the flow or job and ensure that it finished running successfully responses = run_locally(job, create_folders=True, ensure_success=True) - # validation on the outputs + # validation on the output + output1 = responses[job.uuid][1].output assert isinstance(output1, TaskDocument) assert output1.output.energy == pytest.approx(-11.46520398)