diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 50890f49..28369b1d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ Change Log ========== +v3.3.4 +---------- +- Make oxidation state guessing more efficient. +- Update Quantum Espresso and FHI-aims IO functions to work with new (and old) ASE release. +- Minor updates to ensure compatibility with recent ``pymatgen`` release. +- Allow unrecognised defect names when plotting. + v3.3.3 ---------- - Add ``verbose`` option to more parsing/plotting functions for better control of output detail. diff --git a/docs/Tips.rst b/docs/Tips.rst index 095d9795..90730388 100644 --- a/docs/Tips.rst +++ b/docs/Tips.rst @@ -207,6 +207,21 @@ see `docs here `_ page, or by email. + - A current known issue with ``numpy``/``pymatgen`` is that it might give an error similar to this: .. code:: python diff --git a/docs/conf.py b/docs/conf.py index 80d66625..f2a3a6c7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ author = 'Irea Mosquera-Lois, Seán R. Kavanagh' # The full version, including alpha/beta/rc tags -release = '3.3.3' +release = '3.3.4' # -- General configuration --------------------------------------------------- diff --git a/setup.py b/setup.py index 336fa1d5..f583320f 100644 --- a/setup.py +++ b/setup.py @@ -131,7 +131,7 @@ def package_files(directory): setup( name="shakenbreak", - version="3.3.3", + version="3.3.4", description="Package to generate and analyse distorted defect structures, in order to " "identify ground-state and metastable defect configurations.", long_description=long_description, diff --git a/shakenbreak/cli.py b/shakenbreak/cli.py index 13baaaf3..17e16d17 100644 --- a/shakenbreak/cli.py +++ b/shakenbreak/cli.py @@ -9,7 +9,7 @@ from subprocess import call import click -from doped.core import _guess_and_set_oxi_states_with_timeout, _rough_oxi_state_cost_from_comp +from doped.core import guess_and_set_oxi_states_with_timeout from doped.generation import get_defect_name_from_entry from doped.utils.parsing import get_outcar from doped.utils.plotting import format_defect_name @@ -240,14 +240,14 @@ def generate( if key not in valid_args: user_settings.pop(key) - defect_struc = Structure.from_file(defect) - bulk_struc = Structure.from_file(bulk) + defect_struct = Structure.from_file(defect) + bulk_struct = Structure.from_file(bulk) # Note that here the Defect.defect_structure is the defect `supercell` # structure, not the defect `primitive` structure. defect_object = input.identify_defect( - defect_structure=defect_struc, - bulk_structure=bulk_struc, + defect_structure=defect_struct, + bulk_structure=bulk_struct, defect_index=defect_index, defect_coords=defect_coords, ) @@ -464,22 +464,14 @@ def generate_all( Generate the trial distortions and input files for structure-searching for all defects in a given directory. """ - bulk_struc = Structure.from_file(bulk) + bulk_struct = Structure.from_file(bulk) # try parsing the bulk oxidation states first, for later assigning defect "oxi_state"s (i.e. # fully ionised charge states): - # First check if the cost of guessing oxidation states is too high: - if _rough_oxi_state_cost_from_comp(bulk_struc.composition) > 1e6: - # If the cost is too high, avoid setting oxidation states as it will take too long - _bulk_oxi_states = False # will take very long to guess oxi_state - else: - # Otherwise, proceed with setting oxidation states using a separate process to allow timeouts - from multiprocessing import Queue # only import when necessary - - queue = Queue() - _bulk_oxi_states = _guess_and_set_oxi_states_with_timeout(bulk_struc, queue=queue) - if _bulk_oxi_states: # Retrieve the oxidation states if successfully guessed and set - bulk_struc = queue.get() # oxi-state decorated structure - _bulk_oxi_states = {el.symbol: el.oxi_state for el in bulk_struc.composition.elements} + if bulk_struct_w_oxi := guess_and_set_oxi_states_with_timeout( + bulk_struct, break_early_if_expensive=True + ): + bulk_struct = bulk_struct_w_oxi + _bulk_oxi_states = {el.symbol: el.oxi_state for el in bulk_struct.composition.elements} defects_dirs = os.listdir(defects) if config is not None: @@ -595,7 +587,7 @@ def parse_defect_position(defect_name, defect_settings): for defect in defects_dirs: # file or directory if os.path.isfile(f"{defects}/{defect}"): try: # try to parse structure from it - defect_struc = Structure.from_file(f"{defects}/{defect}") + defect_struct = Structure.from_file(f"{defects}/{defect}") defect_name = parse_defect_name(defect, defect_settings) # None if not recognised except Exception: @@ -624,7 +616,7 @@ def parse_defect_position(defect_name, defect_settings): ) continue if defect_file: - defect_struc = Structure.from_file(os.path.join(defects, defect, defect_file)) + defect_struct = Structure.from_file(os.path.join(defects, defect, defect_file)) defect_name = parse_defect_name(defect, defect_settings) else: warnings.warn(f"Could not parse {defects}/{defect} as a defect, skipping.") @@ -633,8 +625,8 @@ def parse_defect_position(defect_name, defect_settings): # Check if indices are provided in config file defect_index, defect_coords = parse_defect_position(defect_name, defect_settings) defect_object = input.identify_defect( - defect_structure=defect_struc, - bulk_structure=bulk_struc, + defect_structure=defect_struct, + bulk_structure=bulk_struct, defect_index=defect_index, defect_coords=defect_coords, oxi_state=( diff --git a/shakenbreak/distortions.py b/shakenbreak/distortions.py index c3aface1..e2c40163 100644 --- a/shakenbreak/distortions.py +++ b/shakenbreak/distortions.py @@ -10,7 +10,10 @@ from hiphive.structure_generation.rattle import _probability_mc_rattle, generate_mc_rattled_structures from pymatgen.analysis.local_env import CrystalNN, MinimumDistanceNN from pymatgen.core.structure import Structure -from pymatgen.io.ase import AseAtomsAdaptor +from pymatgen.io.ase import AseAtomsAdaptor # could be removed to use the Structure.to/from_ase_atoms() + +# methods added in pymatgen 2024.5.31, but then not backwards compatible. Will refactor to this if/when +# pymatgen>=2024.5.31 is a necessary requirement. def _warning_on_one_line(message, category, filename, lineno, file=None, line=None): diff --git a/shakenbreak/energy_lowering_distortions.py b/shakenbreak/energy_lowering_distortions.py index 17e073c2..51feeea0 100644 --- a/shakenbreak/energy_lowering_distortions.py +++ b/shakenbreak/energy_lowering_distortions.py @@ -832,7 +832,7 @@ def write_retest_inputs( code (:obj:`str`): Code used for the geometry relaxations. The supported codes include "vasp", "cp2k", "espresso", "castep" and "fhi-aims" - (case insensitive). + (case-insensitive). (Default: "vasp") input_filename (:obj:`str`): Name of the code input file if different from `ShakeNBreak` @@ -1000,6 +1000,9 @@ def _copy_espresso_files( filename=f"{distorted_dir}/{input_filename}", images=atoms, format="espresso-in", + pseudopotentials={ # doesn't matter, is rewritten below to use same as before + atom: "N/A" for atom in set(atoms.get_chemical_symbols()) + }, ) with open(f"{distorted_dir}/{input_filename}") as f: new_struct = f.read() @@ -1027,6 +1030,9 @@ def _copy_espresso_files( filename=f"{distorted_dir}/{input_filename}", images=atoms, format="espresso-in", + pseudopotentials={ # doesn't matter, is rewritten below to use same as before + atom: "N/A" for atom in set(atoms.get_chemical_symbols()) + }, ) with open(f"{distorted_dir}/{input_filename}") as f: new_struct = f.read() @@ -1048,6 +1054,9 @@ def _copy_espresso_files( filename=f"{distorted_dir}/{input_filename}", images=atoms, format="espresso-in", + pseudopotentials={ + atom: "Pseudopotentials not specified" for atom in set(atoms.get_chemical_symbols()) + }, ) diff --git a/shakenbreak/input.py b/shakenbreak/input.py index bde74f1b..a2aa93ae 100644 --- a/shakenbreak/input.py +++ b/shakenbreak/input.py @@ -12,21 +12,14 @@ import shutil import warnings from importlib.metadata import version -from multiprocessing import Queue +from pathlib import Path from typing import Optional, Tuple, Union import ase import numpy as np -from ase.calculators.aims import Aims from ase.calculators.castep import Castep -from ase.calculators.espresso import Espresso from doped import _ignore_pmg_warnings -from doped.core import ( - Defect, - DefectEntry, - _guess_and_set_oxi_states_with_timeout, - _rough_oxi_state_cost_from_comp, -) +from doped.core import Defect, DefectEntry, guess_and_set_oxi_states_with_timeout from doped.generation import DefectsGenerator, name_defect_entries from doped.utils.parsing import ( get_defect_site_idxs_and_unrelaxed_structure, @@ -43,7 +36,7 @@ from pymatgen.io.ase import AseAtomsAdaptor from pymatgen.io.cp2k.inputs import Cp2kInput from pymatgen.io.vasp.inputs import Kpoints -from pymatgen.io.vasp.sets import BadInputSetWarning, UserPotcarFunctional +from pymatgen.io.vasp.sets import BadInputSetWarning from scipy.cluster.hierarchy import fcluster, linkage from scipy.spatial import Voronoi from scipy.spatial.distance import squareform @@ -293,7 +286,7 @@ def _create_vasp_input( defect_name: str, distorted_defect_dict: dict, user_incar_settings: Optional[dict] = None, - user_potcar_functional: Optional[UserPotcarFunctional] = "PBE", + user_potcar_functional: Optional[str] = "PBE", user_potcar_settings: Optional[dict] = None, output_path: str = ".", **kwargs, @@ -375,13 +368,15 @@ def _create_vasp_input( for dir in matching_dirs: with contextlib.suppress(Exception): # if Unperturbed structure could not be parsed / # compared to distorted_defect_dict, then pass - prev_unperturbed_struc = Structure.from_file(f"{output_path}/{dir}/Unperturbed/POSCAR") - current_unperturbed_struc = distorted_defect_dict["Unperturbed"][ + prev_unperturbed_struct = Structure.from_file( + f"{output_path}/{dir}/Unperturbed/POSCAR" + ) + current_unperturbed_struct = distorted_defect_dict["Unperturbed"][ "Defect Structure" ].copy() - for i in [prev_unperturbed_struc, current_unperturbed_struc]: + for i in [prev_unperturbed_struct, current_unperturbed_struct]: i.remove_oxidation_states() - if prev_unperturbed_struc == current_unperturbed_struc: + if prev_unperturbed_struct == current_unperturbed_struct: warnings.warn( f"The previously-generated defect distortions folder {dir} in " f"{os.path.basename(os.path.abspath(output_path))} " @@ -779,17 +774,17 @@ def _get_voronoi_nodes( # map back to the supercell sm = StructureMatcher(primitive_cell=False, attempt_supercell=True) mapping = sm.get_supercell_matrix(structure, prim_structure) - voronoi_struc = Structure.from_sites(vnodes) # Structure object with Voronoi nodes as sites - voronoi_struc.make_supercell(mapping) # Map back to the supercell + voronoi_struct = Structure.from_sites(vnodes) # Structure object with Voronoi nodes as sites + voronoi_struct.make_supercell(mapping) # Map back to the supercell # check if there was an origin shift between primitive and supercell regenerated_supercell = prim_structure.copy() regenerated_supercell.make_supercell(mapping) fractional_shift = sm.get_transformation(structure, regenerated_supercell)[1] if not np.allclose(fractional_shift, 0): - voronoi_struc.translate_sites(range(len(voronoi_struc)), fractional_shift, frac_coords=True) + voronoi_struct.translate_sites(range(len(voronoi_struct)), fractional_shift, frac_coords=True) - return voronoi_struc.sites + return voronoi_struct.sites def _get_voronoi_multiplicity(site, structure): @@ -868,38 +863,36 @@ def identify_defect( ) from exc # remove oxidation states before site-matching - defect_struc = defect_structure.copy() # copy to prevent overwriting original structures - bulk_struc = bulk_structure.copy() - defect_struc.remove_oxidation_states() + defect_struct = defect_structure.copy() # copy to prevent overwriting original structures + bulk_struct = bulk_structure.copy() + defect_struct.remove_oxidation_states() + bulk_struct.remove_oxidation_states() _bulk_oxi_states = False if oxi_state is None: - if all(hasattr(site.specie, "oxi_state") for site in bulk_struc.sites) and all( - isinstance(site.specie.oxi_state, (int, float)) for site in bulk_struc.sites + if all(hasattr(site.specie, "oxi_state") for site in bulk_struct.sites) and all( + isinstance(site.specie.oxi_state, (int, float)) for site in bulk_struct.sites ): - _bulk_oxi_states = {el.symbol: el.oxi_state for el in bulk_struc.composition.elements} + _bulk_oxi_states = {el.symbol: el.oxi_state for el in bulk_struct.composition.elements} else: # try guessing bulk oxi states now, before Defect initialisation: - if _rough_oxi_state_cost_from_comp(bulk_struc.composition) < 1e6: - # otherwise will take very long to guess oxi_state - queue = Queue() - _bulk_oxi_states = _guess_and_set_oxi_states_with_timeout(bulk_struc, queue=queue) - if _bulk_oxi_states: - bulk_struc = queue.get() # oxi-state decorated structure - _bulk_oxi_states = {el.symbol: el.oxi_state for el in bulk_struc.composition.elements} - - bulk_struc.remove_oxidation_states() + if bulk_struct_w_oxi := guess_and_set_oxi_states_with_timeout( + bulk_struct, break_early_if_expensive=True + ): + _bulk_oxi_states = { + el.symbol: el.oxi_state for el in bulk_struct_w_oxi.composition.elements + } bulk_site_index = None defect_site_index = None - if defect_type == "vacancy" and defect_index: # defect_index should correspond to bulk struc + if defect_type == "vacancy" and defect_index: # defect_index should correspond to bulk struct bulk_site_index = defect_index - elif defect_index: # defect_index should correspond to defect struc + elif defect_index: # defect_index should correspond to defect struct if defect_type == "interstitial": defect_site_index = defect_index if defect_type == "substitution": # also want bulk site index for substitutions, # so use defect index coordinates - defect_coords = defect_struc[defect_index].frac_coords + defect_coords = defect_struct[defect_index].frac_coords if defect_coords is not None: if bulk_site_index is None and defect_site_index is None: @@ -919,17 +912,17 @@ def _possible_sites_in_sphere(structure, frac_coords, tol): key=lambda x: x[1], ) - max_possible_defect_sites_in_bulk_struc = _possible_sites_in_sphere( - bulk_struc, defect_coords, 2.5 + max_possible_defect_sites_in_bulk_struct = _possible_sites_in_sphere( + bulk_struct, defect_coords, 2.5 ) - max_possible_defect_sites_in_defect_struc = _possible_sites_in_sphere( - defect_struc, defect_coords, 2.5 + max_possible_defect_sites_in_defect_struct = _possible_sites_in_sphere( + defect_struct, defect_coords, 2.5 ) - expanded_possible_defect_sites_in_bulk_struc = _possible_sites_in_sphere( - bulk_struc, defect_coords, 3.0 + expanded_possible_defect_sites_in_bulk_struct = _possible_sites_in_sphere( + bulk_struct, defect_coords, 3.0 ) - expanded_possible_defect_sites_in_defect_struc = _possible_sites_in_sphere( - defect_struc, defect_coords, 3.0 + expanded_possible_defect_sites_in_defect_struct = _possible_sites_in_sphere( + defect_struct, defect_coords, 3.0 ) # there should be one site (including specie identity) which does not match between @@ -951,12 +944,12 @@ def _remove_matching_sites(bulk_site_list, defect_site_list): return bulk_sites_list, defect_sites_list non_matching_bulk_sites, _ = _remove_matching_sites( - max_possible_defect_sites_in_bulk_struc, - expanded_possible_defect_sites_in_defect_struc, + max_possible_defect_sites_in_bulk_struct, + expanded_possible_defect_sites_in_defect_struct, ) _, non_matching_defect_sites = _remove_matching_sites( - expanded_possible_defect_sites_in_bulk_struc, - max_possible_defect_sites_in_defect_struc, + expanded_possible_defect_sites_in_bulk_struct, + max_possible_defect_sites_in_defect_struct, ) if len(non_matching_bulk_sites) == 0 and len(non_matching_defect_sites) == 0: @@ -975,18 +968,18 @@ def _remove_matching_sites(bulk_site_list, defect_site_list): searched = "bulk or defect" possible_defects = [] while site_displacement_tol < 5: # loop over distance tolerances - possible_defect_sites_in_bulk_struc = _possible_sites_in_sphere( - bulk_struc, defect_coords, site_displacement_tol + possible_defect_sites_in_bulk_struct = _possible_sites_in_sphere( + bulk_struct, defect_coords, site_displacement_tol ) - possible_defect_sites_in_defect_struc = _possible_sites_in_sphere( - defect_struc, defect_coords, site_displacement_tol + possible_defect_sites_in_defect_struct = _possible_sites_in_sphere( + defect_struct, defect_coords, site_displacement_tol ) if ( defect_type == "vacancy" ): # defect site should be in bulk structure but not defect structure possible_defects, _ = _remove_matching_sites( - possible_defect_sites_in_bulk_struc, - expanded_possible_defect_sites_in_defect_struc, + possible_defect_sites_in_bulk_struct, + expanded_possible_defect_sites_in_defect_struct, ) searched = "bulk" if len(possible_defects) == 1: @@ -996,15 +989,15 @@ def _remove_matching_sites(bulk_site_list, defect_site_list): else: # interstitial or substitution # defect site should be in defect structure but not bulk structure _, possible_defects = _remove_matching_sites( - expanded_possible_defect_sites_in_bulk_struc, - possible_defect_sites_in_defect_struc, + expanded_possible_defect_sites_in_bulk_struct, + possible_defect_sites_in_defect_struct, ) searched = "defect" if len(possible_defects) == 1: if defect_type == "substitution": possible_defects_in_bulk, _ = _remove_matching_sites( - possible_defect_sites_in_bulk_struc, - expanded_possible_defect_sites_in_defect_struc, + possible_defect_sites_in_bulk_struct, + expanded_possible_defect_sites_in_defect_struct, ) if len(possible_defects_in_bulk) == 1: bulk_site_index = possible_defects_in_bulk[0][2] @@ -1075,16 +1068,16 @@ def _remove_matching_sites(bulk_site_list, defect_site_list): defect_site_index = auto_matching_defect_site_index if defect_type == "vacancy": - defect_site = bulk_struc[bulk_site_index] + defect_site = bulk_struct[bulk_site_index] elif defect_type == "substitution": - defect_site_in_bulk = bulk_struc[bulk_site_index] + defect_site_in_bulk = bulk_struct[bulk_site_index] defect_site = PeriodicSite( - defect_struc[defect_site_index].specie, + defect_struct[defect_site_index].specie, defect_site_in_bulk.frac_coords, - bulk_struc.lattice, + bulk_struct.lattice, ) else: - defect_site = defect_struc[defect_site_index] + defect_site = defect_struct[defect_site_index] if (defect_index is not None or defect_coords is not None) and ( auto_matching_defect_site_index is not None or auto_matching_bulk_site_index is not None @@ -1098,9 +1091,9 @@ def _remove_matching_sites(bulk_site_list, defect_site_list): ) if user_index != auto_index: if defect_type == "vacancy": - auto_matching_defect_site = bulk_struc[auto_index] + auto_matching_defect_site = bulk_struct[auto_index] else: - auto_matching_defect_site = defect_struc[auto_index] + auto_matching_defect_site = defect_struct[auto_index] def _site_info(site): return ( @@ -2523,7 +2516,7 @@ def _prepare_distorted_defect_inputs( def write_vasp_files( self, user_incar_settings: Optional[dict] = None, - user_potcar_functional: Optional[UserPotcarFunctional] = "PBE", + user_potcar_functional: Optional[str] = "PBE", user_potcar_settings: Optional[dict] = None, output_path: str = ".", verbose: bool = False, @@ -2634,6 +2627,7 @@ def write_espresso_files( write_structures_only: Optional[bool] = False, output_path: str = ".", verbose: Optional[bool] = False, + profile=None, ) -> Tuple[dict, dict]: """ Generates input files for Quantum Espresso relaxations of all output @@ -2653,6 +2647,7 @@ def write_espresso_files( `shakenbreak` default ones (see `SnB_input_files/qe_input.yaml`). If both `input_parameters` and `input_file` are provided, the input_parameters will be used. + (Default: None) write_structures_only (:obj:`bool`, optional): Whether to only write the structure files (in CIF format) (without calculation inputs). @@ -2665,12 +2660,24 @@ def write_espresso_files( Whether to print distortion information (bond atoms and distances). (Default: False) + profile (:obj:`BaseProfile`, optional): + ASE profile object to use for the ``Espresso()`` calculator + class, if using ase>=3.23. If ``None`` (default), set to + ``EspressoProfile(command="pw.x", pseudo_dir=".")``. Returns: :obj:`tuple`: Tuple of dictionaries with new defects_dict (containing the distorted structures) and defect distortion parameters. """ + try: + old_ase = False # >=3.23 + from ase.calculators.espresso import EspressoProfile, EspressoTemplate + except ImportError: + old_ase = True + from ase.calculators.espresso import Espresso + if not old_ase: + profile = profile or EspressoProfile(command="pw.x", pseudo_dir=".") distorted_defects_dict, self.distortion_metadata = self.apply_distortions( verbose=verbose, ) @@ -2704,30 +2711,49 @@ def write_espresso_files( if not pseudopotentials or write_structures_only: # only write structures warnings.warn( - "Since `pseudopotentials` have not been specified, " - "will only write input structures." + "Since `pseudopotentials` have not been specified, will only write input structures." ) ase.io.write( filename=f"{folder_path}/espresso.pwi", images=atoms, format="espresso-in", + pseudopotentials={ + atom: "Pseudopotential not specified" for atom in set(atoms.get_chemical_symbols()) + }, ) else: # write complete input file default_input_parameters["SYSTEM"]["tot_charge"] = charge # Update defect charge + if old_ase: + calc = Espresso( + pseudopotentials=pseudopotentials, + tstress=False, + tprnfor=True, + kpts=(1, 1, 1), + input_data=default_input_parameters, + ) + calc.write_input(atoms) + os.replace( + "./espresso.pwi", + f"{folder_path}/espresso.pwi", + ) + + else: # ase >= 3.23 + template = EspressoTemplate() + template.write_input( + profile=profile, + directory=Path(folder_path), + atoms=atoms, + parameters={ + "tstress": False, + "tprnfor": True, + "pseudopotentials": pseudopotentials, + "kpts": (1, 1, 1), + "input_data": default_input_parameters, + }, + properties=None, + ) - calc = Espresso( - pseudopotentials=pseudopotentials, - tstress=False, - tprnfor=True, - kpts=(1, 1, 1), - input_data=default_input_parameters, - ) - calc.write_input(atoms) - os.replace( - "./espresso.pwi", - f"{folder_path}/espresso.pwi", - ) return distorted_defects_dict, self.distortion_metadata def write_cp2k_files( @@ -2872,29 +2898,34 @@ def write_castep_files( def write_fhi_aims_files( self, input_file: Optional[str] = None, - ase_calculator: Optional[Aims] = None, + ase_calculator=None, # Aims or AimsTemplate write_structures_only: Optional[bool] = False, output_path: str = ".", verbose: Optional[bool] = False, + profile=None, ) -> Tuple[dict, dict]: """ Generates input geometry and control files for FHI-aims relaxations of all output structures. + Note that if using ASE >= 3.23 and not ``write_structures_only``, the + ``$AIMS_SPECIES_DIR`` environment variable must be set. + Args: input_file (:obj:`str`, optional): Path to FHI-aims input file, to overwrite/update `shakenbreak` default ones. If both `input_file` and `ase_calculator` are provided, the ase_calculator will be used. - ase_calculator (:obj:`ase.calculators.aims.Aims`, optional): - ASE calculator object to use for FHI-aims calculations. - If not set, `shakenbreak` default values will be used. - Recommended to check these. + ase_calculator (:obj:`Aims`, :obj:`AimsTemplate`, optional): + Either an ``Aims`` (ASE calculator) or ``AimsTemplate`` object + to obtain parameters from, for FHI-aims calculations. + If not set, ``ShakeNBreak`` default values will be used. + Recommended to check these! (Default: None) write_structures_only (:obj:`bool`, optional): - Whether to only write the structure files (in `geometry.in` - format), (without the contro-in file). + Whether to only write the structure files (in ``geometry.in`` + format), without the ``control.in`` file. output_path (:obj:`str`, optional): Path to directory in which to write distorted defect structures and calculation inputs. @@ -2903,36 +2934,52 @@ def write_fhi_aims_files( Whether to print distortion information (bond atoms and distances). (Default: False) + profile (:obj:`BaseProfile`, optional): + ASE profile object to use for the ``Aims()`` calculator + class, if using ase>=3.23. If ``None`` (default), set to + ``AimsProfile(command="fhiaims.x")``. Returns: :obj:`tuple`: Tuple of dictionaries with new defects_dict (containing the distorted structures) and defect distortion parameters. """ + try: + old_ase = False # >=3.23 + from ase.calculators.aims import AimsProfile, AimsTemplate + except ImportError: + old_ase = True + from ase.calculators.aims import Aims + + if not old_ase: + profile = profile or AimsProfile(command="fhiaims.x") + template = AimsTemplate() + distorted_defects_dict, self.distortion_metadata = self.apply_distortions( verbose=verbose, ) aaa = AseAtomsAdaptor() + parameters = {} if input_file and not ase_calculator: - params = io.parse_fhi_aims_input(input_file) - ase_calculator = Aims( - k_grid=(1, 1, 1), - **params, - ) - # params is in the format key: (value, value) - - if not ase_calculator and not write_structures_only: - ase_calculator = Aims( - k_grid=(1, 1, 1), - relax_geometry=("bfgs", 5e-3), - xc=("hse06", 0.11), - hse_unit="A", # Angstrom - spin="collinear", # Spin polarized - default_initial_moment=0, # Needs to be set - hybrid_xc_coeff=0.25, + parameters = io.parse_fhi_aims_input(input_file) + parameters.update({"k_grid": (1, 1, 1)}) + + if not parameters and not write_structures_only: + parameters = { + "k_grid": (1, 1, 1), + "relax_geometry": ("bfgs", 5e-3), + "xc": ("hse06", 0.11), + "hse_unit": "A", # Angstrom + "spin": "collinear", # Spin polarized + "default_initial_moment": 0, # Needs to be set + "hybrid_xc_coeff": 0.25, # By default symmetry is not preserved - ) + } + + if ase_calculator: + parameters = ase_calculator.parameters + # loop for each defect in dict for folder_path, ( struct, @@ -2940,17 +2987,17 @@ def write_fhi_aims_files( ) in self._prepare_distorted_defect_inputs( distorted_defects_dict, output_path, include_charge_state=True ).items(): - if isinstance(ase_calculator, Aims) and not write_structures_only: - ase_calculator.set(charge=charge) # Defect charge state + if not write_structures_only: + parameters["charge"] = charge # Defect charge state # Total number of electrons for net spin initialization # Must set initial spin moments (otherwise FHI-aims will # lead to 0 final spin) if struct.composition.total_electrons % 2 == 0: # Even number of electrons -> net spin is 0 - ase_calculator.set(default_initial_moment=0) + parameters["default_initial_moment"] = 0 else: - ase_calculator.set(default_initial_moment=1) + parameters["default_initial_moment"] = 1 atoms = aaa.get_atoms(struct) dist = folder_path.split("/")[-1] @@ -2962,11 +3009,21 @@ def write_fhi_aims_files( info_str=dist, ) # write input structure file - if isinstance(ase_calculator, Aims) and not write_structures_only: - ase_calculator.write_control( - filename=f"{folder_path}/control.in", - atoms=atoms, - ) # write parameters file + if not write_structures_only: + if old_ase: + ase_calculator = Aims(**parameters) # parameters is in the format key: (value, value) + ase_calculator.write_control( + filename=f"{folder_path}/control.in", + atoms=atoms, + ) # write parameters file + else: + template.write_input( + profile=profile, + directory=Path(folder_path), + atoms=atoms, + parameters=parameters, + properties=[], + ) return distorted_defects_dict, self.distortion_metadata @@ -3106,10 +3163,10 @@ def from_structures( ): # Generate a defect entry for each charge state defect.user_charges = defect.get_charge_states(padding=padding) - for charge in defect.user_charges: - defect_entries.append( - _get_defect_entry_from_defect(defect=defect, charge_state=charge) - ) + defect_entries.extend( + _get_defect_entry_from_defect(defect=defect, charge_state=charge) + for charge in defect.user_charges + ) # Check if user gives dict with structure and defect_coords/defect_index elif isinstance(defect_structure, (tuple, list)): diff --git a/shakenbreak/plotting.py b/shakenbreak/plotting.py index 8226a277..14775f0d 100644 --- a/shakenbreak/plotting.py +++ b/shakenbreak/plotting.py @@ -213,7 +213,7 @@ def _purge_data_dicts( """ Purges dictionaries of displacements and energies so that they are consistent (i.e. contain data for same distortions). - To achieve this, it removes any data point from disp_dict if its energy is not + To achieve this, it removes any data point from ``disp_dict`` if its energy is not in the energy dict (this may be due to relaxation not converged). Args: @@ -334,8 +334,8 @@ def _get_displacement_dict( disp_dict, energies_dict = _purge_data_dicts( disp_dict=disp_dict, energies_dict=energies_dict, - ) # make disp and energies dict consistent by removing any data point - # if its energy is not in the energy dict and viceversa + ) # make disp and energies dict consistent by removing any data point from disp_dict + # if its energy is not in the energy dict (this may be due to relaxation not converged etc) else: warnings.warn( "Structure comparison algorithm struggled matching lattices. " @@ -389,7 +389,7 @@ def _format_datapoints_from_other_chargestates( keys.append(float(entry.split("%")[0]) / 100) elif isinstance(entry, str) and ("Rattled_from_" in entry or "Dimer_from_" in entry): keys.append(0.0) # Rattled and Dimer will be plotted at x = 0.0 - elif entry == "Rattled" or entry == "Dimer": # add 0.0 for Rattled + elif entry in ["Rattled", "Dimer"]: # add 0.0 for Rattled # (to avoid problems when sorting distortions) keys.append(0.0) else: @@ -398,7 +398,7 @@ def _format_datapoints_from_other_chargestates( if disp_dict: # Sort displacements in same order as distortions and energies, # for proper color mapping - sorted_disp = [disp_dict[k] for k in energies_dict["distortions"] if k in disp_dict] + sorted_disp = [disp_dict.get(k, None) for k in energies_dict["distortions"]] # Save the values of the displacements from *other charge states* # As the displacements will be re-sorted -> we'll need to # find the index of t @@ -720,6 +720,17 @@ def _format_colorbar( return cbar +def _parse_other_charge_state_label(distortion_key: str) -> tuple: + try: + other_charge_state = int(distortion_key.split("_")[-1]) + label = f"From {'+' if other_charge_state > 0 else ''}{other_charge_state} charge state" + except ValueError: + other_charge_state = distortion_key.split("_")[-1] + label = f"From {other_charge_state}" + + return label + + # Main plotting functions: def plot_all_defects( defect_charges_dict: dict, @@ -1364,7 +1375,6 @@ def plot_colorbar( ] ) for i, j in zip(imported_indices.keys(), range(other_charges)): - other_charge_state = int(list(energies_dict["distortions"].keys())[i].split("_")[-1]) sorted_i = imported_indices[i] # index for the sorted dicts ax.scatter( # plot any datapoints where disp could not be determined as black np.array(keys)[i], @@ -1382,8 +1392,9 @@ def plot_colorbar( cmap=(colormap if isinstance(sorted_disp[sorted_i], float) else None), norm=norm if isinstance(sorted_disp[sorted_i], float) else None, alpha=1, - label=f"From {'+' if other_charge_state > 0 else ''}{other_charge_state} " - f"charge state", + label=_parse_other_charge_state_label( + list(energies_dict["distortions"].keys())[i] + ), ) # Plot reference energy @@ -1668,7 +1679,7 @@ def plot_datasets( ) if len(sorted_distortions) > 0 and [ - key for key in dataset["distortions"] if (key != "Rattled" and key != "Dimer") + key for key in dataset["distortions"] if key not in ["Rattled", "Dimer"] ]: # more than just Rattled if imported_indices: # Exclude datapoints from other charge states non_imported_sorted_indices = [ @@ -1697,7 +1708,6 @@ def plot_datasets( ] # number of other charge states whose distortions have been imported ) for i, j in zip(imported_indices, range(other_charges)): - other_charge_state = int(list(dataset["distortions"].keys())[i].split("_")[-1]) ax.scatter( # distortions from other charge states np.array(keys)[i], list(dataset["distortions"].values())[i], @@ -1712,8 +1722,7 @@ def plot_datasets( j ], # different markers for different charge states alpha=1, - label=f"From {'+' if other_charge_state > 0 else ''}{other_charge_state} " - f"charge state", + label=_parse_other_charge_state_label(list(dataset["distortions"].keys())[i]), ) datasets[0]["Unperturbed"] = 0.0 # unperturbed energy of first dataset (our reference energy) diff --git a/tests/data/castep/vac_1_Cd_0/Bond_Distortion_30.0%/castep.cell b/tests/data/castep/vac_1_Cd_0/Bond_Distortion_30.0%/castep.cell index 31de2afd..f4936f44 100644 --- a/tests/data/castep/vac_1_Cd_0/Bond_Distortion_30.0%/castep.cell +++ b/tests/data/castep/vac_1_Cd_0/Bond_Distortion_30.0%/castep.cell @@ -1,7 +1,4 @@ -####################################################### -#CASTEP cell file: /home/ireaml/Python_Modules/vac_1_Cd_0/Bond_Distortion_30.0%/castep.cell -#Created using the Atomic Simulation Environment (ASE)# -####################################################### +# written by ASE %BLOCK LATTICE_CART 13.086768 0.000000 0.000000 @@ -75,5 +72,3 @@ Te 11.559529 11.895370 4.746923 Te 11.072262 11.648637 11.378040 %ENDBLOCK POSITIONS_ABS -KPOINT_MP_GRID: 1 1 1 -KPOINT_MP_OFFSET: 0.000000 0.000000 0.000000 diff --git a/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi b/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi index b66e1c0d..9f2d1585 100644 --- a/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi +++ b/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi @@ -4,6 +4,7 @@ nstep = 300 tstress = .false. tprnfor = .true. + pseudo_dir = '.' / &SYSTEM ibrav = 0 @@ -27,7 +28,10 @@ / &CELL / - +&FCP +/ +&RISM +/ ATOMIC_SPECIES Cd 112.414 Cd_pbe_v1.uspp.F.UPF Te 127.6 Te.pbe-n-rrkjus_psl.1.0.0.UPF @@ -41,67 +45,67 @@ CELL_PARAMETERS angstrom 0.00000000000000 0.00000000000000 13.08676800000000 ATOMIC_POSITIONS angstrom -Cd 0.2052936933 0.2205109577 6.5612600102 -Cd 0.3553059026 6.4874540930 0.1311618230 -Cd -0.0189701912 6.5181677929 6.2570352666 -Cd 6.1796951708 0.2623979357 -0.2390850836 -Cd 6.3936521122 -0.0705098423 6.3047768912 -Cd 6.6170390438 6.7871616780 -0.3530104837 -Cd 6.2838583436 6.8800332033 6.8680083180 -Cd -0.4558335511 3.5713061158 3.1244141346 -Cd -0.1383866466 3.4883477927 9.4875198666 -Cd -0.0990547023 9.2565757916 3.3244344470 -Cd -0.0666252559 9.6258716381 10.0500411859 -Cd 6.5509957445 3.6911705273 3.0562876062 -Cd 6.7586762218 3.3272456174 9.5832095081 -Cd 6.6360757260 9.8497071995 3.7883128703 -Cd 6.6082747313 10.0528258949 9.9353986711 -Cd 3.0288526343 -0.1828111303 3.5476901542 -Cd 3.1098991492 0.0702601671 9.6601980421 -Cd 3.5574730475 6.4424748675 3.2085931359 -Cd 3.4325905045 6.7705044623 9.5012728266 -Cd 9.7117087314 -0.4834176905 3.4040015301 -Cd 10.0022302059 0.1080439952 9.6516807338 -Cd 10.1714269096 6.6241789285 3.1655379298 -Cd 9.3085127617 6.4018087674 9.7533878631 -Cd 3.3994529298 3.4742102051 -0.1808313195 -Cd 3.7387736554 3.4910359408 6.3135534511 -Cd 3.3414555872 9.5849079909 -0.3544370839 -Cd 3.7662073052 9.4368196528 6.4918174678 -Cd 10.1502177203 3.5291627195 -0.1238205694 -Cd 10.0435753234 3.1852362330 6.9917138830 -Cd 10.0242116925 9.9364450730 0.1104867397 -Cd 9.7510717928 9.8455033094 6.4614014274 -Te 1.5541433257 1.9734023807 4.9233741105 -Te 2.1266235285 2.1266235285 10.9601444715 -Te 1.7174543391 8.2820291303 5.4998426799 -Te 1.4773444045 8.0914853904 11.0884702149 -Te 8.2653380643 1.6043581688 4.8425490397 -Te 8.2235256058 1.4452015063 11.0741478414 -Te 8.1546704364 8.4171284306 4.9777313383 -Te 8.0256553870 8.4325657640 11.6792998138 -Te 1.4910276874 4.8183441414 1.9865939846 -Te 1.6638992716 4.7990204335 7.8885361462 -Te 2.1266235285 10.9601444715 2.1266235285 -Te 1.6668981429 11.6722305551 8.4278363781 -Te 8.0376589517 4.8618654142 1.4752211561 -Te 8.0790002588 5.0654924940 7.4357907467 -Te 7.9596934547 11.5680055313 1.4782538461 -Te 8.8231704737 11.9196722252 7.9344010692 -Te 4.7195900981 1.6713004379 2.1131884631 -Te 4.9108364207 1.4911526347 7.7655524265 -Te 5.3144600671 7.9555627306 1.4579927881 -Te 4.9770661164 8.4098758849 8.3701434731 -Te 11.7092924228 1.8306059845 1.2709266515 -Te 11.8438048907 1.6704836593 7.7841269954 -Te 11.7239819196 8.1712888360 1.3776519156 -Te 11.7745596756 8.1926838545 8.2275328558 -Te 5.1085924827 4.9075909233 4.8337724420 -Te 5.0266100925 4.9282115846 11.3880729444 -Te 4.9662022261 11.5870664745 4.8091737486 -Te 5.1264044323 11.1805616712 11.4958783517 -Te 11.5396180648 4.9906961842 5.2762497808 -Te 11.5086458777 5.1651153635 11.4600915357 -Te 11.5595291122 11.8953695735 4.7469231033 -Te 11.0722618437 11.6486366009 11.3780396955 +Cd 0.2052936933 0.2205109577 6.5612600102 +Cd 0.3553059026 6.4874540930 0.1311618230 +Cd -0.0189701912 6.5181677929 6.2570352666 +Cd 6.1796951708 0.2623979357 -0.2390850836 +Cd 6.3936521122 -0.0705098423 6.3047768912 +Cd 6.6170390438 6.7871616780 -0.3530104837 +Cd 6.2838583436 6.8800332033 6.8680083180 +Cd -0.4558335511 3.5713061158 3.1244141346 +Cd -0.1383866466 3.4883477927 9.4875198666 +Cd -0.0990547023 9.2565757916 3.3244344470 +Cd -0.0666252559 9.6258716381 10.0500411859 +Cd 6.5509957445 3.6911705273 3.0562876062 +Cd 6.7586762218 3.3272456174 9.5832095081 +Cd 6.6360757260 9.8497071995 3.7883128703 +Cd 6.6082747313 10.0528258949 9.9353986711 +Cd 3.0288526343 -0.1828111303 3.5476901542 +Cd 3.1098991492 0.0702601671 9.6601980421 +Cd 3.5574730475 6.4424748675 3.2085931359 +Cd 3.4325905045 6.7705044623 9.5012728266 +Cd 9.7117087314 -0.4834176905 3.4040015301 +Cd 10.0022302059 0.1080439952 9.6516807338 +Cd 10.1714269096 6.6241789285 3.1655379298 +Cd 9.3085127617 6.4018087674 9.7533878631 +Cd 3.3994529298 3.4742102051 -0.1808313195 +Cd 3.7387736554 3.4910359408 6.3135534511 +Cd 3.3414555872 9.5849079909 -0.3544370839 +Cd 3.7662073052 9.4368196528 6.4918174678 +Cd 10.1502177203 3.5291627195 -0.1238205694 +Cd 10.0435753234 3.1852362330 6.9917138830 +Cd 10.0242116925 9.9364450730 0.1104867397 +Cd 9.7510717928 9.8455033094 6.4614014274 +Te 1.5541433257 1.9734023807 4.9233741105 +Te 2.1266235285 2.1266235285 10.9601444715 +Te 1.7174543391 8.2820291303 5.4998426799 +Te 1.4773444045 8.0914853904 11.0884702149 +Te 8.2653380643 1.6043581688 4.8425490397 +Te 8.2235256058 1.4452015063 11.0741478414 +Te 8.1546704364 8.4171284306 4.9777313383 +Te 8.0256553870 8.4325657640 11.6792998138 +Te 1.4910276874 4.8183441414 1.9865939846 +Te 1.6638992716 4.7990204335 7.8885361462 +Te 2.1266235285 10.9601444715 2.1266235285 +Te 1.6668981429 11.6722305551 8.4278363781 +Te 8.0376589517 4.8618654142 1.4752211561 +Te 8.0790002588 5.0654924940 7.4357907467 +Te 7.9596934547 11.5680055313 1.4782538461 +Te 8.8231704737 11.9196722252 7.9344010692 +Te 4.7195900981 1.6713004379 2.1131884631 +Te 4.9108364207 1.4911526347 7.7655524265 +Te 5.3144600671 7.9555627306 1.4579927881 +Te 4.9770661164 8.4098758849 8.3701434731 +Te 11.7092924228 1.8306059845 1.2709266515 +Te 11.8438048907 1.6704836593 7.7841269954 +Te 11.7239819196 8.1712888360 1.3776519156 +Te 11.7745596756 8.1926838545 8.2275328558 +Te 5.1085924827 4.9075909233 4.8337724420 +Te 5.0266100925 4.9282115846 11.3880729444 +Te 4.9662022261 11.5870664745 4.8091737486 +Te 5.1264044323 11.1805616712 11.4958783517 +Te 11.5396180648 4.9906961842 5.2762497808 +Te 11.5086458777 5.1651153635 11.4600915357 +Te 11.5595291122 11.8953695735 4.7469231033 +Te 11.0722618437 11.6486366009 11.3780396955 diff --git a/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_structure.pwi b/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_structure.pwi index 80cd6f21..0dadcd21 100644 --- a/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_structure.pwi +++ b/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_structure.pwi @@ -11,10 +11,13 @@ / &CELL / - +&FCP +/ +&RISM +/ ATOMIC_SPECIES -Cd 112.414 None -Te 127.6 None +Cd 112.414 Pseudopotential not specified +Te 127.6 Pseudopotential not specified K_POINTS gamma @@ -24,67 +27,67 @@ CELL_PARAMETERS angstrom 0.00000000000000 0.00000000000000 13.08676800000000 ATOMIC_POSITIONS angstrom -Cd 0.2052936933 0.2205109577 6.5612600102 -Cd 0.3553059026 6.4874540930 0.1311618230 -Cd -0.0189701912 6.5181677929 6.2570352666 -Cd 6.1796951708 0.2623979357 -0.2390850836 -Cd 6.3936521122 -0.0705098423 6.3047768912 -Cd 6.6170390438 6.7871616780 -0.3530104837 -Cd 6.2838583436 6.8800332033 6.8680083180 -Cd -0.4558335511 3.5713061158 3.1244141346 -Cd -0.1383866466 3.4883477927 9.4875198666 -Cd -0.0990547023 9.2565757916 3.3244344470 -Cd -0.0666252559 9.6258716381 10.0500411859 -Cd 6.5509957445 3.6911705273 3.0562876062 -Cd 6.7586762218 3.3272456174 9.5832095081 -Cd 6.6360757260 9.8497071995 3.7883128703 -Cd 6.6082747313 10.0528258949 9.9353986711 -Cd 3.0288526343 -0.1828111303 3.5476901542 -Cd 3.1098991492 0.0702601671 9.6601980421 -Cd 3.5574730475 6.4424748675 3.2085931359 -Cd 3.4325905045 6.7705044623 9.5012728266 -Cd 9.7117087314 -0.4834176905 3.4040015301 -Cd 10.0022302059 0.1080439952 9.6516807338 -Cd 10.1714269096 6.6241789285 3.1655379298 -Cd 9.3085127617 6.4018087674 9.7533878631 -Cd 3.3994529298 3.4742102051 -0.1808313195 -Cd 3.7387736554 3.4910359408 6.3135534511 -Cd 3.3414555872 9.5849079909 -0.3544370839 -Cd 3.7662073052 9.4368196528 6.4918174678 -Cd 10.1502177203 3.5291627195 -0.1238205694 -Cd 10.0435753234 3.1852362330 6.9917138830 -Cd 10.0242116925 9.9364450730 0.1104867397 -Cd 9.7510717928 9.8455033094 6.4614014274 -Te 1.5541433257 1.9734023807 4.9233741105 -Te 2.1266235285 2.1266235285 10.9601444715 -Te 1.7174543391 8.2820291303 5.4998426799 -Te 1.4773444045 8.0914853904 11.0884702149 -Te 8.2653380643 1.6043581688 4.8425490397 -Te 8.2235256058 1.4452015063 11.0741478414 -Te 8.1546704364 8.4171284306 4.9777313383 -Te 8.0256553870 8.4325657640 11.6792998138 -Te 1.4910276874 4.8183441414 1.9865939846 -Te 1.6638992716 4.7990204335 7.8885361462 -Te 2.1266235285 10.9601444715 2.1266235285 -Te 1.6668981429 11.6722305551 8.4278363781 -Te 8.0376589517 4.8618654142 1.4752211561 -Te 8.0790002588 5.0654924940 7.4357907467 -Te 7.9596934547 11.5680055313 1.4782538461 -Te 8.8231704737 11.9196722252 7.9344010692 -Te 4.7195900981 1.6713004379 2.1131884631 -Te 4.9108364207 1.4911526347 7.7655524265 -Te 5.3144600671 7.9555627306 1.4579927881 -Te 4.9770661164 8.4098758849 8.3701434731 -Te 11.7092924228 1.8306059845 1.2709266515 -Te 11.8438048907 1.6704836593 7.7841269954 -Te 11.7239819196 8.1712888360 1.3776519156 -Te 11.7745596756 8.1926838545 8.2275328558 -Te 5.1085924827 4.9075909233 4.8337724420 -Te 5.0266100925 4.9282115846 11.3880729444 -Te 4.9662022261 11.5870664745 4.8091737486 -Te 5.1264044323 11.1805616712 11.4958783517 -Te 11.5396180648 4.9906961842 5.2762497808 -Te 11.5086458777 5.1651153635 11.4600915357 -Te 11.5595291122 11.8953695735 4.7469231033 -Te 11.0722618437 11.6486366009 11.3780396955 +Cd 0.2052936933 0.2205109577 6.5612600102 +Cd 0.3553059026 6.4874540930 0.1311618230 +Cd -0.0189701912 6.5181677929 6.2570352666 +Cd 6.1796951708 0.2623979357 -0.2390850836 +Cd 6.3936521122 -0.0705098423 6.3047768912 +Cd 6.6170390438 6.7871616780 -0.3530104837 +Cd 6.2838583436 6.8800332033 6.8680083180 +Cd -0.4558335511 3.5713061158 3.1244141346 +Cd -0.1383866466 3.4883477927 9.4875198666 +Cd -0.0990547023 9.2565757916 3.3244344470 +Cd -0.0666252559 9.6258716381 10.0500411859 +Cd 6.5509957445 3.6911705273 3.0562876062 +Cd 6.7586762218 3.3272456174 9.5832095081 +Cd 6.6360757260 9.8497071995 3.7883128703 +Cd 6.6082747313 10.0528258949 9.9353986711 +Cd 3.0288526343 -0.1828111303 3.5476901542 +Cd 3.1098991492 0.0702601671 9.6601980421 +Cd 3.5574730475 6.4424748675 3.2085931359 +Cd 3.4325905045 6.7705044623 9.5012728266 +Cd 9.7117087314 -0.4834176905 3.4040015301 +Cd 10.0022302059 0.1080439952 9.6516807338 +Cd 10.1714269096 6.6241789285 3.1655379298 +Cd 9.3085127617 6.4018087674 9.7533878631 +Cd 3.3994529298 3.4742102051 -0.1808313195 +Cd 3.7387736554 3.4910359408 6.3135534511 +Cd 3.3414555872 9.5849079909 -0.3544370839 +Cd 3.7662073052 9.4368196528 6.4918174678 +Cd 10.1502177203 3.5291627195 -0.1238205694 +Cd 10.0435753234 3.1852362330 6.9917138830 +Cd 10.0242116925 9.9364450730 0.1104867397 +Cd 9.7510717928 9.8455033094 6.4614014274 +Te 1.5541433257 1.9734023807 4.9233741105 +Te 2.1266235285 2.1266235285 10.9601444715 +Te 1.7174543391 8.2820291303 5.4998426799 +Te 1.4773444045 8.0914853904 11.0884702149 +Te 8.2653380643 1.6043581688 4.8425490397 +Te 8.2235256058 1.4452015063 11.0741478414 +Te 8.1546704364 8.4171284306 4.9777313383 +Te 8.0256553870 8.4325657640 11.6792998138 +Te 1.4910276874 4.8183441414 1.9865939846 +Te 1.6638992716 4.7990204335 7.8885361462 +Te 2.1266235285 10.9601444715 2.1266235285 +Te 1.6668981429 11.6722305551 8.4278363781 +Te 8.0376589517 4.8618654142 1.4752211561 +Te 8.0790002588 5.0654924940 7.4357907467 +Te 7.9596934547 11.5680055313 1.4782538461 +Te 8.8231704737 11.9196722252 7.9344010692 +Te 4.7195900981 1.6713004379 2.1131884631 +Te 4.9108364207 1.4911526347 7.7655524265 +Te 5.3144600671 7.9555627306 1.4579927881 +Te 4.9770661164 8.4098758849 8.3701434731 +Te 11.7092924228 1.8306059845 1.2709266515 +Te 11.8438048907 1.6704836593 7.7841269954 +Te 11.7239819196 8.1712888360 1.3776519156 +Te 11.7745596756 8.1926838545 8.2275328558 +Te 5.1085924827 4.9075909233 4.8337724420 +Te 5.0266100925 4.9282115846 11.3880729444 +Te 4.9662022261 11.5870664745 4.8091737486 +Te 5.1264044323 11.1805616712 11.4958783517 +Te 11.5396180648 4.9906961842 5.2762497808 +Te 11.5086458777 5.1651153635 11.4600915357 +Te 11.5595291122 11.8953695735 4.7469231033 +Te 11.0722618437 11.6486366009 11.3780396955 diff --git a/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_user_parameters.pwi b/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_user_parameters.pwi index 38c251b9..aaff0b34 100644 --- a/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_user_parameters.pwi +++ b/tests/data/quantum_espresso/vac_1_Cd_0/Bond_Distortion_30.0%/espresso_user_parameters.pwi @@ -4,6 +4,7 @@ nstep = 300 tstress = .false. tprnfor = .true. + pseudo_dir = '.' / &SYSTEM ibrav = 0 @@ -25,7 +26,10 @@ / &CELL / - +&FCP +/ +&RISM +/ ATOMIC_SPECIES Cd 112.414 Cd_pbe_v1.uspp.F.UPF Te 127.6 Te.pbe-n-rrkjus_psl.1.0.0.UPF @@ -39,67 +43,67 @@ CELL_PARAMETERS angstrom 0.00000000000000 0.00000000000000 13.08676800000000 ATOMIC_POSITIONS angstrom -Cd 0.2052936933 0.2205109577 6.5612600102 -Cd 0.3553059026 6.4874540930 0.1311618230 -Cd -0.0189701912 6.5181677929 6.2570352666 -Cd 6.1796951708 0.2623979357 -0.2390850836 -Cd 6.3936521122 -0.0705098423 6.3047768912 -Cd 6.6170390438 6.7871616780 -0.3530104837 -Cd 6.2838583436 6.8800332033 6.8680083180 -Cd -0.4558335511 3.5713061158 3.1244141346 -Cd -0.1383866466 3.4883477927 9.4875198666 -Cd -0.0990547023 9.2565757916 3.3244344470 -Cd -0.0666252559 9.6258716381 10.0500411859 -Cd 6.5509957445 3.6911705273 3.0562876062 -Cd 6.7586762218 3.3272456174 9.5832095081 -Cd 6.6360757260 9.8497071995 3.7883128703 -Cd 6.6082747313 10.0528258949 9.9353986711 -Cd 3.0288526343 -0.1828111303 3.5476901542 -Cd 3.1098991492 0.0702601671 9.6601980421 -Cd 3.5574730475 6.4424748675 3.2085931359 -Cd 3.4325905045 6.7705044623 9.5012728266 -Cd 9.7117087314 -0.4834176905 3.4040015301 -Cd 10.0022302059 0.1080439952 9.6516807338 -Cd 10.1714269096 6.6241789285 3.1655379298 -Cd 9.3085127617 6.4018087674 9.7533878631 -Cd 3.3994529298 3.4742102051 -0.1808313195 -Cd 3.7387736554 3.4910359408 6.3135534511 -Cd 3.3414555872 9.5849079909 -0.3544370839 -Cd 3.7662073052 9.4368196528 6.4918174678 -Cd 10.1502177203 3.5291627195 -0.1238205694 -Cd 10.0435753234 3.1852362330 6.9917138830 -Cd 10.0242116925 9.9364450730 0.1104867397 -Cd 9.7510717928 9.8455033094 6.4614014274 -Te 1.5541433257 1.9734023807 4.9233741105 -Te 2.1266235285 2.1266235285 10.9601444715 -Te 1.7174543391 8.2820291303 5.4998426799 -Te 1.4773444045 8.0914853904 11.0884702149 -Te 8.2653380643 1.6043581688 4.8425490397 -Te 8.2235256058 1.4452015063 11.0741478414 -Te 8.1546704364 8.4171284306 4.9777313383 -Te 8.0256553870 8.4325657640 11.6792998138 -Te 1.4910276874 4.8183441414 1.9865939846 -Te 1.6638992716 4.7990204335 7.8885361462 -Te 2.1266235285 10.9601444715 2.1266235285 -Te 1.6668981429 11.6722305551 8.4278363781 -Te 8.0376589517 4.8618654142 1.4752211561 -Te 8.0790002588 5.0654924940 7.4357907467 -Te 7.9596934547 11.5680055313 1.4782538461 -Te 8.8231704737 11.9196722252 7.9344010692 -Te 4.7195900981 1.6713004379 2.1131884631 -Te 4.9108364207 1.4911526347 7.7655524265 -Te 5.3144600671 7.9555627306 1.4579927881 -Te 4.9770661164 8.4098758849 8.3701434731 -Te 11.7092924228 1.8306059845 1.2709266515 -Te 11.8438048907 1.6704836593 7.7841269954 -Te 11.7239819196 8.1712888360 1.3776519156 -Te 11.7745596756 8.1926838545 8.2275328558 -Te 5.1085924827 4.9075909233 4.8337724420 -Te 5.0266100925 4.9282115846 11.3880729444 -Te 4.9662022261 11.5870664745 4.8091737486 -Te 5.1264044323 11.1805616712 11.4958783517 -Te 11.5396180648 4.9906961842 5.2762497808 -Te 11.5086458777 5.1651153635 11.4600915357 -Te 11.5595291122 11.8953695735 4.7469231033 -Te 11.0722618437 11.6486366009 11.3780396955 +Cd 0.2052936933 0.2205109577 6.5612600102 +Cd 0.3553059026 6.4874540930 0.1311618230 +Cd -0.0189701912 6.5181677929 6.2570352666 +Cd 6.1796951708 0.2623979357 -0.2390850836 +Cd 6.3936521122 -0.0705098423 6.3047768912 +Cd 6.6170390438 6.7871616780 -0.3530104837 +Cd 6.2838583436 6.8800332033 6.8680083180 +Cd -0.4558335511 3.5713061158 3.1244141346 +Cd -0.1383866466 3.4883477927 9.4875198666 +Cd -0.0990547023 9.2565757916 3.3244344470 +Cd -0.0666252559 9.6258716381 10.0500411859 +Cd 6.5509957445 3.6911705273 3.0562876062 +Cd 6.7586762218 3.3272456174 9.5832095081 +Cd 6.6360757260 9.8497071995 3.7883128703 +Cd 6.6082747313 10.0528258949 9.9353986711 +Cd 3.0288526343 -0.1828111303 3.5476901542 +Cd 3.1098991492 0.0702601671 9.6601980421 +Cd 3.5574730475 6.4424748675 3.2085931359 +Cd 3.4325905045 6.7705044623 9.5012728266 +Cd 9.7117087314 -0.4834176905 3.4040015301 +Cd 10.0022302059 0.1080439952 9.6516807338 +Cd 10.1714269096 6.6241789285 3.1655379298 +Cd 9.3085127617 6.4018087674 9.7533878631 +Cd 3.3994529298 3.4742102051 -0.1808313195 +Cd 3.7387736554 3.4910359408 6.3135534511 +Cd 3.3414555872 9.5849079909 -0.3544370839 +Cd 3.7662073052 9.4368196528 6.4918174678 +Cd 10.1502177203 3.5291627195 -0.1238205694 +Cd 10.0435753234 3.1852362330 6.9917138830 +Cd 10.0242116925 9.9364450730 0.1104867397 +Cd 9.7510717928 9.8455033094 6.4614014274 +Te 1.5541433257 1.9734023807 4.9233741105 +Te 2.1266235285 2.1266235285 10.9601444715 +Te 1.7174543391 8.2820291303 5.4998426799 +Te 1.4773444045 8.0914853904 11.0884702149 +Te 8.2653380643 1.6043581688 4.8425490397 +Te 8.2235256058 1.4452015063 11.0741478414 +Te 8.1546704364 8.4171284306 4.9777313383 +Te 8.0256553870 8.4325657640 11.6792998138 +Te 1.4910276874 4.8183441414 1.9865939846 +Te 1.6638992716 4.7990204335 7.8885361462 +Te 2.1266235285 10.9601444715 2.1266235285 +Te 1.6668981429 11.6722305551 8.4278363781 +Te 8.0376589517 4.8618654142 1.4752211561 +Te 8.0790002588 5.0654924940 7.4357907467 +Te 7.9596934547 11.5680055313 1.4782538461 +Te 8.8231704737 11.9196722252 7.9344010692 +Te 4.7195900981 1.6713004379 2.1131884631 +Te 4.9108364207 1.4911526347 7.7655524265 +Te 5.3144600671 7.9555627306 1.4579927881 +Te 4.9770661164 8.4098758849 8.3701434731 +Te 11.7092924228 1.8306059845 1.2709266515 +Te 11.8438048907 1.6704836593 7.7841269954 +Te 11.7239819196 8.1712888360 1.3776519156 +Te 11.7745596756 8.1926838545 8.2275328558 +Te 5.1085924827 4.9075909233 4.8337724420 +Te 5.0266100925 4.9282115846 11.3880729444 +Te 4.9662022261 11.5870664745 4.8091737486 +Te 5.1264044323 11.1805616712 11.4958783517 +Te 11.5396180648 4.9906961842 5.2762497808 +Te 11.5086458777 5.1651153635 11.4600915357 +Te 11.5595291122 11.8953695735 4.7469231033 +Te 11.0722618437 11.6486366009 11.3780396955 diff --git a/tests/data/remote_baseline_plots/Va_O1_1_plot_defect_with_unrecognised_distortion.png b/tests/data/remote_baseline_plots/Va_O1_1_plot_defect_with_unrecognised_distortion.png new file mode 100644 index 00000000..5b041534 Binary files /dev/null and b/tests/data/remote_baseline_plots/Va_O1_1_plot_defect_with_unrecognised_distortion.png differ diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_-10.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_-10.0%/CONTCAR new file mode 100644 index 00000000..736c379d --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_-10.0%/CONTCAR @@ -0,0 +1,167 @@ +-10.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0037897070559317 0.2322286940356099 0.2474684795675954 + 0.5029467696266002 0.2444122619552690 0.2484263533544291 + 0.0034689130778392 0.7577940394743933 0.2477409557839511 + 0.5030501821196411 0.7452480225804839 0.2485983846999517 + 0.2542748979733569 -0.0052943503159013 0.7475276922958372 + 0.7533851164075865 -0.0050955343637915 0.7472480638453840 + 0.2561481059496141 0.4949101329049210 0.7474700927701745 + 0.7507384345264557 0.4950495930547266 0.7464732072482453 + 0.0035481149729006 0.4950264315443118 0.5092666850102833 + 0.5036822362244660 0.4948508678430448 0.4971428970167249 + 0.0037027816716622 -0.0047548846571159 0.5004814011572042 + 0.5036438978273238 -0.0051011424495776 0.4984696344865095 + 0.2572136410790219 0.2458828462993617 -0.0029853067565458 + 0.7493404840094916 0.2461189360199540 -0.0036495895073987 + 0.2571683435598047 0.7434663978143000 -0.0026608967288014 + 0.7494832484428599 0.7437789675542859 -0.0033281762959586 + 0.2464649050713530 0.3725406426801747 0.3665902885851178 + 0.7614315048742382 0.3733429297926198 0.3630423531477938 + 0.2532762445626128 0.8697815659344715 0.3733190889600400 + 0.7536481303781565 0.8697532972218815 0.3730853779814507 + 0.5037409345906982 0.1199010547362999 0.8720037736197943 + 0.0038884820403823 0.1186184229811875 0.8753004868229426 + 0.5035295146994602 0.6202226983900506 0.8716597460002612 + 0.0028321767141280 0.6142240753917423 0.8895893023188183 + 0.3779016296413417 0.4946628803697204 0.1251855216678644 + 0.8926954888254516 0.4945346097432934 0.1017250070519275 + 0.3786256593320883 0.9945506292804910 0.1242901498275271 + 0.8790680064230043 -0.0050294189848051 0.1161995488339077 + 0.6287192060667910 0.2452714270349685 0.6234687771075705 + 0.1294772919174247 0.2452829453692279 0.6204007452633590 + 0.6288653807657467 0.7447703959556151 0.6236656202105658 + 0.1295303002573071 0.7446647311873299 0.6204442101160891 + 0.2464141544624578 0.6180272086262101 0.3670173896975889 + 0.7612283554982611 0.6170227486239186 0.3639235942915107 + 0.2533311365352238 0.1210622428626773 0.3735390305140303 + 0.7537060628266189 0.1210422222109875 0.3726742153942516 + 0.5034147936277870 0.3694388511344822 0.8715110932647577 + 0.0028649140934841 0.3751498002119301 0.8896362032323032 + 0.5036606706323422 0.8696397643285384 0.8720180884597719 + 0.0040417333229443 0.8706870802849916 0.8756608414575658 + 0.1071866708086518 0.4945101714697508 0.0944460811396127 + 0.6256589822785830 0.4949528136934154 0.1235634997787016 + 0.1280877428764534 -0.0052647921419321 0.1162828068624879 + 0.6287934079116688 -0.0051944520670080 0.1245870513357437 + 0.3789734068459950 0.2452479424367734 0.6236213192474379 + 0.8785950591504228 0.2453088249375758 0.6203822443195152 + 0.3790668777209551 0.7443927989611656 0.6237820983986385 + 0.8785351581157782 0.7448486044723043 0.6203393272541239 + 0.5024950813566519 0.4947817003193312 0.2512324179647330 + 0.0034897648394232 -0.0049757171656387 0.2442950247800839 + 0.5035884475916053 0.9946662138654262 0.2496366304332246 + 0.2524204639287531 0.2455096337245567 0.7476708224628261 + 0.7553846999233655 0.2457863332632439 0.7472186545291423 + 0.2524323492731623 0.7439847831790249 0.7477736979338343 + 0.7555372474840261 0.7443337053963269 0.7474600996792684 + 0.0039432528249745 0.2416216100905275 0.0022618522362743 + 0.5034365937983669 0.2446621682943173 -0.0018354616972073 + 0.0039724212777635 0.7476249328512929 0.0024731865429819 + 0.5034908820707059 0.7449469114626006 -0.0017024817023552 + 0.2527672473286091 -0.0046799767911240 0.4979744948396508 + 0.7540444581857819 -0.0044229653148365 0.4975375050052958 + 0.2456792553479534 0.4950932318760762 0.4946637178024132 + 0.7605504026856679 0.4948700836791362 0.4925018216597514 + 0.0039498547938550 0.2477852893680156 0.4954997344840444 + 0.5038268606821740 0.2462225300368116 0.4976757720517880 + 0.0039843965581335 0.7423341416948261 0.4956141510103977 + 0.5039620188895495 0.7436615221947543 0.4978626909331401 + 0.2561653627386242 -0.0054103281138310 -0.0040995097552242 + 0.7510647144223463 -0.0049422285073624 0.9958809532169793 + 0.2575593216408595 0.4946983307431652 -0.0040380093518351 + 0.7465058935780393 0.4952518325744138 -0.0050963538111108 + 0.0022517826845059 0.4947132231288545 0.7559591208167450 + 0.5032674639419525 0.4948966841166381 0.7459064848376834 + 0.0039473411300450 -0.0054751176985068 0.7482040164396860 + 0.5040215192733168 -0.0052288491248106 0.7468377094934904 + 0.2507298030902603 0.2445865182843065 0.2460568339819935 + 0.7570807312709198 0.2440352147050702 0.2446351424719439 + 0.2506223069207714 0.7457995190913568 0.2463454024243012 + 0.7568932030755009 0.7462980723517217 0.2453961181754296 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_-20.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_-20.0%/CONTCAR new file mode 100644 index 00000000..7ccabe29 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_-20.0%/CONTCAR @@ -0,0 +1,167 @@ +-20.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0086975886795754 0.2324802311382332 0.2466780192818664 + 0.5049137222837443 0.2446770209147236 0.2475316796145117 + 0.0087539030841881 0.7589902859989266 0.2466728788316439 + 0.5052499335539233 0.7462237908989685 0.2475610089930250 + 0.2577357642194409 -0.0038446160134611 0.7494358931982601 + 0.7556436003410251 0.9957819562382110 0.7480786551751271 + 0.2576390582433198 0.4962553165261845 0.7510393970416819 + 0.7532846380373185 0.4956755566281281 0.7471588174602815 + 0.0078635910566988 0.4957246996928277 0.5026502366159991 + 0.5047811155848763 0.4954523402470996 0.4954938615796928 + 0.0066836268656869 -0.0041803743405183 0.5014878498902418 + 0.5064168968623594 -0.0042885799543388 0.4991787091755588 + 0.2564142214080541 0.2495664192970733 -0.0014564340730813 + 0.7565558557091163 0.2481711790914421 -0.0031151676522205 + 0.2568335383989198 0.7424332737782418 -0.0010253861979057 + 0.7566870900311317 0.7430759314207935 -0.0030709398724981 + 0.2520943902359312 0.3708472624662618 0.3734854794847753 + 0.7658341625941255 0.3738711154477217 0.3648529364504282 + 0.2569645791683238 0.8701904872844921 0.3758300218331634 + 0.7571296709541152 0.8691404389166539 0.3738834616977821 + 0.5066657183205012 0.1211093994234122 0.8735727052091385 + 0.0069863353220273 0.1210394704432231 0.8742670045220756 + 0.5066405514555942 0.6196779652967411 0.8728689594687888 + 0.0048629622214508 0.6207072862964664 0.8711954371598657 + 0.3644250390549675 0.4955379586123497 0.1318540450197026 + 0.8586551862312451 0.4953777051925626 0.1606912937459932 + 0.3819291501653982 0.9955336969331717 0.1236695102007010 + 0.8806762968611641 -0.0042948056021986 0.1195369700500500 + 0.6309361287488706 0.2462946551894003 0.6230376275804124 + 0.1312400235893803 0.2467101410113097 0.6219892655926854 + 0.6316233863785441 0.7449592949240180 0.6225081731680250 + 0.1318528922969289 0.7451296863321313 0.6215527970769987 + 0.2521457517333897 0.6208461969944321 0.3736062461052584 + 0.7658804874289310 0.6166426717002432 0.3645460721967755 + 0.2569081257292625 0.1212224825921629 0.3758000128204623 + 0.7570445938669176 0.1213279765174790 0.3734262547136957 + 0.5063734894743489 0.3712809589737156 0.8729219842707230 + 0.0047659632559299 0.3707134800316818 0.8712885616568444 + 0.5066590530929591 0.8699765393512346 0.8734885838287045 + 0.0072074920869583 0.8705994979130655 0.8743200195016804 + 0.0753367382837095 0.4956888979779764 0.0793338386042724 + 0.6195225466449528 0.4952661736117442 0.1131691857895546 + 0.1309825439711809 -0.0041877656436817 0.1179816519186358 + 0.6314699878387389 -0.0045863783364467 0.1241570781073023 + 0.3808834936300718 0.2469180657132578 0.6225167865777935 + 0.8812427981292490 0.2464358693307638 0.6216885704584847 + 0.3815881933028660 0.7447098880219895 0.6226645648317566 + 0.8818605803229177 0.7450971337407318 0.6216009655182324 + 0.4994638525568503 0.4951396572865941 0.2456472262910717 + 0.0063385218731155 -0.0041808481808473 0.2457954257368662 + 0.5066093854678679 0.9953143163248382 0.2495501832228814 + 0.2556858712672196 0.2475090654393578 0.7483686588524091 + 0.7567171924005994 0.2469118519553568 0.7476144752138939 + 0.2560534305853129 0.7443254426928916 0.7482873229957437 + 0.7572083246227133 0.7443616828811761 0.7473925647810351 + 0.0071099956157307 0.2471107584065260 -0.0013778504922602 + 0.5067763822096834 0.2467914282042497 -0.0012566019375291 + 0.0072789387504600 0.7443119598332808 -0.0014672495996084 + 0.5071249465385250 0.7442282030917988 -0.0014127630584473 + 0.2564647561596304 -0.0043362876680215 0.5002468878547992 + 0.7563141218103898 -0.0045874118862409 0.4978153447134265 + 0.2505750045272787 0.4958169204392332 0.4990455064643851 + 0.7611652646999167 0.4954130346207425 0.4941104358532602 + 0.0060707327254112 0.2476998775599516 0.4957117886702329 + 0.5065055491664529 0.2475972702310542 0.4969865402214184 + 0.0065400249319809 0.7437676652809069 0.4954113003396197 + 0.5069496209622742 0.7435118531116690 0.4967403586123363 + 0.2582039592464545 -0.0042502523116808 -0.0029459629550197 + 0.7546699476234993 -0.0044478740171448 -0.0032536104671456 + 0.2402511188306325 0.4958435158699679 0.0049319112676327 + 0.7544547222719009 0.4954759484053020 0.0005926932806283 + 0.0021994143177047 0.4956660255064458 0.7449957084034474 + 0.5048700761270354 0.4954841348952689 0.7460140528492978 + 0.0062322477531207 -0.0042347530377057 0.7487570864568968 + 0.5067705834828553 0.9955591765386007 0.7484776559657695 + 0.2543417284418688 0.2453673574481473 0.2489705257746782 + 0.7612209625311664 0.2450945905958662 0.2460778559379043 + 0.2545531927543553 0.7461010736402074 0.2489583439646740 + 0.7611916729976987 0.7456147386216144 0.2461420405627752 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_-30.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_-30.0%/CONTCAR new file mode 100644 index 00000000..ae9455ee --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_-30.0%/CONTCAR @@ -0,0 +1,167 @@ +-30.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0090649465118498 0.2326412451211081 0.2467799322050543 + 0.5051853726940068 0.2450605279247022 0.2475830358317042 + 0.0088075906820657 0.7589156361460878 0.2467019312955655 + 0.5051988179824410 0.7462229341511742 0.2477048631240832 + 0.2580733505127638 -0.0041501532144905 0.7494998167475398 + 0.7559574458472925 0.9957052859387464 0.7482895205779327 + 0.2579564229423166 0.4959742645304429 0.7512121765957350 + 0.7538582062601279 0.4956895912465147 0.7476385650095290 + 0.0083563741470757 0.4957920160632726 0.5028721408574027 + 0.5053131660376177 0.4957464785824088 0.4957991632577831 + 0.0071188701574081 -0.0041295314118839 0.5015280964580549 + 0.5068564087414753 -0.0041367116500859 0.4991864689745601 + 0.2567325155550245 0.2491710998832382 -0.0015196537550374 + 0.7568304944050246 0.2479124508546495 -0.0027830800162015 + 0.2568344073255345 0.7422926424009564 -0.0009302684765332 + 0.7566307057668999 0.7431777439704884 -0.0028371405110055 + 0.2525180215429627 0.3706362371372263 0.3737421638435026 + 0.7665253000243378 0.3747512457656612 0.3654820687947280 + 0.2571084742549228 0.8701447169982796 0.3757749989870875 + 0.7571990275370400 0.8700342757591508 0.3737151870101479 + 0.5070258549418943 0.1207315734423477 0.8737403482210815 + 0.0072647193197913 0.1205567470243539 0.8740925554315855 + 0.5067429672229987 0.6194392348439544 0.8731248334093056 + 0.0050017758185562 0.6205304389839854 0.8712803237532143 + 0.3638567657981836 0.4953894499951105 0.1320834125030868 + 0.8581368480082152 0.4954379217949862 0.1614037329536296 + 0.3811536566248575 0.9954042604179986 0.1241672964958022 + 0.8799332081587533 -0.0042003260484736 0.1201328152240780 + 0.6320486061208874 0.2464347376921640 0.6228940507389433 + 0.1321746897031513 0.2465792052311540 0.6218421718740752 + 0.6316508089611659 0.7450853130321116 0.6228910839173039 + 0.1317740090949513 0.7450929363389525 0.6218914865183967 + 0.2523164839043862 0.6206651508396938 0.3737508278230926 + 0.7662652716624583 0.6175377650810217 0.3652726824961430 + 0.2572713883681753 0.1211566425249303 0.3756155099084897 + 0.7573768764410559 0.1223589751160929 0.3740828654464385 + 0.5067989115712789 0.3709471105609736 0.8729947502240054 + 0.0050923177135215 0.3701579575927508 0.8711326804568164 + 0.5068129291849744 0.8695695387736013 0.8735126730978607 + 0.0072005122196426 0.8702069698346059 0.8741937180221566 + 0.0745363131899259 0.4953583534337422 0.0790070775435621 + 0.6191905518357509 0.4955203465254251 0.1135956185970831 + 0.1303366998955564 -0.0043826404275933 0.1177737369566511 + 0.6308511269411415 -0.0045478877220507 0.1239770444581630 + 0.3820381341070369 0.2468154478528415 0.6228341646700486 + 0.8822236872445578 0.2464344498043440 0.6220558005649459 + 0.3814894426377707 0.7447389022372592 0.6226543122602045 + 0.8817963799388980 0.7451514093799023 0.6216915807046534 + 0.4990285113098767 0.4953941795146763 0.2458656227430621 + 0.0059571429706634 -0.0041939752395238 0.2458376815617688 + 0.5062169249946207 0.9952530029709233 0.2495773147330588 + 0.2565180544257576 0.2472244387081845 0.7483316587304213 + 0.7575508657245982 0.2470964784091519 0.7478345543137206 + 0.2561144181108561 0.7442150638337142 0.7484702098361264 + 0.7572867672126670 0.7444562817620792 0.7477251363768231 + 0.0074164857750025 0.2465719681893549 -0.0014106151687294 + 0.5072922035403583 0.2464704392165041 -0.0011875735189983 + 0.0070860426400582 0.7441586480223293 -0.0013792066275388 + 0.5069861428379315 0.7439890464811134 -0.0012024637017317 + 0.2566217659319542 -0.0043225721856021 0.5001612342787954 + 0.7564106930400492 -0.0039557380462023 0.4980221629341881 + 0.2510085262346735 0.4956300132820644 0.4992457433670775 + 0.7619247529039118 0.4962283918128041 0.4947251303553073 + 0.0068483869855437 0.2475746099127850 0.4958022237813729 + 0.5074634379604234 0.2476963933698168 0.4970432875822721 + 0.0065747681509131 0.7437708633144290 0.4955869432848790 + 0.5070386495972489 0.7436463620648445 0.4970085069737409 + 0.2577564140643598 -0.0045109235181970 -0.0028870023336586 + 0.7542902099829295 -0.0040685775823449 -0.0031031390418792 + 0.2396830690072047 0.4954207156257796 0.0051202896459007 + 0.7542730117492219 0.4956786193986966 0.0011871492660298 + 0.0025809115162149 0.4954270287058308 0.7451587355073326 + 0.5051498454527510 0.4952630777327303 0.7463069135958481 + 0.0062929912531917 -0.0046105532131715 0.7486765195236761 + 0.5070593698821850 0.9952544435922939 0.7485939537015479 + 0.2549039814250904 0.2454124549530348 0.2488918073481084 + 0.7616237867513788 0.2460877206135315 0.2465867406224188 + 0.2544193334240470 0.7459326715363519 0.2490699984364110 + 0.7610896795866223 0.7461454464081906 0.2463383408102150 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_-40.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_-40.0%/CONTCAR new file mode 100644 index 00000000..58ff4847 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_-40.0%/CONTCAR @@ -0,0 +1,167 @@ +-40.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0089294747978914 0.2324174990863092 0.2470238502754905 + 0.5051734676230837 0.2451593987773329 0.2476360819706472 + 0.0089443489428204 0.7589271153438633 0.2471191740326154 + 0.5053579685655775 0.7462448681916697 0.2479571176231635 + 0.2581650432479677 -0.0041109327227294 0.7496413221078408 + 0.7559733778377725 0.9956693031176557 0.7485181903909226 + 0.2580201356996303 0.4961129785011024 0.7512025593324855 + 0.7538978545234505 0.4957095235386760 0.7477637325136066 + 0.0084408867039695 0.4957068002450996 0.5033235622256210 + 0.5054156954505914 0.4958356006518359 0.4958383199971498 + 0.0071406492305668 -0.0042946262603550 0.5018786560596378 + 0.5068945479960673 -0.0040388857320293 0.4993230028534696 + 0.2567046379432700 0.2493519465637916 -0.0014390738058096 + 0.7567138104583470 0.2479500123918836 -0.0027329523287911 + 0.2570016679182621 0.7424706032539287 -0.0008340576781869 + 0.7567988504354524 0.7431676898248617 -0.0024655833698810 + 0.2524819634142701 0.3706182681984401 0.3736251629973330 + 0.7665800265318413 0.3746466325012179 0.3653281399326165 + 0.2571837235469158 0.8701154024711165 0.3759037049139420 + 0.7572630951519979 0.8698302404237802 0.3740351534310460 + 0.5069783251900277 0.1208815189249574 0.8736428839183807 + 0.0072236726635096 0.1205594548286950 0.8743785956843436 + 0.5068604121111000 0.6194692943870599 0.8732736505237600 + 0.0052110946493799 0.6204116112996383 0.8720300028420892 + 0.3649451947037502 0.4956426391782986 0.1316758779648974 + 0.8592774315973507 0.4955133807228702 0.1610761794340197 + 0.3814026507125806 0.9955557504091148 0.1242328112627630 + 0.8802518259237676 -0.0043220896631635 0.1201921787170199 + 0.6319992805001124 0.2464932120923433 0.6229849167004536 + 0.1322385558099132 0.2464235164724153 0.6217724255851487 + 0.6318654200329571 0.7451039705302996 0.6230996326844876 + 0.1320157202742293 0.7450549099074162 0.6220706508907062 + 0.2523874126783330 0.6205105607101545 0.3736724173110506 + 0.7664457964358807 0.6172612192532597 0.3652080059298239 + 0.2572328280631255 0.1211417533609015 0.3756804615758408 + 0.7573828989245163 0.1221314772346849 0.3740188626671577 + 0.5067002614086128 0.3710442353142460 0.8729212974008880 + 0.0051262780998534 0.3705416077523169 0.8721531545938056 + 0.5069392808704074 0.8695085973006397 0.8736488994662743 + 0.0072735323747925 0.8702285634825729 0.8746377828140401 + 0.0759769444367077 0.4955636344749796 0.0798960661136464 + 0.6199916950601903 0.4955570370814366 0.1138151343701909 + 0.1305607009922241 -0.0043821225517299 0.1180100705861385 + 0.6310754611275630 -0.0044499482463202 0.1242038803535667 + 0.3820066764063376 0.2469151663978112 0.6227962750497311 + 0.8821421512294252 0.2463325627229627 0.6220899980084067 + 0.3817724224375872 0.7448438577486116 0.6228889107437862 + 0.8820304655104546 0.7450073132003933 0.6222433365928826 + 0.4996799889825716 0.4956141136757977 0.2459807995892049 + 0.0061663664332395 -0.0043106639862750 0.2461083602139489 + 0.5063619001728250 0.9954974844457173 0.2497259521853682 + 0.2564895484540494 0.2471569952042208 0.7483044129682933 + 0.7575402788161378 0.2470762802808935 0.7479246848281159 + 0.2563311572394774 0.7442400817630616 0.7486109576862173 + 0.7573858948649991 0.7443933597792344 0.7480867969000476 + 0.0072900642347393 0.2465250198644284 -0.0010367241493486 + 0.5071854998857048 0.2465851392334241 -0.0012347425429219 + 0.0073584811067533 0.7442024862911600 -0.0008929683899089 + 0.5071444026265306 0.7439791257561537 -0.0009732444208461 + 0.2566391750629388 -0.0043058176684150 0.5002566547516061 + 0.7565252440224287 -0.0040493982679606 0.4981775231839878 + 0.2511073458416163 0.4955346378347965 0.4992319639895876 + 0.7620922316144348 0.4959972826553875 0.4947088240023916 + 0.0067918084507124 0.2474656589422249 0.4959253466663498 + 0.5074589340318111 0.2478306892496961 0.4970447683405626 + 0.0067101009380840 0.7436141013552371 0.4960037684570145 + 0.5072832951149903 0.7438049977709310 0.4972231959716649 + 0.2579333497185807 -0.0045029110709267 -0.0027593161985723 + 0.7545074047689431 -0.0041574375050472 -0.0029034213106281 + 0.2405742423643976 0.4954961081726378 0.0049989593803465 + 0.7549160570155072 0.4956788457890768 0.0012293574316020 + 0.0028191040629103 0.4954663947469540 0.7457682667587129 + 0.5052056190629083 0.4953969670342518 0.7462789898581537 + 0.0062828480507964 -0.0046749926258077 0.7490187159138496 + 0.5071059827058564 0.9952266839412861 0.7487409387146815 + 0.2548971865117260 0.2453296830052234 0.2488972865917044 + 0.7614809692643431 0.2458931500923852 0.2465560081244360 + 0.2545665800660993 0.7458902095711227 0.2491671972434006 + 0.7612273222694761 0.7460316019748156 0.2465902640007772 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_-50.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_-50.0%/CONTCAR new file mode 100644 index 00000000..f68f62dc --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_-50.0%/CONTCAR @@ -0,0 +1,167 @@ +-50.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0091017649805766 0.2325709248622697 0.2469804831942779 + 0.5052417523349901 0.2451926638121242 0.2476043694400148 + 0.0093179369238997 0.7589609243304358 0.2473509069163438 + 0.5054351702946285 0.7462800404173493 0.2481809173421596 + 0.2583110036869531 -0.0042250935699349 0.7497499263571419 + 0.7562194517314860 0.9956011902958466 0.7488074591589547 + 0.2582577599601493 0.4959909822163040 0.7512945633783416 + 0.7541540890832712 0.4958954345571397 0.7480384227822215 + 0.0085827349404235 0.4956964552862449 0.5032111592218069 + 0.5056692949671817 0.4957540823776080 0.4960297122180409 + 0.0073382270271002 -0.0041420824798751 0.5020271385778677 + 0.5072181273854696 -0.0039559470837408 0.4994678832713136 + 0.2567690195856137 0.2492678780290715 -0.0015047745771963 + 0.7569524496818683 0.2481123749853166 -0.0025597152353358 + 0.2570499410372086 0.7424233134165127 -0.0007268457160530 + 0.7571297367463055 0.7431047365353619 -0.0018951106822446 + 0.2526248579851635 0.3705194321665837 0.3736860811521453 + 0.7664858966945629 0.3744273530804278 0.3657735194645484 + 0.2573679095166317 0.8700041078676177 0.3761967007789096 + 0.7577605348413887 0.8697507393851407 0.3745221041797804 + 0.5071223027374607 0.1209482065696814 0.8735764511990997 + 0.0074211762248481 0.1206241561275458 0.8742739262551757 + 0.5070778072605625 0.6195944057501888 0.8734396019115850 + 0.0054865716908449 0.6204512389557670 0.8717717873562609 + 0.3645237087056552 0.4955738547476688 0.1319518327555589 + 0.8588145302018094 0.4954377033587665 0.1618230529728253 + 0.3816177291680073 0.9955917661176049 0.1242674742630292 + 0.8805559858444543 -0.0041051896934300 0.1205550716240691 + 0.6322120796270141 0.2465077404849722 0.6231105676972408 + 0.1322860790051852 0.2464810011601005 0.6218275247960563 + 0.6319224785470486 0.7451851733839068 0.6236124180066625 + 0.1321767352905384 0.7450150378928295 0.6223901658374502 + 0.2526679917681557 0.6204661446363104 0.3739823469624586 + 0.7666348278477224 0.6172834453466657 0.3656781894828262 + 0.2573814999110335 0.1210745990502457 0.3757317479289395 + 0.7575650378285413 0.1220752316977025 0.3741990022284384 + 0.5069941346423401 0.3711726903727240 0.8730286307988177 + 0.0053849103873787 0.3704020902972648 0.8715786091240274 + 0.5072125807784077 0.8696896945716156 0.8740858460484329 + 0.0075581294122776 0.8700038367508585 0.8748206115112332 + 0.0755021919383975 0.4954333704819249 0.0798054369499729 + 0.6197426628180670 0.4957271318448842 0.1138355290341204 + 0.1308536239078367 -0.0043506699219427 0.1182920592802018 + 0.6313545861148687 -0.0044138512308123 0.1243066441988064 + 0.3821523581390088 0.2467770392481887 0.6227464947351278 + 0.8823378294793881 0.2464029107075248 0.6223427786071275 + 0.3819486229683221 0.7447544105471218 0.6230389483543166 + 0.8821808611619475 0.7450410283109682 0.6224973689496351 + 0.4994640941058940 0.4957485708071244 0.2460112899964065 + 0.0065199694574590 -0.0042289702991927 0.2463845363583327 + 0.5066090599751164 0.9955886511356670 0.2497559691433229 + 0.2566428899432839 0.2470912070874292 0.7482542311887981 + 0.7576749845700286 0.2471281498784564 0.7481309078312423 + 0.2565974307696903 0.7441834611964182 0.7488259751529828 + 0.7575792175650268 0.7443690389899789 0.7484783245513024 + 0.0074418932360726 0.2466581213471768 -0.0011912121815822 + 0.5072370695120302 0.2466289359840443 -0.0012432024697293 + 0.0075574282953187 0.7439400330629876 -0.0006839749494117 + 0.5073729832007928 0.7439967998415790 -0.0006849365835654 + 0.2568380103726753 -0.0043220125250811 0.5004021623254316 + 0.7566168823304276 -0.0039851390492746 0.4984723958553194 + 0.2511908584133838 0.4953765493909379 0.4993528039534071 + 0.7618543149587158 0.4958893478012153 0.4950480627460328 + 0.0068737434898050 0.2474746553559584 0.4959617351202463 + 0.5076791918790204 0.2477659395271957 0.4971369332088176 + 0.0068725674682095 0.7436148721185586 0.4962753578134165 + 0.5074923785330151 0.7438855719697046 0.4974532774049064 + 0.2580889962262868 -0.0044690124169440 -0.0026469603355747 + 0.7548904184231602 -0.0039886039208186 -0.0026548841344795 + 0.2403259750745202 0.4954985849378974 0.0051140701078233 + 0.7549163610643259 0.4957332323551574 0.0015048637337740 + 0.0032110401930704 0.4955079360828691 0.7454264102806947 + 0.5054823567928155 0.4955601385569818 0.7464380928548960 + 0.0065572468566786 -0.0048579434692888 0.7491956467103836 + 0.5073368417354701 0.9951452315015583 0.7488695530308576 + 0.2549421413051917 0.2452557433473055 0.2489106342843714 + 0.7616736630781069 0.2458565459097373 0.2467631868834966 + 0.2548523668806208 0.7458083835733436 0.2494293596449123 + 0.7618859314818192 0.7460302718666684 0.2470183703806541 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_-60.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_-60.0%/CONTCAR new file mode 100644 index 00000000..c2e14c48 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_-60.0%/CONTCAR @@ -0,0 +1,167 @@ +-60.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0093842947021372 0.2323719301737600 0.2472899883900172 + 0.5056903406113753 0.2450995185933895 0.2480095091295110 + 0.0092363632938081 0.7588428413849673 0.2475023662076244 + 0.5054276769635165 0.7462756928352845 0.2480954729175017 + 0.2583036935381420 -0.0041541713748300 0.7498083271010683 + 0.7562816034686241 0.9957356130030165 0.7488419606713349 + 0.2583939437758897 0.4958759439594175 0.7515932269952619 + 0.7542707887400153 0.4958239303324872 0.7481855743440202 + 0.0085916181045788 0.4956955151233378 0.5037768506381189 + 0.5057016480619001 0.4957235661136566 0.4961893785511053 + 0.0073223282623872 -0.0041901333293148 0.5021662850737105 + 0.5072427657329007 -0.0040707729281517 0.4996850662301588 + 0.2574354026439026 0.2491933790263058 -0.0010904169119553 + 0.7571414505879707 0.2480520071201313 -0.0024682226154527 + 0.2571480428176484 0.7424932792037079 -0.0006055191430780 + 0.7571282099766725 0.7431519763576022 -0.0020668597002209 + 0.2527244034265851 0.3705436624659151 0.3738557807511977 + 0.7668972913969053 0.3746974848625296 0.3656308814619344 + 0.2573259260335642 0.8700471258901820 0.3761798685423956 + 0.7575663308822070 0.8698340074946204 0.3743128370643611 + 0.5073786019905454 0.1206989330102291 0.8739428288439679 + 0.0075495528012875 0.1208135231821604 0.8748143931303504 + 0.5071966666114245 0.6195117109901370 0.8734211858771845 + 0.0056396278417125 0.6204490848046840 0.8726178581069479 + 0.3652565598835834 0.4955219659234522 0.1321999243329557 + 0.8597940671907057 0.4956973927950939 0.1615510873672678 + 0.3817942053177636 0.9954879128997800 0.1243612159400984 + 0.8805777004024792 -0.0042087279551650 0.1206636364725703 + 0.6323379560004384 0.2464583066125827 0.6230711647064124 + 0.1324303892626592 0.2465195474193119 0.6221696142917214 + 0.6320199222013024 0.7451330349365385 0.6233795475090314 + 0.1322468971554512 0.7450538265950045 0.6223207671340714 + 0.2525596258268793 0.6203904833166530 0.3738868625586811 + 0.7666476547606170 0.6173469199819023 0.3656124339848864 + 0.2575625532361580 0.1208935001215660 0.3757474380772612 + 0.7576944779342770 0.1221945107233989 0.3744050126222453 + 0.5073124592930877 0.3710373639590516 0.8733521159466890 + 0.0055480688371843 0.3707723126529753 0.8726774013293582 + 0.5072707324049849 0.8695394748432843 0.8739999795444621 + 0.0076566598257490 0.8704514083926306 0.8749291114773113 + 0.0765292698316514 0.4956220359240786 0.0804622080501626 + 0.6204896088192416 0.4957068823574025 0.1143043508318270 + 0.1308675323301529 -0.0044606434154729 0.1183337261445125 + 0.6314278001234197 -0.0044940378677056 0.1244020296020801 + 0.3822530336070891 0.2468158575517864 0.6230860467766457 + 0.8823415949892185 0.2464479409975384 0.6223945461700735 + 0.3820207771978393 0.7447066432362586 0.6232773667268205 + 0.8821802105372242 0.7451401006353090 0.6223942564573065 + 0.5000990639772714 0.4955594122694847 0.2463310344004395 + 0.0065464374572975 0.9956327360977139 0.2465039075658208 + 0.5067334906307873 0.9954544103520240 0.2499219641615978 + 0.2567596695986428 0.2471166503431294 0.7486531664247165 + 0.7577157737858986 0.2471165787796099 0.7481713748837655 + 0.2565235127354099 0.7440108161140896 0.7489218583026926 + 0.7576208986541254 0.7444160820288156 0.7483270188159448 + 0.0076096178282991 0.2466903292818224 -0.0006229224912456 + 0.5075998171901153 0.2464597840381653 -0.0009908863879839 + 0.0074645721583993 0.7444534102228093 -0.0005582415275384 + 0.5073132388813145 0.7439410904193416 -0.0007520663215374 + 0.2568986064492949 -0.0043683479693406 0.5005374877595401 + 0.7566749578540921 -0.0040360090334137 0.4984636185542728 + 0.2511280763705466 0.4954487625856933 0.4994739170070985 + 0.7622726732435691 0.4960641497187041 0.4950699586522062 + 0.0070332545257313 0.2477096048225011 0.4962709364442986 + 0.5076563334131319 0.2477150241457528 0.4973064937530459 + 0.0069074134788171 0.7436470688702626 0.4962447928291254 + 0.5074065592879853 0.7436927545648195 0.4974446560974511 + 0.2582093060308288 -0.0046583414384166 -0.0024631867492758 + 0.7549412240781223 -0.0041605162520397 -0.0026083356745399 + 0.2411055576306137 0.4954381833727849 0.0053718826100562 + 0.7553991705902288 0.4957421957505198 0.0016614205068082 + 0.0034561783256135 0.4955851979654556 0.7462406328766409 + 0.5058490244836987 0.4952977153833418 0.7466469853609030 + 0.0066741078778933 -0.0044042384721108 0.7493533087441011 + 0.5073600299680467 0.9951154380553283 0.7489773899901240 + 0.2553243143790051 0.2452124927412166 0.2491585579751006 + 0.7619642836235364 0.2459009158882970 0.2468596169597253 + 0.2548751210387787 0.7458315918155566 0.2494292549217381 + 0.7615343852180793 0.7460433966056060 0.2468919378434137 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_0.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_0.0%/CONTCAR new file mode 100644 index 00000000..5b18566f --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_0.0%/CONTCAR @@ -0,0 +1,167 @@ +0.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0014748970929794 0.2320647518659511 0.2473965033574149 + 0.5018940644509389 0.2445003306704317 0.2481334746837073 + 0.0015082258957191 0.7576784489961259 0.2476921508590701 + 0.5019466077278247 0.7451680904238661 0.2482996214126545 + 0.2525474739078203 -0.0053528754662851 0.7468165903693467 + 0.7514563493683816 -0.0049406044992346 0.7474318367713045 + 0.2550144000614360 0.4946239380674307 0.7463646235188203 + 0.7494011893288832 0.4951048764729484 0.7475127414657097 + 0.0017685119473062 0.4950957155819183 0.5094732096374263 + 0.5019420378702268 0.4948413244447358 0.4968542543464000 + 0.0019706529659900 -0.0047769777731889 0.5002393197429804 + 0.5020628653738309 -0.0050265373479144 0.4980755778934610 + 0.2558640191737905 0.2455005833068516 -0.0037116495044822 + 0.7481840434749949 0.2462800691045732 -0.0030627277034877 + 0.2558885199782319 0.7435346411437607 -0.0034719026200830 + 0.7482440708652579 0.7437418761085662 -0.0029258332490372 + 0.2438827766262327 0.3729644988882561 0.3637316581783449 + 0.7587322205101903 0.3727787253626966 0.3666965701225798 + 0.2517095490256315 0.8694309566862941 0.3728031809522444 + 0.7519474852199431 0.8699256063267425 0.3734315329703026 + 0.5020213291412734 0.1196721561287986 0.8715668360465360 + 0.0018550963456180 0.1193349308070394 0.8745330536580872 + 0.5020848371274506 0.6201624348576841 0.8710635725530151 + 0.0026015794954486 0.6145763623497483 0.8895644021553952 + 0.3792946971719157 0.4946396722861004 0.1234297149263534 + 0.8983806226634817 0.4948722834299717 0.0941129047468454 + 0.3769547570836452 0.9945688123902503 0.1236237022686384 + 0.8778337026716192 -0.0051951173088205 0.1161760151818308 + 0.6273149790092151 0.2455145608668561 0.6232579469631678 + 0.1277913462099997 0.2451196443435832 0.6197921915041072 + 0.6278813453129887 0.7447246868188806 0.6231230055225668 + 0.1282829127775093 0.7446166677512746 0.6199198643459446 + 0.2439185062813308 0.6167811551916789 0.3639590320059744 + 0.7587772970618226 0.6183681458373851 0.3673187907130797 + 0.2516722911117302 0.1209609872946934 0.3729197110021341 + 0.7518393215366689 0.1213576053975772 0.3735687634750129 + 0.5020870022879121 0.3692015209691576 0.8710403814963860 + 0.0027214050496703 0.3753942513409398 0.8896268428787998 + 0.5020902766654423 0.8694829692018571 0.8718253347228725 + 0.0018980543358744 0.8711197034835338 0.8750802094833120 + 0.1128185356978760 0.4945501519055713 0.1020026598174772 + 0.6274414159683025 0.4949697964463468 0.1254949276828998 + 0.1268833724078868 -0.0053217942949281 0.1164293167088820 + 0.6271210355103655 -0.0051453796447225 0.1243229327561575 + 0.3774208338143583 0.2449094879790476 0.6231601123367302 + 0.8768803478386152 0.2453637374427576 0.6204012773113392 + 0.3780360301404806 0.7444145731785426 0.6236558139599869 + 0.8772894820474036 0.7448645382237070 0.6207278617178065 + 0.5025026235806702 0.4949610470746974 0.2510660179236481 + 0.0021979093434959 -0.0051708824400943 0.2442468072691551 + 0.5017132789808433 0.9947905632973143 0.2491895598043017 + 0.2507461863223046 0.2450469250972988 0.7469878080821748 + 0.7537623680402249 0.2458718201631475 0.7474885344946803 + 0.2511263493128548 0.7438337826297623 0.7472217831008524 + 0.7540304965047571 0.7444911900550799 0.7476452644220678 + 0.0019296141123701 0.2418011339418096 0.0021303167222087 + 0.5021241252795717 0.2444549642280114 -0.0022811492567404 + 0.0018712470510204 0.7481985107063961 0.0021800149454643 + 0.5022788255634415 0.7446981051843409 -0.0019989393963059 + 0.2513492367475315 -0.0048803851353615 0.4973456364864862 + 0.7524481619996064 -0.0044627395434704 0.4979447981812631 + 0.2438824109401117 0.4947911920909082 0.4927894519257366 + 0.7590432465834533 0.4953258477330193 0.4948105777015223 + 0.0020936468301808 0.2480238465956958 0.4952205388111373 + 0.5023042641008234 0.2461050109907709 0.4973836720179667 + 0.0025051120962170 0.7423260267703110 0.4955160566303219 + 0.5026277653784573 0.7435745762785684 0.4975234476688872 + 0.2543787802907252 -0.0054477611332660 -0.0046896361065846 + 0.7497014108970436 -0.0049090129322565 0.9960385671873372 + 0.2585545577044475 0.4944464848353010 -0.0053446242487277 + 0.7476508671213249 0.4950638992944109 0.9961569707505944 + 0.0026953521855324 0.4949291556032099 0.7560289710725514 + 0.5020019642859631 0.4946794618495906 0.7454770509890830 + 0.0019811909550139 -0.0049783172643312 0.7476664809247796 + 0.5018259282458828 -0.0055184087065766 0.7465055359450832 + 0.2487580659969668 0.2440024519408938 0.2448132470881048 + 0.7548342546064604 0.2449232632240244 0.2460533112619334 + 0.2488178208643026 0.7458444267632428 0.2451675588221318 + 0.7549115644469179 0.7460108377685220 0.2463674576328877 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_10.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_10.0%/CONTCAR new file mode 100644 index 00000000..e5d4dcb9 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_10.0%/CONTCAR @@ -0,0 +1,167 @@ +10.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0010938156552404 0.2316825073612559 0.2474651600903374 + 0.5019196678441853 0.2444416488168528 0.2476540479219360 + 0.0008166000581556 0.7577953595590505 0.2475927137147300 + 0.5019399665898405 0.7452864060518559 0.2476194000454829 + 0.2524176226251074 -0.0052403878327663 0.7468872371701362 + 0.7512817226203933 -0.0049548537453854 0.7472662059011347 + 0.2545508572987586 0.4947075840641016 0.7461438230024811 + 0.7494265738582906 0.4950594781820828 0.7475351119937369 + 0.0013788339705367 0.4950195347775593 0.5088823746778266 + 0.5018512822048976 0.4949374996909771 0.4962587230064856 + 0.0019203308948395 -0.0049793896455574 0.5003542583313598 + 0.5018612047429183 -0.0049369884106150 0.4976902474272674 + 0.2552382743946641 0.2458459736664189 -0.0039476191212340 + 0.7485281716000816 0.2464761775208840 -0.0032358850867022 + 0.2551769714458981 0.7434153922647176 -0.0038656752179154 + 0.7483638848079432 0.7434924665411207 -0.0032982058085552 + 0.2429462665711703 0.3734937786377538 0.3618352856731980 + 0.7585907873715775 0.3730872241110473 0.3665310848942039 + 0.2514045434445449 0.8689847852778402 0.3728731474417056 + 0.7516632948338128 0.8703031092380041 0.3730727539956802 + 0.5018761912927672 0.1196226260504969 0.8714303537709165 + 0.0016887844651573 0.1193151595545067 0.8749311188791559 + 0.5017448556252413 0.6198447336679007 0.8707112224914373 + 0.0025767670888958 0.6146957788844525 0.8889647926680269 + 0.3795185504590821 0.4946973913613886 0.1222532899711428 + 0.9011151148426105 0.4948889249298867 0.0940085989045793 + 0.3762556939225395 0.9946360307520992 0.1236192953012764 + 0.8772807165989799 -0.0052628610045771 0.1158778545251248 + 0.6276679710355824 0.2455472591982739 0.6226809730298352 + 0.1282344236368453 0.2451099472171204 0.6197503154513732 + 0.6267462716958055 0.7447233027901867 0.6228861615574725 + 0.1273242331643240 0.7445346624959972 0.6202804805337220 + 0.2427474527022386 0.6157720798982100 0.3614573813668829 + 0.7582603652865754 0.6189665228864001 0.3673526131363349 + 0.2515360455838603 0.1207928150971800 0.3729037048112951 + 0.7517148457549533 0.1216560132747333 0.3735650439959037 + 0.5019168482160130 0.3691569506382766 0.8707889347310513 + 0.0028449085172005 0.3755196598510900 0.8893194226097106 + 0.5018169218252654 0.8692411933335212 0.8711894850589296 + 0.0016096150447019 0.8711316513645252 0.8753763375340946 + 0.1164399905687587 0.4947383181285308 0.1119412007950848 + 0.6286089350546609 0.4947833872555704 0.1252242193234689 + 0.1260943141704986 -0.0053928842460653 0.1163753602819910 + 0.6265120137874194 -0.0050727567663717 0.1237148702821516 + 0.3780068578874665 0.2450406362659602 0.6231374699259181 + 0.8772557831620486 0.2451767472896708 0.6205278561808018 + 0.3771452546975728 0.7444942854213369 0.6228169031227816 + 0.8762977278481220 0.7447534705374458 0.6201035229724137 + 0.5027946294558990 0.4947783485718144 0.2499492807085660 + 0.0014832880538541 -0.0053108522067511 0.2442176339439207 + 0.5013107078981458 0.9947306399475682 0.2488058018703267 + 0.2512555559958804 0.2453289700170527 0.7468423000762144 + 0.7538398429789341 0.2458695971637507 0.7472516101879640 + 0.2507153642718430 0.7436007246949095 0.7468744321295285 + 0.7531432300655174 0.7441680403277414 0.7471771445084583 + 0.0019166796369359 0.2421148039676776 0.0022531026922583 + 0.5021180464410877 0.2445164902289614 -0.0025352641178988 + 0.0012819570256354 0.7478817736331423 0.0021504927877534 + 0.5017401854694296 0.7444962323477956 -0.0025989394576462 + 0.2512185568378166 -0.0051105498558914 0.4972619888662694 + 0.7523849423075679 -0.0042601443761822 0.4977926600375931 + 0.2435076940487417 0.4947709627956982 0.4915175954180911 + 0.7587710300964130 0.4956806921627951 0.4946491142323056 + 0.0024862526505322 0.2476608768942641 0.4953373788150528 + 0.5025414565034357 0.2463738457389190 0.4969299835130623 + 0.0019765983029879 0.7424161760119212 0.4954278075914596 + 0.5018398290057329 0.7436665195363362 0.4968455559247107 + 0.2536549125349932 -0.0052886610601763 -0.0046176726282043 + 0.7492056493275736 -0.0048201692551891 0.9956452216823835 + 0.2570964370478303 0.4945229281243331 -0.0047594106208526 + 0.7498367870310356 0.4950449842286724 0.9967491789902592 + 0.0029682953104150 0.4949313718941182 0.7556189528685030 + 0.5017797254631819 0.4944952045790016 0.7450684704651865 + 0.0016772444150498 -0.0049552991268509 0.7479879720284741 + 0.5013967483260836 -0.0054915974729220 0.7461964051355595 + 0.2486575493786242 0.2435102289793800 0.2444447905500484 + 0.7548129343796415 0.2451170018194037 0.2459793851012180 + 0.2480993006620816 0.7460342589155829 0.2445620943044738 + 0.7540614423090845 0.7463412485181862 0.2460069591288112 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_20.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_20.0%/CONTCAR new file mode 100644 index 00000000..85b1403c --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_20.0%/CONTCAR @@ -0,0 +1,167 @@ +20.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0005080393440033 0.2317060500074509 0.2470222476352066 + 0.5017646597895765 0.2444058221367079 0.2474900687458964 + 0.0005829565245407 0.7578644665062221 0.2472176555887088 + 0.5018388893611589 0.7453373872309567 0.2477010412414919 + 0.2520176768177022 -0.0053257821700198 0.7467036085472749 + 0.7509596006021386 -0.0049989015744914 0.7472187620726622 + 0.2542406164034537 0.4947763642367168 0.7458606422116463 + 0.7493322595858674 0.4950899078220544 0.7475549034581316 + 0.0010713041117464 0.4949299490934023 0.5082931384305808 + 0.5016250305541583 0.4949103619934310 0.4962010725370362 + 0.0015423451635475 -0.0049425992121859 0.5001495418378359 + 0.5015521218921967 -0.0049267635171565 0.4976786736043263 + 0.2549807995838428 0.2458639866974688 -0.0043497690489800 + 0.7483567871110127 0.2465922517503735 -0.0033880390194005 + 0.2549491404043529 0.7434102338788706 -0.0040490444573129 + 0.7482749865188963 0.7433828383953253 -0.0032363992242925 + 0.2422989046469330 0.3739168968193495 0.3605800285200671 + 0.7579322596073725 0.3726850684686036 0.3669845050530748 + 0.2511765214879811 0.8691050891017436 0.3727154071458086 + 0.7514926753876718 0.8701264074809841 0.3732574719529903 + 0.5016115295474937 0.1196723217899189 0.8712708848528751 + 0.0013220110214435 0.1194729573466587 0.8744760654770893 + 0.5015266250231211 0.6197970131782343 0.8708694770316938 + 0.0027168785169227 0.6149678972223908 0.8880787236318992 + 0.3799253347976353 0.4947198032392753 0.1216244727145523 + 0.9028243598569190 0.4947083440205906 0.0923877797459272 + 0.3761371429408578 0.9947023554379880 0.1235809002599964 + 0.8771676137961081 -0.0052823897345821 0.1158311509547643 + 0.6271819466833303 0.2456350257793035 0.6226695762719088 + 0.1276740646500769 0.2450138919961301 0.6194402754637244 + 0.6268014966418066 0.7446599338433204 0.6228936677916300 + 0.1272753759442787 0.7444787691964773 0.6196588278301490 + 0.2423973217092208 0.6157774877356885 0.3611121641414269 + 0.7578999155400515 0.6189334978152145 0.3677462053994844 + 0.2511191598207204 0.1209744326924677 0.3724931482961767 + 0.7513851687836894 0.1215781021361870 0.3736106053138966 + 0.5016983117473771 0.3692303464883800 0.8707151880089764 + 0.0027787240726110 0.3753303664771857 0.8880296616174814 + 0.5015697671240588 0.8692559033318600 0.8713163840513442 + 0.0014132583000420 0.8710916703260652 0.8750141096059249 + 0.1183347270574346 0.4945959174955217 0.1150880032035601 + 0.6290812837605170 0.4947761500447693 0.1255607601423506 + 0.1261268221098119 -0.0052962230079057 0.1163878803698962 + 0.6263807528588136 -0.0051207775867176 0.1236064848360626 + 0.3775169712591199 0.2449752259833470 0.6228915796080597 + 0.8767128415368661 0.2451726551710908 0.6202189103477905 + 0.3771150334090376 0.7444571963229503 0.6228493275393060 + 0.8763163306085492 0.7446876931299276 0.6200628699461596 + 0.5028366185728668 0.4948068798812238 0.2497803740607172 + 0.0014111388572488 -0.0052930391060890 0.2440732724582058 + 0.5011844443786324 0.9947662075815827 0.2487442209730767 + 0.2507314314627885 0.2452457371080994 0.7465009401863467 + 0.7534293402565185 0.2458745585901631 0.7471147527269425 + 0.2504559393745443 0.7435681806667059 0.7465495599706151 + 0.7531554444265528 0.7441267979555899 0.7472102222945565 + 0.0015995693970265 0.2423827349732923 0.0016666423968420 + 0.5019448219710112 0.2445474294249239 -0.0026830766971499 + 0.0013319666434766 0.7478361284084047 0.0018090403393222 + 0.5016542404739061 0.7444581500155185 -0.0025245479094653 + 0.2509172191323283 -0.0048826066719256 0.4969834099826250 + 0.7520872530108335 -0.0042909895376610 0.4978499559767777 + 0.2433757909074727 0.4946885366119545 0.4909893584468434 + 0.7584923187814194 0.4954954090952492 0.4948438918861308 + 0.0019559847655862 0.2477367066881573 0.4949731506629228 + 0.5020999078337005 0.2463500501807204 0.4968048614202831 + 0.0017295755701747 0.7424031943472276 0.4950707829469889 + 0.5018021197052019 0.7435959037932963 0.4969309462362804 + 0.2536076648133716 -0.0052134615168401 -0.0047291804163222 + 0.7490929082795544 -0.0049246924887280 0.9956043682375719 + 0.2570716767713188 0.4946556726448304 -0.0049360238868397 + 0.7503527452762327 0.4949607754756921 0.9970235451204680 + 0.0032300897062058 0.4951522307089642 0.7548763332520432 + 0.5016710937814474 0.4946077291853920 0.7450474004249817 + 0.0014237514074882 -0.0049530150983645 0.7477036456284368 + 0.5010684707619714 -0.0055410651254698 0.7461516139627914 + 0.2479981109782605 0.2435176301098924 0.2438719362093197 + 0.7541657386653219 0.2449924975548567 0.2459817564127957 + 0.2478880843337821 0.7461312485662973 0.2444162846782031 + 0.7540071956877148 0.7461668769595078 0.2461519607308530 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_30.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_30.0%/CONTCAR new file mode 100644 index 00000000..a4e22241 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_30.0%/CONTCAR @@ -0,0 +1,167 @@ +30.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + -0.0022116971828439 0.2316218099751145 0.2454491767621373 + 0.5013609166660866 0.2444048556906130 0.2463183792510658 + -0.0020112280812928 0.7581046396605731 0.2456589413491701 + 0.5016316027697073 0.7455640455192452 0.2462039976080454 + 0.2509815645959165 -0.0050967838371948 0.7469616512136602 + 0.7489474455710006 -0.0051193310443487 0.7481547506011080 + 0.2530933505875441 0.4949158055044187 0.7460335811995129 + 0.7488306638825019 0.4949340189028643 0.7498183311315583 + -0.0016329392663079 0.4951329416052181 0.5017575673003223 + 0.5016476578858630 0.4950850324485312 0.4943023099888960 + -0.0000012861062511 -0.0047857174357677 0.5003646390427124 + 0.5001553034411734 -0.0048894182122594 0.4977575044509904 + 0.2499783292083763 0.2472731840006044 -0.0044999234257368 + 0.7500046819849789 0.2481723294128060 -0.0027026107978200 + 0.2501010238112356 0.7424104870497676 -0.0041643031148459 + 0.7501142757351735 0.7413787658978183 -0.0027403909567542 + 0.2400743267422305 0.3735033395738822 0.3633776776725948 + 0.7541390855140570 0.3703659202282517 0.3722481287864862 + 0.2495704552214557 0.8688575876246013 0.3729458838679213 + 0.7498359488457236 0.8699451328786525 0.3740715624393420 + 0.5000491113417952 0.1202794966096455 0.8720449760363801 + -0.0003451444627487 0.1199851274150997 0.8730171911876846 + 0.5000819338629205 0.6188205380148352 0.8716459652519158 + 0.0018357280504426 0.6197221238157781 0.8705837649577486 + 0.3867859008532789 0.4949052829684087 0.1122289046053995 + 0.9308188007984061 0.4947029351114531 0.0783212036406519 + 0.3753104976729217 0.9950331877788098 0.1227795519597366 + 0.8757387069907170 -0.0052302818714586 0.1172209036120498 + 0.6256711768565743 0.2459891117306181 0.6215185922150912 + 0.1253287376282163 0.2456974400902386 0.6200775756766813 + 0.6260521519941171 0.7440162407927192 0.6210083268798769 + 0.1258357272270895 0.7443319789603258 0.6198148643489717 + 0.2402269216016946 0.6162444229431036 0.3634900669907107 + 0.7543756243863106 0.6202566269307640 0.3722402300706676 + 0.2495115050640489 0.1214157691448471 0.3726520362035711 + 0.7497166774286688 0.1208891487945166 0.3743174637870590 + 0.5000464865125834 0.3702913292533853 0.8713763267938390 + 0.0016610165883895 0.3697834636888419 0.8704387469318564 + 0.5000499730355298 0.8690174377480349 0.8720041302172279 + -0.0002491820003319 0.8697185704318859 0.8732115955800410 + 0.1473817967312876 0.4946067897145825 0.1594394234913323 + 0.6420501445510863 0.4948727603754550 0.1302654108796220 + 0.1261479150955472 -0.0051369967844041 0.1187002965072390 + 0.6251020147990413 -0.0050846211310920 0.1226076176702085 + 0.3756047144448524 0.2456567259148791 0.6214965652581367 + 0.8753612502711310 0.2456366350763457 0.6204540815241162 + 0.3760606942983609 0.7443357215977128 0.6216280639796428 + 0.8756583264109236 0.7442451363178805 0.6204311062844284 + 0.5071522976557544 0.4954314839181648 0.2443895438230263 + 0.0004825837571646 -0.0052652930865660 0.2447793928809203 + 0.5001419973665442 0.9950809669292010 0.2481819740712091 + 0.2497933421219099 0.2461087405755448 0.7460881577615621 + 0.7511113774913573 0.2461608269843400 0.7470980084788161 + 0.2500933972376668 0.7434287294236268 0.7461374856601296 + 0.7512595371001931 0.7434245647978580 0.7468966808862525 + -0.0003562291256766 0.2459313991857409 -0.0025396838682019 + 0.4998605724378209 0.2458861462973612 -0.0027286869427923 + -0.0001048553663152 0.7436226778559575 -0.0024501536188527 + 0.4998316887462557 0.7434762526860987 -0.0027318716744443 + 0.2505474518881421 -0.0047414693064813 0.4968239163141480 + 0.7505238928106739 -0.0046773222085457 0.4987768039516594 + 0.2442841706990138 0.4948060151411565 0.4928685002278663 + 0.7556714458848622 0.4952786853605520 0.4978311155570687 + 0.0004380796385555 0.2470136671849228 0.4941333870430592 + 0.5002270617485242 0.2469703949955140 0.4956742085093597 + 0.0007360638550440 0.7430361993028934 0.4941775166905765 + 0.5003947202896809 0.7430281736029423 0.4954391570037319 + 0.2519721436372693 -0.0048370794859099 -0.0043482093680751 + 0.7487705260893787 -0.0051519120727964 0.9959432786272256 + 0.2518852505907992 0.4947554959456487 -0.0003307587314272 + 0.7662498666133959 0.4947920152564076 0.0034059093546486 + 0.0035916917804088 0.4948267566051817 0.7442433431692353 + 0.5013721570849293 0.4946692198733476 0.7447018000319913 + 0.0005225288057733 -0.0052163611061307 0.7475963252236834 + 0.4999299013654832 -0.0053479465146527 0.7470793197452884 + 0.2451485640959351 0.2447162483215380 0.2446834066745003 + 0.7519187363033905 0.2450824590917407 0.2475400162138697 + 0.2455063528062643 0.7452890689537774 0.2451388649257900 + 0.7523459947306482 0.7454834486149700 0.2475174144659384 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_40.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_40.0%/CONTCAR new file mode 100644 index 00000000..a4d490b8 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_40.0%/CONTCAR @@ -0,0 +1,167 @@ +40.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0002813646882670 0.2317652694248695 0.2466028477762297 + 0.5015477359051579 0.2442545044932568 0.2472803226524463 + 0.0004253915241610 0.7579891395161487 0.2468254829624938 + 0.5016147289611315 0.7452920760838481 0.2474995579428572 + 0.2517188827546893 -0.0053655386636988 0.7463897073670008 + 0.7506752643934972 -0.0050084139319233 0.7470348518198932 + 0.2540013476603250 0.4947213972133813 0.7453020847993155 + 0.7490115520790483 0.4950640132929447 0.7473479345189364 + 0.0007840860611033 0.4950106786072112 0.5079293802013947 + 0.5013814448574679 0.4947492429285847 0.4959266790215475 + 0.0010988870066070 -0.0048282923565101 0.4997935810412854 + 0.5013133416158198 -0.0050572751502830 0.4974584069031583 + 0.2548112757020016 0.2459021547308998 -0.0047292922267270 + 0.7480973826346370 0.2465275022060657 -0.0036114991020249 + 0.2547298176508135 0.7434050895040147 -0.0044620770633663 + 0.7479805037574975 0.7432100288266029 -0.0034242957264389 + 0.2420682177873146 0.3740089028661212 0.3601980290020943 + 0.7576352471698360 0.3726127885487863 0.3669297246700469 + 0.2508673599131344 0.8691326730230651 0.3724683072193379 + 0.7511918819550315 0.8701734655266539 0.3732122387350493 + 0.5013676822040918 0.1197898527964632 0.8708803521147498 + 0.0010516462203014 0.1194002880858194 0.8740903126814246 + 0.5013036694444355 0.6198726591418628 0.8704396751618289 + 0.0025033226979167 0.6148806259210323 0.8878237221993408 + 0.3795349214413340 0.4946630069035934 0.1212777178637241 + 0.9023890137375684 0.4948108490082335 0.0920928593451257 + 0.3757421345183385 0.9946782422729631 0.1234716568431724 + 0.8767144516690739 -0.0051459846798463 0.1155638439053560 + 0.6268127578603025 0.2455594357301512 0.6224773875109358 + 0.1272961548337978 0.2450353427967659 0.6189757190425409 + 0.6264881648279526 0.7445363553236174 0.6227750268059570 + 0.1268642371781060 0.7445777838237938 0.6191635568385256 + 0.2421851885223914 0.6158729224803863 0.3608681883513246 + 0.7576334226916176 0.6189727601050806 0.3672957429751706 + 0.2508791002891810 0.1210250890691091 0.3722561828920401 + 0.7509997536117483 0.1216495947664031 0.3734222825649762 + 0.5014495754233310 0.3691755044395051 0.8703838821705466 + 0.0025746426284906 0.3752915195155585 0.8875959912669802 + 0.5013526124126104 0.8692706083772508 0.8710615464239040 + 0.0009988325271821 0.8708999361024067 0.8745104370035760 + 0.1177944631365031 0.4946067303633144 0.1135836567527479 + 0.6286177136048429 0.4945942405311747 0.1253656584914948 + 0.1256249997806116 -0.0051734130033277 0.1159700552660951 + 0.6260567573807421 -0.0050416215308510 0.1233730234323732 + 0.3772144835828540 0.2448103184300330 0.6226210114798462 + 0.8763944810305694 0.2453576658667208 0.6199814396294872 + 0.3768051342201712 0.7444363657398098 0.6225461819235292 + 0.8758314513322119 0.7446573142243534 0.6195637574621058 + 0.5022828437800204 0.4946362642263886 0.2495549335043288 + 0.0010077412541564 -0.0052045298192180 0.2437623327622332 + 0.5008945719350746 0.9946655440266841 0.2485189849672176 + 0.2503498964116659 0.2451222682109302 0.7460835371967365 + 0.7530969082492800 0.2459105120676690 0.7468938647328029 + 0.2500309757808498 0.7436591224212279 0.7461298855948469 + 0.7529169233304580 0.7439873468981487 0.7470378489673055 + 0.0012492908827343 0.2423756818976694 0.0012069554978150 + 0.5016237442687532 0.2445588419654229 -0.0029762909531940 + 0.0010005197492601 0.7478140976469647 0.0014570522943044 + 0.5014184823716449 0.7444416470095813 -0.0028232758436107 + 0.2507053401914672 -0.0048240887861795 0.4967292858349900 + 0.7515743975203666 -0.0042092743396075 0.4977207490491984 + 0.2431968668186835 0.4947053258557190 0.4906546178897669 + 0.7581606252972827 0.4956254408323306 0.4945461797441474 + 0.0015062540319356 0.2479119122251054 0.4945868288847106 + 0.5017353233598025 0.2462228754957545 0.4965169420428617 + 0.0012624877251074 0.7424303135138111 0.4945860171872222 + 0.5015502496414181 0.7434476908718328 0.4967262241351130 + 0.2532901929366453 -0.0050807420807583 -0.0049385468995773 + 0.7487144475962199 -0.0047080675581068 0.9953335484896789 + 0.2570132350952741 0.4946996025954742 -0.0056549575345127 + 0.7499249940101488 0.4947504489965883 0.9968520078156792 + 0.0030553383814933 0.4951630258185895 0.7545074303230065 + 0.5014174779905287 0.4945646018582357 0.7447596965495195 + 0.0010504196279667 -0.0050407647102274 0.7473302125198411 + 0.5008097879806256 -0.0055432460501905 0.7459122461467397 + 0.2476165843722780 0.2435481370306047 0.2435487021365571 + 0.7538226388957568 0.2450320156271953 0.2457444067072122 + 0.2474985046331968 0.7462114169414739 0.2440841829328985 + 0.7537874529941152 0.7463461800194731 0.2459605564107737 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_50.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_50.0%/CONTCAR new file mode 100644 index 00000000..1e453681 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_50.0%/CONTCAR @@ -0,0 +1,167 @@ +50.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0023521635772852 0.2333086015800682 0.2457750375590236 + 0.5016582732856887 0.2452580608602648 0.2466241353408032 + 0.0022471239174331 0.7587209172117932 0.2463160301897465 + 0.5017363372130128 0.7462090767515116 0.2469547694589485 + 0.2524649721256683 -0.0044986680380708 0.7456380612181376 + 0.7515143801870543 -0.0040266129183083 0.7457607632129701 + 0.2545034930007111 0.4957734403948161 0.7455502946669279 + 0.7491213800367895 0.4960458311453466 0.7451735678474494 + 0.0017737530053664 0.4959242034166905 0.5076562282339624 + 0.5023502716504670 0.4957614739714752 0.4953848941750285 + 0.0019636951572462 -0.0036577680264597 0.4988687147534705 + 0.5020739469332565 -0.0039424153990703 0.4966264741942393 + 0.2557111513327673 0.2469240496048273 -0.0050081915220490 + 0.7480630479987448 0.2472731001799334 -0.0050526556152055 + 0.2555983285876312 0.7443758306735780 -0.0044430597666310 + 0.7479280566807622 0.7450266322533982 -0.0045451119168720 + 0.2446796526685114 0.3728330029979885 0.3648933481187296 + 0.7598238706456024 0.3741832665247561 0.3620554105740145 + 0.2519798010435180 0.8699406030280714 0.3722022770435905 + 0.7522987639180169 0.8707632165977525 0.3717206034484618 + 0.5018875607361885 0.1207294586086456 0.8699179220830455 + 0.0020115505815619 0.1201859215122227 0.8736027913459246 + 0.5017813521680713 0.6210364912428853 0.8696873130253845 + 0.0012034435565457 0.6156495137089093 0.8882306915549415 + 0.3766856703052471 0.4955397511917974 0.1233071930387742 + 0.8920544690295539 0.4962596041295240 0.0993307508492881 + 0.3764363355267286 0.9956731176089497 0.1224633424148613 + 0.8773068715538822 -0.0037950987274126 0.1148084114649806 + 0.6274828744758729 0.2461843977343992 0.6218919663334511 + 0.1280495492386027 0.2460562896506028 0.6184255467076488 + 0.6272124291316256 0.7457761967762460 0.6224039500881655 + 0.1278782049672397 0.7454638850456868 0.6186017933158439 + 0.2448027434027147 0.6181014883216591 0.3648688347026166 + 0.7598086674828980 0.6181607550439173 0.3627874587139751 + 0.2519220747236320 0.1215922077174146 0.3714776531357815 + 0.7521983139299215 0.1220945812543432 0.3713708872504752 + 0.5018871381825021 0.3700536014167675 0.8696162967277717 + 0.0014209715346956 0.3768410758657295 0.8878692251890054 + 0.5017572257427700 0.8703240820892333 0.8703231060570614 + 0.0018846013737421 0.8720443652619307 0.8740967449233512 + 0.1066148775912809 0.4956965406247156 0.0937447103996058 + 0.6244772252202210 0.4958624623151341 0.1222255655248842 + 0.1259081803550435 -0.0041777767800012 0.1142948596258432 + 0.6266360487980236 -0.0038991841516082 0.1224260752819396 + 0.3777621594518938 0.2460122486084412 0.6219817134103075 + 0.8773160474216600 0.2462029811188851 0.6190683271050971 + 0.3774890067375090 0.7451765584037986 0.6218224529652074 + 0.8769662264158614 0.7459023863577210 0.6192327628668440 + 0.5010573173920773 0.4954588401292442 0.2495901490189797 + 0.0017861399222300 -0.0040931070964688 0.2427782827718517 + 0.5015372358742505 0.9956049677181176 0.2476537393768529 + 0.2509430917660398 0.2460739746050368 0.7457139028213587 + 0.7540473184330135 0.2467403891910647 0.7458147272853156 + 0.2508581376266668 0.7446866676990188 0.7458848826130878 + 0.7538514615870642 0.7454961853918537 0.7462702617670270 + 0.0022910752759187 0.2432380839686528 0.0005174159815047 + 0.5021473396242203 0.2453646686334561 -0.0036986667629953 + 0.0018476099544519 0.7490956158380995 0.0010588103945007 + 0.5018299157806653 0.7456263619759441 -0.0034266959491253 + 0.2513313825167851 -0.0039785730147498 0.4961552457195070 + 0.7524734124673093 -0.0034806451246530 0.4961135985356645 + 0.2438820969156905 0.4954878404111944 0.4928425874248389 + 0.7591224648511269 0.4958520587776798 0.4912855366566599 + 0.0023442765118674 0.2488649868575786 0.4937926185597484 + 0.5026007643386756 0.2469548041514755 0.4959844252408964 + 0.0020947884009351 0.7430461842812093 0.4940523393794733 + 0.5026030751122027 0.7442987430926081 0.4961699018350902 + 0.2540212313019126 -0.0043769662669302 -0.0059841843290617 + 0.7493841694380651 -0.0032175415305541 0.9942881603388466 + 0.2563674816672763 0.4955649277930290 -0.0059473688583164 + 0.7453067856748800 0.4962461493354667 0.9935736918905644 + 0.0008282125957867 0.4963531156743883 0.7542861357936391 + 0.5015744872573831 0.4955949297033767 0.7440860670822564 + 0.0016400648349608 -0.0040803226705556 0.7465998014212213 + 0.5016410185256028 -0.0046276326373175 0.7449686970302228 + 0.2494087510616786 0.2451341101700331 0.2440528729238795 + 0.7556726704906394 0.2450991917713845 0.2433203602561143 + 0.2494766320102720 0.7462346906085709 0.2447082849269535 + 0.7557013081893493 0.7473445558018526 0.2440744815366349 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Bond_Distortion_60.0%/CONTCAR b/tests/data/vasp/Va_O1_1/Bond_Distortion_60.0%/CONTCAR new file mode 100644 index 00000000..40d473f8 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Bond_Distortion_60.0%/CONTCAR @@ -0,0 +1,167 @@ +60.0%__num_neighbours=1__Vac_O_mult32 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0020568866814928 0.2327127423248939 0.2463146920780529 + 0.5020192144578993 0.2446260783915784 0.2478361444867850 + 0.0017909206615060 0.7578877063628668 0.2463805011406088 + 0.5020289504932742 0.7453483032538289 0.2476725878614392 + 0.2525260833269599 -0.0051207379757623 0.7461453603495174 + 0.7518606536794259 -0.0047494193085483 0.7463271753268389 + 0.2550386155130111 0.4948300352920646 0.7456923963400669 + 0.7494379869980295 0.4952590051956627 0.7461599215719897 + 0.0021303232611476 0.4953588209053909 0.5082447182743710 + 0.5021798511243012 0.4951010951404131 0.4964930657627280 + 0.0021343684742967 -0.0046533922224880 0.4990027034645712 + 0.5022770279993178 -0.0048968184901887 0.4974178184044294 + 0.2563877219796947 0.2459226171535905 -0.0042225388562772 + 0.7479710077600871 0.2465291855817203 -0.0038593463467321 + 0.2563247787817644 0.7437956794890873 -0.0041733406703947 + 0.7480138406835265 0.7440756952112733 -0.0040208428508407 + 0.2446904264483690 0.3722344495193128 0.3645058240019708 + 0.7593657492339765 0.3737934785480099 0.3650862082089409 + 0.2518582622516140 0.8691514639462971 0.3724101195609497 + 0.7520803559182718 0.8707730682381890 0.3718921347851935 + 0.5021832519192637 0.1202130993396250 0.8708536499922902 + 0.0020816432842959 0.1194216346106138 0.8737966587587190 + 0.5020736884717978 0.6207008440428815 0.8701544594498432 + 0.0024639393325259 0.6150836958408017 0.8881179955279918 + 0.3791608330086071 0.4947721165407206 0.1233803593892106 + 0.8964460056144027 0.4952802364847032 0.0928286394751636 + 0.3764092317931373 0.9947430623480557 0.1234246974834022 + 0.8770345770265670 -0.0045326688688607 0.1150065174938417 + 0.6278922887605296 0.2456297338315553 0.6229229089962190 + 0.1282132563243628 0.2452515471334558 0.6190031727743909 + 0.6274331330505950 0.7450278257545299 0.6228823756973171 + 0.1277715632762098 0.7447086397310124 0.6190135904571608 + 0.2446514419398951 0.6169413235445490 0.3639788590231202 + 0.7590162062038722 0.6191473674044665 0.3657642771723514 + 0.2518799524457823 0.1206471546935877 0.3722479397997869 + 0.7522937093758448 0.1220658967172612 0.3724946488505805 + 0.5022498740982072 0.3695034718128646 0.8705719628155382 + 0.0024628167695985 0.3756363224563857 0.8880481215992615 + 0.5021010323998800 0.8699462817553008 0.8709045920178869 + 0.0019748056122522 0.8715354358282721 0.8744212339375311 + 0.1104818258598071 0.4950497185994708 0.0952030025305743 + 0.6267329388952294 0.4951756720225442 0.1245642969353570 + 0.1257717271963590 -0.0049751061002905 0.1143243773056000 + 0.6265083417342360 -0.0048381141532970 0.1234619387329549 + 0.3779166255965963 0.2450709133436272 0.6229916123331117 + 0.8775637594491672 0.2456209475577664 0.6196409062295098 + 0.3774785421374727 0.7445781888439927 0.6226747915540257 + 0.8770162602661606 0.7450514909225315 0.6191864420759917 + 0.5024758726640342 0.4949170805162255 0.2508676616372590 + 0.0016401015075189 -0.0046960476091225 0.2427973722075879 + 0.5014320241853359 0.9948725608436780 0.2487236681150333 + 0.2509452953054758 0.2451548651751871 0.7465071474948540 + 0.7545708473844800 0.2461353111376996 0.7467978814603723 + 0.2506136024510187 0.7438002639729622 0.7463272438205880 + 0.7542326492857528 0.7447700342762650 0.7466415013330070 + 0.0020511857846257 0.2422500368098304 0.0009658619235659 + 0.5022164376204191 0.2447737822173663 -0.0026522772717908 + 0.0018266176549791 0.7484226964134847 0.0011348212503683 + 0.5020097738729684 0.7452460756297543 -0.0028351106417898 + 0.2513002822779634 -0.0050335093808708 0.4967726525705498 + 0.7526037909852715 -0.0038288151399596 0.4967088743357480 + 0.2444017716777347 0.4948016142646223 0.4925579084291071 + 0.7593640794859238 0.4961625040556872 0.4933642973184559 + 0.0026065895938700 0.2482724262768528 0.4942923562846392 + 0.5028353172483522 0.2463120071260745 0.4971808713393521 + 0.0022991438945296 0.7426053944285756 0.4941225816243497 + 0.5024572995437995 0.7439332176574625 0.4969913447461117 + 0.2543219141485434 -0.0053021311895078 -0.0054534857093474 + 0.7488624132008819 -0.0040524696622924 -0.0051292450058404 + 0.2592150028669585 0.4947230855964364 -0.0061905059410612 + 0.7461651513346361 0.4957257548870665 0.9944185336506517 + 0.0025147697580088 0.4953792797786774 0.7546406412636877 + 0.5021561546322638 0.4949597958736790 0.7449137313291022 + 0.0019156406147839 0.9952377227325832 0.7466890885341656 + 0.5019157391444050 -0.0049137478173923 0.7456933919568057 + 0.2491142231499216 0.2439720649238022 0.2445660656979037 + 0.7557235236215694 0.2455286857374577 0.2449993482377944 + 0.2490558350641811 0.7456681219923551 0.2446822935049645 + 0.7550256524691944 0.7467865498800446 0.2448891532008797 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Rattled_from_+2/CONTCAR b/tests/data/vasp/Va_O1_1/Rattled_from_+2/CONTCAR new file mode 100644 index 00000000..ce38bd75 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Rattled_from_+2/CONTCAR @@ -0,0 +1,167 @@ +Sr16 Cu32 O31 + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.9990063925340664 0.2321865759851650 0.2467206694793023 + 0.5026681640086770 0.2446596620548992 0.2475213052613703 + 0.9992817351260946 0.7583992593264650 0.2466703377967283 + 0.5027836522171735 0.7455537584569950 0.2475835543384985 + 0.2519250632157091 0.9952768034668155 0.7483992651811849 + 0.7497259931170882 0.9953143519549226 0.7491397858034929 + 0.2544468645806510 0.4953862130816586 0.7475879472120198 + 0.7504120717632093 0.4954094447088703 0.7510678660883262 + 0.9997919774854412 0.4954836577711375 0.5028116304807556 + 0.5028896527019595 0.4953203484552185 0.4956513141924504 + 0.0007980814745964 0.9956284555819918 0.5014248634643241 + 0.5009985318935475 0.9954463101394394 0.4990076684379550 + 0.2512576519751657 0.2476251676666288 0.9971990284308351 + 0.7514427422549289 0.2486102648230839 0.9984317416486814 + 0.2513644406949202 0.7428415612258612 0.9971430720114742 + 0.7515500624834751 0.7415484329853890 0.9983843705948480 + 0.2416817895042562 0.3739285820041386 0.3654931388848276 + 0.7553290105193556 0.3704705729938831 0.3735616510080834 + 0.2506364883136760 0.8691745298078315 0.3741147941328926 + 0.7508546473831628 0.8699144479882175 0.3750195770564727 + 0.5009597708457885 0.1206086480534185 0.8736060851905156 + 0.0006070891404960 0.1205565365726717 0.8738928076026167 + 0.5015645000386122 0.6191660402157212 0.8727552844935561 + 0.0034162421429913 0.6204353189821962 0.8712456980330248 + 0.3897630122776857 0.4951818280140348 0.1131647818685295 + 0.9342794690178526 0.4948724591423886 0.0789351017763071 + 0.3762171465560808 0.9949331144845621 0.1240122338871690 + 0.8765065139171473 0.9951385351839418 0.1183462500983296 + 0.6260174627552476 0.2464448404772679 0.6228571208213329 + 0.1258626749500956 0.2462009073833874 0.6221346880395711 + 0.6261444742600469 0.7443212261994254 0.6229213696874984 + 0.1259262452396247 0.7448874467396541 0.6219600614012245 + 0.2416838584372470 0.6167435657508384 0.3651735553835667 + 0.7556304719398498 0.6203163842459510 0.3735211668986552 + 0.2504654359061604 0.1216538306117348 0.3742043413327230 + 0.7506261141488376 0.1208370345745895 0.3752540559807864 + 0.5014824942401008 0.3706172840484093 0.8726081878921136 + 0.0032878129812707 0.3700126480987633 0.8709450756557898 + 0.5010251545575500 0.8693198477049945 0.8732568456676209 + 0.0006699065595024 0.8701367600700215 0.8740137001514143 + 0.1506404199646045 0.4951945522035729 0.1611027558176682 + 0.6452565582131351 0.4950592153673072 0.1321014294991499 + 0.1268862571833767 0.9952733109706865 0.1198757002040944 + 0.6260261604757011 0.9949591117502889 0.1235249759823497 + 0.3759795146094798 0.2459772661485761 0.6229227574870648 + 0.8758748942453556 0.2462012292880625 0.6215115155646213 + 0.3761505928687432 0.7446924948208591 0.6230455644397934 + 0.8759916646846280 0.7446660937704879 0.6210310257563583 + 0.5098466515023844 0.4951855457672562 0.2456164463383680 + 0.0011905283140326 0.9953909683598964 0.2459354091208601 + 0.5011510706978383 0.9948820048980760 0.2492575947965330 + 0.2505204874305438 0.2467294170251392 0.7479547539158968 + 0.7516564696339161 0.2468390790923234 0.7482405825513923 + 0.2504815666047338 0.7440265619457742 0.7478980041043385 + 0.7519922300839132 0.7437282495047407 0.7480465070618579 + 0.0009914241386428 0.2464970430586491 0.9984483668090157 + 0.5009607038853844 0.2463535678430520 0.9986307372188667 + 0.0011565522816499 0.7440905655713922 0.9984962172395604 + 0.5010193338437762 0.7436961679207947 0.9985087918551858 + 0.2513123280080990 0.9953790562057410 0.4981860409621788 + 0.7511045124643498 0.9952925987951011 0.4997280538018075 + 0.2460740121318802 0.4954346034576357 0.4945826768817616 + 0.7569299205927726 0.4953624388033371 0.4991450962520722 + 0.0013436927550763 0.2474702018271084 0.4955880611751386 + 0.5005509074080449 0.2472896543309318 0.4969635618025390 + 0.0015542115126114 0.7435117656866597 0.4952969450269044 + 0.5006910214323975 0.7433971961686715 0.4970892049903298 + 0.2528142017411450 0.9951519731380181 0.9969399143013018 + 0.7497194705785878 0.9949774204199672 0.9968813413789651 + 0.2544420106264148 0.4952228534284807 0.0009905483654938 + 0.7692737340069057 0.4950316866758498 0.0050425457687480 + 0.0052755732443229 0.4954002447036975 0.7451299487116259 + 0.5032753234413516 0.4949711659438625 0.7459715417956096 + 0.0009196250594229 0.9952876669011935 0.7485178800264842 + 0.5004764159086673 0.9950952580921609 0.7484533465343752 + 0.2464078794026798 0.2453014699174113 0.2465672366279956 + 0.7531911496139321 0.2452244000824160 0.2487391605280930 + 0.2465247173243118 0.7454904137140267 0.2464684157873761 + 0.7534783489258424 0.7453988293682220 0.2486013501513689 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Unperturbed/CONTCAR b/tests/data/vasp/Va_O1_1/Unperturbed/CONTCAR new file mode 100644 index 00000000..6a96bc08 --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Unperturbed/CONTCAR @@ -0,0 +1,167 @@ +Unperturbed__num_neighbours=1__Vac_O_mul + 1.0000000000000000 + 0.0000000000000000 10.7468629999999994 0.0000000000000000 + -10.7468629999999994 0.0000000000000000 0.0000000000000000 + 0.0000000000000000 0.0000000000000000 9.7925889999999995 + Sr Cu O + 16 32 31 +Direct + 0.0000186486742408 0.2378110852824517 0.2509203574437955 + 0.4999791383800333 0.2496167659522283 0.2514397897127792 + 0.0000205208222175 0.7622673071040493 0.2509265769775786 + 0.4999746268808494 0.7503423807819433 0.2514341820008421 + 0.2508162814682433 -0.0000207748002208 0.7498458103148474 + 0.7491876241309845 -0.0000118459007153 0.7498860700010556 + 0.2533386590370581 0.5000113503864471 0.7502441232429757 + 0.7466474021486446 0.5000124335069412 0.7502477729514315 + -0.0000228438449334 0.5000059398564376 0.5138849476902300 + 0.4999996101394611 0.5000128134343954 0.5003439660919923 + -0.0000097068832150 0.0000320013769000 0.5031766044961861 + 0.5000021061625906 0.0000012860368377 0.5005848146733408 + 0.2537914270811577 0.2509347675036926 -0.0002303426951625 + 0.7462054106657735 0.2509220843650032 -0.0002002494790394 + 0.2538010825156783 0.7490652759573695 -0.0002005151867904 + 0.7461973531077699 0.7490690681433323 -0.0001880394431999 + 0.2425527680779667 0.3778605440975577 0.3684014555495240 + 0.7574453297003894 0.3778805413040165 0.3683426943400081 + 0.2499369632613672 0.8742155720867584 0.3757460996214895 + 0.7500755564878101 0.8742319266001640 0.3757394498372962 + 0.5000015571842388 0.1248695187482767 0.8751761603069677 + 0.0000064075666907 0.1240156445827905 0.8778930273191703 + 0.5000057797668839 0.6253622433746310 0.8751490941826885 + -0.0000160764861512 0.6197587425801256 0.8933774970443711 + 0.3764974293481602 0.4999980574426635 0.1274456866433651 + 0.8927434540912735 0.5000072412834096 0.1002539052646821 + 0.3749440187411033 -0.0000069433367187 0.1261035072962173 + 0.8759943548189622 0.0000198040342456 0.1190223183779670 + 0.6248133049529745 0.2502829555290172 0.6263149535648397 + 0.1254374841288464 0.2501589924145254 0.6239524808932230 + 0.6248054984262176 0.7497130034781065 0.6263244744633305 + 0.1254405270482018 0.7498423274785024 0.6239449292403753 + 0.2425418114933939 0.6221052210728327 0.3683886982601108 + 0.7574591863648680 0.6220941824764732 0.3683385377166127 + 0.2499254162183820 0.1257487805517620 0.3757084426316286 + 0.7500701065587787 0.1257572873280265 0.3757197468743549 + 0.4999966731711067 0.3746316096311761 0.8751387051550559 + -0.0000225033004675 0.3802603701646380 0.8933711907769277 + 0.4999999619267940 0.8751076616373830 0.8751705937949462 + 0.0000097077857476 0.8760299688658197 0.8779158716032162 + 0.1071645331682275 0.5000071059981633 0.1002255203252741 + 0.6234205431265900 0.4999935534888432 0.1274574370374157 + 0.1241639585084889 0.0000260404603515 0.1190840787585131 + 0.6251317902918865 -0.0000108194800546 0.1261611237765949 + 0.3751978831244224 0.2502904052136512 0.6263068741643297 + 0.8745591666672411 0.2501583263117257 0.6239604519578253 + 0.3751863672799034 0.7497202311676241 0.6263092111117374 + 0.8745543374107640 0.7498468625291500 0.6239534723796382 + 0.4999556837621289 0.4999989580238781 0.2548030096281678 + 0.0000607811486354 0.0000604509734235 0.2474688848762434 + 0.5000188894853537 -0.0000064882829510 0.2513771416598626 + 0.2488624946950281 0.2508595517382292 0.7505082459988273 + 0.7511413768787245 0.2508719155438621 0.7505249915176865 + 0.2488559387200373 0.7491218972514622 0.7505205336134589 + 0.7511419145070704 0.7491275620660460 0.7505293497047428 + 0.0000024942192795 0.2464118948690681 0.0055888943506449 + 0.4999999311082516 0.2495782892255081 0.0013169434286707 + 0.0000026534511887 0.7536247539081651 0.0055929476648414 + 0.4999992400234475 0.7504141668864263 0.0013292629030419 + 0.2497669037508593 -0.0000074223945642 0.5001315030827608 + 0.7502410267041250 0.0000010254857033 0.5001464941047576 + 0.2422636027363794 0.4999878711468791 0.4970464414383396 + 0.7577252084678263 0.4999919303778441 0.4970169569010623 + -0.0000059707475574 0.2525139624729482 0.4990772077385928 + 0.5000088196680466 0.2510413579110771 0.5004111567650283 + -0.0000052274988578 0.7474893598949198 0.4990732999535216 + 0.5000020237999276 0.7489312896845390 0.5004159484198792 + 0.2519075018611374 -0.0000063011367598 -0.0016603046940926 + 0.7481564295504839 -0.0000087439175801 -0.0016062617086495 + 0.2558987932299768 0.4999947018978520 -0.0014332694620905 + 0.7440110477200426 0.4999920134613263 -0.0014288800430774 + -0.0000199606178283 0.5000052691968134 0.7599984831503899 + 0.4999976577445997 0.5000030255595208 0.7493893177841457 + 0.0000042135636916 0.0000116772993135 0.7505473136050308 + 0.5000070206956373 -0.0000125868504824 0.7495731246999883 + 0.2469050242150606 0.2495223961701358 0.2485679890017909 + 0.7531003440570689 0.2495078331498783 0.2485639736275160 + 0.2468861871195889 0.7504545844518316 0.2485839163321275 + 0.7531173185830279 0.7504749058329553 0.2485768248942302 + + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 + 0.00000000E+00 0.00000000E+00 0.00000000E+00 diff --git a/tests/data/vasp/Va_O1_1/Va_O1_1.yaml b/tests/data/vasp/Va_O1_1/Va_O1_1.yaml new file mode 100644 index 00000000..e85648cd --- /dev/null +++ b/tests/data/vasp/Va_O1_1/Va_O1_1.yaml @@ -0,0 +1,17 @@ +distortions: + -0.6: -390.82735682 + -0.5: -390.8272136 + -0.4: -390.82714201 + -0.3: -390.82682576 + -0.2: -390.82646171 + -0.1: -390.76273367 + 0.0: -390.7629011 + 0.1: -390.76110797 + 0.2: -390.7614373 + 0.3: -390.82365891 + 0.4: -390.76116709 + 0.5: -390.76246099 + 0.6: -390.76264865 + 50.0%_from_stdev_0pt18: -390.76444362 + Rattled_from_+2: -390.82432141 +Unperturbed: -390.76834003 diff --git a/tests/test_energy_lowering_distortions.py b/tests/test_energy_lowering_distortions.py index 321dd88b..d00f1189 100644 --- a/tests/test_energy_lowering_distortions.py +++ b/tests/test_energy_lowering_distortions.py @@ -8,7 +8,6 @@ import numpy as np from monty.serialization import dumpfn, loadfn from pymatgen.core.structure import Structure -from pymatgen.io.ase import AseAtomsAdaptor from shakenbreak import analysis, distortions, energy_lowering_distortions, io @@ -83,9 +82,7 @@ def setUp(self): self.orig_castep_0pt3_files = os.listdir( self.CASTEP_DATA_DIR + "/vac_1_Cd_0/Bond_Distortion_30.0%" ) - self.orig_cp2k_0pt3_files = os.listdir( - self.CP2K_DATA_DIR + "/vac_1_Cd_0/Bond_Distortion_30.0%" - ) + self.orig_cp2k_0pt3_files = os.listdir(self.CP2K_DATA_DIR + "/vac_1_Cd_0/Bond_Distortion_30.0%") self.orig_fhi_aims_0pt3_files = os.listdir( self.FHI_AIMS_DATA_DIR + "/vac_1_Cd_0/Bond_Distortion_30.0%" ) @@ -124,15 +121,9 @@ def tearDown(self): ): if_present_rm(os.path.join(data_dir, "vac_1_Cd_0", defect_dir)) - for file in os.listdir( - os.path.join(data_dir, "vac_1_Cd_0", "Bond_Distortion_30.0%") - ): + for file in os.listdir(os.path.join(data_dir, "vac_1_Cd_0", "Bond_Distortion_30.0%")): if file not in orig_files: - if_present_rm( - os.path.join( - data_dir, "vac_1_Cd_0", "Bond_Distortion_30.0%", file - ) - ) + if_present_rm(os.path.join(data_dir, "vac_1_Cd_0", "Bond_Distortion_30.0%", file)) def test__format_distortion_directory_name(self): self.assertEqual( @@ -191,7 +182,14 @@ def test_read_defects_directories(self): defect_charges_dict = {**defect_charges_dict_cdte, **defect_charges_dict_tio2} self.assertDictEqual( defect_charges_dict, - {"v_O_s1": [0], 'v_Ca_s0': [0], "vac_1_Ti": [0], "vac_1_Cd": [0], "v_Ge_s16": [0]} + { + "v_O_s1": [0], + "v_Ca_s0": [0], + "vac_1_Ti": [0], + "vac_1_Cd": [0], + "v_Ge_s16": [0], + "Va_O1": [1], + }, ) for i in self.defect_folders_list: @@ -208,8 +206,9 @@ def test_read_defects_directories(self): "vac_1_Cd": [0], "vac_1_Ti": [0], "v_O_s1": [0], - 'v_Ca_s0': [0], + "v_Ca_s0": [0], "v_Ge_s16": [0], + "Va_O1": [1], } self.assertEqual( defect_charges_dict.keys(), @@ -224,14 +223,10 @@ def test_get_energy_lowering_distortions(self): as write_retest_inputs and the internal functions called by get_energy_lowering_distortions() """ - with patch("builtins.print") as mock_print, warnings.catch_warnings( - record=True - ) as w: + with patch("builtins.print") as mock_print, warnings.catch_warnings(record=True) as w: warnings.filterwarnings("ignore", category=DeprecationWarning) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR ) mock_print.assert_any_call("\nvac_1_Cd") mock_print.assert_any_call( @@ -266,18 +261,14 @@ def test_get_energy_lowering_distortions(self): "No energy lowering distortion with energy difference greater than min_e_diff = " "0.05 eV found for Int_Cd_2 with charge +1." ) - mock_print.assert_any_call( - "\nComparing and pruning defect structures across charge states..." - ) + mock_print.assert_any_call("\nComparing and pruning defect structures across charge states...") mock_print.assert_any_call( "Problem parsing structures for vac_1_Cd_-1. This species will be skipped and will " "not be included in low_energy_defects (check relaxation folders with CONTCARs " "are present)." # check this is skipped if no data ) user_warnings = [warning for warning in w if warning.category == UserWarning] - self.assertEqual( - len(user_warnings), 2 - ) # No Int_Cd_2_+1 data and parsing not possible + self.assertEqual(len(user_warnings), 2) # No Int_Cd_2_+1 data and parsing not possible self.assertIn( "Energies could not be parsed for defect 'Int_Cd_2_+1' in " f"'{self.VASP_CDTE_DATA_DIR}'. If these directories are correct, " @@ -299,23 +290,17 @@ def test_get_energy_lowering_distortions(self): low_energy_defects_dict["vac_1_Cd"][0]["energy_diffs"], [-0.7551820700000178], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][0]["bond_distortions"], [-0.55] - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][0]["bond_distortions"], [-0.55]) self.assertEqual( low_energy_defects_dict["vac_1_Cd"][0]["structures"], [self.V_Cd_minus_0pt55_structure], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][0]["excluded_charges"], set() - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][0]["excluded_charges"], set()) # test verbose=False output: with patch("builtins.print") as mock_print: - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, verbose=False - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, verbose=False ) # same call as before, just with verbose=False mock_print.assert_not_called_with( "vac_1_Cd_0: Energy difference between minimum, found with -0.55 bond distortion, " @@ -327,14 +312,10 @@ def test_get_energy_lowering_distortions(self): ) # test min_e_diff kwarg: - with patch("builtins.print") as mock_print, warnings.catch_warnings( - record=True - ) as w: + with patch("builtins.print") as mock_print, warnings.catch_warnings(record=True) as w: warnings.filterwarnings("ignore", category=DeprecationWarning) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, min_e_diff=0.8 - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, min_e_diff=0.8 ) mock_print.assert_any_call("\nvac_1_Cd") mock_print.assert_any_call( @@ -348,12 +329,8 @@ def test_get_energy_lowering_distortions(self): "with charge -1." ) mock_print.assert_any_call("\nInt_Cd_2") - user_warnings = [ - warning for warning in w if warning.category == UserWarning - ] - self.assertEqual( - len(user_warnings), 2 - ) # No Int_Cd_2_+1 data and parsing not possible + user_warnings = [warning for warning in w if warning.category == UserWarning] + self.assertEqual(len(user_warnings), 2) # No Int_Cd_2_+1 data and parsing not possible self.assertIn( "Energies could not be parsed for defect 'Int_Cd_2_+1' in " f"'{self.VASP_CDTE_DATA_DIR}'. If these directories are correct, " @@ -389,10 +366,8 @@ def test_get_energy_lowering_distortions(self): ) with patch("builtins.print") as mock_print: - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR ) # same call as before mock_print.assert_not_called_with( "Problem parsing final, low-energy structure for -35.0% bond distortion of " @@ -421,19 +396,13 @@ def test_get_energy_lowering_distortions(self): low_energy_defects_dict["vac_1_Cd"][0]["energy_diffs"], [-0.7551820700000178], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][0]["bond_distortions"], [-0.55] - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][0]["bond_distortions"], [-0.55]) self.assertEqual( low_energy_defects_dict["vac_1_Cd"][0]["structures"], [self.V_Cd_minus_0pt55_structure], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][0]["excluded_charges"], {-1, -2} - ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][1]["charges"], [-2, 0, -1] - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][0]["excluded_charges"], {-1, -2}) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][1]["charges"], [-2, 0, -1]) np.testing.assert_almost_equal( low_energy_defects_dict["vac_1_Cd"][1]["energy_diffs"], [-0.2, 0.0, 0.0], @@ -452,9 +421,7 @@ def test_get_energy_lowering_distortions(self): low_energy_defects_dict["vac_1_Cd"][1]["structures"], [distorted_structure, unperturbed_structure, distorted_structure], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set() - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set()) # test case where the _same_ non-spontaneous energy lowering distortion # was found for two different charge states @@ -467,19 +434,15 @@ def test_get_energy_lowering_distortions(self): os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/vac_1_Cd_-1.yaml"), ) with patch("builtins.print") as mock_print: - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR ) # same call as before mock_print.assert_any_call( "Low-energy distorted structure for vac_1_Cd_-2 already found with charge states ['-1'], " "storing together." ) self.assertEqual(len(low_energy_defects_dict["vac_1_Cd"]), 2) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][1]["charges"], [-1, -2, 0] - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][1]["charges"], [-1, -2, 0]) np.testing.assert_almost_equal( low_energy_defects_dict["vac_1_Cd"][1]["energy_diffs"], [-0.9, -0.2, 0.0], @@ -498,17 +461,13 @@ def test_get_energy_lowering_distortions(self): low_energy_defects_dict["vac_1_Cd"][1]["structures"], [distorted_structure, distorted_structure, unperturbed_structure], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set() - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set()) # all print messages and potential structure matching outcomes in # `get_energy_lowering_distortions` have now been tested in the above code # test min_dist kwarg: - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, min_dist=0.01 - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, min_dist=0.01 ) # same call as before, but with min_dist self.assertEqual(len(low_energy_defects_dict["vac_1_Cd"]), 2) self.assertEqual( @@ -532,17 +491,13 @@ def test_get_energy_lowering_distortions(self): low_energy_defects_dict["vac_1_Cd"][1]["structures"], [distorted_structure, distorted_structure, zero_rattled_structure], ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set() - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set()) # test stol kwarg: with warnings.catch_warnings(record=True) as w: warnings.filterwarnings("ignore", category=DeprecationWarning) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, stol=0.01 - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR, stol=0.01 ) # same call as before, but with stol # no data parsed from Int_Cd_2_+1 (1) for warning in w: @@ -550,43 +505,33 @@ def test_get_energy_lowering_distortions(self): # test no defects specified and write_input_files = True for fake_distortion_dir in ["Bond_Distortion_-7.5%", "Unperturbed"]: - if not os.path.exists( - f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}" - ): + if not os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}"): os.mkdir(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}") shutil.copyfile( f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_0/Bond_Distortion_-20.0%/CONTCAR", f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}/CONTCAR", ) for fake_distortion_dir in ["Bond_Distortion_-35.0%", "Unperturbed"]: - if not os.path.exists( - f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}" - ): + if not os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}"): os.mkdir(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}") shutil.copyfile( f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_0/Bond_Distortion_-20.0%/CONTCAR", f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}/CONTCAR", ) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - output_path=self.VASP_CDTE_DATA_DIR, - write_input_files=True, - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + output_path=self.VASP_CDTE_DATA_DIR, + write_input_files=True, ) self.assertTrue( - os.path.exists( - f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0/POSCAR" - ) + os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0/POSCAR") ) def test_get_energy_lowering_distortions_no_energies_file(self): """Test that `io.parse_energies()` is called fine if no energies file present""" defect = "v_Ti_0" warnings.filterwarnings("ignore", category=DeprecationWarning) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - {"v_Ti": [0]}, self.EXAMPLE_RESULTS - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + {"v_Ti": [0]}, self.EXAMPLE_RESULTS ) self.assertEqual(len(low_energy_defects_dict["v_Ti"]), 1) energies = loadfn(f"{self.EXAMPLE_RESULTS}/{defect}/{defect}.yaml") @@ -614,14 +559,10 @@ def test_get_energy_lowering_distortions_rattle_too_large(self): failing_V_Cd_1_dict, os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/vac_1_Cd_-1.yaml"), ) - with patch("builtins.print") as mock_print, warnings.catch_warnings( - record=True - ) as w: + with patch("builtins.print") as mock_print, warnings.catch_warnings(record=True) as w: warnings.filterwarnings("ignore", category=DeprecationWarning) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR ) mock_print.assert_any_call("\nvac_1_Cd") mock_print.assert_any_call( @@ -657,17 +598,13 @@ def test_get_energy_lowering_distortions_rattle_too_large(self): "than min_e_diff = 0.05 eV found for Int_Cd_2 " "with charge -1." ) - mock_print.assert_any_call( - "\nComparing and pruning defect structures across charge states..." - ) + mock_print.assert_any_call("\nComparing and pruning defect structures across charge states...") mock_print.assert_any_call( "Problem parsing structures for vac_1_Cd_-1. This species will be skipped and will " "not be included in low_energy_defects (check relaxation folders with CONTCARs " "are present)." # check this is skipped if no data ) - user_warnings = [ - warning for warning in w if warning.category == UserWarning - ] + user_warnings = [warning for warning in w if warning.category == UserWarning] self.assertEqual( len(user_warnings), 3 ) # No Int_Cd_2_+1 data (2) and too large rattle warnings @@ -683,11 +620,7 @@ def test_get_energy_lowering_distortions_rattle_too_large(self): f"\nThis often indicates a complex PES with multiple minima, thus energy-lowering " f"distortions particularly likely, so important to test with reduced `stdev`!" ) - self.assertTrue( - any( - str(warning.message) == warning_message for warning in user_warnings - ) - ) + self.assertTrue(any(str(warning.message) == warning_message for warning in user_warnings)) def test_get_energy_lowering_distortions_metastable(self): """Test get_energy_lowering_distortions() function when @@ -722,9 +655,7 @@ def test_get_energy_lowering_distortions_metastable(self): f"{self.VASP_CDTE_DATA_DIR}/{defect}/Bond_Distortion_-10.0%/CONTCAR", f"{self.VASP_CDTE_DATA_DIR}/{defect}/Bond_Distortion_-10.0%/CONTCAR_original", ) - struct = Structure.from_file( - f"{self.VASP_CDTE_DATA_DIR}/{defect}/Bond_Distortion_-10.0%/CONTCAR" - ) + struct = Structure.from_file(f"{self.VASP_CDTE_DATA_DIR}/{defect}/Bond_Distortion_-10.0%/CONTCAR") struct_rattled = distortions.rattle(struct, stdev=0.35) struct_rattled.to( fmt="POSCAR", @@ -737,12 +668,10 @@ def test_get_energy_lowering_distortions_metastable(self): -1, ], } - low_energy_defects_met = ( - energy_lowering_distortions.get_energy_lowering_distortions( - defect_charges_dict, - output_path=self.VASP_CDTE_DATA_DIR, - metastable=True, - ) + low_energy_defects_met = energy_lowering_distortions.get_energy_lowering_distortions( + defect_charges_dict, + output_path=self.VASP_CDTE_DATA_DIR, + metastable=True, ) self.assertTrue(2, len(low_energy_defects_met["vac_1_Cd"])) metastable_entry = { @@ -785,24 +714,16 @@ def test_get_energy_lowering_distortions_with_already_imported_strucs(self): os.mkdir(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled_from_-2")) os.mkdir(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled")) shutil.copy( - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_0.0%/CONTCAR" - ), - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled_from_-2/CONTCAR" - ), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_0.0%/CONTCAR"), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled_from_-2/CONTCAR"), ) shutil.copy( - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_0.0%/CONTCAR" - ), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_0.0%/CONTCAR"), os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled/CONTCAR"), ) os.mkdir(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-2/Rattled")) shutil.copy( - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_-55.0%/CONTCAR" - ), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_-55.0%/CONTCAR"), os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-2/Rattled/CONTCAR"), ) # structure doesn't match Rattled_from_-2, but still shouldn't be added to @@ -815,13 +736,11 @@ def test_get_energy_lowering_distortions_with_already_imported_strucs(self): ) with patch("builtins.print") as mock_print: - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - { - "vac_1_Cd": [-1, -2], - }, - self.VASP_CDTE_DATA_DIR, - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + { + "vac_1_Cd": [-1, -2], + }, + self.VASP_CDTE_DATA_DIR, ) mock_print.assert_any_call("\nvac_1_Cd") mock_print.assert_any_call( @@ -839,16 +758,10 @@ def test_get_energy_lowering_distortions_with_already_imported_strucs(self): # "has also been found" not in any mock_print call (i.e. Rattled_from_-2 in # `vac_1_Cd_-1` directory not compared to Rattled in `vac_1_Cd_-2` directory) - self.assertFalse( - any( - "has also been found" in str(call) for call in mock_print.call_args_list - ) - ) + self.assertFalse(any("has also been found" in str(call) for call in mock_print.call_args_list)) self.assertEqual(len(low_energy_defects_dict), 1) # only vac_1_Cd self.assertIn("vac_1_Cd", low_energy_defects_dict) - self.assertEqual( - len(low_energy_defects_dict["vac_1_Cd"]), 2 - ) # different -1 and -2 + self.assertEqual(len(low_energy_defects_dict["vac_1_Cd"]), 2) # different -1 and -2 # structures self.assertEqual(low_energy_defects_dict["vac_1_Cd"][0]["charges"], [-1]) np.testing.assert_almost_equal( @@ -877,13 +790,11 @@ def test_get_energy_lowering_distortions_with_already_imported_strucs(self): os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-3/vac_1_Cd_-3.yaml"), ) with patch("builtins.print") as mock_print: - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - { - "vac_1_Cd": [-2, -3], - }, - self.VASP_CDTE_DATA_DIR, - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + { + "vac_1_Cd": [-2, -3], + }, + self.VASP_CDTE_DATA_DIR, ) mock_print.assert_any_call("\nvac_1_Cd") mock_print.assert_any_call( @@ -892,16 +803,10 @@ def test_get_energy_lowering_distortions_with_already_imported_strucs(self): ) # "has also been found" not in any mock_print call (i.e. Rattled_from_-2 in # `vac_1_Cd_-1`directory not compared to Rattled in `vac_1_Cd_-2` directory) - self.assertFalse( - any( - "has also been found" in str(call) for call in mock_print.call_args_list - ) - ) + self.assertFalse(any("has also been found" in str(call) for call in mock_print.call_args_list)) self.assertEqual(len(low_energy_defects_dict), 1) # only vac_1_Cd self.assertIn("vac_1_Cd", low_energy_defects_dict) - self.assertEqual( - len(low_energy_defects_dict["vac_1_Cd"]), 2 - ) # different -3 and -2 + self.assertEqual(len(low_energy_defects_dict["vac_1_Cd"]), 2) # different -3 and -2 # structures self.assertEqual(low_energy_defects_dict["vac_1_Cd"][0]["charges"], [-2]) np.testing.assert_almost_equal( @@ -914,12 +819,10 @@ def test_get_energy_lowering_distortions_with_already_imported_strucs(self): ) self.assertEqual( low_energy_defects_dict["vac_1_Cd"][0]["excluded_charges"], - {-3} + {-3}, # -3 in the -2 dict but not other way around ) - self.assertEqual( - low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set() - ) + self.assertEqual(low_energy_defects_dict["vac_1_Cd"][1]["excluded_charges"], set()) def test_compare_struct_to_distortions(self): # test case where matching distortion is "Rattled_from_..." @@ -938,17 +841,11 @@ def test_compare_struct_to_distortions(self): os.mkdir(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled")) os.mkdir(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed")) shutil.copy( - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_-55.0%/CONTCAR" - ), - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled_from_+1/CONTCAR" - ), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_-55.0%/CONTCAR"), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled_from_+1/CONTCAR"), ) shutil.copy( - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_-10.0%/CONTCAR" - ), + os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_-10.0%/CONTCAR"), os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Rattled/CONTCAR"), ) shutil.copy( @@ -969,18 +866,14 @@ def test_compare_struct_to_distortions(self): def test_write_retest_inputs(self): """Test write_retest_inputs().""" for fake_distortion_dir in ["Bond_Distortion_-7.5%", "Unperturbed"]: - if not os.path.exists( - f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}" - ): + if not os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}"): os.mkdir(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}") shutil.copyfile( f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_0/Bond_Distortion_-20.0%/CONTCAR", f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-1/{fake_distortion_dir}/CONTCAR", ) for fake_distortion_dir in ["Bond_Distortion_-35.0%", "Unperturbed"]: - if not os.path.exists( - f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}" - ): + if not os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}"): os.mkdir(f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_-2/{fake_distortion_dir}") shutil.copyfile( f"{self.VASP_CDTE_DATA_DIR}/vac_1_Cd_0/Bond_Distortion_-20.0%/CONTCAR", @@ -997,10 +890,8 @@ def test_write_retest_inputs(self): os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/vac_1_Cd_-1.yaml"), ) - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - self.defect_charges_dict, self.VASP_CDTE_DATA_DIR - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + self.defect_charges_dict, self.VASP_CDTE_DATA_DIR ) with patch("builtins.print") as mock_print: with warnings.catch_warnings(record=True) as w: @@ -1040,19 +931,11 @@ def test_write_retest_inputs(self): # Test for copying over VASP input files (INCAR, KPOINTS and (empty) # POTCAR files) - if_present_rm( - os.path.join( - self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0" - ) - ) - if not os.path.exists( - os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed/") - ): + if_present_rm(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0")) + if not os.path.exists(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed/")): os.mkdir(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed")) # Write VASP input files to Unperturbed directory - with open( - os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed/INCAR"), "w" - ) as fp: + with open(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed/INCAR"), "w") as fp: incar = "NCORE = 12\nISYM = 0\nIBRION = 2\n" fp.write(incar) with open( @@ -1061,17 +944,13 @@ def test_write_retest_inputs(self): ) as fp: kpoints = "0\nGamma\n1 1 1\n0.00 0.00 0.00\n" fp.write(kpoints) - with open( - os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed/POTCAR"), "w" - ) as fp: + with open(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_-1/Unperturbed/POTCAR"), "w") as fp: potcar = f" " fp.write(potcar) # empty POTCAR file # Test if VASP input files are copied over - low_energy_defects_dict = ( - energy_lowering_distortions.get_energy_lowering_distortions( - output_path=self.VASP_CDTE_DATA_DIR - ) + low_energy_defects_dict = energy_lowering_distortions.get_energy_lowering_distortions( + output_path=self.VASP_CDTE_DATA_DIR ) energy_lowering_distortions.write_retest_inputs( low_energy_defects=low_energy_defects_dict, @@ -1101,27 +980,17 @@ def test_write_retest_inputs(self): # Test CP2K input files for i in os.listdir(self.VASP_CDTE_DATA_DIR): - if i.startswith("vac_1_Cd") and os.path.isdir( - os.path.join(self.VASP_CDTE_DATA_DIR, i) - ): + if i.startswith("vac_1_Cd") and os.path.isdir(os.path.join(self.VASP_CDTE_DATA_DIR, i)): shutil.copytree( os.path.join(self.VASP_CDTE_DATA_DIR, i), os.path.join(self.CP2K_DATA_DIR, i), dirs_exist_ok=True, ) for filename in ["KPOINTS", "INCAR", "POTCAR"]: - if_present_rm( - os.path.join(self.CP2K_DATA_DIR, f"vac_1_Cd_-1/Unperturbed/{filename}") - ) - if_present_rm( - os.path.join( - self.CP2K_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0" - ) - ) + if_present_rm(os.path.join(self.CP2K_DATA_DIR, f"vac_1_Cd_-1/Unperturbed/{filename}")) + if_present_rm(os.path.join(self.CP2K_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0")) shutil.copy( - os.path.join( - self.CP2K_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input.inp" - ), + os.path.join(self.CP2K_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/cp2k_input.inp"), os.path.join(self.CP2K_DATA_DIR, "vac_1_Cd_-1/Unperturbed/cp2k_input.inp"), ) # Copy over CP2K input file energy_lowering_distortions.write_retest_inputs( @@ -1144,10 +1013,7 @@ def test_write_retest_inputs(self): "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0/structure.cif", ) ) - self.assertTrue( - analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] - < 0.01 - ) + self.assertTrue(analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] < 0.01) # Test copying over Quantum Espresso input files shutil.move( # avoid overwriting yaml file @@ -1155,9 +1021,7 @@ def test_write_retest_inputs(self): f"{self.CP2K_DATA_DIR}/test_vac_1_Cd_0.yaml", ) for i in os.listdir(self.CP2K_DATA_DIR): - if i.startswith("vac_1_Cd") and os.path.isdir( - os.path.join(self.CP2K_DATA_DIR, i) - ): + if i.startswith("vac_1_Cd") and os.path.isdir(os.path.join(self.CP2K_DATA_DIR, i)): shutil.copytree( os.path.join(self.CP2K_DATA_DIR, i), os.path.join(self.ESPRESSO_DATA_DIR, i), @@ -1167,27 +1031,15 @@ def test_write_retest_inputs(self): f"{self.CP2K_DATA_DIR}/test_vac_1_Cd_0.yaml", f"{self.CP2K_DATA_DIR}/vac_1_Cd_0/test_vac_1_Cd_0.yaml", ) - if_present_rm( - os.path.join( - self.ESPRESSO_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0" - ) - ) + if_present_rm(os.path.join(self.ESPRESSO_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0")) shutil.copy( - os.path.join( - self.ESPRESSO_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi" - ), - os.path.join( - self.ESPRESSO_DATA_DIR, "vac_1_Cd_-1/Unperturbed/espresso.pwi" - ), + os.path.join(self.ESPRESSO_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi"), + os.path.join(self.ESPRESSO_DATA_DIR, "vac_1_Cd_-1/Unperturbed/espresso.pwi"), ) # Copy over Quantum Espresso input file for filename in [ "cp2k_input.inp", ]: - if_present_rm( - os.path.join( - self.ESPRESSO_DATA_DIR, f"vac_1_Cd_-1/Unperturbed/{filename}" - ) - ) + if_present_rm(os.path.join(self.ESPRESSO_DATA_DIR, f"vac_1_Cd_-1/Unperturbed/{filename}")) energy_lowering_distortions.write_retest_inputs( low_energy_defects=low_energy_defects_dict, output_path=self.ESPRESSO_DATA_DIR, @@ -1210,12 +1062,8 @@ def test_write_retest_inputs(self): "r", ) as f: atoms = ase.io.espresso.read_espresso_in(f) - aaa = AseAtomsAdaptor() - struct = aaa.get_structure(atoms) - self.assertTrue( - analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] - < 0.01 - ) + struct = Structure.from_ase_atoms(atoms) + self.assertTrue(analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] < 0.01) # Test copying over FHI-aims input files when the input files are only # present in one distortion directory (different from Unperturbed) @@ -1225,9 +1073,7 @@ def test_write_retest_inputs(self): f"{self.ESPRESSO_DATA_DIR}/test_vac_1_Cd_0.yaml", ) for i in os.listdir(self.ESPRESSO_DATA_DIR): - if i.startswith("vac_1_Cd") and os.path.isdir( - os.path.join(self.ESPRESSO_DATA_DIR, i) - ): + if i.startswith("vac_1_Cd") and os.path.isdir(os.path.join(self.ESPRESSO_DATA_DIR, i)): shutil.copytree( os.path.join(self.ESPRESSO_DATA_DIR, i), os.path.join(self.FHI_AIMS_DATA_DIR, i), @@ -1237,27 +1083,15 @@ def test_write_retest_inputs(self): f"{self.ESPRESSO_DATA_DIR}/test_vac_1_Cd_0.yaml", f"{self.ESPRESSO_DATA_DIR}/vac_1_Cd_0/test_vac_1_Cd_0.yaml", ) - if_present_rm( - os.path.join( - self.FHI_AIMS_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0" - ) - ) + if_present_rm(os.path.join(self.FHI_AIMS_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0")) shutil.copy( - os.path.join( - self.FHI_AIMS_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/control.in" - ), - os.path.join( - self.FHI_AIMS_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-7.5%/control.in" - ), + os.path.join(self.FHI_AIMS_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/control.in"), + os.path.join(self.FHI_AIMS_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-7.5%/control.in"), ) # Copy over FHI-aims input file for filename in [ "espresso.pwi", ]: - if_present_rm( - os.path.join( - self.FHI_AIMS_DATA_DIR, f"vac_1_Cd_-1/Unperturbed/{filename}" - ) - ) + if_present_rm(os.path.join(self.FHI_AIMS_DATA_DIR, f"vac_1_Cd_-1/Unperturbed/{filename}")) energy_lowering_distortions.write_retest_inputs( low_energy_defects=low_energy_defects_dict, output_path=self.FHI_AIMS_DATA_DIR, @@ -1278,10 +1112,7 @@ def test_write_retest_inputs(self): "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0/geometry.in", ) ) - self.assertTrue( - analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] - < 0.01 - ) + self.assertTrue(analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] < 0.01) # Test CASTEP input files shutil.move( # avoid overwriting yaml file @@ -1289,9 +1120,7 @@ def test_write_retest_inputs(self): f"{self.FHI_AIMS_DATA_DIR}/test_vac_1_Cd_0.yaml", ) for i in os.listdir(self.FHI_AIMS_DATA_DIR): - if i.startswith("vac_1_Cd") and os.path.isdir( - os.path.join(self.FHI_AIMS_DATA_DIR, i) - ): + if i.startswith("vac_1_Cd") and os.path.isdir(os.path.join(self.FHI_AIMS_DATA_DIR, i)): shutil.copytree( os.path.join(self.FHI_AIMS_DATA_DIR, i), os.path.join(self.CASTEP_DATA_DIR, i), @@ -1301,18 +1130,10 @@ def test_write_retest_inputs(self): f"{self.FHI_AIMS_DATA_DIR}/test_vac_1_Cd_0.yaml", f"{self.FHI_AIMS_DATA_DIR}/vac_1_Cd_0/test_vac_1_Cd_0.yaml", ) - if_present_rm( - os.path.join( - self.CASTEP_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0" - ) - ) + if_present_rm(os.path.join(self.CASTEP_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-55.0%_from_0")) shutil.copy( - os.path.join( - self.CASTEP_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/castep.param" - ), - os.path.join( - self.CASTEP_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-7.5%/castep.param" - ), + os.path.join(self.CASTEP_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/castep.param"), + os.path.join(self.CASTEP_DATA_DIR, "vac_1_Cd_-1/Bond_Distortion_-7.5%/castep.param"), ) # Copy over CASTEP input file for filename in [ "control.in", @@ -1337,7 +1158,7 @@ def test_write_retest_inputs(self): ) ) # Check structure - struct = aaa.get_structure( + struct = Structure.from_ase_atoms( ase.io.read( os.path.join( self.CASTEP_DATA_DIR, @@ -1345,10 +1166,7 @@ def test_write_retest_inputs(self): ) ) ) - self.assertTrue( - analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] - < 0.01 - ) + self.assertTrue(analysis._calculate_atomic_disp(struct, self.V_Cd_minus_0pt55_structure)[0] < 0.01) if __name__ == "__main__": diff --git a/tests/test_input.py b/tests/test_input.py index 2616d726..1480fb87 100644 --- a/tests/test_input.py +++ b/tests/test_input.py @@ -3,6 +3,7 @@ import datetime import locale import os +import pathlib import shutil import unittest import warnings @@ -2830,8 +2831,7 @@ def test_write_vasp_files_from_list(self): self.assertFalse(os.path.exists("v_Te_Td_Cd2.83_+4")) self.tearDown() - @patch("builtins.print") - def test_write_espresso_files(self, mock_print): + def test_write_espresso_files(self): """Test method write_espresso_files""" oxidation_states = {"Cd": +2, "Te": -2} bond_distortions = [ @@ -2858,30 +2858,31 @@ def test_write_espresso_files(self, mock_print): pseudopotentials=pseudopotentials, ) self.assertTrue(os.path.exists("vac_1_Cd_0/Unperturbed")) - with open( + test_input = pathlib.Path( os.path.join( - self.ESPRESSO_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi" + self.ESPRESSO_DATA_DIR, + "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi", ) - ) as f: - test_input = f.read() - with open("vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi") as f: - generated_input = f.read() - self.assertEqual(test_input, generated_input) + ).read_text() + generated_input = pathlib.Path( + "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi" + ).read_text() + self.assertEqual(test_input, generated_input) # Test parameter file is not written if write_structures_only = True for i in self.cdte_defect_folders_old_names: if_present_rm(i) # remove test-generated defect folders _, _ = Dist.write_espresso_files(write_structures_only=True) - with open( + test_input = pathlib.Path( os.path.join( self.ESPRESSO_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/espresso_structure.pwi", ) - ) as f: - test_input = f.read() - with open("vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi") as f: - generated_input = f.read() - self.assertEqual(test_input, generated_input) + ).read_text() + generated_input = pathlib.Path( + "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi" + ).read_text() + self.assertEqual(test_input, generated_input) # Test user defined parameters _, _ = Dist.write_espresso_files( @@ -2896,21 +2897,18 @@ def test_write_espresso_files(self, mock_print): } }, ) - with open( + test_input = pathlib.Path( os.path.join( self.ESPRESSO_DATA_DIR, "vac_1_Cd_0/Bond_Distortion_30.0%/espresso_user_parameters.pwi", ) - ) as f: - test_input = f.read() - with open("vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi") as f: - generated_input = f.read() + ).read_text() + generated_input = pathlib.Path( + "vac_1_Cd_0/Bond_Distortion_30.0%/espresso.pwi" + ).read_text() self.assertEqual(test_input, generated_input) - # The input_file option is tested through the test for `generate_all()` - # (in `test_cli.py`) - @patch("builtins.print") - def test_write_cp2k_files(self, mock_print): + def test_write_cp2k_files(self): """Test method write_cp2k_files""" oxidation_states = {"Cd": +2, "Te": -2} bond_distortions = [ @@ -2984,8 +2982,7 @@ def test_write_cp2k_files(self, mock_print): # The input_file option is tested through the test for `generate_all()` # (in `test_cli.py`) - @patch("builtins.print") - def test_write_castep_files(self, mock_print): + def test_write_castep_files(self): """Test method write_castep_files""" oxidation_states = {"Cd": +2, "Te": -2} bond_distortions = [ @@ -3057,8 +3054,7 @@ def test_write_castep_files(self, mock_print): # The input_file option is tested through the test for `generate_all()` # (in `test_cli.py`) - @patch("builtins.print") - def test_write_fhi_aims_files(self, mock_print): + def test_write_fhi_aims_files(self): """Test method write_fhi_aims_files""" oxidation_states = {"Cd": +2, "Te": -2} bond_distortions = [ @@ -3076,19 +3072,9 @@ def test_write_fhi_aims_files(self, mock_print): # Test `write_fhi_aims_files` method for i in self.cdte_defect_folders_old_names: if_present_rm(i) # remove test-generated defect folders - _, _ = Dist.write_fhi_aims_files() + _, _ = Dist.write_fhi_aims_files(write_structures_only=True) self.assertTrue(os.path.exists("vac_1_Cd_0/Unperturbed")) - # Test input parameter file - with open( - os.path.join( - self.FHI_AIMS_DATA_DIR, - "vac_1_Cd_0/Bond_Distortion_30.0%/control.in", - ) - ) as f: - test_input = f.readlines()[6:] # First 5 lines contain irrelevant info - with open("vac_1_Cd_0/Bond_Distortion_30.0%/control.in") as f: - generated_input = f.readlines()[6:] - self.assertEqual(test_input, generated_input) + # Test input structure file test_atoms = read(os.path.join( self.FHI_AIMS_DATA_DIR, @@ -3098,6 +3084,19 @@ def test_write_fhi_aims_files(self, mock_print): for array_tuple in zip(test_atoms.get_positions(), generated_atoms.get_positions()): np.testing.assert_array_almost_equal(array_tuple[0], array_tuple[1], decimal=3) + # old tests with ASE <= 3.23: + # # Test input parameter file + # with open( + # os.path.join( + # self.FHI_AIMS_DATA_DIR, + # "vac_1_Cd_0/Bond_Distortion_30.0%/control.in", + # ) + # ) as f: + # test_input = f.readlines()[6:] # First 5 lines contain irrelevant info + # with open("vac_1_Cd_0/Bond_Distortion_30.0%/control.in") as f: + # generated_input = f.readlines()[6:] + # self.assertEqual(test_input, generated_input) + # Test parameter file not written if write_structures_only = True for i in self.cdte_defect_folders_old_names: if_present_rm(i) # remove test-generated defect folders @@ -3105,30 +3104,31 @@ def test_write_fhi_aims_files(self, mock_print): self.assertFalse(os.path.exists("vac_1_Cd_0/Bond_Distortion_30.0%/control.in")) self.assertTrue(os.path.exists("vac_1_Cd_0/Bond_Distortion_30.0%/geometry.in")) - # User defined parameters - for i in self.cdte_defect_folders_old_names: - if_present_rm(i) # remove test-generated defect folders - ase_calculator = Aims( - k_grid=(1, 1, 1), - relax_geometry=("bfgs", 5e-4), - xc=("hse06", 0.11), - hse_unit="A", # Angstrom - spin="collinear", # Spin polarized - default_initial_moment=0, # Needs to be set - hybrid_xc_coeff=0.15, - # By default symmetry is not preserved - ) - _, _ = Dist.write_fhi_aims_files(ase_calculator=ase_calculator) - with open( - os.path.join( - self.FHI_AIMS_DATA_DIR, - "vac_1_Cd_0/Bond_Distortion_30.0%/control_user_parameters.in", - ) - ) as f: - test_input = f.readlines()[6:] # First 5 lines contain irrelevant info - with open("vac_1_Cd_0/Bond_Distortion_30.0%/control.in") as f: - generated_input = f.readlines()[6:] - self.assertEqual(test_input, generated_input) + # old tests with ASE <= 3.23: + # # User defined parameters + # for i in self.cdte_defect_folders_old_names: + # if_present_rm(i) # remove test-generated defect folders + # ase_calculator = Aims( + # k_grid=(1, 1, 1), + # relax_geometry=("bfgs", 5e-4), + # xc=("hse06", 0.11), + # hse_unit="A", # Angstrom + # spin="collinear", # Spin polarized + # default_initial_moment=0, # Needs to be set + # hybrid_xc_coeff=0.15, + # # By default symmetry is not preserved + # ) + # _, _ = Dist.write_fhi_aims_files(ase_calculator=ase_calculator) + # with open( + # os.path.join( + # self.FHI_AIMS_DATA_DIR, + # "vac_1_Cd_0/Bond_Distortion_30.0%/control_user_parameters.in", + # ) + # ) as f: + # test_input = f.readlines()[6:] # First 5 lines contain irrelevant info + # with open("vac_1_Cd_0/Bond_Distortion_30.0%/control.in") as f: + # generated_input = f.readlines()[6:] + # self.assertEqual(test_input, generated_input) # The input_file option is tested through the test for `generate_all()` # (in `test_cli.py`) diff --git a/tests/test_plotting.py b/tests/test_plotting.py index 74812f35..8d1427b4 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -14,7 +14,7 @@ import pytest from monty.serialization import loadfn -from shakenbreak import analysis, plotting +from shakenbreak import analysis, plotting, io from test_energy_lowering_distortions import assert_not_called_with Mock.assert_not_called_with = assert_not_called_with @@ -33,6 +33,7 @@ def if_present_rm(path): BASELINE_DIR = os.path.join(_DATA_DIR, "remote_baseline_plots") STYLE = os.path.join(_file_path, "../shakenbreak/shakenbreak.mplstyle") + def custom_mpl_image_compare(filename): """ Set our default settings for MPL image compare. @@ -53,6 +54,7 @@ def wrapper(*args, **kwargs): return decorator + class PlottingDefectsTestCase(unittest.TestCase): def setUp(self): self.DATA_DIR = os.path.join(os.path.dirname(__file__), "data") @@ -151,17 +153,11 @@ def test_format_axis(self): formatted_ax.xaxis.get_label().get_text(), "Bond Distortion Factor (for 2 Te near $V_{Cd}^{0}$)", ) - self.assertEqual( - len(formatted_ax.yaxis.get_ticklabels()), 6 + 2 - ) # +2 bc MaxNLocator adds ticks + self.assertEqual(len(formatted_ax.yaxis.get_ticklabels()), 6 + 2) # +2 bc MaxNLocator adds ticks # beyond axis limits for autoscaling reasons self.assertTrue( [ - float( - tick.get_text().replace("−", "-") - ) # weird mpl ticker reformatting - % 0.3 - == 0.0 + float(tick.get_text().replace("−", "-")) % 0.3 == 0.0 # weird mpl ticker reformatting for tick in formatted_ax.xaxis.get_ticklabels() ] ) # x ticks should be multiples of 0.3 @@ -193,9 +189,7 @@ def test_format_axis(self): num_nearest_neighbours=2, neighbour_atom="Te", ) - self.assertEqual( - formatted_ax.xaxis.get_label().get_text(), "Bond Distortion Factor" - ) + self.assertEqual(formatted_ax.xaxis.get_label().get_text(), "Bond Distortion Factor") def test_format_ticks(self): "Test format_ticks() function." @@ -212,9 +206,7 @@ def test_format_ticks(self): num_nearest_neighbours=2, neighbour_atom="Te", ) - semi_formatted_ax.set_ylim( - -0.2, 0.4 - ) # set incorrect y limits (-0.2 rather than ~-0.8) + semi_formatted_ax.set_ylim(-0.2, 0.4) # set incorrect y limits (-0.2 rather than ~-0.8) semi_formatted_ax.set_yticks( ticks=[ -0.804, @@ -304,10 +296,7 @@ def test_cast_energies_to_floats(self): casted_energies_dict = plotting._cast_energies_to_floats( energies_dict=energies_dict, defect_species="vac_1_Cd_0" ) - [ - self.assertIsInstance(energy, float) - for energy in casted_energies_dict["distortions"].values() - ] + [self.assertIsInstance(energy, float) for energy in casted_energies_dict["distortions"].values()] self.assertIsInstance(casted_energies_dict["Unperturbed"], float) # Check str letters are not converted to floats, and exception is raised @@ -332,10 +321,7 @@ def test_change_energy_units_to_meV(self): ) self.assertEqual( energies_dict["distortions"], - { - k: 1000 * v - for k, v in self.organized_V_Cd_distortion_data["distortions"].items() - }, + {k: 1000 * v for k, v in self.organized_V_Cd_distortion_data["distortions"].items()}, ) self.assertEqual( energies_dict["Unperturbed"], @@ -354,8 +340,7 @@ def test_purge_data_dict(self): disp_dict=deepcopy(disp_dict), ) self.assertEqual( - set(list(disp_dict.keys())) - - set(list(energies_dict["distortions"].keys())), + set(list(disp_dict.keys())) - set(list(energies_dict["distortions"].keys())), {"Unperturbed"}, ) # only difference should be Unperturbed # Test behaviour when energy dict is incomplete @@ -366,8 +351,7 @@ def test_purge_data_dict(self): disp_dict=deepcopy(disp_dict), ) self.assertEqual( - set(list(disp_dict.keys())) - - set(list(energies_dict["distortions"].keys())), + set(list(disp_dict.keys())) - set(list(energies_dict["distortions"].keys())), {"Unperturbed"}, ) # only difference should be Unperturbed @@ -406,9 +390,7 @@ def test_get_displacement_dict(self): add_colorbar=True, ) warning_message = f"Could not find structures for {self.VASP_CDTE_DATA_DIR}/fake_defect_species. Colorbar will not be added to plot." - user_warnings = [ - warning for warning in w if warning.category == UserWarning - ] + user_warnings = [warning for warning in w if warning.category == UserWarning] self.assertEqual(len(user_warnings), 1) self.assertIn(warning_message, str(user_warnings[0].message)) @@ -435,12 +417,8 @@ def test_save_plot(self): # Saving to defect_dir subfolder in output_path fig, ax = plt.subplots(1, 1) defect_name = "vac_1_Cd_0" - if_present_rm( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png" - ) - with patch("builtins.print") as mock_print, warnings.catch_warnings( - record=True - ) as w: + if_present_rm(f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png") + with patch("builtins.print") as mock_print, warnings.catch_warnings(record=True) as w: plotting._save_plot( fig=fig, defect_name=defect_name, @@ -448,21 +426,15 @@ def test_save_plot(self): save_format="png", ) self.assertTrue( - os.path.exists( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png" - ) + os.path.exists(f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png") ) mock_print.assert_not_called_with(f"Plot saved to {defect_name}/{defect_name}.png") user_warnings = [warning for warning in w if warning.category == UserWarning] self.assertEqual(len(user_warnings), 0) # No warnings in this case - if_present_rm( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png" - ) + if_present_rm(f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png") # test verbose: - with patch("builtins.print") as mock_print, warnings.catch_warnings( - record=True - ) as w: + with patch("builtins.print") as mock_print, warnings.catch_warnings(record=True) as w: plotting._save_plot( fig=fig, defect_name=defect_name, @@ -471,63 +443,52 @@ def test_save_plot(self): verbose=True, ) self.assertTrue( - os.path.exists( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png" - ) + os.path.exists(f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png") ) mock_print.assert_called_once_with(f"Plot saved to {defect_name}/{defect_name}.png") user_warnings = [warning for warning in w if warning.category == UserWarning] self.assertEqual(len(user_warnings), 0) # No warnings in this case # test verbose overwriting info: - with patch("builtins.print") as mock_print, warnings.catch_warnings( - record=True - ) as w: + with patch("builtins.print") as mock_print, warnings.catch_warnings(record=True) as w: plotting._save_plot( fig=fig, defect_name=defect_name, output_path=self.VASP_CDTE_DATA_DIR, save_format="png", - verbose=True + verbose=True, ) current_datetime = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M") - current_datetime_minus1min = ( - datetime.datetime.now() - datetime.timedelta(minutes=1) - ).strftime( + current_datetime_minus1min = (datetime.datetime.now() - datetime.timedelta(minutes=1)).strftime( "%Y-%m-%d-%H-%M" ) # in case delay between writing and testing plot generation self.assertTrue( - os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/{defect_name}/{defect_name}_{current_datetime}.png" - ) or - os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/{defect_name}/{defect_name}_{current_datetime_minus1min}.png") + os.path.exists(f"{self.VASP_CDTE_DATA_DIR}/{defect_name}/{defect_name}_{current_datetime}.png") + or os.path.exists( + f"{self.VASP_CDTE_DATA_DIR}/{defect_name}/{defect_name}_{current_datetime_minus1min}.png" + ) ) self.assertTrue( f"Previous version of {defect_name}.png found" in mock_print.call_args_list[0][0][0] ) mock_print.assert_any_call(f"Plot saved to {defect_name}/{defect_name}.png") self.assertTrue( - os.path.exists( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png" - ) + os.path.exists(f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png") ) user_warnings = [warning for warning in w if warning.category == UserWarning] self.assertEqual(len(user_warnings), 0) # No warnings in this case - if_present_rm( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png" - ) + if_present_rm(f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}.png") if_present_rm( f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}_{current_datetime}.png" ) if_present_rm( - f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}_{current_datetime_minus1min}.png" + f"{os.path.join(self.VASP_CDTE_DATA_DIR, defect_name, defect_name)}_{current_datetime_minus1min}.png" ) # Saving to output_path where defect_dir is not in output_path and output_path is not cwd if_present_rm(f"./{defect_name}.svg") with patch("builtins.print") as mock_print: - plotting._save_plot( - fig=fig, defect_name=defect_name, output_path=".", save_format="svg" - ) + plotting._save_plot(fig=fig, defect_name=defect_name, output_path=".", save_format="svg") self.assertTrue(os.path.exists(f"./{defect_name}.svg")) mock_print.assert_not_called() # non-verbose, no print call if_present_rm(f"./{defect_name}.svg") @@ -539,9 +500,7 @@ def test_save_plot(self): plotting._save_plot( fig=fig, defect_name=defect_name, output_path=".", save_format="svg", verbose=True ) - self.assertFalse( - os.path.exists(f"./{defect_name}.svg") - ) # not in cwd, in defect directory + self.assertFalse(os.path.exists(f"./{defect_name}.svg")) # not in cwd, in defect directory self.assertTrue(os.path.exists(f"{defect_name}/{defect_name}.svg")) mock_print.assert_called_once_with( # verbose is True f"Plot saved to {defect_name}/{defect_name}.svg" @@ -550,18 +509,14 @@ def test_save_plot(self): os.chdir(_file_path) # test previously saved plot renaming and print statement - plotting._save_plot( - fig=fig, defect_name=defect_name, output_path=".", save_format="png" - ) + plotting._save_plot(fig=fig, defect_name=defect_name, output_path=".", save_format="png") self.assertTrue(os.path.exists(f"./{defect_name}.png")) with patch("builtins.print") as mock_print: plotting._save_plot( fig=fig, defect_name=defect_name, output_path=".", save_format="png", verbose=True ) current_datetime = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M") - current_datetime_minus1min = ( - datetime.datetime.now() - datetime.timedelta(minutes=1) - ).strftime( + current_datetime_minus1min = (datetime.datetime.now() - datetime.timedelta(minutes=1)).strftime( "%Y-%m-%d-%H-%M" ) # in case delay between writing and testing plot generation @@ -573,19 +528,14 @@ def test_save_plot(self): ) self.assertTrue( f"Previous version of {defect_name}.png found in output_path: './'. Will rename " - f"old plot to {defect_name}_{current_datetime}.png." - in mock_print.call_args_list[0][0][0] + f"old plot to {defect_name}_{current_datetime}.png." in mock_print.call_args_list[0][0][0] or f"Previous version of {defect_name}.png found in output_path: './'. Will rename " f"old plot to {defect_name}_{current_datetime_minus1min}.png." in mock_print.call_args_list[0][0][0] ) - self._remove_current_and_saved_plots( - defect_name, current_datetime, current_datetime_minus1min - ) + self._remove_current_and_saved_plots(defect_name, current_datetime, current_datetime_minus1min) # test no print statements with verbose = False (default) - plotting._save_plot( - fig=fig, defect_name=defect_name, output_path=".", save_format="png" - ) + plotting._save_plot(fig=fig, defect_name=defect_name, output_path=".", save_format="png") self.assertTrue(os.path.exists(f"./{defect_name}.png")) with patch("builtins.print") as mock_print: plotting._save_plot( @@ -596,9 +546,7 @@ def test_save_plot(self): ) self.assertTrue(os.path.exists(f"./{defect_name}.png")) mock_print.assert_not_called() - self._remove_current_and_saved_plots( - defect_name, current_datetime, current_datetime_minus1min - ) + self._remove_current_and_saved_plots(defect_name, current_datetime, current_datetime_minus1min) def _remove_current_and_saved_plots(self, defect_name, current_datetime, current_datetime_minus1min): if_present_rm(f"./{defect_name}.png") @@ -788,11 +736,7 @@ def test_plot_datasets_keywords(self): save_format="png", colors=["green", "orange"], ) - self.assertTrue( - os.path.exists( - os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/vac_1_Cd_0.png") - ) - ) + self.assertTrue(os.path.exists(os.path.join(self.VASP_CDTE_DATA_DIR, "vac_1_Cd_0/vac_1_Cd_0.png"))) return fig @custom_mpl_image_compare("vac_1_Cd_0_notitle.png") @@ -919,9 +863,7 @@ def test_plot_defect_fake_output_directories(self): @custom_mpl_image_compare("v_Ca_s0_0_plot_defect_without_colorbar.png") def test_plot_defect_dimer(self): defect_species = "v_Ca_s0_0" - defect_energies = analysis.get_energies( - defect_species=defect_species, output_path=self.VASP_DIR - ) + defect_energies = analysis.get_energies(defect_species=defect_species, output_path=self.VASP_DIR) fig = plotting.plot_defect( defect_species=defect_species, energies_dict=defect_energies, @@ -930,9 +872,7 @@ def test_plot_defect_dimer(self): ) # Check Dimer label ax = fig.gca() - self.assertEqual( - ax.get_legend_handles_labels()[1][0], "Dimer" - ) + self.assertEqual(ax.get_legend_handles_labels()[1][0], "Dimer") return fig # @pytest.mark.mpl_image_compare( @@ -994,8 +934,10 @@ def test_plot_defect_without_colorbar(self): @custom_mpl_image_compare("vac_1_Cd_0_plot_defect_with_unrecognised_name.png") def test_plot_defect_unrecognised_name(self): - """Test plot_defect() function when the name cannot be formatted (e.g. if parsing and - plotting from a renamed folder)""" + """ + Test plot_defect() function when the name cannot be formatted (e.g. + if parsing and plotting from a renamed folder) + """ with warnings.catch_warnings(record=True) as w: fig = plotting.plot_defect( # note this also implicitly tests that we can use # `plot_defect` with a `defect_species` that is not found in the `output_path` (but @@ -1010,13 +952,47 @@ def test_plot_defect_unrecognised_name(self): self.assertTrue( any( f"Cannot add colorbar to plot for vac_1_Cd_no_charge as" - f" {self.VASP_CDTE_DATA_DIR}/vac_1_Cd_no_charge cannot be found." - in str(warning.message) + f" {self.VASP_CDTE_DATA_DIR}/vac_1_Cd_no_charge cannot be found." in str(warning.message) for warning in w ) ) return fig + @custom_mpl_image_compare("Va_O1_1_plot_defect_with_unrecognised_distortion.png") + def test_plot_defect_unrecognised_distortion(self): + """ + Test plot_defect() function when the distortion name cannot be formatted + (e.g. if parsing and plotting from a renamed folder) + """ + with warnings.catch_warnings(record=True) as w: + energies_file = io.parse_energies(defect="Va_O1_1", path=self.VASP_DIR, verbose=True) + defect_species = energies_file.rsplit("/", 1)[-1].replace(".yaml", "") # in case '+' removed + defect_energies_dict = analysis.get_energies( + defect_species=defect_species, + output_path=self.VASP_DIR, + verbose=True, + ) + fig = plotting.plot_defect( # note this also implicitly tests that we can use + # `plot_defect` with a distortion that is not found in the `output_path` (but + # is present in the energies file) + output_path=self.VASP_DIR, + defect_species="Va_O1_1", + energies_dict=defect_energies_dict, + ) + print([str(warning.message) for warning in w]) # for debugging + + with warnings.catch_warnings(record=True) as w: + fig_cb = plotting.plot_defect( # note this also implicitly tests that we can use + # `plot_defect` with a distortion that is not found in the `output_path` (but + # is present in the energies file) + output_path=self.VASP_DIR, + defect_species="Va_O1_1", + energies_dict=defect_energies_dict, + add_colorbar=True, + ) + print([str(warning.message) for warning in w]) # for debugging + return fig_cb + @custom_mpl_image_compare("Te_i_Td_Te2.83_+2.png") def test_plot_defect_doped_v2(self): """Test plot_defect() function using doped v2 naming""" @@ -1103,10 +1079,7 @@ def test_plot_all_defects_nonexistent_defect_folder(self): }, save_plot=False, ) - self.assertTrue( - "vac_1_Cd_-1 does not exist! Skipping vac_1_Cd_-1." - in str(w[-1].message) - ) + self.assertTrue("vac_1_Cd_-1 does not exist! Skipping vac_1_Cd_-1." in str(w[-1].message)) @custom_mpl_image_compare("vac_1_Cd_-2_only_rattled.png") def test_plot_defects_output(self): @@ -1119,10 +1092,7 @@ def test_plot_defects_output(self): min_e_diff=0.05, add_title=False, ) - [ - self.assertIsInstance(figure, mpl.figure.Figure) - for figure in fig_dict.values() - ] + [self.assertIsInstance(figure, mpl.figure.Figure) for figure in fig_dict.values()] self.assertEqual(list(fig_dict.keys()), ["vac_1_Cd_0", "vac_1_Cd_-2"]) # No info on distortion_metadata.json for charge state -2, so its x label should be 'Bond # Distortion Factor'