diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4fc48f65dc1..8b32b929da2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -62,7 +62,7 @@ repos: - id: codespell stages: [commit, commit-msg] exclude_types: [html] - args: [--ignore-words-list, 'titel,titels,reson,rute,pres,kno'] + args: [--ignore-words-list, 'titel,titels,reson,rute,pres,kno,coo'] - repo: https://github.com/PyCQA/pydocstyle rev: 6.1.1 diff --git a/pymatgen/cli/pmg.py b/pymatgen/cli/pmg.py index 61f15ba7158..8fe100cd8c5 100755 --- a/pymatgen/cli/pmg.py +++ b/pymatgen/cli/pmg.py @@ -132,6 +132,16 @@ def main(): nargs="+", help="Variables to add in the form of space separated key value pairs. E.g., PMG_VASP_PSP_DIR ~/psps", ) + + groups.add_argument( + "--cp2k", + dest="cp2k_data_dirs", + metavar="dir_name", + nargs=2, + help="Initial directory where the CP2K data is located and the output directory where the " + "CP2K yaml data files will be written", + ) + parser_config.add_argument( "-b", "--backup", diff --git a/pymatgen/cli/pmg_config.py b/pymatgen/cli/pmg_config.py index 8d12e2ce467..893e0893eb6 100644 --- a/pymatgen/cli/pmg_config.py +++ b/pymatgen/cli/pmg_config.py @@ -22,16 +22,105 @@ from pymatgen.core import OLD_SETTINGS_FILE, SETTINGS_FILE +def setup_cp2k_data(cp2k_data_dirs: list[str]) -> None: + """Setup CP2K basis and potential data directory""" + data_dir, target_dir = (os.path.abspath(dir) for dir in cp2k_data_dirs) + try: + os.mkdir(target_dir) + except OSError: + reply = input("Destination directory exists. Continue (y/n)?") + if reply != "y": + print("Exiting ...") + raise SystemExit(0) + print("Generating pymatgen resource directory for CP2K...") + + import glob + + from monty.json import jsanitize + from ruamel import yaml + + from pymatgen.core import Element + from pymatgen.io.cp2k.inputs import GaussianTypeOrbitalBasisSet, GthPotential + from pymatgen.io.cp2k.utils import chunk + + basis_files = glob.glob(os.path.join(data_dir, "*BASIS*")) + potential_files = glob.glob(os.path.join(data_dir, "*POTENTIAL*")) + + settings: dict[str, dict] = {str(el): {"potentials": {}, "basis_sets": {}} for el in Element} + + for potential_file in potential_files: + print(f"Processing... {potential_file}") + with open(potential_file) as file: + try: + chunks = chunk(file.read()) + except IndexError: + continue + for chk in chunks: + try: + potential = GthPotential.from_string(chk) + potential.filename = os.path.basename(potential_file) + potential.version = None + settings[potential.element.symbol]["potentials"][potential.get_hash()] = jsanitize( + potential, strict=True + ) + except ValueError: + # Chunk was readable, but the element is not pmg recognized + continue + except IndexError: + # Chunk was readable, but invalid. Mostly likely "N/A" for this potential + continue + + for basis_file in basis_files: + print(f"Processing... {basis_file}") + with open(basis_file) as file: + try: + chunks = chunk(file.read()) + except IndexError: + continue + for chk in chunks: + try: + basis = GaussianTypeOrbitalBasisSet.from_string(chk) + basis.filename = os.path.basename(basis_file) + settings[basis.element.symbol]["basis_sets"][basis.get_hash()] = jsanitize( # type: ignore + basis, strict=True + ) + except ValueError: + # Chunk was readable, but the element is not pmg recognized + continue + except IndexError: + # Chunk was readable, but invalid. Mostly likely "N/A" for this potential + continue + + print("Done processing cp2k data files") + + for el in settings: + print(f"Writing {el} settings file") + with open(os.path.join(target_dir, el), "w") as file: + yaml.dump(settings.get(el), file, default_flow_style=False) + + print( + "\n CP2K resource directory generated. It is recommended that you run:" + f"\n 'pmg config --add PMG_CP2K_DATA_DIR {os.path.abspath(target_dir)}' " + ) + print( + "\n It is also recommended that you set the following (with example values):" + "\n 'pmg config --add PMG_DEFAULT_CP2K_FUNCTIONAL PBE' " + "\n 'pmg config --add PMG_DEFAULT_CP2K_BASIS_TYPE TZVP-MOLOPT' " + "\n 'pmg config --add PMG_DEFAULT_CP2K_AUX_BASIS_TYPE pFIT' " + ) + print("\n Start a new terminal to ensure that your environment variables are properly set.") + + def setup_potcars(potcar_dirs: list[str]): """Setup POTCAR directories.""" - pspdir, targetdir = (os.path.abspath(d) for d in potcar_dirs) + psp_dir, target_dir = (os.path.abspath(d) for d in potcar_dirs) try: - os.makedirs(targetdir) + os.makedirs(target_dir) except OSError: - r = input("Destination directory exists. Continue (y/n)? ") - if r != "y": + reply = input("Destination directory exists. Continue (y/n)? ") + if reply != "y": print("Exiting ...") - sys.exit(0) + raise SystemExit(0) print("Generating pymatgen resources directory...") @@ -51,18 +140,18 @@ def setup_potcars(potcar_dirs: list[str]): "potUSPP_GGA": "POT_GGA_US_PW91", } - for parent, subdirs, _files in os.walk(pspdir): + for parent, subdirs, _files in os.walk(psp_dir): basename = os.path.basename(parent) basename = name_mappings.get(basename, basename) for subdir in subdirs: filenames = glob.glob(os.path.join(parent, subdir, "POTCAR*")) if len(filenames) > 0: try: - basedir = os.path.join(targetdir, basename) - if not os.path.exists(basedir): - os.makedirs(basedir) + base_dir = os.path.join(target_dir, basename) + if not os.path.exists(base_dir): + os.makedirs(base_dir) fname = filenames[0] - dest = os.path.join(basedir, os.path.basename(fname)) + dest = os.path.join(base_dir, os.path.basename(fname)) shutil.copy(fname, dest) ext = fname.split(".")[-1] if ext.upper() in ["Z", "GZ"]: @@ -73,8 +162,8 @@ def setup_potcars(potcar_dirs: list[str]): p.communicate() if subdir == "Osmium": subdir = "Os" - dest = os.path.join(basedir, f"POTCAR.{subdir}") - shutil.move(os.path.join(basedir, "POTCAR"), dest) + dest = os.path.join(base_dir, f"POTCAR.{subdir}") + shutil.move(os.path.join(base_dir, "POTCAR"), dest) with subprocess.Popen(["gzip", "-f", dest]) as p: p.communicate() except Exception as ex: @@ -82,7 +171,7 @@ def setup_potcars(potcar_dirs: list[str]): print( "\nPSP resources directory generated. It is recommended that you " - f"run 'pmg config --add PMG_VASP_PSP_DIR {os.path.abspath(targetdir)}'" + f"run 'pmg config --add PMG_VASP_PSP_DIR {os.path.abspath(target_dir)}'" ) print("Start a new terminal to ensure that your environment variables are properly set.") @@ -209,3 +298,5 @@ def configure_pmg(args: Namespace): install_software(args.install) elif args.var_spec: add_config_var(args.var_spec, args.backup) + elif args.cp2k_data_dirs: + setup_cp2k_data(args.cp2k_data_dirs) diff --git a/pymatgen/entries/compatibility.py b/pymatgen/entries/compatibility.py index d58a4c95ee4..c66112fa68c 100644 --- a/pymatgen/entries/compatibility.py +++ b/pymatgen/entries/compatibility.py @@ -938,8 +938,9 @@ def get_adjustments(self, entry: AnyComputedEntry) -> list[EnergyAdjustment]: # check the POTCAR symbols # this should return ufloat(0, 0) or raise a CompatibilityError or ValueError - pc = PotcarCorrection(MPRelaxSet, check_hash=self.check_potcar_hash) - pc.get_correction(entry) + if entry.parameters.get("software", "vasp") == "vasp": + pc = PotcarCorrection(MPRelaxSet, check_hash=self.check_potcar_hash) + pc.get_correction(entry) # apply energy adjustments adjustments: list[CompositionEnergyAdjustment] = [] diff --git a/pymatgen/io/cp2k/inputs.py b/pymatgen/io/cp2k/inputs.py index 31b08516bb5..ab7d5f5ec2b 100644 --- a/pymatgen/io/cp2k/inputs.py +++ b/pymatgen/io/cp2k/inputs.py @@ -18,6 +18,7 @@ calculation input. -- The rest of the classes are children of Section intended to make initialization of common sections easier. + """ from __future__ import annotations @@ -27,8 +28,10 @@ import os import re import textwrap -import warnings -from typing import Iterable, Sequence +from dataclasses import dataclass, field +from hashlib import md5 +from pathlib import Path +from typing import Any, Iterable, Literal, Sequence from monty.io import zopen from monty.json import MSONable @@ -36,17 +39,20 @@ from pymatgen.core.lattice import Lattice from pymatgen.core.periodic_table import Element from pymatgen.core.structure import Molecule, Structure -from pymatgen.io.cp2k.utils import _postprocessor, _preprocessor +from pymatgen.io.cp2k.utils import chunk, postprocessor, preprocessor +from pymatgen.io.vasp.inputs import Kpoints as VaspKpoints +from pymatgen.io.vasp.inputs import Kpoints_supported_modes from pymatgen.symmetry.analyzer import SpacegroupAnalyzer __author__ = "Nicholas Winner" -__version__ = "1.0" +__version__ = "2.0" __email__ = "nwinner@berkeley.edu" -__date__ = "March 2022" +__date__ = "September 2022" +MODULE_DIR = Path(__file__).resolve().parent -class Keyword(MSONable): +class Keyword(MSONable): """ Class representing a keyword argument in CP2K. Within CP2K Sections, which activate features of the CP2K code, the keywords are arguments that control the functionality of that feature. @@ -61,8 +67,8 @@ def __init__( *values, description: str | None = None, units: str | None = None, - verbose: bool = True, - repeats: bool = False, + verbose: bool | None = True, + repeats: bool | None = False, ): """ Initializes a keyword. These Keywords and the value passed to them are sometimes as simple @@ -71,14 +77,15 @@ def __init__( input file. Args: - name (str): The name of this keyword. Must match an acceptable keyword from CP2K - args: All non-keyword arguments after 'name' are interpreted as the values to set for + name: The name of this keyword. Must match an acceptable keyword from CP2K + values: All non-keyword arguments after 'name' are interpreted as the values to set for this keyword. i.e: KEYWORD ARG1 ARG2 would provide two values to the keyword. - description (str): The description for this keyword. This can make readability of + description: The description for this keyword. This can make readability of input files easier for some. Default=None. - units (str): The units for this keyword. If not specified, CP2K default units will be + units: The units for this keyword. If not specified, CP2K default units will be used. Consult manual for default units. Default=None. - repeats (bool): Whether or not this keyword may be repeated. Default=False. + verbose: Whether the description should be printed with the string of this keyword + repeats: Whether or not this keyword may be repeated. Default=False. """ self.name = name self.values = values @@ -89,7 +96,7 @@ def __init__( def __str__(self): return ( - str(self.name) + self.name.__str__() + " " + (f"[{self.units}] " if self.units else "") + " ".join(map(str, self.values)) @@ -157,18 +164,18 @@ def from_string(s): that the keywords is a number, then None is return (used by the file reader). - returns: + Returns: Keyword or None """ s = s.strip() - if ("!" in s) or ("#" in s): + if "!" in s or "#" in s: s, description = re.split("(?:!|#)", s) description = description.strip() else: description = None units = re.findall(r"\[(.*)\]", s) or [None] s = re.sub(r"\[(.*)\]", "", s) - args = list(map(_postprocessor, s.split())) + args = list(map(postprocessor, s.split())) args[0] = str(args[0]) return Keyword(*args, units=units[0], description=description) @@ -180,7 +187,6 @@ def verbosity(self, v): class KeywordList(MSONable): - """ Some keywords can be repeated, which makes accessing them via the normal dictionary methods a little unnatural. This class deals with this by defining a collection @@ -217,13 +223,13 @@ def __getitem__(self, item): def append(self, item): """ - append the keyword list + Append the keyword list """ self.keywords.append(item) def extend(self, l): """ - extend the keyword list + Extend the keyword list """ self.keywords.extend(l) @@ -242,15 +248,11 @@ def verbosity(self, verbosity): class Section(MSONable): - """ Basic input representation of input to Cp2k. Activates functionality inside of the Cp2k executable. """ - required_sections: tuple = () - required_keywords: tuple = () - def __init__( self, name: str, @@ -258,9 +260,9 @@ def __init__( repeats: bool = False, description: str | None = None, keywords: dict | None = None, - section_parameters: Sequence[str] | None = None, + section_parameters: list | tuple | None = None, location: str | None = None, - verbose: bool = True, + verbose: bool | None = True, alias: str | None = None, **kwargs, ): @@ -270,39 +272,41 @@ def __init__( forces. Args: - name (str): The name of the section (must match name in CP2K) - subsections (dict): A dictionary of subsections that are nested in this section. + name: The name of the section (must match name in CP2K) + subsections: A dictionary of subsections that are nested in this section. Format is {'NAME': Section(*args, **kwargs). The name you chose for 'NAME' to index that subsection does not *have* to be the same as the section's true name, but we recommend matching them. You can specify a blank dictionary if there are no subsections, or if you want to insert the subsections later. - repeats (bool): Whether or not this section can be repeated. Most sections cannot. + repeats: Whether or not this section can be repeated. Most sections cannot. Default=False. - description (str): Description of this section for easier readability - keywords (list): the keywords to be set for this section. Each element should be a + description: Description of this section for easier readability + keywords: the keywords to be set for this section. Each element should be a Keyword object. This can be more cumbersome than simply using kwargs for building a class in a script, but is more convenient for the class instantiations of CP2K sections (see below). - section_parameters (list): the section parameters for this section. Section parameters + section_parameters: the section parameters for this section. Section parameters are specialized keywords that modify the behavior of the section overall. Most sections do not have section parameters, but some do. Unlike normal Keywords, these are specified as strings and not as Keyword objects. - location (str): the path to the section in the form 'SECTION/SUBSECTION1/SUBSECTION3', + location: the path to the section in the form 'SECTION/SUBSECTION1/SUBSECTION3', example for QS module: 'FORCE_EVAL/DFT/QS'. This location is used to automatically determine if a subsection requires a supersection to be activated. - verbose (str): Controls how much is printed to Cp2k input files (Also see Keyword). + verbose: Controls how much is printed to Cp2k input files (Also see Keyword). If True, then a description of the section will be printed with it as a comment (if description is set). Default=True. + alias: An alias for this class to use in place of the name. kwargs are interpreted as keyword, value pairs and added to the keywords array as Keyword objects """ self.name = name - self.subsections = subsections if subsections is not None else {} + self.subsections = subsections if subsections else {} self.repeats = repeats self.description = description - self.keywords = keywords or {} - self.section_parameters = section_parameters or [] + keywords = keywords if keywords else {} + self.keywords = keywords + self.section_parameters = section_parameters if section_parameters else [] self.location = location self.verbose = verbose self.alias = alias @@ -310,13 +314,6 @@ def __init__( for k, v in self.kwargs.items(): self.keywords[k] = Keyword(k, v) - for k in self.required_sections: - if not self.check(k): - raise UserWarning(f"WARNING: REQUIRED SECTION {k} HAS NOT BEEN INITIALIZED") - for k in self.required_keywords: - if k not in self.keywords: - raise UserWarning(f"WARNING: REQUIRED KEYWORD {k} HAS NOT BEEN PROVIDED") - def __str__(self): return self.get_string() @@ -352,10 +349,21 @@ def __add__(self, other): else: TypeError("Can only add sections or keywords.") - def __setitem__(self, key, value, strict=False): + def __setitem__(self, key, value): + self.setitem(key, value) + + def setitem(self, key, value, strict=False): + """ + Helper function for setting items. Kept seperate from + the dunder function so that "strict" option can be made + possible. + + strict will only set values for items that already have + a key entry (no insertion) + """ if isinstance(value, (Section, SectionList)): if key in self.subsections: - self.subsections[key] = value.__deepcopy__() + self.subsections[key] = copy.deepcopy(value) elif not strict: self.insert(value) else: @@ -419,9 +427,9 @@ def get_section(self, d, default=None): d: Name of section to get default: return if d is not found in subsections """ - for k in self.subsections: + for k, v in self.subsections.items(): if str(k).upper() == str(d).upper(): - return self.subsections[k] + return v return default def get_keyword(self, d, default=None): @@ -432,9 +440,9 @@ def get_keyword(self, d, default=None): d: Name of keyword to get default: return if d is not found in keyword list """ - for k in self.keywords: + for k, v in self.keywords.items(): if str(k).upper() == str(d).upper(): - return self.keywords[k] + return v return default def update(self, d: dict, strict=False): @@ -470,9 +478,9 @@ def _update(d1, d2, strict=False): """ for k, v in d2.items(): if isinstance(v, (str, float, int, bool)): - d1.__setitem__(k, Keyword(k, v), strict=strict) # pylint: disable=C2801 + d1.setitem(k, Keyword(k, v), strict=strict) elif isinstance(v, (Keyword, KeywordList)): - d1.__setitem__(k, v, strict=strict) # pylint: disable=C2801 + d1.setitem(k, v, strict=strict) elif isinstance(v, dict): tmp = [_ for _ in d1.subsections if k.upper() == _.upper()] if not tmp: @@ -559,6 +567,7 @@ def by_path(self, path: str): Args: path (str): Path to section of form 'SUBSECTION1/SUBSECTION2/SUBSECTION_OF_INTEREST' + """ _path = path.split("/") if _path[0].upper() == self.name.upper(): @@ -625,12 +634,11 @@ def silence(self): if self.subsections: if self.subsections.get("PRINT"): del self.subsections["PRINT"] - for _s in self.subsections: - self.subsections[_s].silence() + for v in self.subsections.values(): + v.silence() class SectionList(MSONable): - """ Section list """ @@ -656,7 +664,8 @@ def __eq__(self, other: object) -> bool: return all(k == o for k, o in zip(self.sections, other.sections)) def __add__(self, other): - return self.extend(other) + self.append(other) + return self def __len__(self): return len(self.sections) @@ -686,26 +695,25 @@ def get(self, d, index=-1): def append(self, item): """ - append the keyword list + Append the section list """ self.sections.append(item) def extend(self, l): """ - extend the keyword list + Extend the section list """ self.sections.extend(l) def verbosity(self, verbosity): """ - Silence all keywords in keyword list + Silence all sections in section list """ for k in self.sections: k.verbosity(verbosity) class Cp2kInput(Section): - """ Special instance of 'Section' class that is meant to represent the overall cp2k input. Distinguishes itself from Section by overriding get_string() to not print this section's @@ -717,7 +725,7 @@ def __init__(self, name: str = "CP2K_INPUT", subsections: dict | None = None, ** Initialize Cp2kInput by calling the super """ self.name = name - self.subsections = subsections or {} + self.subsections = subsections if subsections else {} self.kwargs = kwargs description = "CP2K Input" @@ -735,8 +743,8 @@ def get_string(self): Get string representation of the Cp2kInput """ s = "" - for k in self.subsections: - s += self.subsections[k].get_string() + for v in self.subsections.values(): + s += v.get_string() return s @classmethod @@ -760,7 +768,7 @@ def from_file(file: str): Initialize from a file """ with zopen(file, "rt") as f: - txt = _preprocessor(f.read(), os.path.dirname(f.name)) + txt = preprocessor(f.read(), os.path.dirname(f.name)) return Cp2kInput.from_string(txt) @staticmethod @@ -818,7 +826,7 @@ def _from_lines(self, lines): self.by_path(current)[s.alias or s.name] = SectionList(sections=[tmp, s]) else: self.by_path(current).insert(s) - current = f"{current}/{alias}" if alias else f"{current}/{name}" + current = current + "/" + alias if alias else current + "/" + name else: kwd = Keyword.from_string(line) tmp = self.by_path(current).get(kwd.name) @@ -857,7 +865,6 @@ def write_file( class Global(Section): - """ Controls 'global' settings for cp2k execution such as RUN_TYPE and PROJECT_NAME """ @@ -866,28 +873,30 @@ def __init__( self, project_name: str = "CP2K", run_type: str = "ENERGY_FORCE", + keywords: dict | None = None, **kwargs, ): """Initialize the global section Args: - project_name (str, optional): Defaults to "CP2K". - run_type (str, optional) what type of calculation to run + project_name: Defaults to "CP2K". + run_type: what type of calculation to run + keywords: Additional keywords to add """ self.project_name = project_name self.run_type = run_type - self.kwargs = kwargs + keywords = keywords if keywords else {} description = ( "Section with general information regarding which kind of simulation" + " to perform an general settings" ) - keywords = { + _keywords = { "PROJECT_NAME": Keyword("PROJECT_NAME", project_name), "RUN_TYPE": Keyword("RUN_TYPE", run_type), "EXTENDED_FFT_LENGTHS": Keyword("EXTENDED_FFT_LENGTHS", True), } - + keywords.update(_keywords) super().__init__( "GLOBAL", description=description, @@ -898,29 +907,24 @@ def __init__( class ForceEval(Section): - """ Controls the calculation of energy and forces in Cp2k """ - def __init__(self, subsections: dict | None = None, **kwargs): - """Initialize the ForceEval section - - Args: - subsections (dict, optional): Defaults to None. - """ - self.subsections = subsections or {} - self.kwargs = kwargs + def __init__(self, keywords: dict | None = None, subsections: dict | None = None, **kwargs): + """Initialize the ForceEval section""" + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "Parameters needed to calculate energy and forces" + " and describe the system you want to analyze." ) - keywords = { + _keywords = { "METHOD": Keyword("METHOD", kwargs.get("METHOD", "QS")), "STRESS_TENSOR": Keyword("STRESS_TENSOR", kwargs.get("STRESS_TENSOR", "ANALYTICAL")), } - + keywords.update(_keywords) super().__init__( "FORCE_EVAL", repeats=True, @@ -932,42 +936,43 @@ def __init__(self, subsections: dict | None = None, **kwargs): class Dft(Section): - """ Controls the DFT parameters in Cp2k """ def __init__( self, - basis_set_filenames="BASIS_MOLOPT", + basis_set_filenames: Iterable = ("BASIS_MOLOPT",), potential_filename="GTH_POTENTIALS", uks: bool = True, wfn_restart_file_name: str | None = None, + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): """Initialize the DFT section. Args: - basis_set_filenames (str, optional): Name of the file that contains the basis set + basis_set_filenames: Name of the file that contains the basis set information. Defaults to "BASIS_MOLOPT". - potential_filename (str, optional): Name of the file that contains the pseudopotential + potential_filename: Name of the file that contains the pseudopotential information. Defaults to "GTH_POTENTIALS". - uks (bool, optional): Whether to run unrestricted Kohn Sham (spin polarized). + uks: Whether to run unrestricted Kohn Sham (spin polarized). Defaults to True. - wfn_restart_file_name (str, optional): Defaults to None. - subsections (dict, optional): Any subsections to initialize with. Defaults to None. + wfn_restart_file_name: Defaults to None. + keywords: additional keywords to add. + subsections: Any subsections to initialize with. Defaults to None. """ self.basis_set_filenames = basis_set_filenames self.potential_filename = potential_filename self.uks = uks self.wfn_restart_file_name = wfn_restart_file_name - self.subsections = subsections or {} - self.kwargs = kwargs + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "Parameter needed by dft programs" - keywords = { + _keywords = { "BASIS_SET_FILE_NAME": KeywordList([Keyword("BASIS_SET_FILE_NAME", k) for k in basis_set_filenames]), "POTENTIAL_FILE_NAME": Keyword("POTENTIAL_FILE_NAME", potential_filename), "UKS": Keyword( @@ -978,44 +983,41 @@ def __init__( } if wfn_restart_file_name: - keywords["WFN_RESTART_FILE_NAME"] = Keyword("WFN_RESTART_FILE_NAME", wfn_restart_file_name) + _keywords["WFN_RESTART_FILE_NAME"] = Keyword("WFN_RESTART_FILE_NAME", wfn_restart_file_name) + keywords.update(_keywords) super().__init__( "DFT", description=description, keywords=keywords, - subsections=self.subsections, + subsections=subsections, **kwargs, ) class Subsys(Section): - """ Controls the definition of the system to be simulated """ - def __init__(self, subsections: dict | None = None, **kwargs): - """ - Initialize the subsys section - """ - self.subsections = subsections or {} - self.kwargs = kwargs + def __init__(self, keywords: dict | None = None, subsections: dict | None = None, **kwargs): + """Initialize the subsys section""" + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "A subsystem: coordinates, topology, molecules and cell" - super().__init__("SUBSYS", description=description, subsections=subsections, **kwargs) + super().__init__("SUBSYS", keywords=keywords, description=description, subsections=subsections, **kwargs) class QS(Section): - - """ - Controls the quickstep settings (DFT driver) - """ + """Controls the quickstep settings (DFT driver)""" def __init__( self, method: str = "GPW", eps_default: float = 1e-10, + eps_pgf_orb: float | None = None, extrapolation: str = "ASPC", + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): @@ -1030,25 +1032,31 @@ def __init__( global value for all the numerical value of all EPS_* values in QS module. It is not the same as EPS_SCF, which sets convergence accuracy of the SCF cycle alone. + eps_pgf_orb: Precision for the overlap matrix. Default is to use sqrt(eps_default) extrapolation ("PS" | "ASPC"): Method use for extrapolation. If using gamma-point-only calculation, then one should either PS or ASPC (ASPC especially for MD runs). See the manual for other options. - subsections (dict): Subsections to initialize with. + keywords: Additional keywords to add + subsections: Subsections to initialize with. """ self.method = method self.eps_default = eps_default + self.eps_pgf_orb = eps_pgf_orb self.extrapolation = extrapolation - self.subsections = subsections or {} - self.kwargs = kwargs - + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "Parameters needed to set up the Quickstep framework" - keywords = { - "METHOD": Keyword("METHOD", method), - "EPS_DEFAULT": Keyword("EPS_DEFAULT", eps_default, description="Base precision level (in Ha)"), - "EXTRAPOLATION": Keyword("EXTRAPOLATION", extrapolation, description="WFN extrapolation between steps"), + _keywords = { + "METHOD": Keyword("METHOD", self.method), + "EPS_DEFAULT": Keyword("EPS_DEFAULT", self.eps_default, description="Base precision level (in Ha)"), + "EXTRAPOLATION": Keyword( + "EXTRAPOLATION", self.extrapolation, description="WFN extrapolation between steps" + ), } - + if eps_pgf_orb: + _keywords["EPS_PGF_ORB"] = Keyword("EPS_PGF_ORB", self.eps_pgf_orb, description="Overlap matrix precision") + keywords.update(_keywords) super().__init__( "QS", description=description, @@ -1059,16 +1067,14 @@ def __init__( class Scf(Section): - - """ - Controls the self consistent field loop - """ + """Controls the self consistent field loop""" def __init__( self, max_scf: int = 50, eps_scf: float = 1e-6, scf_guess: str = "RESTART", + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): @@ -1089,16 +1095,19 @@ def __init__( "RESTART": Use the RESTART file as an initial guess (and ATOMIC if not present). "SPARSE": Generate a sparse wavefunction using the atomic code (for OT based methods). + keywords: Additional keywords + subsections: Additional subsections """ self.max_scf = max_scf self.eps_scf = eps_scf self.scf_guess = scf_guess - self.subsections = subsections or {} - self.kwargs = kwargs + + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "Parameters needed to perform an SCF run." - keywords = { + _keywords = { "MAX_SCF": Keyword("MAX_SCF", max_scf, description="Max number of steps for an inner SCF loop"), "EPS_SCF": Keyword("EPS_SCF", eps_scf, description="Convergence threshold for SCF"), "SCF_GUESS": Keyword("SCF_GUESS", scf_guess, description="How to initialize the density matrix"), @@ -1108,7 +1117,7 @@ def __init__( description="Iterations for solving for unoccupied levels when running OT", ), } - + keywords.update(_keywords) super().__init__( "SCF", description=description, @@ -1119,10 +1128,7 @@ def __init__( class Mgrid(Section): - - """ - Controls the multigrid for numerical integration - """ + """Controls the multigrid for numerical integration""" def __init__( self, @@ -1130,6 +1136,7 @@ def __init__( rel_cutoff: int | float = 80, ngrids: int = 5, progression_factor: int = 3, + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): @@ -1140,26 +1147,28 @@ def __init__( cutoff: Cutoff energy (in Rydbergs for historical reasons) defining how find of Gaussians will be used rel_cutoff: The relative cutoff energy, which defines how to map the Gaussians onto - the multigrid. If the value is too low then, even if you have a high cutoff + the multigrid. If the the value is too low then, even if you have a high cutoff with sharp Gaussians, they will be mapped to the course part of the multigrid ngrids: number of grids to use progression_factor: divisor that decides how to map Gaussians the multigrid after the highest mapping is decided by rel_cutoff + keywords: additional keywords + subsections: additional subsections """ self.cutoff = cutoff self.rel_cutoff = rel_cutoff self.ngrids = ngrids self.progression_factor = progression_factor - self.subsections = subsections or {} - self.kwargs = kwargs + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "Multigrid information. Multigrid allows for sharp gaussians and diffuse " + "gaussians to be treated on different grids, where the spacing of FFT integration " + "points can be tailored to the degree of sharpness/diffusiveness" ) - keywords = { + _keywords = { "CUTOFF": Keyword("CUTOFF", cutoff, description="Cutoff in [Ry] for finest level of the MG."), "REL_CUTOFF": Keyword( "REL_CUTOFF", @@ -1169,7 +1178,7 @@ def __init__( "NGRIDS": Keyword("NGRIDS", ngrids, description="Number of grid levels in the MG"), "PROGRESSION_FACTOR": Keyword("PROGRESSION_FACTOR", progression_factor), } - + keywords.update(_keywords) super().__init__( "MGRID", description=description, @@ -1180,10 +1189,7 @@ def __init__( class Diagonalization(Section): - - """ - Controls diagonalization settings (if using traditional diagonalization). - """ + """Controls diagonalization settings (if using traditional diagonalization).""" def __init__( self, @@ -1191,49 +1197,47 @@ def __init__( eps_iter: float = 1e-8, eps_jacobi: float = 0, jacobi_threshold: float = 1e-7, + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): - """ - Initialize the diagronalization section - """ + """Initialize the diagronalization section""" self.eps_adapt = eps_adapt self.eps_iter = eps_iter self.eps_jacobi = eps_jacobi self.jacobi_threshold = jacobi_threshold - self.subsections = subsections or {} - self.kwargs = kwargs - self.location = "CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION" - self.description = "Settings for the SCF's diagonalization routines" + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} + location = "CP2K_INPUT/FORCE_EVAL/DFT/SCF/DIAGONALIZATION" + description = "Settings for the SCF's diagonalization routines" - keywords = { + _keywords = { "EPS_ADAPT": Keyword("EPS_ADAPT", eps_adapt), "EPS_ITER": Keyword("EPS_ITER", eps_iter), "EPS_JACOBI": Keyword("EPS_JACOBI", eps_jacobi), "JACOBI_THRESHOLD": Keyword("JACOBI_THRESHOLD", jacobi_threshold), } - + keywords.update(_keywords) super().__init__( "DIAGONALIZATION", keywords=keywords, repeats=False, - location=self.location, - description=self.description, - subsections=self.subsections, + location=location, + description=description, + subsections=subsections, **kwargs, ) class Davidson(Section): - - """ - Parameters for davidson diagonalization - """ + """Parameters for davidson diagonalization""" def __init__( self, new_prec_each: int = 20, preconditioner: str = "FULL_SINGLE_INVERSE", + keywords: dict | None = None, + subsections: dict | None = None, **kwargs, ): """ @@ -1254,35 +1258,37 @@ def __init__( "FULL_S_INVERSE": Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive. "NONE": skip preconditioning + keywords: additional keywords + subsections: additional subsections """ self.new_prec_each = new_prec_each self.preconditioner = preconditioner - - keywords = { + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} + _keywords = { "NEW_PREC_EACH": Keyword("NEW_PREC_EACH", new_prec_each), "PRECONDITIONER": Keyword("PRECONDITIONER", preconditioner), } - + keywords.update(_keywords) super().__init__( "DAVIDSON", keywords=keywords, repeats=False, location=None, - subsections={}, + subsections=subsections, **kwargs, ) class OrbitalTransformation(Section): - """ - Turns on the Orbital Transformation scheme for diagonalizing the Hamiltonian. Much faster and - with guaranteed convergence compared to normal diagonalization, but requires the system + Turns on the Orbital Transformation scheme for diagonalizing the Hamiltonian. Often faster + and with guaranteed convergence compared to normal diagonalization, but requires the system to have a band gap. NOTE: OT has poor convergence for metallic systems and cannot use SCF mixing or smearing. Therefore, you should not use it for metals or systems with 'small' band gaps. In that - case, use normal diagonalization, which will be slower, but will converge properly. + case, use normal diagonalization """ def __init__( @@ -1294,6 +1300,7 @@ def __init__( occupation_preconditioner: bool = False, energy_gap: float = -1, linesearch: str = "2PNT", + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): @@ -1301,25 +1308,32 @@ def __init__( Initialize the OT section Args: - minimizer (str): The minimizer to use with the OT method. Default is conjugate gradient + minimizer: The minimizer to use with the OT method. Default is conjugate gradient method, which is more robust, but more well-behaved systems should use DIIS, which can be as much as 50% faster. - preconditioner (str): Preconditioner to use for OT, FULL_ALL tends to be most robust, but is - not always most efficient. For difficult systems, FULL_SINGLE_INVERSE can be more robust, - and is reasonably efficient with large systems. For huge, but well behaved, systems, - where construction of the preconditioner can take a very long time, FULL_KINETIC can be a good - choice. - energy_gap (float): Guess for the band gap. For FULL_ALL, should be smaller than the actual band gap, - so simply using 0.01 is a robust value. Choosing a larger value will help if you start with a bad - initial guess though. For FULL_SINGLE_INVERSE, energy_gap is treated as a lower bound. Values lower - than 0.05 in this case can lead to stability issues. - algorithm (str): What algorithm to use for OT. 'Strict': Taylor or diagonalization based algorithm. - IRAC: Orbital Transformation based Iterative Refinement of the Approximative Congruence - transformation (OT/IR). - linesearch (str): From the manual: 1D line search algorithm to be used with the OT minimizer, - in increasing order of robustness and cost. MINIMIZER CG combined with LINESEARCH - GOLD should always find an electronic minimum. Whereas the 2PNT minimizer is almost always OK, - 3PNT might be needed for systems in which successive OT CG steps do not decrease the total energy. + preconditioner: Preconditioner to use for OT, FULL_ALL tends to be most robust, + but is not always most efficient. For difficult systems, FULL_SINGLE_INVERSE can be + more robust, and is reasonably efficient with large systems. For huge, but well + behaved, systems, where construction of the preconditioner can take a very long + time, FULL_KINETIC can be a good choice. + algorithm: What algorithm to use for OT. 'Strict': Taylor or diagonalization + based algorithm. IRAC: Orbital Transformation based Iterative Refinement of the + Approximative Congruence transformation (OT/IR). + rotation: Introduce additional variables to allow subspace rotations (i.e fractional + occupations) + occupation_preconditioner: include the fractional occupation in the preconditioning + energy_gap: Guess for the band gap. For FULL_ALL, should be smaller than the + actual band gap, so simply using 0.01 is a robust value. Choosing a larger value + will help if you start with a bad initial guess though. For FULL_SINGLE_INVERSE, + energy_gap is treated as a lower bound. Values lower than 0.05 in this case can + lead to stability issues. + linesearch (str): From the manual: 1D line search algorithm to be used with the OT + minimizer, in increasing order of robustness and cost. MINIMIZER CG combined with + LINESEARCH GOLD should always find an electronic minimum. Whereas the 2PNT + minimizer is almost always OK, 3PNT might be needed for systems in which successive + OT CG steps do not decrease the total energy. + keywords: additional keywords + subsections: additional subsections """ self.minimizer = minimizer self.preconditioner = preconditioner @@ -1328,8 +1342,8 @@ def __init__( self.occupation_preconditioner = occupation_preconditioner self.energy_gap = energy_gap self.linesearch = linesearch - self.subsections = subsections or {} - self.kwargs = kwargs + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "Sets the various options for the orbital transformation (OT) method. " @@ -1343,7 +1357,7 @@ def __init__( + "metallic systems." ) - keywords = { + _keywords = { "MINIMIZER": Keyword("MINIMIZER", minimizer), "PRECONDITIONER": Keyword("PRECONDITIONER", preconditioner), "ENERGY_GAP": Keyword("ENERGY_GAP", energy_gap), @@ -1352,90 +1366,88 @@ def __init__( "ROTATION": Keyword("ROTATION", rotation), "OCCUPATION_PRECONDITIONER": Keyword("OCCUPATION_PRECONDITIONER", occupation_preconditioner), } - + keywords.update(_keywords) super().__init__( "OT", description=description, keywords=keywords, - subsections=self.subsections, + subsections=subsections, **kwargs, ) class Cell(Section): + """Defines the simulation cell (lattice)""" - """ - Defines the simulation cell (lattice) - """ - - def __init__(self, lattice: Lattice, **kwargs): + def __init__(self, lattice: Lattice, keywords: dict | None = None, **kwargs): """ Initialize the cell section. Args: lattice: pymatgen lattice object + keywords: additional keywords """ self.lattice = lattice - self.kwargs = kwargs - + keywords = keywords if keywords else {} description = "Lattice parameters and optional settings for creating a the CELL" - keywords = { + _keywords = { "A": Keyword("A", *lattice.matrix[0]), "B": Keyword("B", *lattice.matrix[1]), "C": Keyword("C", *lattice.matrix[2]), } - + keywords.update(_keywords) super().__init__("CELL", description=description, keywords=keywords, subsections={}, **kwargs) class Kind(Section): - - """ - Specifies the information for the different atom types being simulated. - """ + """Specifies the information for the different atom types being simulated.""" def __init__( self, specie: str, alias: str | None = None, magnetization: float = 0.0, - subsections: dict | None = None, - basis_set: str = "GTH_BASIS", - potential: str = "GTH_POTENTIALS", + basis_set: GaussianTypeOrbitalBasisSet | str | None = "GTH_BASIS", + potential: GthPotential | str | None = "GTH_POTENTIALS", ghost: bool = False, - aux_basis: str | None = None, + aux_basis: GaussianTypeOrbitalBasisSet | str | None = None, + keywords: dict | None = None, + subsections: dict | None = None, **kwargs, ): """ Initialize a KIND section Args: - specie (Species or Element): Object representing the atom. - alias (str): Alias for the atom, can be used for specifying modifications + specie: Object representing the atom. + alias: Alias for the atom, can be used for specifying modifications to certain atoms but not all, e.g. Mg_1 and Mg_2 to force difference oxidation states on the two atoms. - magnetization (float): From the CP2K Manual: The magnetization used + magnetization: From the CP2K Manual: The magnetization used in the atomic initial guess. Adds magnetization/2 spin-alpha electrons and removes magnetization/2 spin-beta electrons. - basis_set (str): Basis set for this atom, accessible from the + basis_set: Basis set for this atom, accessible from the basis set file specified - potential (str): Pseudopotential for this atom, accessible from the + potential: Pseudopotential for this atom, accessible from the potential file + ghost: Turn this into ghost atom (disaple the potential) + aux_basis: Auxiliary basis to use with ADMM + keywords: additional keywords + subsections: additional subsections kwargs: Additional kwargs to pass to Section() """ self.name = "KIND" self.specie = specie self.alias = alias self.magnetization = magnetization - self.subsections = subsections or {} self.basis_set = basis_set self.potential = potential self.ghost = ghost self.aux_basis = aux_basis - self.kwargs = kwargs - - self.description = "The description of this kind of atom including basis sets, element, etc." + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} + description = "The description of this kind of atom including basis sets, element, etc." # Special case for closed-shell elements. Cannot impose magnetization in cp2k. if Element(self.specie).Z in { @@ -1461,42 +1473,47 @@ def __init__( }: self.magnetization = 0 - keywords = { - "ELEMENT": Keyword("ELEMENT", str(specie)), + _keywords = { + "ELEMENT": Keyword("ELEMENT", specie.__str__()), "MAGNETIZATION": Keyword("MAGNETIZATION", magnetization), - "BASIS_SET": Keyword("BASIS_SET", basis_set), - "POTENTIAL": Keyword("POTENTIAL", potential), "GHOST": Keyword("GHOST", ghost), } + if basis_set: + _keywords["BASIS_SET"] = ( + Keyword("BASIS_SET", basis_set) if isinstance(basis_set, str) else basis_set.get_keyword() + ) + if potential: + _keywords["POTENTIAL"] = ( + Keyword("POTENTIAL", potential) if isinstance(potential, str) else potential.get_keyword() + ) if aux_basis: - keywords["BASIS_SET"] += Keyword("BASIS_SET", "AUX_FIT", aux_basis) - - kind_name = alias or str(specie) - self.alias = kind_name + _keywords["BASIS_SET"] += ( + Keyword("BASIS_SET", f"BASIS_SET AUX_FIT {aux_basis}") + if isinstance(aux_basis, str) + else aux_basis.get_keyword() + ) - self.section_parameters = [kind_name] - self.location = "FORCE_EVAL/SUBSYS/KIND" - self.verbose = True - self.repeats = False + kind_name = alias if alias else specie.__str__() + alias = kind_name + section_parameters = [kind_name] + location = "FORCE_EVAL/SUBSYS/KIND" + keywords.update(_keywords) super().__init__( name=self.name, - subsections=self.subsections, - description=self.description, + subsections=subsections, + description=description, keywords=keywords, - section_parameters=self.section_parameters, - alias=self.alias, - location=self.location, - verbose=self.verbose, - **self.kwargs, + section_parameters=section_parameters, + alias=alias, + location=location, + verbose=True, + **kwargs, ) class DftPlusU(Section): - - """ - Controls DFT+U for an atom kind - """ + """Controls DFT+U for an atom kind""" def __init__( self, @@ -1505,6 +1522,9 @@ def __init__( l=-1, u_minus_j=0, u_ramping=0, + keywords: dict | None = None, + subsections: dict | None = None, + **kwargs, ): """ Initialize the DftPlusU section. @@ -1515,134 +1535,156 @@ def __init__( l: (int) angular moment of the orbital to apply the +U correction u_minus_j: (float) the effective U parameter, Ueff = U-J u_ramping: (float) stepwise amount to increase during ramping until u_minus_j is reached + keywords: additional keywords + subsections: additional subsections """ - self.name = "DFT_PLUS_U" + name = "DFT_PLUS_U" self.eps_u_ramping = 1e-5 self.init_u_ramping_each_scf = False self.l = l self.u_minus_j = u_minus_j self.u_ramping = u_ramping - self.description = "Settings for on-site Hubbard +U correction for this atom kind." + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} + description = "Settings for on-site Hubbard +U correction for this atom kind." - keywords = { + _keywords = { "EPS_U_RAMPING": Keyword("EPS_U_RAMPING", eps_u_ramping), "INIT_U_RAMPING_EACH_SCF": Keyword("INIT_U_RAMPING_EACH_SCF", init_u_ramping_each_scf), "L": Keyword("L", l), "U_MINUS_J": Keyword("U_MINUS_J", u_minus_j), "U_RAMPING": Keyword("U_RAMPING", u_ramping), } - - super().__init__( - name=self.name, - subsections=None, - description=self.description, - keywords=keywords, - section_parameters=self.section_parameters, - alias=None, - location=None, - ) + keywords.update(_keywords) + super().__init__(name=name, subsections=None, description=description, keywords=keywords, **kwargs) class Coord(Section): - - """ - Specifies the coordinates of the atoms using a pymatgen structure object. - """ + """Specifies the coordinates of the atoms using a pymatgen structure object.""" def __init__( self, structure: Structure | Molecule, aliases: dict | None = None, + keywords: dict | None = None, subsections: dict | None = None, **kwargs, ): """ Args: structure: Pymatgen structure object - alias (bool): whether or not to identify the sites by Element + number so you can do things like - assign unique magnetization do different elements. + alias (bool): whether or not to identify the sites by Element + number so you can do + things like assign unique magnetization do different elements. + keywords: additional keywords + subsections: additional subsections """ self.structure = structure self.aliases = aliases - self.subsections = subsections or {} - self.kwargs = kwargs - + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "The coordinates for simple systems (like small QM cells) are specified " + "here by default using explicit XYZ coordinates. More complex systems " + "should be given via an external coordinate file in the SUBSYS%TOPOLOGY section." ) + if aliases: - keywords = { - k[0]: KeywordList([Keyword(k[0], *structure[i].coords) for i in k[1]]) - for k in sorted(aliases.items(), key=lambda x: x[1]) - } - else: - keywords = { - ss: KeywordList([Keyword(s.specie.symbol, *s.coords) for s in structure.sites if s.specie.symbol == ss]) - for ss in structure.symbol_set - } + aliases = {index: kind for kind, indices in aliases.items() for index in indices} + + keywords = { + i: Keyword(aliases[i] if aliases else structure[i].species_string, *structure[i].coords) + for i in range(len(structure)) + } super().__init__( name="COORD", description=description, keywords=keywords, - alias=None, - subsections=self.subsections, + subsections=subsections, **kwargs, ) -class PDOS(Section): +class DOS(Section): + """Controls printing of the density of states.""" + def __init__(self, ndigits: int = 6, keywords: dict | None = None, subsections: dict | None = None, **kwargs): + """ + Initialize the DOS section + + Args: + ndigits: how many digits of precision to print. As of 2022.1, + this is necessary to not lose information. + keywords: additional keywords + subsections: additional subsections + """ + self.ndigits = ndigits + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} + description = "Controls printing of the overall density of states" + _keywords = {"NDIGITS": Keyword("NDIGITS", ndigits)} + keywords.update(_keywords) + super().__init__("DOS", description=description, keywords=keywords, subsections=subsections, **kwargs) + + +class PDOS(Section): """ Controls printing of projected density of states onto the different atom KINDS (elemental decomposed DOS). """ - def __init__(self, nlumo: int = -1, **kwargs): + def __init__(self, nlumo: int = -1, keywords: dict | None = None, subsections: dict | None = None, **kwargs): """ Initialize the PDOS section Args: nlumo: how many unoccupied orbitals to include (-1==ALL) + keywords: additional keywords + subsections: additional subsections """ self.nlumo = nlumo - self.kwargs = kwargs - + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "Controls printing of the projected density of states" - keywords = { + _keywords = { "NLUMO": Keyword("NLUMO", nlumo), "COMPONENTS": Keyword("COMPONENTS"), } - - super().__init__("PDOS", description=description, keywords=keywords, subsections={}, **kwargs) + keywords.update(_keywords) + super().__init__("PDOS", description=description, keywords=keywords, subsections=subsections, **kwargs) class LDOS(Section): - """ Controls printing of the LDOS (List-Density of states). i.e. projects onto specific atoms. """ - def __init__(self, index: int = 1, alias: str | None = None, **kwargs): + def __init__( + self, + index: int = 1, + alias: str | None = None, + keywords: dict | None = None, + subsections: dict | None = None, + **kwargs, + ): """ Initialize the LDOS section Args: index: Index of the atom to project onto + alias: section alias + keywords: additional keywords + subsections: additional subsections """ self.index = index - self.alias = alias - self.kwargs = kwargs - + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "Controls printing of the projected density of states decomposed by atom type" - - keywords = {"COMPONENTS": Keyword("COMPONENTS"), "LIST": Keyword("LIST", index)} - + _keywords = {"COMPONENTS": Keyword("COMPONENTS"), "LIST": Keyword("LIST", index)} + keywords.update(_keywords) super().__init__( "LDOS", - subsections={}, + subsections=subsections, alias=alias, description=description, keywords=keywords, @@ -1651,27 +1693,19 @@ def __init__(self, index: int = 1, alias: str | None = None, **kwargs): class V_Hartree_Cube(Section): + """Controls printing of the hartree potential as a cube file.""" - """ - Controls printing of the hartree potential as a cube file. - """ - - def __init__(self, keywords=None, **kwargs): - """ - Initialize the V_HARTREE_CUBE section - """ - self.keywords = keywords or {} - self.kwargs = kwargs - + def __init__(self, keywords: dict | None = None, subsections: dict | None = None, **kwargs): + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "Controls the printing of a cube file with eletrostatic potential generated by " + "the total density (electrons+ions). It is valid only for QS with GPW formalism. " - + "Note that by convention the potential has opposite sign than the expected physical one." + + "Note: by convention the potential has opposite sign than the expected physical one." ) - super().__init__( "V_HARTREE_CUBE", - subsections={}, + subsections=subsections, description=description, keywords=keywords, **kwargs, @@ -1679,32 +1713,37 @@ def __init__(self, keywords=None, **kwargs): class MO_Cubes(Section): + """Controls printing of the molecular orbital eigenvalues""" - """ - Controls printing of the molecular orbital eigenvalues - """ - - def __init__(self, write_cube: bool = False, nhomo: int = 1, nlumo: int = 1, **kwargs): + def __init__( + self, + write_cube: bool = False, + nhomo: int = 1, + nlumo: int = 1, + keywords: dict | None = None, + subsections: dict | None = None, + **kwargs, + ): """ Initialize the MO_CUBES section """ self.write_cube = write_cube self.nhomo = nhomo self.nlumo = nlumo - self.kwargs = kwargs - + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "Controls the printing of a cube file with eletrostatic potential generated by " + "the total density (electrons+ions). It is valid only for QS with GPW formalism. " - + "Note that by convention the potential has opposite sign than the expected physical one." + + "Note: by convention the potential has opposite sign than the expected physical one." ) - keywords = { + _keywords = { "WRITE_CUBES": Keyword("WRITE_CUBE", write_cube), "NHOMO": Keyword("NHOMO", nhomo), "NLUMO": Keyword("NLUMO", nlumo), } - + keywords.update(_keywords) super().__init__( "MO_CUBES", subsections={}, @@ -1715,18 +1754,11 @@ def __init__(self, write_cube: bool = False, nhomo: int = 1, nlumo: int = 1, **k class E_Density_Cube(Section): + """Controls printing of the electron density cube file""" - """ - Controls printing of the electron density cube file - """ - - def __init__(self, keywords=None, **kwargs): - """ - Initialize the E_DENSITY_CUBE Section - """ - self.keywords = keywords or {} - self.kwargs = kwargs - + def __init__(self, keywords: dict | None = None, subsections: dict | None = None, **kwargs): + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = ( "Controls the printing of cube files with the electronic density and, for LSD " + "calculations, the spin density." @@ -1734,7 +1766,7 @@ def __init__(self, keywords=None, **kwargs): super().__init__( "E_DENSITY_CUBE", - subsections={}, + subsections=subsections, description=description, keywords=keywords, **kwargs, @@ -1742,45 +1774,40 @@ def __init__(self, keywords=None, **kwargs): class Smear(Section): - - """ - Control electron smearing - """ + """Control electron smearing""" def __init__( self, elec_temp: int | float = 300, method: str = "FERMI_DIRAC", fixed_magnetic_moment: float = -1e2, + keywords: dict | None = None, + subsections: dict | None = None, **kwargs, ): - """ - Initialize the SMEAR section - """ self.elec_temp = elec_temp self.method = method self.fixed_magnetic_moment = fixed_magnetic_moment - self.kwargs = kwargs - + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} description = "Activates smearing of electron occupations" - keywords = { + _keywords = { "ELEC_TEMP": Keyword("ELEC_TEMP", elec_temp), "METHOD": Keyword("METHOD", method), "FIXED_MAGNETIC_MOMENT": Keyword("FIXED_MAGNETIC_MOMENT", fixed_magnetic_moment), } - + keywords.update(_keywords) super().__init__( "SMEAR", description=description, keywords=keywords, - subsections={}, + subsections=subsections, **kwargs, ) class BrokenSymmetry(Section): - """ Define the required atomic orbital occupation assigned in initialization of the density matrix, by adding or subtracting electrons from specific @@ -1815,7 +1842,6 @@ def __init__( self.l_beta = l_beta self.n_beta = n_beta self.nel_beta = nel_beta - description = ( "Define the required atomic orbital occupation assigned in initialization " + "of the density matrix, by adding or subtracting electrons from specific " @@ -1916,27 +1942,27 @@ def f3(x): class Xc_Functional(Section): + """Defines the XC functional(s) to use.""" - """ - Defines the XC functional(s) to use. - """ - - def __init__(self, functionals: Iterable | None = None, subsections: dict | None = None, **kwargs): - """ - Initialize the XC_FUNCTIONAL class - """ - self.functionals = functionals or [] - self.subsections = subsections or {} - self.kwargs = kwargs - + def __init__( + self, + functionals: Iterable | None = None, + keywords: dict | None = None, + subsections: dict | None = None, + **kwargs, + ): + self.functionals = functionals if functionals else [] + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} location = "CP2K_INPUT/FORCE_EVAL/DFT/XC/XC_FUNCTIONAL" for functional in self.functionals: - self.subsections[functional] = Section(functional, subsections={}, repeats=False) + subsections[functional] = Section(functional, subsections={}, repeats=False) super().__init__( "XC_FUNCTIONAL", - subsections=self.subsections, + subsections=subsections, + keywords=keywords, location=location, repeats=False, **kwargs, @@ -1944,16 +1970,15 @@ def __init__(self, functionals: Iterable | None = None, subsections: dict | None class PBE(Section): - - """ - Info about the PBE functional. - """ + """Info about the PBE functional.""" def __init__( self, parameterization: str = "ORIG", scale_c: float | int = 1, scale_x: float | int = 1, + keywords: dict | None = None, + subsections: dict | None = None, ): """ Args: @@ -1963,22 +1988,26 @@ def __init__( REVPBE: revised PBE scale_c (float): scales the correlation part of the functional. scale_x (float): scales the exchange part of the functional. + keywords: additional keywords + subsections: additional subsections """ self.parameterization = parameterization self.scale_c = scale_c self.scale_x = scale_x + keywords = keywords if keywords else {} + subsections = subsections if subsections else {} location = "CP2K_INPUT/FORCE_EVAL/DFT/XC/XC_FUNCTIONAL/PBE" - keywords = { + _keywords = { "PARAMETRIZATION": Keyword("PARAMETRIZATION", parameterization), "SCALE_C": Keyword("SCALE_C", scale_c), "SCALE_X": Keyword("SCALE_X", scale_x), } - + keywords.update(_keywords) super().__init__( "PBE", - subsections={}, + subsections=subsections, repeats=False, location=location, section_parameters=[], @@ -1987,10 +2016,7 @@ def __init__( class Kpoints(Section): - - """ - Description of the k-points to use for the calculation. - """ + """Description of the k-points to use for the calculation.""" def __init__( self, @@ -2035,7 +2061,7 @@ def __init__( keywords = {} self.kpts = kpts - self.weights = weights or [1] * len(kpts) + self.weights = weights if weights else [1] * len(kpts) assert len(self.kpts) == len(self.weights) self.eps_geo = eps_geo self.full_grid = full_grid @@ -2075,7 +2101,7 @@ def __init__( ) @classmethod - def from_kpoints(cls, kpoints, structure=None, reduce=True): + def from_kpoints(cls, kpoints: VaspKpoints, structure=None): """ Initialize the section from a Kpoints object (pymatgen.io.vasp.inputs). CP2K does not have an automatic gamma-point constructor, so this is generally used @@ -2090,28 +2116,787 @@ def from_kpoints(cls, kpoints, structure=None, reduce=True): reduce: whether or not to reduce the grid using symmetry. CP2K itself cannot do this automatically without spglib present at execution time. """ - k = kpoints.as_dict() - kpoints = k["kpoints"] - weights = k["kpts_weights"] - scheme = k["generation_style"] + kpts = kpoints.kpts + weights = kpoints.kpts_weights - if reduce and structure: - sga = SpacegroupAnalyzer(structure) - kpoints, weights = zip(*sga.get_ir_reciprocal_mesh(mesh=kpoints)) - kpoints = list(itertools.chain.from_iterable(kpoints)) + if kpoints.style == Kpoints_supported_modes.Monkhorst: + k = kpts[0] + if isinstance(k, (int, float)): + x, y, z = k, k, k + else: + x, y, z = k + scheme = f"MONKHORST-PACK {x} {y} {z}" + units = "B_VECTOR" + elif kpoints.style == Kpoints_supported_modes.Reciprocal: + units = "B_VECTOR" scheme = "GENERAL" - elif scheme.lower() == "monkhorst": - scheme = "MONKHORST-PACK" - else: - warnings.warn("No automatic constructor for this scheme" "defaulting to monkhorst-pack grid.") - scheme = "MONKHORST-PACK" - units = k["coord_type"] - if k["coord_type"]: - if k["coord_type"].lower() == "reciprocal": + elif kpoints.style == Kpoints_supported_modes.Cartesian: + units = "CART_ANGSTROM" + scheme = "GENERAL" + elif kpoints.style == Kpoints_supported_modes.Gamma: + if (isinstance(kpts[0], Iterable) and tuple(kpts[0]) == (1, 1, 1)) or ( + isinstance(kpts[0], (float, int)) and int(kpts[0]) == 1 + ): + scheme = "GAMMA" units = "B_VECTOR" - elif k["coord_type"].lower() == "cartesian": - units = "CART_ANGSTROM" - else: + elif not structure: + raise ValueError( + "No cp2k automatic gamma constructor. " "A structure is required to construct from spglib" + ) + else: + sga = SpacegroupAnalyzer(structure) + _kpts, weights = zip(*sga.get_ir_reciprocal_mesh(mesh=kpts)) + kpts = list(itertools.chain.from_iterable(_kpts)) + scheme = "GENERAL" + units = "B_VECTOR" + elif kpoints.style == Kpoints_supported_modes.Line_mode: + scheme = "GENERAL" units = "B_VECTOR" + else: + raise ValueError("Unrecognized k-point style") + return Kpoints(kpts=kpts, weights=weights, scheme=scheme, units=units) + + +class Kpoint_Set(Section): + """Specifies a kpoint line to be calculated between special points.""" + + def __init__(self, npoints: int, kpoints: Iterable, units: str = "B_VECTOR") -> None: + """ + Args: + npoints (int): Number of kpoints along the line. + kpoints: A dictionary of {label: kpoint} kpoints defining the path + units (str): Units for the kpoint coordinates. + Options: "B_VECTOR" (reciprocal coordinates) + "CART_ANGSTROM" (units of 2*Pi/Angstrom) + "CART_BOHR" (units of 2*Pi/Bohr) + """ + self.npoints = npoints + self.kpoints = kpoints + self.units = units + + keywords = { + "NPOINTS": Keyword("NPOINTS", npoints), + "UNITS": Keyword("UNITS", units), + "SPECIAL_POINT": KeywordList( + [ + Keyword("SPECIAL_POINT", "Gamma" if label.upper() == "\\GAMMA" else label, *kpt) + for label, kpt in kpoints + ] + ), + } + + super().__init__( + name="KPOINT_SET", + subsections=None, + repeats=True, + description="Specifies a single k-point line for band structure calculations", + keywords=keywords, + ) + + +class Band_Structure(Section): + """Specifies high symmetry paths for outputing the band structure in CP2K.""" + + def __init__( + self, + kpoint_sets: Sequence[Kpoint_Set], + filename: str = "BAND.bs", + added_mos: int = -1, + keywords: dict | None = None, + subsections: dict | None = None, + ): + """ + Args: + kpoint_sets: Sequence of Kpoint_Set objects for the band structure calculation. + filename: Filename for the band structure output + added_mos: Added (unoccupied) molecular orbitals for the calculation. + keywords: additional keywords + subsections: additional subsections + """ + self.kpoint_sets = SectionList(kpoint_sets) + self.filename = filename + self.added_mos = added_mos + keywords = keywords if keywords else {} + _keywords = { + "FILE_NAME": Keyword("FILE_NAME", filename), + "ADDED_MOS": Keyword("ADDED_MOS", added_mos), + } + keywords.update(_keywords) + super().__init__( + name="BAND_STRUCTURE", + subsections={"KPOINT_SET": self.kpoint_sets}, + repeats=False, + description="Controls printing of band structure calculation", + keywords=keywords, + ) + + # TODO kpoints objects are defined in the vasp module instead of a code agnostic module + # if this changes in the future as other codes are added, then this will need to change + @staticmethod + def from_kpoints(kpoints: VaspKpoints, kpoints_line_density=20): + """ + Initialize band structure section from a line-mode Kpoint object + + Args: + kpoints: a kpoint object from the vasp module, which was constructed in line mode + kpoints_line_density: Number of kpoints along each path + """ + if kpoints.style == Kpoints_supported_modes.Line_mode: + + def pairwise(iterable): + a = iter(iterable) + return zip(a, a) + + kpoint_sets = [ + Kpoint_Set( + npoints=kpoints_line_density, + kpoints=[(lbls[0], kpts[0]), (lbls[1], kpts[1])], + units="B_VECTOR", + ) + for lbls, kpts in zip(pairwise(kpoints.labels), pairwise(kpoints.kpts)) + ] + elif kpoints.style in ( + Kpoints_supported_modes.Reciprocal, + Kpoints_supported_modes.Cartesian, + ): + kpoint_sets = [ + Kpoint_Set( + npoints=1, + kpoints=[("None", kpts) for kpts in kpoints.kpts], + units="B_VECTOR" if kpoints.coord_type == "Reciprocal" else "CART_ANGSTROM", + ) + ] + else: + raise ValueError( + "Unsupported k-point style. Must be line-mode or explicit k-points (reciprocal/cartesian)." + ) + return Band_Structure(kpoint_sets=kpoint_sets, filename="BAND.bs") + + +@dataclass +class BasisInfo(MSONable): + """ + Summary info about a basis set + + Attributes: + electrons: Number of electrons + core: Number of basis functions per core electron + valence: Number of basis functions per valence electron OR number of exp if it + is a FIT formatted admm basis + polarization: Number of polarization functions + diffuse: Number of added, diffuse/augmentation functions + cc: Correlation consistent + pc: Polarization consistent + sr: Short-range optimized + molopt: Optimized for molecules/solids + admm: Whether this is an auxiliary basis set for ADMM + lri: Whether this is a local resolution of identity auxiliary basis + contracted: Whether this basis set is contracted + xc: Exchange correlation functional used for creating this potential + """ + + electrons: int | None = None + core: int | None = None + valence: int | None = None + polarization: int | None = None + diffuse: int | None = None + cc: bool | None = False + pc: bool | None = False + sr: bool | None = False + molopt: bool | None = False + admm: bool | None = False + lri: bool | None = False + contracted: bool | None = None + xc: str | None = None + + def softmatch(self, other): + """ + Soft matching to see if two basis sets match. + + Will only match those attributes which *are* defined for this basis info object (one way checking) + """ + if not isinstance(other, BasisInfo): + return False + d1 = self.as_dict() + d2 = other.as_dict() + for k, v in d1.items(): + if v is not None and v != d2[k]: + return False + return True + + @classmethod + def from_string(cls, string: str) -> BasisInfo: + """Get summary info from a string""" + string = string.upper() + data = {} # type: dict[str, Any] + data["cc"] = "CC" in string + string = string.replace("CC", "") + data["pc"] = "PC" in string + string = string.replace("PC", "") + data["sr"] = "SR" in string + string = string.replace("SR", "") + data["molopt"] = "MOLOPT" in string + string = string.replace("MOLOPT", "") + for x in ("LDA", "PADE", "MGGA", "GGA", "HF", "PBE0", "PBE", "BP", "BLYP", "B3LYP", "SCAN"): + if x in string: + data["xc"] = x + string = string.replace(x, "") + break + + tmp = {"S": 1, "D": 2, "T": 3, "Q": 4} + if "ADMM" in string or "FIT" in string: + data["admm"] = True + bool_core = False + data["contracted"] = "C" in string + nums = "".join(s for s in string if s.isnumeric()) + data["valence"] = int(nums) if nums else None + else: + data["admm"] = False + if "LRI" in string: + data["lri"] = True + bool_core = "V" not in string or "ALL" in string + + data["polarization"] = string.count("P") + data["diffuse"] = string.count("X") + string = "#" + string + for i, s in enumerate(string): + if s == "Z": + z = int(tmp.get(string[i - 1], string[i - 1])) + data["core"] = z if bool_core else None + data["valence"] = z + elif s == "P" and string[i - 1].isnumeric(): + data["polarization"] = int(string[i - 1]) + elif s == "X" and string[i - 1].isnumeric(): + data["diffuse"] = int(string[i - 1]) + elif s == "Q" and string[i + 1].isnumeric(): + data["electrons"] = int("".join(_ for _ in string[i + 1 :] if _.isnumeric())) + + if not data["diffuse"]: + data["diffuse"] = string.count("AUG") + + return cls(**data) + + +@dataclass +class AtomicMetadata(MSONable): + """ + Metadata for basis sets and potentials in cp2k + + Attributes: + info: Info about this object + element: Element for this object + potential: The potential for this object + name: Name of the object + alias_names: Optional aliases + filename: Name of the file containing this object + version: Version + """ + + info: BasisInfo | PotentialInfo | None = None + element: Element | None = None + potential: Literal["All Electron", "Pseudopotential"] | None = None + name: str | None = None + alias_names: list = field(default_factory=list) + filename: str | None = None + version: str | None = None + + def softmatch(self, other): + """ + Soft matching to see if a desired basis/potential matches requirements. + + Does soft matching on the "info" attribute first. Then soft matches against the + element and name/aliases. + """ + if not isinstance(other, type(self)): + return False + if self.info and not self.info.softmatch(other.info): + return False + if self.element is not None and self.element != other.element: + return False + if self.potential is not None and self.potential != other.potential: + return False + this_names = [self.name] + if self.alias_names: + this_names.extend(self.alias_names) + other_names = [other.name] + if other.alias_names: + other_names.extend(other.alias_names) + for nm in this_names: + if nm is not None and nm not in other_names: + return False + return True + + def get_hash(self) -> str: + """Get a hash of this object""" + return md5(self.get_string().lower().encode("utf-8")).hexdigest() + + def get_string(self): + """Get string representation""" + return str(self) + + +@dataclass +class GaussianTypeOrbitalBasisSet(AtomicMetadata): + """ + Model definition of a GTO basis set + + Attributes: + info: Cardinality of this basis + nset: Number of exponent sets + n: Principle quantum number for each set + lmax: Maximum angular momentum quantum number for each set + lmin: Minimum angular momentum quantum number for each set + nshell: Number of shells for angular momentum l for each set + exponents: Exponents for each set + coefficients: Contraction coefficients for each set. Dict[exp->l->shell] + """ + + info: BasisInfo | None = None + nset: int | None = None + n: list[int] | None = None + lmax: list[int] | None = None + lmin: list[int] | None = None + nshell: list[dict[int, int]] | None = None + exponents: list[list[float]] | None = None + coefficients: list[dict[int, dict[int, dict[int, float]]]] | None = None + + def __post_init__(self) -> None: + if self.info and self.potential == "All Electron" and self.element: + self.info.electrons = self.element.Z + if self.name == "ALLELECTRON": + self.name = "ALL" # cp2k won't parse ALLELECTRON for some reason + + def cast(d): + new = {} + for k, v in d.items(): + if isinstance(v, dict): + v = cast(v) + new[int(k)] = v + return new + + if self.nshell: + self.nshell = [cast(n) for n in self.nshell] + if self.coefficients: + self.coefficients = [cast(c) for c in self.coefficients] + + def get_keyword(self) -> Keyword: + """Convert basis to keyword object""" + if not self.name: + raise ValueError("No name attribute. Cannot create keyword") + vals: Any = [] + if self.info and self.info.admm: + vals.append("AUX_FIT") + vals.append(self.name) + return Keyword("BASIS_SET", *vals) + + @property + def nexp(self): + """Number of exponents""" + return [len(e) for e in self.exponents] + + def get_string(self) -> str: + """Get standard cp2k GTO formatted string""" + if ( + self.info is None + or self.nset is None + or self.n is None + or self.lmax is None + or self.lmin is None + or self.nshell is None + or self.exponents is None + or self.coefficients is None + ): + raise ValueError("Must have all attributes defined to get string representation") + + s = f"{str(self.element)} {self.name} {' '.join(self.alias_names)}\n" + s += f"{str(self.nset)}\n" + for set_index in range(self.nset): + s += ( + f"{str(self.n[set_index])} " + f"{str(self.lmin[set_index])} " + f"{str(self.lmax[set_index])} " + f"{str(self.nexp[set_index])} " + f"{' '.join(map(str, self.nshell[set_index].values()))}\n" + ) + for exp in self.coefficients[set_index]: + s += f"\t {self.exponents[set_index][exp]: .14f} " + for l in self.coefficients[set_index][exp]: + for shell in self.coefficients[set_index][exp][l]: + s += f"{self.coefficients[set_index][exp][l][shell]: .14f} " + s += "\n" + return s + + @classmethod + def from_string(cls, string: str) -> GaussianTypeOrbitalBasisSet: + """ + Read from standard cp2k GTO formatted string + """ + lines = [line for line in string.split("\n") if line] + firstline = lines[0].split() + element = Element(firstline[0]) + names = firstline[1:] + name, aliases = names[0], names[1:] + _info = BasisInfo.from_string(name).as_dict() + for alias in aliases: + for k, v in BasisInfo.from_string(alias).as_dict().items(): + if _info[k] is None: + _info[k] = v + info = BasisInfo.from_dict(_info) + potential: Literal["All Electron", "Pseudopotential"] + if any("ALL" in x for x in [name] + aliases): + info.electrons = element.Z + potential = "All Electron" + else: + potential = "Pseudopotential" + nset = int(lines[1].split()[0]) + n = [] + lmin = [] + lmax = [] + nshell = [] + exponents: list[list[float]] = [] + coefficients: list[dict[int, dict[int, dict[int, float]]]] = [] + + line_index = 2 + for set_index in range(nset): + + setinfo = lines[line_index].split() + _n, _lmin, _lmax, _nexp = map(int, setinfo[0:4]) + n.append(_n) + lmin.append(_lmin) + lmax.append(_lmax) + + _nshell = map(int, setinfo[4:]) + nshell.append({l: int(next(_nshell, 0)) for l in range(_lmin, _lmax + 1)}) + exponents.append([]) + coefficients.append({i: {l: {} for l in range(_lmin, _lmax + 1)} for i in range(_nexp)}) + line_index += 1 + + for i in range(_nexp): + line = lines[line_index].split() + exponents[set_index].append(float(line[0])) + coeffs = list(map(float, line[1:])) + + j = 0 + for l in range(_lmin, _lmax + 1): + for shell in range(nshell[set_index][l]): + coefficients[set_index][i][l][shell] = coeffs[j] + j += 1 + + line_index += 1 + + return cls( + element=element, + name=name, + alias_names=aliases, + info=info, + potential=potential, + nset=nset, + n=n, + lmin=lmin, + lmax=lmax, + nshell=nshell, + exponents=exponents, + coefficients=coefficients, + ) + + +@dataclass +class PotentialInfo(MSONable): + """ + Metadata for this potential + + Attributes: + electrons: Total number of electrons + potential_type: Potential type (e.g. GTH) + nlcc: Nonlinear core corrected potential + xc: Exchange correlation functional used for creating this potential + """ + + electrons: int | None = None + potential_type: str | None = None + nlcc: bool | None = None + xc: str | None = None + + def softmatch(self, other): + """ + Soft matching to see if two potentials match. - return Kpoints(kpts=kpoints, weights=weights, scheme=scheme, units=units) + Will only match those attributes which *are* defined for this basis info object (one way checking) + """ + if not isinstance(other, PotentialInfo): + return False + d1 = self.as_dict() + d2 = other.as_dict() + for k, v in d1.items(): + if v is not None and v != d2[k]: + return False + return True + + @classmethod + def from_string(cls, string): + """Get a cp2k formatted string representation""" + string = string.upper() + data = {} + if "NLCC" in string: + data["nlcc"] = True + if "GTH" in string: + data["potential_type"] = "GTH" + for i, s in enumerate(string): + if s == "Q" and string[i + 1].isnumeric(): + data["electrons"] = int("".join(_ for _ in string[i + 1 :] if _.isnumeric())) + + for x in ("LDA", "PADA", "MGGA", "GGA", "HF", "PBE0", "PBE", "BP", "BLYP", "B3LYP", "SCAN"): + if x in string: + data["xc"] = x + break + + return cls(**data) + + +@dataclass +class GthPotential(AtomicMetadata): + """ + Representation of GTH-type (pseudo)potential + + Attributes: + info: Info about this potential + n_elecs: Number of electrons for each quantum number + r_loc: Radius of local projectors + nexp_ppl: Number of the local pseudopotential functions + c_exp_ppl: Sequence = field(None, description="Coefficients of the local pseudopotential functions + radii: Radius of the nonlocal part for angular momentum quantum number l defined by the Gaussian + function exponents alpha_prj_ppnl + nprj: Number of projectors + nprj_ppnl: Number of the non-local projectors for the angular momentum quantum number + hprj_ppnl: Coefficients of the non-local projector functions. Coeff ij for ang momentum l + ) + """ + + info: PotentialInfo + n_elecs: dict[int, int] | None = None + r_loc: float | None = None + nexp_ppl: int | None = None + c_exp_ppl: Sequence | None = None + radii: dict[int, float] | None = None + nprj: int | None = None + nprj_ppnl: dict[int, int] | None = None + hprj_ppnl: dict[int, dict[int, dict[int, float]]] | None = None + + def __post_init__(self) -> None: + if self.potential == "All Electron" and self.element: + self.info.electrons = self.element.Z + if self.name == "ALLELECTRON": + self.name = "ALL" # cp2k won't parse ALLELECTRON for some reason + + def cast(d): + new = {} + for k, v in d.items(): + if isinstance(v, dict): + v = cast(v) + new[int(k)] = v + return new + + if self.n_elecs: + self.n_elecs = cast(self.n_elecs) + if self.radii: + self.radii = cast(self.radii) + if self.nprj_ppnl: + self.nprj_ppnl = cast(self.nprj_ppnl) + if self.hprj_ppnl: + self.hprj_ppnl = cast(self.hprj_ppnl) + + def get_keyword(self) -> Keyword: + """Get keyword object for the potential""" + if self.name is None: + raise ValueError("Cannot get keyword without name attribute") + + return Keyword("POTENTIAL", self.name) + + def get_section(self) -> Section: + """ + Convert model to a GTH-formatted section object for input files + """ + if self.name is None: + raise ValueError("Cannot get section without name attribute") + + keywords = {"POTENTIAL": Keyword("", self.get_string())} + return Section( + name=self.name, + section_parameters=None, + subsections=None, + description="Manual definition of GTH Potential", + keywords=keywords, + ) + + @classmethod + def from_section(cls, section: Section) -> GthPotential: + """ + Extract GTH-formatted string from a section and convert it to model + """ + sec = copy.deepcopy(section) + sec.verbosity(False) + s = sec.get_string() + s = [_ for _ in s.split("\n") if not _.startswith("&")] + s = "\n".join(s) + return cls.from_string(s) + + def get_string(self): + """ + Convert model to a GTH-formatted string + """ + if ( + self.info is None + or self.n_elecs is None + or self.r_loc is None + or self.nexp_ppl is None + or self.c_exp_ppl is None + or self.radii is None + or self.nprj is None + or self.nprj_ppnl is None + or self.hprj_ppnl is None + ): + raise ValueError("Must initialize all attributes in order to get string") + + s = f"{str(self.element)} {self.name} {' '.join(self.alias_names)}\n" + s += f"{' '.join(str(self.n_elecs[i]) for i in range(len(self.n_elecs)))}\n" + s += f"{self.r_loc: .14f} {str(self.nexp_ppl)} " + for i in range(self.nexp_ppl): + s += f"{self.c_exp_ppl[i]: .14f} " + s += "\n" + s += f"{self.nprj} \n" + for l in range(self.nprj): + total_fill = self.nprj_ppnl[l] * 20 + 24 + tmp = f"{self.radii[l]: .14f} {self.nprj_ppnl[l]: d}" + s += f"{tmp:>{''}{24}}" + for i in range(self.nprj_ppnl[l]): + k = total_fill - 24 if i == 0 else total_fill + tmp = " ".join(f"{v: .14f}" for v in self.hprj_ppnl[l][i].values()) + s += f"{tmp:>{''}{k}}" + s += "\n" + return s + + @classmethod + def from_string(cls, string): + """ + Initialize model from a GTH formatted string + """ + lines = [line for line in string.split("\n") if line] + firstline = lines[0].split() + element, name, aliases = firstline[0], firstline[1], firstline[2:] + info = PotentialInfo.from_string(name).as_dict() + for alias in aliases: + for k, v in PotentialInfo.from_string(alias).as_dict().items(): + if info[k] is None: + info[k] = v + info = PotentialInfo.from_dict(info) + potential: Literal["All Electron", "Pseudopotential"] + if any("ALL" in x for x in [name] + aliases): + potential = "All Electron" + info.electrons = Element(element).Z + else: + potential = "Pseudopotential" + nelecs = {i: int(n) for i, n in enumerate(lines[1].split())} + info.electrons = sum(nelecs.values()) # override, more reliable than name + thirdline = lines[2].split() + r_loc, nexp_ppl, c_exp_ppl = ( + float(thirdline[0]), + int(thirdline[1]), + list(map(float, thirdline[2:])), + ) + nprj = int(lines[3].split()[0]) if len(lines) > 3 else 0 + + radii = {} + nprj_ppnl = {} + hprj_ppnl = {} + lines = lines[4:] + i = 0 + l = 0 + L = 0 + + while l < nprj: + line = lines[i].split() + radii[l] = float(line[0]) + nprj_ppnl[l] = int(line[1]) + hprj_ppnl[l] = {x: {} for x in range(nprj_ppnl[l])} + line = list(map(float, line[2:])) + hprj_ppnl[l][0] = {j: float(ln) for j, ln in enumerate(line)} + + L = 1 + i += 1 + while L < nprj_ppnl[l]: + line2 = list(map(float, lines[i].split())) + hprj_ppnl[l][L] = {j: float(ln) for j, ln in enumerate(line2)} + i += 1 + L += 1 + l += 1 + + return cls( + element=Element(element), + name=name, + alias_names=aliases, + potential=potential, + n_elecs=nelecs, + r_loc=r_loc, + nexp_ppl=nexp_ppl, + c_exp_ppl=c_exp_ppl, + info=info, + radii=radii, + nprj=nprj, + nprj_ppnl=nprj_ppnl, + hprj_ppnl=hprj_ppnl, + ) + + +@dataclass +class DataFile(MSONable): + """A data file for a cp2k calc.""" + + objects: Sequence | None = None + + @classmethod + def from_file(cls, fn): + """Load from a file""" + with open(fn) as f: + data = cls.from_string(f.read()) + for obj in data.objects: + obj.filename = fn + return data + + @classmethod + def from_string(cls): + """Initialize from a string""" + raise NotImplementedError + + def write_file(self, fn): + """Write to a file""" + with open(fn, "w") as f: + f.write(self.get_string()) + + def get_string(self): + """Get string representation""" + return "\n".join(b.get_string() for b in self.objects) + + def __str__(self): + return self.get_string() + + +@dataclass +class BasisFile(DataFile): + """Data file for basis sets only""" + + @classmethod + def from_string(cls, string): + """Initialize from a string representation""" + basis_sets = [GaussianTypeOrbitalBasisSet.from_string(c) for c in chunk(string)] + return cls(objects=basis_sets) + + +@dataclass +class PotentialFile(DataFile): + """Data file for potentials only""" + + @classmethod + def from_string(cls, string): + """Initialize from a string representation""" + basis_sets = [GthPotential.from_string(c) for c in chunk(string)] + return cls(objects=basis_sets) diff --git a/pymatgen/io/cp2k/outputs.py b/pymatgen/io/cp2k/outputs.py index 4c0f69fec20..e5510e2fbd6 100644 --- a/pymatgen/io/cp2k/outputs.py +++ b/pymatgen/io/cp2k/outputs.py @@ -4,6 +4,7 @@ """ This module defines the Cp2k output parser along with a few other functions for parsing cp2k-related outputs. + """ import glob @@ -21,14 +22,19 @@ from pymatgen.core.structure import Molecule, Structure from pymatgen.core.units import Ha_to_eV +from pymatgen.electronic_structure.bandstructure import ( + BandStructure, + BandStructureSymmLine, +) from pymatgen.electronic_structure.core import Orbital, Spin from pymatgen.electronic_structure.dos import CompleteDos, Dos +from pymatgen.io.cp2k.inputs import Keyword from pymatgen.io.cp2k.sets import Cp2kInput -from pymatgen.io.cp2k.utils import _postprocessor, natural_keys +from pymatgen.io.cp2k.utils import natural_keys, postprocessor from pymatgen.io.xyz import XYZ __author__ = "Nicholas Winner" -__version__ = "1.0" +__version__ = "2.0" __status__ = "Production" logger = logging.getLogger(__name__) @@ -36,9 +42,9 @@ class Cp2kOutput: """ - Class for parsing output file from CP2K. The CP2K output file is very flexible in the way that it is returned. - This class will automatically parse parameters that should always be present, but other parsing features may be - called depending on the run type. + Class for parsing output file from CP2K. The CP2K output file is very flexible in the way that + it is returned. This class will automatically parse parameters that should always be present, + but other parsing features may be called depending on the run type. """ def __init__(self, filename, verbose=False, auto_load=False): @@ -47,8 +53,10 @@ def __init__(self, filename, verbose=False, auto_load=False): Args: filename: (str) Name of the CP2K output file to parse - verbose: (bool) Whether or not to parse with verbosity (will parse lots of data that may not be useful) - auto_load (bool): Whether or not to automatically load basic info like energies and structures. + verbose: (bool) Whether or not to parse with verbosity (will parse lots of data that + may not be useful) + auto_load (bool): Whether or not to automatically load basic info like energies + and structures. """ # IO Info self.filename = filename @@ -72,43 +80,37 @@ def __init__(self, filename, verbose=False, auto_load=False): # parse the basic run parameters always self.parse_cp2k_params() - self.parse_input() # parse the input file - self.parse_global_params() # Always present, parse the global parameters, most important is what run type + self.parse_input() + self.parse_global_params() self.parse_atomic_kind_info() - self.parse_dft_params() # Present so long as a DFT calculation was performed + self.parse_dft_params() self.parse_scf_params() # Auto-load will load the most crucial data into the data attribute if auto_load: - self.ran_successfully() # Only if job completed. No info about convergence etc. - self.convergence() # Checks to see if job converged - - self.parse_structures() # collect all structures from the run - self.parse_energies() # get total energy for each ionic step - self.parse_forces() # get forces on all atoms (in order), if available - self.parse_stresses() # get stress tensor and total stress at each ionic step, if available - self.parse_ionic_steps() # collect energy, forces, and total stress into ionic steps variable - - self.parse_dos() # Get dos and use to find gap, CBM, and VBM - if not self.band_gap or self.vbm or self.cbm: - self.parse_mo_eigenvalues() # Get the eigenvalues of the MOs - self.parse_homo_lumo() # Get the HOMO LUMO gap as printed after the mo eigenvalues (for OT only) - self.parse_timing() # Get timing info (includes total CPU time consumed, but also much more) - - # TODO: Is this the best way to implement? Should there just be the option to select each individually? - if verbose: - self.parse_scf_opt() - self.parse_opt_steps() - self.parse_total_numbers() - self.parse_mulliken() - self.parse_hirshfeld() + self.ran_successfully() + self.convergence() + + self.parse_structures() + self.parse_energies() + self.parse_forces() + self.parse_stresses() + self.parse_ionic_steps() + + self.parse_dos() + self.parse_bandstructure() + if not self.band_gap: + self.parse_homo_lumo() + if not self.vbm or not self.cbm: + self.parse_mo_eigenvalues() + self.parse_timing() @property def cp2k_version(self): """ The cp2k version used in the calculation """ - return self.data.get("cp2k_version", None) + return self.data.get("cp2k_version", None)[0][0] @property def completed(self): @@ -163,20 +165,20 @@ def calculation_type(self): if len(functional) > 1: rt = "Mixed: " + ", ".join(functional) functional = " ".join(functional) - if ("HYB" in functional) or (ip and frac) or (functional in HYBRID_TYPES): + if "HYP" in functional or (ip and frac) or (functional in HYBRID_TYPES): rt = "Hybrid" else: functional = functional[0] if functional is None: rt = "None" - elif ("HYB" in functional) or (ip and frac) or (functional) in HYBRID_TYPES: + elif "HYP" in functional or (ip and frac) or (functional) in HYBRID_TYPES: rt = "Hybrid" - elif ("MGGA" in functional) or functional in METAGGA_TYPES: + elif "MGGA" in functional or functional in METAGGA_TYPES: rt = "METAGGA" - elif ("GGA" in functional) or functional in GGA_TYPES: + elif "GGA" in functional or functional in GGA_TYPES: rt = "GGA" - elif ("LDA" in functional) or functional in LDA_TYPES: + elif "LDA" in functional or functional in LDA_TYPES: rt = "LDA" else: rt = "Unknown" @@ -204,13 +206,23 @@ def spin_polarized(self): return True return False + @property + def charge(self): + """Get charge from the input file""" + return self.input["FORCE_EVAL"]["DFT"].get("CHARGE", Keyword("", 0)).values[0] + + @property + def multiplicity(self): + """Get the spin multiplicity from input file""" + return self.input["FORCE_EVAL"]["DFT"].get("Multiplicity", Keyword("", None)).values[0] + @property def is_molecule(self): """ Returns True if the cp2k output was generated for a molecule (i.e. no periodicity in the cell). Returns false otherwise. """ - if self.data.get("poisson_periodicity", [[""]]) is None: + if self.data.get("poisson_periodicity", [[""]])[0][0].upper() == "NONE": return True return False @@ -227,9 +239,7 @@ def is_metal(self): @property def is_hubbard(self): - """ - returns True if hubbard +U correction was used - """ + """Returns True if hubbard +U correction was used""" for v in self.data.get("atomic_kind_info", {}).values(): if "DFT_PLUS_U" in v: if v.get("DFT_PLUS_U").get("U_MINUS_J") > 0: @@ -238,8 +248,10 @@ def is_hubbard(self): def parse_files(self): """ - Identify files present in the directory with the cp2k output file. Looks for trajectories, dos, and cubes + Identify files present in the directory with the cp2k output file. Looks for trajectories, + dos, and cubes """ + self.filenames["DOS"] = glob.glob(os.path.join(self.dir, "*.dos*")) pdos = glob.glob(os.path.join(self.dir, "*pdos*")) self.filenames["PDOS"] = [] self.filenames["LDOS"] = [] @@ -248,14 +260,21 @@ def parse_files(self): self.filenames["LDOS"].append(p) else: self.filenames["PDOS"].append(p) - + self.filenames["band_structure"] = glob.glob(os.path.join(self.dir, "*BAND.bs*")) self.filenames["trajectory"] = glob.glob(os.path.join(self.dir, "*pos*.xyz*")) self.filenames["forces"] = glob.glob(os.path.join(self.dir, "*frc*.xyz*")) self.filenames["stress"] = glob.glob(os.path.join(self.dir, "*stress*")) self.filenames["cell"] = glob.glob(os.path.join(self.dir, "*.cell*")) + self.filenames["ener"] = glob.glob(os.path.join(self.dir, "*.ener*")) self.filenames["electron_density"] = glob.glob(os.path.join(self.dir, "*ELECTRON_DENSITY*.cube*")) self.filenames["spin_density"] = glob.glob(os.path.join(self.dir, "*SPIN_DENSITY*.cube*")) self.filenames["v_hartree"] = glob.glob(os.path.join(self.dir, "*hartree*.cube*")) + self.filenames["hyperfine_tensor"] = glob.glob(os.path.join(self.dir, "*HYPERFINE*eprhyp*")) + self.filenames["g_tensor"] = glob.glob(os.path.join(self.dir, "*GTENSOR*data*")) + self.filenames["spinspin_tensor"] = glob.glob(os.path.join(self.dir, "*K*data*")) + self.filenames["chi_tensor"] = glob.glob(os.path.join(self.dir, "*CHI*data*")) + self.filenames["nmr_shift"] = glob.glob(os.path.join(self.dir, "*SHIFT*data*")) + self.filenames["raman"] = glob.glob(os.path.join(self.dir, "*raman*data*")) restart = glob.glob(os.path.join(self.dir, "*restart*")) self.filenames["restart.bak"] = [] self.filenames["restart"] = [] @@ -278,14 +297,20 @@ def parse_files(self): def parse_structures(self, trajectory_file=None, lattice_file=None): """ - Parses the structures from a cp2k calculation. Static calculations simply use the initial structure. - For calculations with ionic motion, the function will look for the appropriate trajectory and lattice - files based on naming convention. If no file is given, and no file is found, it is assumed - that the lattice/structure remained constant, and the initial lattice/structure is used. - Cp2k does not output the trajectory in the main output file by default, so non static calculations have to - reference the trajectory file. + Parses the structures from a cp2k calculation. Static calculations simply use the initial + structure. For calculations with ionic motion, the function will look for the appropriate + trajectory and lattice files based on naming convention. If no file is given, and no file + is found, it is assumed that the lattice/structure remained constant, and the initial + lattice/structure is used. Cp2k does not output the trajectory in the main output file by + default, so non static calculations have to reference the trajectory file. """ self.parse_initial_structure() + trajectory_file = trajectory_file if trajectory_file else self.filenames.get("trajectory") + if isinstance(trajectory_file, list): + if len(trajectory_file) == 1: + trajectory_file = trajectory_file[0] + elif len(trajectory_file) > 1: + raise FileNotFoundError("Unable to automatically determine trajectory file. More than one exist.") if lattice_file is None: if len(self.filenames["cell"]) == 0: @@ -303,31 +328,16 @@ def parse_structures(self, trajectory_file=None, lattice_file=None): latfile = np.loadtxt(lattice_file) lattice = [l[2:].reshape(3, 3) for l in latfile] - if trajectory_file is None: - if len(self.filenames["trajectory"]) == 0: - self.structures = [] - self.structures.append(self.initial_structure) - self.final_structure = self.structures[-1] - elif len(self.filenames["trajectory"]) == 1: - mols = XYZ.from_file(self.filenames["trajectory"][0]).all_molecules - self.structures = [] - gs = self.initial_structure.site_properties.get("ghost") - for m, l in zip(mols, lattice): - self.structures.append( - Structure( - lattice=l, - coords=[s.coords for s in m.sites], - species=[s.specie for s in m.sites], - coords_are_cartesian=True, - site_properties={"ghost": gs} if gs else {}, - ) - ) - self.final_structure = self.structures[-1] - else: - raise FileNotFoundError("Unable to automatically determine trajectory file. More than one exist.") + if not trajectory_file: + self.structures = [] + self.structures.append(self.initial_structure) + self.final_structure = self.structures[-1] else: mols = XYZ.from_file(trajectory_file).all_molecules + for m in mols: + m.set_charge_and_spin(charge=self.charge, spin_multiplicity=self.multiplicity) self.structures = [] + gs = self.initial_structure.site_properties.get("ghost") if not self.is_molecule: for m, l in zip(mols, lattice): self.structures.append( @@ -336,12 +346,13 @@ def parse_structures(self, trajectory_file=None, lattice_file=None): coords=[s.coords for s in m.sites], species=[s.specie for s in m.sites], coords_are_cartesian=True, + site_properties={"ghost": gs} if gs else {}, + charge=self.charge, ) ) else: self.structures = mols self.final_structure = self.structures[-1] - self.final_structure.set_charge(self.initial_structure.charge) def parse_initial_structure(self): """ @@ -371,43 +382,45 @@ def parse_initial_structure(self): lattice = self.parse_cell_params() gs = {} self.data["atomic_kind_list"] = [] - for k, v in self.data["atomic_kind_info"].items(): # noqa: B007 + for v in self.data["atomic_kind_info"].values(): if v["pseudo_potential"].upper() == "NONE": gs[v["kind_number"]] = True else: gs[v["kind_number"]] = False for c in coord_table: - for v in self.data["atomic_kind_info"].values(): + for k, v in self.data["atomic_kind_info"].items(): if int(v["kind_number"]) == int(c[1]): v["element"] = c[2] + self.data["atomic_kind_list"].append(k) break - self.data["atomic_kind_list"].append(k) if self.is_molecule: self.initial_structure = Molecule( species=[i[2] for i in coord_table], coords=[[float(i[4]), float(i[5]), float(i[6])] for i in coord_table], site_properties={"ghost": [gs.get(int(i[1])) for i in coord_table]}, + charge=self.charge, + spin_multiplicity=self.multiplicity, ) else: self.initial_structure = Structure( - lattice[0], + lattice, species=[i[2] for i in coord_table], coords=[[float(i[4]), float(i[5]), float(i[6])] for i in coord_table], coords_are_cartesian=True, site_properties={"ghost": [gs.get(int(i[1])) for i in coord_table]}, + charge=self.charge, ) - self.initial_structure.set_charge(self.input["FORCE_EVAL"]["DFT"].get("CHARGE", [0])[0]) self.composition = self.initial_structure.composition return self.initial_structure def ran_successfully(self): """ - Sanity checks that the program ran successfully. Looks at the bottom of the CP2K output file - for the "PROGRAM ENDED" line, which is printed when successfully ran. Also grabs the number - of warnings issued. + Sanity checks that the program ran successfully. Looks at the bottom of the CP2K output + file for the "PROGRAM ENDED" line, which is printed when successfully ran. Also grabs + the number of warnings issued. """ program_ended_at = re.compile(r"PROGRAM ENDED AT\s+(\w+)") num_warnings = re.compile(r"The number of warnings for this run is : (\d+)") @@ -472,14 +485,19 @@ def convergence(self): def parse_energies(self): """ - Get the total energy from a CP2K calculation. Presently, the energy reported in the trajectory (pos.xyz) file - takes presidence over the energy reported in the main output file. This is because the trajectory file keeps - track of energies in between restarts, while the main output file may or may not depending on whether - a particular machine overwrites or appends it. + Get the total energy from a CP2K calculation. Presently, the energy reported in the + trajectory (pos.xyz) file takes presidence over the energy reported in the main output + file. This is because the trajectory file keeps track of energies in between restarts, + while the main output file may or may not depending on whether a particular machine + overwrites or appends it. """ if self.filenames.get("trajectory"): toten_pattern = r".*E\s+\=\s+(-?\d+.\d+)" - matches = regrep(self.filenames["trajectory"][-1], {"total_energy": toten_pattern}, postprocess=float) + matches = regrep( + self.filenames["trajectory"][-1], + {"total_energy": toten_pattern}, + postprocess=float, + ) self.data["total_energy"] = list( chain.from_iterable(np.multiply([i[0] for i in matches.get("total_energy", [[]])], Ha_to_eV)) ) @@ -497,9 +515,7 @@ def parse_energies(self): self.final_energy = self.data.get("total_energy", [])[-1] def parse_forces(self): - """ - Get the forces from the output file - """ + """Get the forces from the forces file, or from the main output file""" if len(self.filenames["forces"]) == 1: self.data["forces"] = [ [list(atom.coords) for atom in step] @@ -514,15 +530,12 @@ def parse_forces(self): header_pattern=header_pattern, row_pattern=row_pattern, footer_pattern=footer_pattern, - postprocess=_postprocessor, + postprocess=postprocessor, last_one_only=False, ) - # TODO stress file still parses correctly, but the other is not rigorously tested def parse_stresses(self): - """ - Get the stresses from the output file. - """ + """Get the stresses from stress file, or from the main output file.""" if len(self.filenames["stress"]) == 1: dat = np.genfromtxt(self.filenames["stress"][0], skip_header=1) dat = [dat] if len(np.shape(dat)) == 1 else dat @@ -538,7 +551,7 @@ def parse_stresses(self): header_pattern=header_pattern, row_pattern=row_pattern, footer_pattern=footer_pattern, - postprocess=_postprocessor, + postprocess=postprocessor, last_one_only=False, ) @@ -564,27 +577,29 @@ def parse_ionic_steps(self): if not self.data.get("stress_tensor"): self.parse_stresses() - self.ionic_steps = [ - {"structure": structure, "E": energy, "stress_tensor": stress, "forces": forces} - for structure, energy, stress, forces in zip( - self.structures, - self.data.get("total_energy", []), - self.data.get("stress_tensor", []), - self.data.get("forces", []), + for i, (structure, energy) in enumerate(zip(self.structures, self.data.get("total_energy"))): + self.ionic_steps.append( + { + "structure": structure, + "E": energy, + "forces": self.data["forces"][i] if self.data.get("forces") else None, + "stress_tensor": self.data["stress_tensor"][i] if self.data.get("stress_tensor") else None, + } ) - ] + + return self.ionic_steps def parse_cp2k_params(self): """ Parse the CP2K general parameters from CP2K output file into a dictionary. """ - version = re.compile(r"\s+CP2K\|.+(\d\.\d)") + version = re.compile(r"\s+CP2K\|.+version\s+(.+)") input_file = re.compile(r"\s+CP2K\|\s+Input file name\s+(.+)$") self.read_pattern( {"cp2k_version": version, "input_filename": input_file}, terminate_on_match=True, reverse=False, - postprocess=_postprocessor, + postprocess=str, ) def parse_plus_u_params(self): @@ -593,7 +608,10 @@ def parse_plus_u_params(self): """ method = re.compile(r"\s+DFT\+U\|\s+Method\s+()$") self.read_pattern( - {"dft_plus_u_method": method}, terminate_on_match=True, reverse=False, postprocess=_postprocessor + {"dft_plus_u_method": method}, + terminate_on_match=True, + reverse=False, + postprocess=postprocessor, ) def parse_input(self): @@ -616,7 +634,7 @@ def parse_global_params(self): pat = re.compile(r"\s+GLOBAL\|\s+([\w+\s]*)\s+(\w+)") self.read_pattern({"global": pat}, terminate_on_match=False, reverse=False) for d in self.data["global"]: - d[0], d[1] = _postprocessor(d[0]), str(d[1]) + d[0], d[1] = postprocessor(d[0]), str(d[1]) self.data["global"] = dict(self.data["global"]) def parse_dft_params(self): @@ -627,7 +645,7 @@ def parse_dft_params(self): self.read_pattern( {"dft": pat}, terminate_on_match=False, - postprocess=_postprocessor, + postprocess=postprocessor, reverse=False, ) self.data["dft"] = dict(self.data["dft"]) @@ -639,7 +657,7 @@ def parse_dft_params(self): # Functional if self.input and self.input.check("FORCE_EVAL/DFT/XC/XC_FUNCTIONAL"): - xcfuncs = list(self.input["force_eval"]["dft"]["xc"]["xc_functional"].subsections) + xcfuncs = list(self.input["force_eval"]["dft"]["xc"]["xc_functional"].subsections.keys()) if xcfuncs: self.data["dft"]["functional"] = xcfuncs else: @@ -651,7 +669,7 @@ def parse_dft_params(self): self.read_pattern( {"functional": functional}, terminate_on_match=False, - postprocess=_postprocessor, + postprocess=postprocessor, reverse=False, ) self.data["dft"]["functional"] = [item for sublist in self.data.pop("functional", None) for item in sublist] @@ -664,7 +682,7 @@ def parse_dft_params(self): self.read_pattern( {"hfx": hfx}, terminate_on_match=False, - postprocess=_postprocessor, + postprocess=postprocessor, reverse=False, ) self.data["dft"]["hfx"] = dict(self.data.pop("hfx")) @@ -678,7 +696,19 @@ def parse_dft_params(self): reverse=False, ) if self.data.get("vdw"): - self.data["dft"]["vdw"] = self.data.pop("vdw")[0][0] + found = False + suffix = "" + for l in self.data.get("vdw"): + for _possible, _name in zip( + ["RVV10", "LMKLL", "DRSLL", "DFT-D3", "DFT-D2"], + ["RVV10", "LMKLL", "DRSLL", "D3", "D2"], + ): + if _possible in l[0]: + found = _name + if "BJ" in l[0]: + suffix = "(BJ)" + + self.data["dft"]["vdw"] = found + suffix if found else self.data.pop("vdw")[0][0] poisson_periodic = {"poisson_periodicity": re.compile(r"POISSON\| Periodicity\s+(\w+)")} self.read_pattern(poisson_periodic, terminate_on_match=True) @@ -691,14 +721,14 @@ def parse_qs_params(self): self.read_pattern( {"QS": pat}, terminate_on_match=False, - postprocess=_postprocessor, + postprocess=postprocessor, reverse=False, ) self.data["QS"] = dict(self.data["QS"]) tmp = {} i = 1 for k in list(self.data["QS"]): - if ("grid_level" in str(k)) and ("Number" not in str(k)): + if "grid_level" in str(k) and "Number" not in str(k): tmp[i] = self.data["QS"].pop(k) i += 1 self.data["QS"]["Multi_grid_cutoffs_[a.u.]"] = tmp @@ -713,14 +743,13 @@ def parse_overlap_condition(self): {"overlap_condition_number": overlap_condition}, terminate_on_match=True, reverse=False, - postprocess=_postprocessor, + postprocess=postprocessor, ) def parse_scf_params(self): """ Retrieve the most import SCF parameters: the max number of scf cycles (max_scf), the convergence cutoff for scf (eps_scf), - :return: """ max_scf = re.compile(r"max_scf:\s+(\d+)") eps_scf = re.compile(r"eps_scf:\s+(\d+)") @@ -737,6 +766,23 @@ def parse_cell_params(self): """ Parse the lattice parameters (initial) from the output file """ + if self.input and self.input.check("force_eval/subsys/cell"): + cell = self.input["force_eval"]["subsys"]["cell"] + if cell.get("abc"): + return [ + [cell["abc"].values[0], 0, 0], + [0, cell["abc"].values[1], 0], + [0, 0, cell["abc"].values[2]], + ] + return [ + list(cell.get("A").values), + list(cell.get("B").values), + list(cell.get("C").values), + ] + + warnings.warn( + "Input file lost. Reading cell params from summary at top of output. " "Precision errors may result." + ) cell_volume = re.compile(r"\s+CELL\|\sVolume.*\s(\d+\.\d+)") vectors = re.compile(r"\s+CELL\| Vector.*\s(-?\d+\.\d+)\s+(-?\d+\.\d+)\s+(-?\d+\.\d+)") angles = re.compile(r"\s+CELL\| Angle.*\s(\d+\.\d+)") @@ -749,11 +795,12 @@ def parse_cell_params(self): ) i = iter(self.data["lattice"]) lattices = list(zip(i, i, i)) - return lattices + return lattices[0] def parse_atomic_kind_info(self): """ - Parse info on what atomic kinds are present and what basis/pseudopotential is describing each of them. + Parse info on what atomic kinds are present and what basis/pseudopotential is describing + each of them. """ kinds = re.compile(r"Atomic kind: (\w+)") orbital_basis_set = re.compile(r"Orbital Basis Set\s+(.+$)") @@ -902,7 +949,7 @@ def parse_timing(self): row_pattern=row, footer_pattern=footer, last_one_only=True, - postprocess=_postprocessor, + postprocess=postprocessor, ) self.timing = {} for t in timing: @@ -964,7 +1011,7 @@ def parse_opt_steps(self): "pressure_converged": pressure_converged, }, terminate_on_match=False, - postprocess=_postprocessor, + postprocess=postprocessor, ) def parse_mulliken(self): @@ -986,9 +1033,7 @@ def parse_mulliken(self): print("Found data, but not yet implemented!") def parse_hirshfeld(self): - """ - parse the hirshfeld population analysis for each step - """ + """Parse the hirshfeld population analysis for each step.""" uks = self.spin_polarized header = r"Hirshfeld Charges.+Net charge" footer = r"^$" @@ -1043,11 +1088,11 @@ def parse_mo_eigenvalues(self): Parse the MO eigenvalues from the cp2k output file. Will get the eigenvalues (and band gap) at each ionic step (if more than one exist). - Everything is decomposed by spin channel. If calculation was performed without spin polarization, - then only Spin.up will be present, which represents the average of up and down. + Everything is decomposed by spin channel. If calculation was performed without spin + polarization, then only Spin.up will be present, which represents the average of up and + down. """ eigenvalues = [] - band_gap = [] efermi = [] with zopen(self.filename, "rt") as f: @@ -1103,7 +1148,7 @@ def parse_mo_eigenvalues(self): if "convergence" in line: line = next(lines) - if ("eigenvalues" in line.lower()) or ("HOMO" in line) or ("|" in line): + if "eigenvalues" in line.lower() or "HOMO" in line or "|" in line: break eigenvalues[-1]["unoccupied"][Spin.up].extend([Ha_to_eV * float(l) for l in line.split()]) line = next(lines) @@ -1128,7 +1173,7 @@ def parse_mo_eigenvalues(self): if "convergence" in line: line = next(lines) - if ("HOMO" in line) or ("|" in line): + if "HOMO" in line or "|" in line: next(lines) break try: @@ -1141,20 +1186,18 @@ def parse_mo_eigenvalues(self): except ValueError: eigenvalues = [ - {"occupied": {Spin.up: None, Spin.down: None}, "unoccupied": {Spin.up: None, Spin.down: None}} + { + "occupied": {Spin.up: None, Spin.down: None}, + "unoccupied": {Spin.up: None, Spin.down: None}, + } ] warnings.warn("Convergence of eigenvalues for one or more subspaces did NOT converge") self.data["eigenvalues"] = eigenvalues - self.data["band_gap"] = band_gap if len(eigenvalues) == 0: - warnings.warn("No MO eigenvalues detected.") return - # self.data will always contained the eigenvalues resolved by spin channel. The average vbm, cbm, gap, - # and fermi are saved as class attributes, as there is (usually) no asymmetry in these values for - # common materials if self.spin_polarized: self.data["vbm"] = { Spin.up: np.max(eigenvalues[-1]["occupied"][Spin.up]), @@ -1193,8 +1236,8 @@ def parse_mo_eigenvalues(self): def parse_homo_lumo(self): """ - Find the HOMO - LUMO gap in [eV]. Returns the last value. For gaps/eigenvalues decomposed by - spin up/spin down channel and over many ionic steps, see parse_mo_eigenvalues() + Find the HOMO - LUMO gap in [eV]. Returns the last value. For gaps/eigenvalues decomposed + by spin up/spin down channel and over many ionic steps, see parse_mo_eigenvalues() """ pattern = re.compile(r"HOMO.*-.*LUMO.*gap.*\s(-?\d+.\d+)") self.read_pattern( @@ -1216,29 +1259,40 @@ def parse_homo_lumo(self): self.data["band_gap"] = bg self.band_gap = (bg[Spin.up][-1] + bg[Spin.down][-1]) / 2 if bg[Spin.up] and bg[Spin.down] else None - def parse_dos(self, pdos_files=None, ldos_files=None, sigma=0): + def parse_dos(self, dos_file=None, pdos_files=None, ldos_files=None): """ - Parse the pdos_ALPHA files created by cp2k, and assimilate them into a CompleteDos object. - Either provide a list of PDOS file paths, or use glob to find the .pdos_ALPHA extension in - the calculation directory. + Parse the dos files produced by cp2k calculation. CP2K produces different files based + on the input file rather than assimilating them all into one file. + + One file type is the overall DOS file, which is used for k-point calculations. For + non-kpoint calculation, the overall DOS is generally not calculated, but the + element-projected pDOS is. Seperate files are created for each spin channel and each + atom kind. If requested, cp2k can also do site/local projected dos (ldos). Each site + requested will have a seperate file for each spin channel (if spin polarized calculation + is performed). + + If possible, this function will assimilate the ldos files into a CompleteDos object. + Either provide a list of PDOS file paths, or use glob to find the .pdos_ALPHA extension + in the calculation directory. Args: + dos_file (str): Name of the dos file, otherwise will be inferred pdos_files (list): list of pdos file paths, otherwise they will be inferred - ldos_Files (list): list of ldos file paths, otherwise they will be inferred - sigma (float): Gaussian smearing parameter, if desired. Because cp2k is generally - used as a gamma-point only code, this is often needed to get smooth DOS that - are comparable to k-point averaged DOS + ldos_files (list): list of ldos file paths, otherwise they will be inferred """ + if dos_file is None: + dos_file = self.filenames["DOS"][0] if self.filenames["DOS"] else None + if pdos_files is None: pdos_files = self.filenames["PDOS"] if ldos_files is None: ldos_files = self.filenames["LDOS"] - # Parse specie projected dos tdos, pdoss, ldoss = None, {}, {} + # Parse specie projected dos for pdos_file in pdos_files: - _pdos, _tdos = parse_dos(pdos_file, total=True, sigma=sigma) + _pdos, _tdos = parse_pdos(pdos_file, total=True) for k in _pdos: if k in pdoss: for orbital in _pdos[k]: @@ -1255,7 +1309,7 @@ def parse_dos(self, pdos_files=None, ldos_files=None, sigma=0): # parse any site-projected dos for ldos_file in ldos_files: - _pdos = parse_dos(ldos_file, sigma=sigma) + _pdos = parse_pdos(ldos_file) for k in _pdos: if k in ldoss: for orbital in _pdos[k]: @@ -1265,22 +1319,251 @@ def parse_dos(self, pdos_files=None, ldos_files=None, sigma=0): self.data["pdos"] = jsanitize(pdoss, strict=True) self.data["ldos"] = jsanitize(ldoss, strict=True) - self.data["tdos"] = tdos + + if dos_file: + self.data["tdos"] = parse_dos(dos_file) + else: + self.data["tdos"] = tdos if self.data.get("tdos"): - self.band_gap = tdos.get_gap() - self.cbm, self.vbm = tdos.get_cbm_vbm() + self.band_gap = self.data["tdos"].get_gap() + self.cbm, self.vbm = self.data["tdos"].get_cbm_vbm() + self.efermi = (self.cbm + self.vbm) / 2 # If number of site-projected dos == number of sites, assume they are bijective # and create the CompleteDos object _ldoss = {} - if self.initial_structure and len(ldoss) == len(self.initial_structure): - for k, lds in enumerate(ldoss): + for k, lds in ldoss.items(): _ldoss[self.initial_structure[int(k) - 1]] = {Orbital(orb): lds[orb].densities for orb in lds} self.data["cdos"] = CompleteDos(self.final_structure, total_dos=tdos, pdoss=_ldoss) + @property + def complete_dos(self) -> CompleteDos: + """Returns complete dos object if it has been parsed.""" + return self.data.get("cdos") + + @property + def band_structure(self) -> BandStructure: + """Returns band structure object if it has been parsed.""" + return self.data.get("band_structure") + + def parse_bandstructure(self, bandstructure_filename=None) -> None: + """ + Parse a CP2K bandstructure file. + + Args: + bandstructure_filename: Filename containing bandstructure info. If + not provided, then the pmg name of "BAND.bs" will be assumed by + the filename parser. + """ + if not bandstructure_filename: + if self.filenames["band_structure"]: + bandstructure_filename = self.filenames["band_structure"][0] + else: + return + + with open(bandstructure_filename) as f: + lines = f.read().split("\n") + + data = np.loadtxt(bandstructure_filename) + nkpts = int(lines[0].split()[6]) + nbands = int(lines[0].split()[-2]) + rec_lat = ( + self.final_structure.lattice.reciprocal_lattice + if self.final_structure + else self.initial_structure.lattice.reciprocal_lattice + ) + + labels = {} + kpts = [] + nkpts = 0 + for l in lines: + if not l.startswith("#"): + continue + if l.split()[1] == "Set": + nkpts += int(lines[0].split()[6]) + elif l.split()[1] == "Point": + kpts.append(list(map(float, l.split()[-4:-1]))) + elif l.split()[1] == "Special" in l: + splt = l.split() + label = splt[7] + if label.upper() == "GAMMA": + label = "\\Gamma" + kpt = np.array(splt[4:7]).astype(float).tolist() + if label.upper() != "NONE": + labels[label] = kpt + + if self.spin_polarized: + kpts = kpts[::2] + + eigenvals = {} + if self.spin_polarized: + up = data.reshape(-1, nbands * 2, data.shape[1])[:, :nbands].reshape(-1, data.shape[1]) + down = data.reshape(-1, nbands * 2, data.shape[1])[:, nbands:].reshape(-1, data.shape[1]) + eigenvals = { + Spin.up: up[:, 1].reshape((nkpts, nbands)).T.tolist(), + Spin.down: down[:, 1].reshape((nkpts, nbands)).T.tolist(), + } + else: + eigenvals = {Spin.up: data.reshape((nbands, nkpts))} + + occ = data[:, 1][data[:, -1] != 0.0] + homo = np.max(occ) + unocc = data[:, 1][data[:, -1] == 0.0] + lumo = np.min(unocc) + efermi = (lumo + homo) / 2 + self.efermi = efermi + + self.data["band_structure"] = BandStructureSymmLine( + kpoints=kpts, + eigenvals=eigenvals, + lattice=rec_lat, + efermi=efermi, + labels_dict=labels, + structure=self.final_structure, + projections=None, # not implemented in cp2k + ) + + self.band_gap = self.data["band_structure"].get_band_gap().get("energy") + self.vbm = self.data["band_structure"].get_vbm().get("energy") + self.cbm = self.data["band_structure"].get_cbm().get("energy") + + def parse_hyperfine(self, hyperfine_filename=None): + """ + Parse a file containing hyperfine coupling tensors for each atomic site. + """ + if not hyperfine_filename: + if self.filenames["hyperfine_tensor"]: + hyperfine_filename = self.filenames["hyperfine_tensor"][0] + else: + return + + with zopen(hyperfine_filename, "rt") as f: + lines = [line for line in f.read().split("\n") if line] + + hyperfine = [[] for _ in self.ionic_steps] + for i in range(2, len(lines), 5): + x = list(map(float, lines[i + 2].split()[-3:])) + y = list(map(float, lines[i + 3].split()[-3:])) + z = list(map(float, lines[i + 4].split()[-3:])) + hyperfine[-1].append([x, y, z]) + + self.data["hyperfine_tensor"] = hyperfine + return hyperfine + + def parse_gtensor(self, gtensor_filename=None): + """ + Parse a file containing g tensor. + """ + if not gtensor_filename: + if self.filenames["g_tensor"]: + gtensor_filename = self.filenames["g_tensor"][0] + else: + return + + with zopen(gtensor_filename, "rt") as f: + lines = [line for line in f.read().split("\n") if line] + + data = {} + data["gmatrix_zke"] = [] + data["gmatrix_so"] = [] + data["gmatrix_soo"] = [] + data["gmatrix_total"] = [] + data["gtensor_total"] = [] + data["delta_g"] = [] + ionic = -1 + dat = None + for _, line in enumerate(lines): + first = line.strip() + if first == "G tensor": + ionic += 1 + for _, d in data.items(): + d.append([]) + elif first in data: + dat = first + elif first.startswith("delta_g"): + dat = "delta_g" + else: + splt = [postprocessor(s) for s in line.split()] + splt = [s for s in splt if isinstance(s, float)] + data[dat][ionic].append(list(map(float, splt[-3:]))) + self.data.update(data) + return data["gtensor_total"][-1] + + def parse_chi_tensor(self, chi_filename=None): + """ + Parse the magnetic susceptibility tensor + """ + if not chi_filename: + if self.filenames["chi_tensor"]: + chi_filename = self.filenames["chi_tensor"][0] + else: + return + + with zopen(chi_filename, "rt") as f: + lines = [line for line in f.read().split("\n") if line] + + data = {} + data["chi_soft"] = [] + data["chi_local"] = [] + data["chi_total"] = [] + data["chi_total_ppm_cgs"] = [] + data["PV1"] = [] + data["PV2"] = [] + data["PV3"] = [] + data["ISO"] = [] + data["ANISO"] = [] + ionic = -1 + dat = None + for _, line in enumerate(lines): + first = line.strip() + if first == "Magnetic Susceptibility Tensor": + ionic += 1 + for _, d in data.items(): + d.append([]) + elif first in data: + dat = first + elif "SOFT" in first: + dat = "chi_soft" + elif "LOCAL" in first: + dat = "chi_local" + elif "Total" in first: + if "ppm" in first: + dat = "chi_total_ppm_cgs" + else: + dat = "chi_total" + elif first.startswith("PV1"): + splt = [postprocessor(s) for s in line.split()] + splt = [s for s in splt if isinstance(s, float)] + data["PV1"][ionic] = splt[0] + data["PV2"][ionic] = splt[1] + data["PV3"][ionic] = splt[2] + elif first.startswith("ISO"): + splt = [postprocessor(s) for s in line.split()] + splt = [s for s in splt if isinstance(s, float)] + data["ISO"][ionic] = splt[0] + data["ANISO"][ionic] = splt[1] + else: + splt = [postprocessor(s) for s in line.split()] + splt = [s for s in splt if isinstance(s, float)] + data[dat][ionic].append(list(map(float, splt))) + self.data.update(data) + return data["chi_total"][-1] + + def parse_nmr_shift(self): + """Parse NMR calculation""" + raise NotImplementedError("NMR Parsing not yet implemented") + + def parse_tddfpt(self): + """Parse TDDFPT calculation""" + raise NotImplementedError("TDDFPT excited states parsing not yet implemented") + + def parse_raman(self): + """Parse raman calculation""" + raise NotImplementedError("Raman parsing not yet implemented") + @staticmethod def _gauss_smear(densities, energies, npts, width): @@ -1329,7 +1612,7 @@ def read_pattern(self, patterns, reverse=False, terminate_on_match=False, postpr terminate_on_match=terminate_on_match, postprocess=postprocess, ) - for k in patterns: + for k in patterns.keys(): self.data[k] = [i[0] for i in matches.get(k, [])] def read_table_pattern( @@ -1377,7 +1660,7 @@ def read_table_pattern( Returns: List of tables. 1) A table is a list of rows. 2) A row if either a list of - attribute values in case the capturing group is defined without name in + attribute values in case the the capturing group is defined without name in row_pattern, or a dict in case that named capturing groups are defined by row_pattern. """ @@ -1482,7 +1765,26 @@ def parse_energy_file(energy_file): return d -def parse_dos(dos_file=None, spin_channel=None, total=False, sigma=0): +# TODO The DOS file that cp2k outputs as of 2022.1 seems to have a lot of problems. +def parse_dos(dos_file=None): + """ + Parse a dos file. This format is different from the pdos files. + """ + data = np.loadtxt(dos_file) + data[:, 0] *= Ha_to_eV + energies = data[:, 0] + for i, o in enumerate(data[:, 1]): + if o == 0: + break + vbmtop = i + efermi = energies[vbmtop] + 1e-6 + densities = {Spin.up: data[:, 1]} + if data.shape[1] > 3: + densities[Spin.down] = data[:, 3] + return Dos(efermi=efermi, energies=energies, densities=densities) + + +def parse_pdos(dos_file=None, spin_channel=None, total=False): """ Parse a single DOS file created by cp2k. Must contain one PDOS snapshot. i.e. you cannot use this cannot deal with multiple concatenated dos files. @@ -1568,10 +1870,15 @@ def cp2k_to_pmg_labels(x): # *not* middle of the gap, which pdos might report efermi = energies[vbmtop] + 1e-6 - # for pymatgen's dos class. VASP creates an evenly spaced grid of energy states, which leads to 0 density - # states in the band gap. CP2K does not do this. PMG's Dos class was created with VASP in mind so the way - # it searches for vbm and cbm relies on grid points in between VBM and CBM, so here we introduce trivial ones - energies = np.insert(energies, vbmtop + 1, np.linspace(energies[vbmtop] + 1e-6, energies[vbmtop + 1] - 1e-6, 2)) + # for pymatgen's dos class. VASP creates an evenly spaced grid of energy states, which + # leads to 0 density states in the band gap. CP2K does not do this. PMG's Dos class was + # created with VASP in mind so the way it searches for vbm and cbm relies on grid points + # in between VBM and CBM, so here we introduce trivial ones + energies = np.insert( + energies, + vbmtop + 1, + np.linspace(energies[vbmtop] + 1e-6, energies[vbmtop + 1] - 1e-6, 2), + ) data = np.insert(data, vbmtop + 1, np.zeros((2, data.shape[1])), axis=0) pdos = { diff --git a/pymatgen/io/cp2k/sets.py b/pymatgen/io/cp2k/sets.py index 545f4a595c8..421e23f2544 100644 --- a/pymatgen/io/cp2k/sets.py +++ b/pymatgen/io/cp2k/sets.py @@ -1,6 +1,6 @@ """ This module defines input sets for CP2K and is a work in progress. The structure/philosophy -of this module is based on the VASP input sets in Pymatgen. These sets are meant to contain +of this module is based on the Vasp input sets in Pymatgen. These sets are meant to contain tested parameters that will result in successful, reproducible, consistent calculations without need for intervention 99% of the time. 99% of the time, you only need to provide a pymatgen structure object and let the defaults take over from there. @@ -22,17 +22,22 @@ import itertools import os import warnings -from pathlib import Path +import numpy as np from ruamel.yaml import YAML +from pymatgen.core import SETTINGS from pymatgen.core.lattice import Lattice -from pymatgen.core.structure import Molecule, Structure +from pymatgen.core.structure import Element, Molecule, Structure from pymatgen.io.cp2k.inputs import ( + DOS, LDOS, PBE, PDOS, QS, + Band_Structure, + BasisFile, + BasisInfo, BrokenSymmetry, Cell, Coord, @@ -40,14 +45,17 @@ Dft, E_Density_Cube, ForceEval, + GaussianTypeOrbitalBasisSet, Global, + GthPotential, Keyword, - KeywordList, Kind, Kpoints, Mgrid, MO_Cubes, OrbitalTransformation, + PotentialFile, + PotentialInfo, Scf, Section, SectionList, @@ -56,177 +64,33 @@ V_Hartree_Cube, Xc_Functional, ) -from pymatgen.io.cp2k.utils import ( - get_aux_basis, - get_basis_and_potential, - get_cutoff_from_basis, - get_truncated_coulomb_cutoff, - get_unique_site_indices, - get_xc_functionals, -) +from pymatgen.io.cp2k.utils import get_truncated_coulomb_cutoff, get_unique_site_indices +from pymatgen.io.vasp.inputs import Kpoints as VaspKpoints +from pymatgen.io.vasp.inputs import Kpoints_supported_modes __author__ = "Nicholas Winner" -__version__ = "1.0" +__version__ = "2.0" __email__ = "nwinner@berkeley.edu" -__date__ = "March 2022" - -MODULE_DIR = Path(__file__).resolve().parent - -with open(os.path.join(MODULE_DIR, "settings.yaml")) as f: - yaml = YAML(typ="unsafe", pure=True) - SETTINGS = yaml.load(f) - +__date__ = "September 2022" -class Cp2kInputSet(Cp2kInput): +class DftSet(Cp2kInput): """ - The basic representation of a CP2K input set as a collection of "sections" defining the simulation - connected to a structure object. At the most basis level, CP2K requires a &GLOBAL section and - &FORCE_EVAL section. Global sets parameters like "RUN_TYPE" or the overall verbosity. FORCE_EVAL is - the largest section usually, containing the cell and coordinates of atoms, the DFT settings, and more. - This top level input set is meant to initialize GLOBAL and FORCE_EVAL based on a structure object and - and sections that the user provides. - - Like everything that goes into a cp2k input file, this base input set is essentially a section object. - These sets are distinguished by saving default settings for easy implementation of calculations such - as relaxation and static calculations. This base set is here to transfer a pymatgen structure object - into the input format for cp2k and associate the basis set and pseudopotential to use with each - element in the structure. - - Generally, this class will not be used directly, and instead one of - its child-classes will be used, which contain more predefined initializations of various sections, and, - if modifications are required, the user can specify override_default_settings. + Base for an input set using the Quickstep module (i.e. a DFT calculation). The DFT section is + pretty vast in CP2K, so this set hopes to make the DFT setup fairly simple. The provided + parameters are pretty conservative, and so they should not need to be changed very often. """ def __init__( self, structure: Structure | Molecule, - basis_and_potential: dict | str = "preferred", - multiplicity: int = 0, project_name: str = "CP2K", - override_default_params: dict | None = None, - **kwargs, - ): - """ - Args: - structure: (Structure or Molecule) pymatgen structure or molecule object used to define - the lattice, coordinates, and elements. This structure object cannot contain "special" - species like the Dummy species, e.g. X, or fractional occupations, e.g. Fe0.2, etc. - potential_and_basis: (dict) Specifies what basis set and potential to use. Specify these - as a dict of the form: - { element: {'cardinality': __, 'sr': __, 'q': __}, - 'cardinality': __, 'functional': __} - Where cardinality and functional are overall specifications (for all elements), while - specifies the overrides for a specific element. Currently the following - conventions must be followed: - (a) All species of a particular element must have the same potential/basis - multiplicity: (int) Specify the system's multiplicity if appropriate - project_name: (str) Specify the project name. This will be used to name the output files - from a CP2K calculation - override_default_params: (dict) Specifies user-defined settings to override the settings of any - input set (See Section.update()) - """ - super().__init__(name="CP2K_INPUT", subsections={}) - - # Important CP2K set parameters - self.structure = structure - self.charge = int(structure.charge) - self.basis_and_potential = basis_and_potential - self.multiplicity = multiplicity # spin multiplicity = 2s+1 - self.override_default_params = override_default_params or {} - self.project_name = project_name - self.kwargs = kwargs - - self.insert(ForceEval()) # always present in cp2k - self.basis_set_file_names = None # need for dft - self.potential_file_name = None # need for dft - self.create_subsys(self.structure) # assemble structure with atom types and pseudopotentials assigned - - if self.kwargs.get("print_forces", True): - self.print_forces() - - self.update(self.override_default_params) - - def create_subsys(self, structure: Structure | Molecule): - """ - Create the structure for the input - """ - subsys = Subsys() - if isinstance(structure, Structure): - subsys.insert(Cell(structure.lattice)) - - # Decide what basis sets/pseudopotentials to use - basis_and_potential = get_basis_and_potential(structure.symbol_set, self.basis_and_potential) - - # Insert atom kinds by identifying the unique sites (unique element and site properties) - unique_kinds = get_unique_site_indices(structure) - for k, v in unique_kinds.items(): - kind = k.split("_")[0] - kwargs = {} - - _ox = ( - self.structure.site_properties["oxi_state"][v[0]] - if "oxi_state" in self.structure.site_properties - else 0 - ) - _sp = self.structure.site_properties["spin"][v[0]] if "spin" in self.structure.site_properties else 0 - - bs = BrokenSymmetry.from_el(kind, _ox, _sp) if _ox else None - - if "magmom" in self.structure.site_properties and not bs: - kwargs["magnetization"] = self.structure.site_properties["magmom"][v[0]] - - if "ghost" in self.structure.site_properties: - kwargs["ghost"] = self.structure.site_properties["ghost"][v[0]] - - if "basis_set" in self.structure.site_properties: - basis_set = self.structure.site_properties["basis_set"][v[0]] - else: - basis_set = basis_and_potential[kind]["basis"] - - if "potential" in self.structure.site_properties: - potential = self.structure.site_properties["potential"][v[0]] - else: - potential = basis_and_potential[kind]["potential"] - - if "aux_basis" in self.structure.site_properties: - kwargs["aux_basis"] = self.structure.site_properties["aux_basis"][v[0]] - if kwargs["aux_basis"] == "match": - kwargs["aux_basis"] = basis_set - - _kind = Kind( - kind, alias=k, basis_set=basis_set, potential=potential, subsections={"BS": bs} if bs else {}, **kwargs - ) - - subsys.insert(_kind) - - coord = Coord(structure, aliases=unique_kinds) - subsys.insert(coord) - self["FORCE_EVAL"].insert(subsys) - self.basis_set_file_names = basis_and_potential["basis_filenames"] - self.potential_file_name = basis_and_potential["potential_filename"] - - def print_forces(self): - """ - Print out the forces and stress during calculation - """ - self["FORCE_EVAL"].insert(Section("PRINT", subsections={})) - self["FORCE_EVAL"]["PRINT"].insert(Section("FORCES", subsections={})) - self["FORCE_EVAL"]["PRINT"].insert(Section("STRESS_TENSOR", subsections={})) - - -class DftSet(Cp2kInputSet): - """ - Base for an input set using the Quickstep module (i.e. a DFT calculation). The DFT section is pretty vast - in CP2K, so this set hopes to make the DFT setup fairly simple. The provided parameters are pretty conservative, - and so they should not need to be changed very often. - """ - - def __init__( - self, - structure: Structure | Molecule, + basis_and_potential: dict | None = None, + xc_functionals: list | str | None = None, + multiplicity: int = 0, ot: bool = True, energy_gap: float = -1, + qs_method: str = "GPW", eps_default: float = 1e-12, eps_scf: float = 1e-6, max_scf: int | None = None, @@ -236,78 +100,92 @@ def __init__( linesearch: str = "2PNT", rotation: bool = True, occupation_preconditioner: bool = False, - cutoff: int = 0, + cutoff: int | float | None = None, rel_cutoff: int = 50, ngrids: int = 5, progression_factor: int = 3, override_default_params: dict | None = None, wfn_restart_file_name: str | None = None, - kpoints: Kpoints | None = None, + kpoints: VaspKpoints | None = None, smearing: bool = False, **kwargs, - ): + ) -> None: """ Args: structure: Pymatgen structure or molecule object - ot (bool): Whether or not to use orbital transformation method for matrix diagonalization. OT is the - flagship scf solver of CP2K, and will provide huge speed-ups for this part of the calculation, - but the system must have a band gap for OT to be used (higher band-gap --> faster convergence). - Band gap is also used by the preconditioner for OT, and should be set as a value SMALLER than the true - band gap to get good efficiency. Generally, this parameter does not need to be changed from - default of 0.01 - energy_gap (float): Estimate of energy gap for preconditioner. Default is -1, leaving it up to cp2k. - eps_default (float): Replaces all EPS_XX Keywords in the DFT section (NOT its subsections!) to have this - value, ensuring an overall accuracy of at least this much. - eps_scf (float): The convergence criteria for leaving the SCF loop. Default is 1e-6. Should - ensure reasonable results, but is not applicable to all situations. - Note: eps_scf is *not* in units of energy, as in most DFT codes. For OT method, it is the largest - gradient of the energy with respect to changing any of the molecular orbital coefficients. For - diagonalization, it is the largest change in the density matrix from the last step. - max_scf (int): The max number of SCF cycles before terminating the solver. NOTE: With the OT solver, this - corresponds to the max number of INNER scf loops, and then the outer loops are set with outer_max_scf, - while with diagonalization it corresponds to the overall (INNER*OUTER) number of SCF steps, with the + ot (bool): Whether or not to use orbital transformation method for matrix + diagonalization. OT is the flagship scf solver of CP2K, and will provide + speed-ups for this part of the calculation, but the system must have a band gap + for OT to be used (higher band-gap --> faster convergence). + energy_gap (float): Estimate of energy gap for pre-conditioner. Default is -1, leaving + it up to cp2k. + eps_default (float): Replaces all EPS_XX Keywords in the DFT section value, ensuring + an overall accuracy of at least this much. + eps_scf (float): The convergence criteria for leaving the SCF loop. Default is 1e-6. + Should ensure reasonable results, but is not applicable to all situations. + Note: eps_scf is *not* in units of energy, as in most DFT codes. For OT method, + it is the largest gradient of the energy with respect to changing any of the + molecular orbital coefficients. For diagonalization, it is the largest change + in the density matrix from the last step. + max_scf (int): The max number of SCF cycles before terminating the solver. NOTE: With + the OT solver, this corresponds to the max number of INNER scf loops, and then + the outer loops are set with outer_max_scf, while with diagonalization it + corresponds to the overall (INNER*OUTER) number of SCF steps, with the inner loop limit set by - minimizer (str): The minimization scheme. DIIS can be as much as 50% faster than the more robust conjugate - gradient method, and so it is chosen as default. Switch to CG if dealing with a difficult system. - preconditioner (str): Preconditioner for the OT method. FULL_SINGLE_INVERSE is very robust and compatible - with non-integer occupations from IRAC+rotation. FULL_ALL is considered "best" but needs algorithm to - be set to STRICT. Only change from these two when simulation cell gets to be VERY large, in which case - FULL_KINETIC might be preferred. - algorithm (str): Algorithm for the OT method. STRICT assumes that the orbitals are strictly orthogonal to - each other, which works well for wide gap ionic systems, but can diverge for systems with small gaps, - fractional occupations, and some other cases. IRAC (iterative refinement of the approximate congruency) - transformation is not analytically correct and uses a truncated polynomial expansion, but is robust to - the problems with STRICT, and so is the default. - linesearch (str): Linesearch method for CG. 2PNT is the default, and is the fastest, but is not as robust - as 3PNT. 2PNT is required as of cp2k v9.1 for compatibility with irac+rotation. This may be upgraded - in the future. 3PNT can be good for wide gapped transition metal systems as an alternative. - rotation (bool): Whether or not to allow for rotation of the orbitals in the OT method. This equates to - allowing for fractional occupations in the calculation. - occupation_preconditioner (bool): Whether or not to account for fractional occupations in the - preconditioner. This method is not fully integrated as of cp2k v9.1 and is set to false by default. - cutoff (int): Cutoff energy (in Ry) for the finest level of the multigrid. A high cutoff will allow you to - have very accurate calculations PROVIDED that REL_CUTOFF is appropriate. By default cutoff is set to 0, - which will assign it to be the largest exponent of your basis times the rel_cutoff. - rel_cutoff (int): This cutoff decides how the Gaussians are mapped onto the different levels of the - multigrid. If REL_CUTOFF is too low, then even if you have a high CUTOFF, all Gaussians will be - mapped onto the coarsest level of the multi-grid, and thus the effective integration grid for - the calculation may still be too coarse. By default 50Ry is chosen, which should be sufficient - given the cutoff is large enough. - From CP2K manual: A Gaussian is mapped onto the coarsest level of the multi-grid, on which the - function will cover number of grid points greater than or equal to the number of grid points - will cover on a reference grid defined by REL_CUTOFF. - ngrids (int): number of multi-grids to use. CP2K default is 4, but the molopt basis files recommend 5. - progression_factor (int): Divisor of CUTOFF to get the cutoff for the next level of the multigrid. + minimizer (str): The minimization scheme. DIIS can be as much as 50% faster than the + more robust conjugate gradient method, and so it is chosen as default. Switch to CG + if dealing with a difficult system. + preconditioner (str): Pre-conditioner for the OT method. FULL_SINGLE_INVERSE is very + robust and compatible with non-integer occupations from IRAC+rotation. FULL_ALL is + considered "best" but needs algorithm to be set to STRICT. Only change from these + two when simulation cell gets to be VERY large, in which case FULL_KINETIC might be + preferred. + algorithm (str): Algorithm for the OT method. STRICT assumes that the orbitals are + strictly orthogonal to each other, which works well for wide gap ionic systems, + but can diverge for systems with small gaps, fractional occupations, and some + other cases. IRAC (iterative refinement of the approximate congruency) + transformation is not analytically correct and uses a truncated polynomial + expansion, but is robust to the problems with STRICT, and so is the default. + linesearch (str): Linesearch method for CG. 2PNT is the default, and is the fastest, + but is not as robust as 3PNT. 2PNT is required as of cp2k v9.1 for compatibility + with irac+rotation. This may be upgraded in the future. 3PNT can be good for wide + gapped transition metal systems as an alternative. + rotation (bool): Whether or not to allow for rotation of the orbitals in the OT method. + This equates to allowing for fractional occupations in the calculation. + occupation_preconditioner (bool): Whether or not to account for fractional occupations + in the preconditioner. This method is not fully integrated as of cp2k v9.1 and is + set to false by default. + cutoff (int): Cutoff energy (in Ry) for the finest level of the multigrid. A high + cutoff will allow you to have very accurate calculations PROVIDED that REL_CUTOFF + is appropriate. By default cutoff is set to 0, leaving it up to the set. + rel_cutoff (int): This cutoff decides how the Gaussians are mapped onto the different + levels of the multigrid. If REL_CUTOFF is too low, then even if you have a high + CUTOFF, all Gaussians will be mapped onto the coarsest level of the multi-grid, + and thus the effective integration grid for the calculation may still be too + coarse. By default 50Ry is chosen, which should be sufficient given the cutoff is + large enough. + ngrids (int): number of multi-grids to use. CP2K default is 4, but the molopt basis + files recommend 5. + progression_factor (int): Divisor of CUTOFF to get the cutoff for the next level of + the multigrid. wfn_restart_file_name (str): RESTART file for the initial wavefunction guess. - kpoints (Kpoints): kpoints object from pymatgen.io.vasp.inputs.Kpoints. By default, CP2K runs with gamma - point only. - smearing (bool): whether or not to activate smearing (should be done for systems containing no (or a very - small) band gap. + kpoints (Kpoints): kpoints object from pymatgen.io.vasp.inputs.Kpoints. By default, + CP2K runs with gamma point only. + smearing (bool): whether or not to activate smearing (should be done for systems + containing no (or a very small) band gap. """ - super().__init__(structure, **kwargs) + super().__init__(name="CP2K_INPUT", subsections={}) self.structure = structure + self.basis_and_potential = basis_and_potential if basis_and_potential else {} + self.project_name = project_name + self.charge = int(structure.charge) + if not multiplicity and isinstance(self.structure, Molecule): + self.multiplicity = self.structure.spin_multiplicity + else: + self.multiplicity = multiplicity self.ot = ot + self.qs_method = qs_method self.energy_gap = energy_gap self.eps_default = eps_default self.eps_scf = eps_scf @@ -322,20 +200,42 @@ def __init__( self.rel_cutoff = rel_cutoff self.ngrids = ngrids self.progression_factor = progression_factor - self.override_default_params = override_default_params or {} + self.override_default_params = override_default_params if override_default_params else {} self.wfn_restart_file_name = wfn_restart_file_name self.kpoints = kpoints self.smearing = smearing self.kwargs = kwargs + # Enable force and energy evaluations (most calculations) + self.insert(ForceEval()) + + if self.kpoints: + # As of cp2k v2022.1 kpoint module is not fully integrated, so even specifying + # 0,0,0 will disable certain features. So, you have to drop it all together to + # get full support + if self.kpoints.style in [Kpoints_supported_modes.Gamma, Kpoints_supported_modes.Monkhorst]: + if np.array_equal(self.kpoints.kpts[0], (1, 1, 1)): + self.kpoints = None + elif self.kpoints.style in [Kpoints_supported_modes.Reciprocal, Kpoints_supported_modes.Cartesian]: + if np.array_equal(self.kpoints.kpts[0], (0, 0, 0)): + self.kpoints = None + if ot and self.kpoints: + warnings.warn("As of 2022.1, kpoints not supported with OT. Defaulting to diagonalization") + ot = False + + # Build the global section + g = Global( + project_name=self.kwargs.get("project_name", "CP2K"), + run_type=self.kwargs.get("run_type", "ENERGY_FORCE"), + ) + self.insert(g) + # Build the QS Section - qs = QS(eps_default=eps_default) - max_scf = max_scf or 20 if ot else 400 # If ot, max_scf is for inner loop + qs = QS(method=self.qs_method, eps_default=eps_default, eps_pgf_orb=kwargs.get("eps_pgf_orb", None)) + max_scf = max_scf if max_scf else 20 if ot else 400 # If ot, max_scf is for inner loop scf = Scf(eps_scf=eps_scf, max_scf=max_scf, subsections={}) - # If there's a band gap, use OT, else use diagonalization if ot: - scf.insert( OrbitalTransformation( minimizer=minimizer, @@ -370,43 +270,52 @@ def __init__( scf.insert(mixing) scf["MAX_DIIS"] = Keyword("MAX_DIIS", 15) + # Get basis, potential, and xc info + self.basis_and_potential = DftSet.get_basis_and_potential(self.structure, self.basis_and_potential) + self.basis_set_file_names = self.basis_and_potential.get("basis_filenames") + self.potential_file_name = self.basis_and_potential.get("potential_filename") + self.xc_functionals = DftSet.get_xc_functionals( + xc_functionals=xc_functionals + ) # kwargs.get("xc_functional", "PBE")) + + # create the subsys (structure) + self.create_subsys(self.structure) + # Create the multigrid for FFTs - if not cutoff: - basis_and_potential = get_basis_and_potential(structure.symbol_set, self.basis_and_potential) - cutoff = get_cutoff_from_basis( - els=self.structure.symbol_set, - bases=[basis_and_potential[s]["basis"] for s in self.structure.symbol_set], - rel_cutoff=rel_cutoff, - ) + if not self.cutoff: + basis_sets = [self.basis_and_potential[el].get("basis") for el in self.structure.symbol_set] + self.cutoff = DftSet.get_cutoff_from_basis(basis_sets=basis_sets, rel_cutoff=rel_cutoff) + mgrid = Mgrid( - cutoff=cutoff, + cutoff=self.cutoff, rel_cutoff=rel_cutoff, ngrids=ngrids, progression_factor=progression_factor, ) + if smearing and not ot: + scf["ADDED_MOS"] = Keyword("ADDED_MOS", -1, -1) if self.kwargs.get("spin_polarized", True) else -1 + scf.insert(Smear(elec_temp=kwargs.get("elec_temp", 300))) + # Set the DFT calculation with global parameters dft = Dft( MULTIPLICITY=self.multiplicity, CHARGE=self.charge, - basis_set_filenames=self.basis_set_file_names, + uks=self.kwargs.get("spin_polarized", True), + basis_set_filenames=self.basis_set_file_names if self.basis_set_file_names else [], potential_filename=self.potential_file_name, subsections={"QS": qs, "SCF": scf, "MGRID": mgrid}, wfn_restart_file_name=wfn_restart_file_name, ) # Set kpoints only if user supplies them - if kpoints: - dft.insert(Kpoints.from_kpoints(kpoints, structure=self.structure, reduce=True)) - if smearing: - scf.kwargs["ADDED_MOS"] = 500 - scf["ADDED_MOS"] = 500 # TODO: how to grab the appropriate number? - scf.insert(Smear(elec_temp=kwargs.get("elec_temp", 300))) + if self.kpoints: + dft.insert(Kpoints.from_kpoints(self.kpoints, structure=self.structure)) # Create subsections and insert into them self["FORCE_EVAL"].insert(dft) - xc_functionals = get_xc_functionals(kwargs.get("xc_functional", "PBE")) - xc_functional = Xc_Functional(functionals=xc_functionals) + + xc_functional = Xc_Functional(functionals=self.xc_functionals) xc = Section("XC", subsections={"XC_FUNCTIONAL": xc_functional}) self["FORCE_EVAL"]["DFT"].insert(xc) self["FORCE_EVAL"]["DFT"].insert(Section("PRINT", subsections={})) @@ -414,81 +323,394 @@ def __init__( if isinstance(structure, Molecule): self.activate_nonperiodic() + if kwargs.get("print_forces", True): + self.print_forces() + if kwargs.get("print_dos", True): + self.print_dos() if kwargs.get("print_pdos", True): self.print_pdos() if kwargs.get("print_ldos", False): self.print_ldos() if kwargs.get("print_mo_cubes", True): self.print_mo_cubes() - if kwargs.get("print_hartree_potential", True): - self.print_hartree_potential() + if kwargs.get("print_v_hartree", True): + self.print_v_hartree() if kwargs.get("print_e_density", True): self.print_e_density() + if kwargs.get("print_bandstructure", False): + self.print_bandstructure(kwargs.get("kpoints_line_density", 20)) self.update(self.override_default_params) + if kwargs.get("validate", True): + self.validate() - def print_pdos(self, nlumo=-1): + @staticmethod + def get_basis_and_potential(structure, basis_and_potential): + """ + Get a dictionary of basis and potential info for constructing the input file. + + data in basis_and_potential argument can be specified in several ways: + + Strategy 1: Element-specific info (takes precedence) + + 1. Provide a basis and potential object: + + el: {'basis': obj, 'potential': obj} + + 2. Provide a hash of the object that matches the keys in the pmg configured cp2k data files. + + el: {'basis': hash, 'potential': hash} + + 3. Provide the name of the basis and potential AND the basis_filenames and potential_filename + keywords specifying where to find these objects + + el: { + 'basis': name, 'potential': name, 'basis_filenames': [filenames], + 'potential_filename': filename + } + + Strategy 2: global descriptors + + In this case, any elements not present in the argument will be dealt with by searching the pmg + configured cp2k data files to find a objects matching your requirements. + + - functional: Find potential and basis that have been optimized for a specific functional like PBE. + Can be None if you do not require them to match. + - basis_type: type of basis to search for (e.g. DZVP-MOLOPT). + - aux_basis_type: type of basis to search for (e.g. pFIT). Some elements do not have all aux types + available. Use aux_basis_type that is universal to avoid issues, or avoid using this strategy. + - potential_type: "Pseudopotential" or "All Electron" + + ***BE WARNED*** CP2K data objects can have the same name, this will sort those and choose the first one + that matches. + + Will raise an error if no basis/potential info can be found according to the input. + """ + data = {"basis_filenames": []} + functional = basis_and_potential.get("functional", SETTINGS.get("PMG_DEFAULT_CP2K_FUNCTIONAL")) + basis_type = basis_and_potential.get("basis_type", SETTINGS.get("PMG_DEFAULT_CP2K_BASIS_TYPE")) + potential_type = basis_and_potential.get( + "potential_type", SETTINGS.get("PMG_DEFAULT_POTENTIAL_TYPE", "Pseudopotential") + ) + aux_basis_type = basis_and_potential.get("aux_basis_type", SETTINGS.get("PMG_DEFAULT_CP2K_AUX_BASIS_TYPE")) + + for el in structure.symbol_set: + possible_basis_sets = [] + possible_potentials = [] + basis, aux_basis, potential = None, None, None + desired_basis, desired_aux_basis, desired_potential = None, None, None + have_element_file = os.path.exists(os.path.join(SETTINGS.get("PMG_CP2K_DATA_DIR"), el)) + + # Necessary if matching data to cp2k data files + if have_element_file: + with open(os.path.join(SETTINGS.get("PMG_CP2K_DATA_DIR"), el)) as f: + yaml = YAML(typ="unsafe", pure=True) + DATA = yaml.load(f) + if not DATA.get("basis_sets"): + raise ValueError(f"No standard basis sets available in data directory for {el}") + if not DATA.get("potentials"): + raise ValueError(f"No standard potentials available in data directory for {el}") + + # Give precedence to explicitly listing info for the element + if el in basis_and_potential: + _basis = basis_and_potential[el].get("basis") + if isinstance(_basis, GaussianTypeOrbitalBasisSet): + possible_basis_sets.append(_basis) + elif have_element_file: + if _basis in DATA["basis_sets"]: + possible_basis_sets.append(GaussianTypeOrbitalBasisSet.from_dict(DATA["basis_sets"][_basis])) + elif _basis: + desired_basis = GaussianTypeOrbitalBasisSet(name=_basis) + + _aux_basis = basis_and_potential[el].get("aux_basis") + if isinstance(_aux_basis, GaussianTypeOrbitalBasisSet): + aux_basis = _aux_basis + elif have_element_file: + if _aux_basis in DATA["basis_sets"]: + aux_basis = GaussianTypeOrbitalBasisSet.from_dict(DATA["basis_sets"][_aux_basis]) + elif _aux_basis: + desired_aux_basis = GaussianTypeOrbitalBasisSet(name=_aux_basis) + + _potential = basis_and_potential[el].get("potential") + if isinstance(_potential, GthPotential): + possible_potentials.append(_potential) + elif have_element_file: + if _potential in DATA["potentials"]: + possible_potentials.append(GthPotential.from_dict(DATA["potentials"][_potential])) + elif _potential: + desired_potential = GthPotential(name=_potential) + + if basis_and_potential[el].get("basis_filename"): + data["basis_filenames"].append(basis_and_potential[el].get("basis_filename")) + pfn1 = basis_and_potential[el].get("potential_filename") + pfn2 = data.get("potential_filename") + if pfn1 and pfn2 and pfn1 != pfn2: + raise ValueError( + "Provided potentials have more than one corresponding file." + "CP2K does not support multiple potential filenames" + ) + data["potential_filename"] = basis_and_potential[el].get("potential_filename") + + # Else, if functional/basis settings are provided, create objects to search the data files + else: + if basis_type and have_element_file: + desired_basis = GaussianTypeOrbitalBasisSet( + element=Element(el), + potential=potential_type, + info=BasisInfo.from_string(f"{basis_type}-{functional}"), + ) + desired_potential = GthPotential( + element=Element(el), potential=potential_type, info=PotentialInfo(xc=functional) + ) + if aux_basis_type and have_element_file: + desired_aux_basis = GaussianTypeOrbitalBasisSet(info=BasisInfo.from_string(aux_basis_type)) + + # If basis/potential are not explicit, match the desired ones to available ones in the element file + if desired_basis: + for _possible_basis in DATA.get("basis_sets").values(): + possible_basis = GaussianTypeOrbitalBasisSet.from_dict(_possible_basis) + if desired_basis.softmatch(possible_basis): + possible_basis_sets.append(possible_basis) + if desired_aux_basis: + for _possible_basis in DATA.get("basis_sets").values(): + possible_basis = GaussianTypeOrbitalBasisSet.from_dict(_possible_basis) + if desired_aux_basis.softmatch(possible_basis): + aux_basis = possible_basis + data["basis_filenames"].append(aux_basis.filename) + break + if desired_potential: + for _possible_potential in DATA.get("potentials").values(): + possible_potential = GthPotential.from_dict(_possible_potential) + if desired_potential.softmatch(possible_potential): + possible_potentials.append(possible_potential) + + possible_basis_sets = sorted( + filter(lambda x: x.info.electrons, possible_basis_sets), key=lambda x: x.info.electrons, reverse=True + ) + possible_potentials = sorted( + filter(lambda x: x.info.electrons, possible_potentials), key=lambda x: x.info.electrons, reverse=True + ) + + def match_elecs(x): + for p in possible_potentials: + if x.info.electrons == p.info.electrons: + return p + + for b in possible_basis_sets: + fb = match_elecs(b) + if fb is not None: + basis = b + potential = fb + break + + if basis is None: + if basis_and_potential.get(el, {}).get("basis"): + warnings.warn(f"Unable to validate basis for {el}. Exact name provided will be put in input file.") + basis = basis_and_potential[el].get("basis") + else: + raise ValueError("No explicit basis found and matching has failed.") + + if aux_basis is None: + if basis_and_potential.get(el, {}).get("aux_basis"): + warnings.warn( + f"Unable to validate auxiliary basis for {el}. Exact name provided will be put in input file." + ) + aux_basis = basis_and_potential[el].get("aux_basis") + + if potential is None: + if basis_and_potential.get(el, {}).get("potential"): + warnings.warn( + f"Unable to validate potential for {el}. " " Exact name provided will be put in input file." + ) + potential = basis_and_potential.get(el, {}).get("potential") + else: + raise ValueError("No explicit potential found and matching has failed.") + + if basis.filename: + data["basis_filenames"].append(basis.filename) + pfn1 = data.get("potential_filename") + pfn2 = potential.filename + if pfn1 and pfn2 and pfn1 != pfn2: + raise ValueError( + "Provided potentials have more than one corresponding file." + "CP2K does not support multiple potential filenames" + ) + data["potential_filename"] = pfn2 + + data[el] = { + "basis": basis, + "aux_basis": aux_basis, + "potential": potential, + } + return data + + @staticmethod + def get_cutoff_from_basis(basis_sets, rel_cutoff) -> int | float: + """Given a basis and a relative cutoff. Determine the ideal cutoff variable""" + for b in basis_sets: + if not b.exponents: + raise ValueError(f"Basis set {b} contains missing exponent info. Please specify cutoff manually") + + def get_soft_exponents(b): + if b.potential == "All Electron": + radius = 1.2 if b.element == Element("H") else 1.512 # Hard radius defaults for gapw + threshold = 1e-4 # Default for gapw + max_lshell = max(l for l in b.lmax) + exponent = np.log(radius**max_lshell / threshold) / radius**2 + return [[exponent]] + else: + return b.exponents + + exponents = [get_soft_exponents(b) for b in basis_sets if b.exponents] + exponents = list(itertools.chain.from_iterable(exponents)) + cutoff = np.ceil(max(itertools.chain.from_iterable(exponents))) * rel_cutoff + return cutoff + + @staticmethod + def get_xc_functionals(xc_functionals: list | str | None = None) -> list: + """ + Get XC functionals. If simplified names are provided in kwargs, they + will be expanded into their corresponding X and C names. + """ + names = xc_functionals if xc_functionals else SETTINGS.get("PMG_DEFAULT_CP2K_FUNCTIONAL") + if not names: + raise ValueError("No XC functional provided. Specify kwarg xc_functional or configure your pmgrc.yaml file") + if isinstance(names, str): + names = [names] + names = [n.upper() for n in names] + cp2k_names = [] + for name in names: + if name in ["LDA", "LSDA"]: + cp2k_names.append("PADE") + elif name == "SCAN": + cp2k_names.extend(["MGGA_X_SCAN", "MGGA_C_SCAN"]) + elif name == "SCANL": + cp2k_names.extend(["MGGA_X_SCANL", "MGGA_C_SCANL"]) + elif name == "R2SCAN": + cp2k_names.extend(["MGGA_X_R2SCAN", "MGGA_C_R2SCAN"]) + elif name == "R2SCANL": + cp2k_names.extend(["MGGA_X_R2SCANL", "MGGA_C_R2SCANL"]) + else: + cp2k_names.append(name) + + return cp2k_names + + def write_basis_set_file(self, basis_sets, fn="BASIS") -> None: + """Write the basis sets to a file""" + BasisFile(objects=basis_sets).write_file(fn) + + def write_potential_file(self, potentials, fn="POTENTIAL") -> None: + """Write the potentials to a file""" + PotentialFile(objects=potentials).write_file(fn) + + def print_forces(self) -> None: + """ + Print out the forces and stress during calculation + """ + self["FORCE_EVAL"].insert(Section("PRINT", subsections={})) + self["FORCE_EVAL"]["PRINT"].insert(Section("FORCES", subsections={})) + self["FORCE_EVAL"]["PRINT"].insert(Section("STRESS_TENSOR", subsections={})) + + def print_dos(self, ndigits=6) -> None: + """ + Activate printing of the overall DOS file. + + Note: As of 2022.1, ndigits needs to be set to a sufficient value to ensure data is not lost. + Note: As of 2022.1, can only be used with a k-point calculation. + """ + if self.kpoints: + self["force_eval"]["dft"]["print"].insert(DOS(ndigits)) + + def print_pdos(self, nlumo: int = -1) -> None: """ Activate creation of the PDOS file. Args: nlumo (int): Number of virtual orbitals to be added to the MO set (-1=all). - CAUTION: Setting this value to be higher than the number of states present may cause a Cholesky error. + CAUTION: Setting this value to be higher than the number of states present may + cause a Cholesky error. """ - if not self.check("FORCE_EVAL/DFT/PRINT/PDOS"): + if not self.check("FORCE_EVAL/DFT/PRINT/PDOS") and not self.kpoints: self["FORCE_EVAL"]["DFT"]["PRINT"].insert(PDOS(nlumo=nlumo)) - def print_ldos(self, nlumo=-1): + def print_ldos(self, nlumo: int = -1) -> None: """ Activate the printing of LDOS files, printing one for each atom kind by default Args: nlumo (int): Number of virtual orbitals to be added to the MO set (-1=all). - CAUTION: Setting this value to be higher than the number of states present may cause a Cholesky error. + CAUTION: Setting this value to be higher than the number of states present may + cause a Cholesky error. """ if not self.check("FORCE_EVAL/DFT/PRINT/PDOS"): self["FORCE_EVAL"]["DFT"]["PRINT"].insert(PDOS(nlumo=nlumo)) for i in range(self.structure.num_sites): self["FORCE_EVAL"]["DFT"]["PRINT"]["PDOS"].insert(LDOS(i + 1, alias=f"LDOS {i + 1}", verbose=False)) - def print_mo_cubes(self, write_cube=False, nlumo=-1, nhomo=-1): + def print_mo_cubes(self, write_cube: bool = False, nlumo: int = -1, nhomo: int = -1) -> None: """ Activate printing of molecular orbitals. Args: - write_cube (bool): whether to write cube file for the MOs (setting false will just print levels in out file) - nlumo (int): Controls the number of lumos that are printed and dumped as a cube (-1=all) - nhomo (int): Controls the number of homos that are printed and dumped as a cube (-1=all) + write_cube (bool): whether to write cube file for the MOs instead of out file + nlumo (int): Controls the number of lumos printed and dumped as a cube (-1=all) + nhomo (int): Controls the number of homos printed and dumped as a cube (-1=all) """ if not self.check("FORCE_EVAL/DFT/PRINT/MO_CUBES"): self["FORCE_EVAL"]["DFT"]["PRINT"].insert(MO_Cubes(write_cube=write_cube, nlumo=nlumo, nhomo=nhomo)) - def print_mo(self): + def print_mo(self) -> None: """ Print molecular orbitals when running non-OT diagonalization """ raise NotImplementedError - def print_hartree_potential(self, stride=(2, 2, 2)): + def print_v_hartree(self, stride=(2, 2, 2)) -> None: """ - Controls the printing of a cube file with eletrostatic potential generated by the total density - (electrons+ions). It is valid only for QS with GPW formalism. + Controls the printing of a cube file with eletrostatic potential generated by the + total density (electrons+ions). It is valid only for QS with GPW formalism. Note that by convention the potential has opposite sign than the expected physical one. """ if not self.check("FORCE_EVAL/DFT/PRINT/V_HARTREE_CUBE"): self["FORCE_EVAL"]["DFT"]["PRINT"].insert(V_Hartree_Cube(keywords={"STRIDE": Keyword("STRIDE", *stride)})) - def print_e_density(self, stride=(2, 2, 2)): + def print_e_density(self, stride=(2, 2, 2)) -> None: """ - Controls the printing of cube files with the electronic density and, for LSD calculations, the spin density + Controls the printing of cube files with electronic density and, for UKS, the spin density """ if not self.check("FORCE_EVAL/DFT/PRINT/E_DENSITY_CUBE"): self["FORCE_EVAL"]["DFT"]["PRINT"].insert(E_Density_Cube(keywords={"STRIDE": Keyword("STRIDE", *stride)})) - def set_charge(self, charge: int): + def print_bandstructure(self, kpoints_line_density: int = 20) -> None: """ - Set the overall charge of the simulation cell + Attaches a non-scf band structure calc the end of an SCF loop. + + This requires a kpoint calculation, which is not always default in cp2k. + + Args: + kpoints_line_density: number of kpoints along each branch in line-mode calc. """ + if not self.kpoints: + raise ValueError("Kpoints must be provided to enable band structure printing") + + bs = Band_Structure.from_kpoints( + self.kpoints, + kpoints_line_density=kpoints_line_density, + ) + self["force_eval"]["dft"]["print"].insert(bs) + + def print_hirshfeld(self, on=True) -> None: + """Activate or deactivate printing of Hirshfeld charges""" + section = Section("HIRSHFELD", section_parameters=["ON" if on else "OFF"]) + self["force_eval"]["dft"]["print"].insert(section) + + def print_mulliken(self, on=False) -> None: + """Activate or deactivate printing of Mulliken charges""" + section = Section("MULLIKEN", section_parameters=["ON" if on else "OFF"]) + self["force_eval"]["dft"]["print"].insert(section) + + def set_charge(self, charge: int) -> None: + """Set the overall charge of the simulation cell""" self["FORCE_EVAL"]["DFT"]["CHARGE"] = Keyword("CHARGE", int(charge)) def activate_hybrid( @@ -500,42 +722,45 @@ def activate_hybrid( max_memory: int = 2000, cutoff_radius: float = 8.0, potential_type: str | None = None, + omega: float = 0.11, scale_coulomb: float = 1, scale_gaussian: float = 1, scale_longrange: float = 1, - omega: float = 0.11, - aux_basis: dict | None = None, admm: bool = True, + admm_method: str = "BASIS_PROJECTION", + admm_purification_method: str = "NONE", + admm_exch_correction_func: str = "DEFAULT", eps_schwarz: float = 1e-7, eps_schwarz_forces: float = 1e-6, screen_on_initial_p: bool = True, screen_p_forces: bool = True, - ): + ) -> None: """ Basic set for activating hybrid DFT calculation using Auxiliary Density Matrix Method. - Note 1: When running ADMM with cp2k, memory is very important. If the memory requirements exceed - what is available (see max_memory), then CP2K will have to calculate the 4-electron integrals - for HFX during each step of the SCF cycle. ADMM provides a huge speed up by making the memory - requirements *feasible* to fit into RAM, which means you only need to calculate the integrals - once each SCF cycle. But, this only works if it fits into memory. When setting up ADMM - calculations, we recommend doing whatever is possible to fit all the 4EI into memory. + Note 1: When running ADMM with cp2k, memory is very important. If the memory requirements + exceed what is available (see max_memory), then CP2K will have to calculate the 4-electron + integrals for HFX during each step of the SCF cycle. ADMM provides a huge speed up by + making the memory requirements *feasible* to fit into RAM, which means you only need to + calculate the integrals once each SCF cycle. But, this only works if it fits into memory. + When setting up ADMM calculations, we recommend doing whatever is possible to fit all the + 4EI into memory. Note 2: This set is designed for reliable high-throughput calculations, NOT for extreme accuracy. Please review the in-line comments in this method if you want more control. Args: - hybrid_functional (str): Type of hybrid functional. This set supports HSE (screened) and PBE0 - (truncated). Default is PBE0, which converges easier in the GPW basis used by - cp2k. + hybrid_functional (str): Type of hybrid functional. This set supports HSE (screened) + and PBE0 (truncated). Default is PBE0, which converges easier in the GPW basis + used by cp2k. hf_fraction (float): fraction of exact HF exchange energy to mix. Default: 0.25 gga_x_fraction (float): fraction of gga exchange energy to retain. Default: 0.75 gga_c_fraction (float): fraction of gga correlation energy to retain. Default: 1.0 - max_memory (int): Maximum memory available to each MPI process (in Mb) in the calculation. - Most modern computing nodes will have ~2Gb per core, or 2048 Mb, but check for - your specific system. This value should be as large as possible while still leaving - some memory for the other parts of cp2k. Important: If this value is set larger - than the memory limits, CP2K will likely seg-fault. + max_memory (int): Maximum memory available to each MPI process (in Mb) in the + calculation. Most modern computing nodes will have ~2Gb per core, or 2048 Mb, + but check for your specific system. This value should be as large as possible + while still leaving some memory for the other parts of cp2k. Important: If + this value is set larger than the memory limits, CP2K will likely seg-fault. Default: 2000 cutoff_radius (float): for truncated hybrid functional (i.e. PBE0), this is the cutoff radius. The default is selected as that which generally gives convergence, but @@ -548,49 +773,43 @@ def activate_hybrid( values will constitute a user-override. omega (float): For HSE, this specifies the screening parameter. HSE06 sets this as 0.2, which is the default. - aux_basis (dict): If you want to specify the aux basis to use, specify it as a dict of - the form {'specie_1': 'AUX_BASIS_1', 'specie_2': 'AUX_BASIS_2'} - admm (bool): Whether or not to use the auxiliary density matrix method for the exact - HF exchange contribution. Highly recommended. Speed ups between 10x and aaa1000x are - possible when compared to non ADMM hybrid calculations. Default: True - eps_schwarz (float): Screening threshold for HFX, in Ha. Contributions smaller than this - will be screened. The smaller the value, the more accurate, but also the more + scale_coulomb: Scale for the coulomb operator if using a range separated functional + scale_gaussian: Scale for the gaussian operator (if applicable) + scale_longrange: Scale for the coulomb operator if using a range separated functional + admm: Whether or not to use the auxiliary density matrix method for the exact + HF exchange contribution. Highly recommended. Speed ups between 10x and 1000x are + possible when compared to non ADMM hybrid calculations. + admm_method: Method for constructing the auxiliary basis + admm_purification_method: Method for purifying the auxiliary density matrix so as to + preserve properties, such as idempotency. May lead to shifts in the + eigenvalues. + admm_exch_correction_func: Which functional to use to calculate the exchange correction + E_x(primary) - E_x(aux) + eps_schwarz: Screening threshold for HFX, in Ha. Contributions smaller than + this will be screened. The smaller the value, the more accurate, but also the more costly. Default value is 1e-7. 1e-6 works in a large number of cases, but is quite aggressive, which can lead to convergence issues. - eps_schwarz_forces (float): Same as for eps_schwarz, but for screening contributions to + eps_schwarz_forces: Same as for eps_schwarz, but for screening contributions to forces. Convergence is not as sensitive with respect to eps_schwarz forces as compared to eps_schwarz, and so 1e-6 should be good default. - screen_on_initial_p (bool): If an initial density matrix is provided, in the form of a + screen_on_initial_p: If an initial density matrix is provided, in the form of a CP2K wfn restart file, then this initial density will be used for screening. This is generally very computationally efficient, but, as with eps_schwarz, can lead to instabilities if the initial density matrix is poor. - screen_p_forces (bool): Same as screen_on_initial_p, but for screening of forces. + screen_p_forces: Same as screen_on_initial_p, but for screening of forces. """ - if admm: - aux_basis = aux_basis or {} - aux_basis = {s: aux_basis[s] if s in aux_basis else None for s in self.structure.symbol_set} - basis = get_aux_basis(basis_type=aux_basis) - if isinstance(self["FORCE_EVAL"]["DFT"]["BASIS_SET_FILE_NAME"], KeywordList): - self["FORCE_EVAL"]["DFT"]["BASIS_SET_FILE_NAME"].extend( - [Keyword("BASIS_SET_FILE_NAME", k) for k in ["BASIS_ADMM", "BASIS_ADMM_MOLOPT"]], - ) + if not admm: + for k, v in self.basis_and_potential.items(): + if "aux_basis" in v: + del self.basis_and_potential[k]["aux_basis"] + del self["force_eval"]["subsys"] + self.create_subsys(self.structure) - for k, v in self["FORCE_EVAL"]["SUBSYS"].subsections.items(): - if v.name.upper() == "KIND": - if isinstance(v.keywords["BASIS_SET"], KeywordList) and any( - "AUX_FIT" in k.values for k in v.keywords["BASIS_SET"] - ): - continue - if any(k.upper() == "AUX_FIT" for k in v.keywords["BASIS_SET"].values): - continue - kind = v["ELEMENT"].values[0] - v.keywords["BASIS_SET"] += Keyword("BASIS_SET", "AUX_FIT", basis[kind]) - - # Don't change unless you know what you're doing - # Use NONE for accurate eigenvalues (static calcs) + else: aux_matrix_params = { - "ADMM_PURIFICATION_METHOD": Keyword("ADMM_PURIFICATION_METHOD", "NONE"), - "METHOD": Keyword("METHOD", "BASIS_PROJECTION"), + "ADMM_PURIFICATION_METHOD": Keyword("ADMM_PURIFICATION_METHOD", admm_purification_method), + "METHOD": Keyword("METHOD", admm_method), + "EXCH_CORRECTION_FUNC": Keyword("EXCH_CORRECTION_FUNC", admm_exch_correction_func), } aux_matrix = Section( "AUXILIARY_DENSITY_MATRIX_METHOD", @@ -625,7 +844,7 @@ def activate_hybrid( pbe = PBE("ORIG", scale_c=1, scale_x=0) xc_functional = Xc_Functional(functionals=[], subsections={"PBE": pbe}) - potential_type = potential_type or "SHORTRANGE" + potential_type = potential_type if potential_type else "SHORTRANGE" xc_functional.insert( Section( "XWPBE", @@ -647,28 +866,25 @@ def activate_hybrid( elif hybrid_functional == "PBE0": pbe = PBE("ORIG", scale_c=1, scale_x=1 - hf_fraction) xc_functional = Xc_Functional(functionals=[], subsections={"PBE": pbe}) - xc_functional.insert( - Section( - "PBE_HOLE_T_C_LR", - subsections={}, - keywords={ - "CUTOFF_RADIUS": Keyword("CUTOFF_RADIUS", cutoff_radius), - "SCALE_X": Keyword("SCALE_X", hf_fraction), - }, - ) - ) if isinstance(self.structure, Molecule): potential_type = "COULOMB" else: potential_type = "TRUNCATED" - ip_keywords.update( - { - "POTENTIAL_TYPE": Keyword("POTENTIAL_TYPE", potential_type), - "CUTOFF_RADIUS": Keyword("CUTOFF_RADIUS", cutoff_radius), - "T_C_G_DATA": Keyword("T_C_G_DATA", "t_c_g.dat"), - } - ) + xc_functional.insert( + Section( + "PBE_HOLE_T_C_LR", + subsections={}, + keywords={ + "CUTOFF_RADIUS": Keyword("CUTOFF_RADIUS", cutoff_radius), + "SCALE_X": Keyword("SCALE_X", hf_fraction), + }, + ) + ) + ip_keywords["CUTOFF_RADIUS"] = Keyword("CUTOFF_RADIUS", cutoff_radius) + ip_keywords["T_C_G_DATA"] = Keyword("T_C_G_DATA", "t_c_g.dat") + + ip_keywords["POTENTIAL_TYPE"] = Keyword("POTENTIAL_TYPE", potential_type) elif hybrid_functional == "RSH": """ Activates range separated functional using mixing of the truncated @@ -678,7 +894,7 @@ def activate_hybrid( pbe = PBE("ORIG", scale_c=1, scale_x=0) xc_functional = Xc_Functional(functionals=[], subsections={"PBE": pbe}) - potential_type = potential_type or "MIX_CL_TRUNC" + potential_type = potential_type if potential_type else "MIX_CL_TRUNC" hf_fraction = 1 ip_keywords.update( { @@ -713,9 +929,8 @@ def activate_hybrid( ) else: warnings.warn( - "Unknown hybrid functional. Using PBE base functional" - " and overriding all settings manually. Proceed with" - " caution." + "Unknown hybrid functional. Using PBE base functional and overriding all " + "settings manually. Proceed with caution." ) pbe = PBE("ORIG", scale_c=gga_c_fraction, scale_x=gga_x_fraction) xc_functional = Xc_Functional(functionals=[], subsections={"PBE": pbe}) @@ -765,7 +980,23 @@ def activate_hybrid( self.subsections["FORCE_EVAL"]["DFT"].insert(xc) - def activate_motion(self): + def activate_motion( + self, + max_drift: float = 3e-3, + rms_drift: float = 1.5e-3, + max_force: float = 4.5e-4, + rms_force: float = 3e-4, + max_iter: int = 200, + optimizer: str = "BFGS", + trust_radius: float = 0.25, + line_search: str = "2PNT", + ensemble: str = "NVE", + temperature: float | int = 300, + timestep: float | int = 0.5, + nsteps: int = 3, + thermostat: str = "NOSE", + nproc_rep: int = 1, + ) -> None: """ Turns on the motion section for GEO_OPT, CELL_OPT, etc. calculations. Will turn on the printing subsections and also bind any constraints @@ -774,12 +1005,69 @@ def activate_motion(self): if not self.check("MOTION"): self.insert(Section("MOTION", subsections={})) + run_type = self["global"].get("run_type", Keyword("run_type", "energy")).values[0].upper() + if run_type == "GEOMETRY_OPTIMIZATION": + run_type = "GEO_OPT" + if run_type == "MOLECULAR_DYNAMICS": + run_type = "MD" + self["MOTION"].insert(Section("PRINT", subsections={})) self["MOTION"]["PRINT"].insert(Section("TRAJECTORY", section_parameters=["ON"], subsections={})) self["MOTION"]["PRINT"].insert(Section("CELL", subsections={})) self["MOTION"]["PRINT"].insert(Section("FORCES", subsections={})) self["MOTION"]["PRINT"].insert(Section("STRESS", subsections={})) + # ACTIVATE RELAX IF REQUESTED + if run_type in ["GEO_OPT", "CELL_OPT"]: + opt_params = { + "MAX_DR": Keyword("MAX_DR", max_drift), + "MAX_FORCE": Keyword("MAX_FORCE", max_force), + "RMS_DR": Keyword("RMS_DR", rms_drift), + "RMS_FORCE": Keyword("RMS_FORCE", rms_force), + "MAX_ITER": Keyword("MAX_ITER", max_iter), + "OPTIMIZER": Keyword("OPTIMIZER", optimizer), + } + opt = Section(run_type, subsections={}, keywords=opt_params) + if optimizer.upper() == "CG": + ls = Section("LINE_SEARCH", subsections={}, keywords={"TYPE": Keyword("TYPE", line_search)}) + cg = Section("CG", subsections={"LINE_SEARCH": ls}, keywords={}) + opt.insert(cg) + elif optimizer.upper() == "BFGS": + bfgs = Section("BFGS", subsections={}, keywords={"TRUST_RADIUS": Keyword("TRUST_RADIUS", trust_radius)}) + opt.insert(bfgs) + + self["MOTION"].insert(opt) + + # ACTIVATE MD IF REQUESTED + elif run_type == "MD": + md_keywords = { + "ENSEMBLE": Keyword("ENSEMBLE", ensemble), + "TEMPERATURE": Keyword("TEMPERATURE", temperature), + "TIMESTEP": Keyword("TIMESTEP", timestep), + "STEPS": Keyword("STEPS", nsteps), + } + thermostat = Section("THERMOSTAT", keywords={"TYPE": thermostat}) + md = Section("MD", subsections={"THERMOSTAT": thermostat}, keywords=md_keywords) + self["MOTION"].insert(md) + + elif run_type == "BAND": + convergence_control_params = { + "MAX_DR": Keyword("MAX_DR", max_drift), + "MAX_FORCE": Keyword("MAX_FORCE", max_force), + "RMS_DR": Keyword("RMS_DR", rms_drift), + "RMS_FORCE": Keyword("RMS_FORCE", rms_force), + } + band_kwargs = { + "BAND_TYPE": Keyword("BAND_TYPE", "IT-NEB", description="Improved tangent NEB"), + "NUMBER_OF_REPLICA": Keyword("NUMBER_OF_REPLICA"), + "NPROC_REP": Keyword("NPROC_REP", nproc_rep), + } + band = Section("BAND", keywords=band_kwargs) + band.insert(Section("CONVERGENCE_CONTROL", keywords=convergence_control_params)) + self["MOTION"].insert(band) + + self.modify_dft_print_iters(0, add_last="numeric") + if "fix" in self.structure.site_properties: self["motion"].insert(Section("CONSTRAINT")) @@ -813,7 +1101,97 @@ def activate_motion(self): ) ) - def activate_fast_minimization(self, on): + def activate_tddfpt(self, **kwargs) -> None: + """Activate TDDFPT for calculating excited states. Only works with GPW. Supports hfx.""" + if not self.check("force_eval/properties"): + self["FORCE_EVAL"].insert(Section("PROPERTIES")) + self["FORCE_EVAL"]["PROPERTIES"].insert(Section("TDDFPT", **kwargs)) + + def activate_epr(self, **kwargs) -> None: + """Calculate g-tensor. Requires localize. Suggested with GAPW""" + if not self.check("force_eval/properties/linres/localize"): + self.activate_localize() + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"].insert(Section("EPR", **kwargs)) + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"]["EPR"].update({"PRINT": {"G_TENSOR": {}}}) + + def activate_nmr(self, **kwargs) -> None: + """Calculate nmr shifts. Requires localize. Suggested with GAPW""" + if not self.check("force_eval/properties/linres/localize"): + self.activate_localize() + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"].insert(Section("NMR", **kwargs)) + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"]["NMR"].update({"PRINT": {"CHI_TENSOR": {}, "SHIELDING_TENSOR": {}}}) + + def activate_spinspin(self, **kwargs) -> None: + """Calculate spin-spin coupling tensor. Requires localize.""" + if not self.check("force_eval/properties/linres/localize"): + self.activate_localize() + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"].insert(Section("SPINSPIN", **kwargs)) + + def activate_polar(self, **kwargs) -> None: + """Calculate polarizations (including raman).""" + if not self.check("force_eval/properties"): + self["FORCE_EVAL"].insert(Section("PROPERTIES")) + if not self.check("force_eval/properties/linres"): + self["FORCE_EVAL"]["PROPERTIES"].insert("LINRES") + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"].insert(Section("POLAR", **kwargs)) + + def activate_hyperfine(self) -> None: + """Print the hyperfine coupling constants.""" + self["FORCE_EVAL"]["DFT"]["PRINT"].insert(Section("HYPERFINE_COUPLING_TENSOR", FILENAME="HYPERFINE")) + + def activate_localize(self, states="OCCUPIED", preconditioner="FULL_ALL", restart=False) -> None: + """ + Activate calculation of the maximally localized wannier functions. + + Args: + states: Which states to calculate. occupied, unoccupied, mixed states, or all states. At + present, unoccupied orbitals are only implemented for GPW. + preconditioner: Preconditioner to use for optimize + restart: Initialize from the localization restart file + """ + if not self.check("force_eval/properties"): + self["FORCE_EVAL"].insert(Section("PROPERTIES")) + if not self.check("force_eval/properties/linres"): + self["FORCE_EVAL"]["PROPERTIES"].insert(Section("LINRES")) + + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"].insert( + Section("LOCALIZE", PRECONDITIONER=preconditioner, STATES=states, RESTART=restart) + ) + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"]["LOCALIZE"].insert(Section("PRINT")) + self["FORCE_EVAL"]["PROPERTIES"]["LINRES"]["LOCALIZE"]["PRINT"].insert(Section("LOC_RESTART")) + + def activate_vdw_potential( + self, + dispersion_functional: str, + potential_type: str, + ) -> None: + """ + Activate van der Waals dispersion corrections. + + Args: + dispersion_functional: Type of dispersion functional. + Options: pair_potential or non_local + potential_type: What type of potential to use, given a dispersion functional type + Options: DFTD2, DFTD3, DFTD3(BJ), DRSLL, LMKLL, RVV10 + """ + vdw = Section( + "VDW_POTENTIAL", keywords={"DISPERSION_FUNCTIONAL": Keyword("DISPERSION_FUNCTIONAL", dispersion_functional)} + ) + keywords = {"TYPE": Keyword("TYPE", potential_type)} + if dispersion_functional.upper() == "PAIR_POTENTIAL": + reference_functional = self.xc_functionals[0] + warnings.warn( + "Reference functional will not be checked for validity. " + "Calculation will fail if the reference functional " + "does not exist in the dftd3 reference data" + ) + keywords["PARAMETER_FILE_NAME"] = Keyword("PARAMETER_FILE_NAME", "dftd3.dat") + keywords["REFERENCE_FUNCTIONAL"] = Keyword("REFERENCE_FUNCTIONAL", reference_functional) + + vdw.insert(Section(dispersion_functional, keywords=keywords)) + self["FORCE_EVAL"]["DFT"]["XC"].insert(vdw) + + def activate_fast_minimization(self, on) -> None: """ Method to modify the set to use fast SCF minimization. """ @@ -826,7 +1204,7 @@ def activate_fast_minimization(self, on): ) self.update({"FORCE_EVAL": {"DFT": {"SCF": {"OT": ot}}}}) - def activate_robust_minimization(self): + def activate_robust_minimization(self) -> None: """ Method to modify the set to use more robust SCF minimization technique """ @@ -838,7 +1216,7 @@ def activate_robust_minimization(self): ) self.update({"FORCE_EVAL": {"DFT": {"SCF": {"OT": ot}}}}) - def activate_very_strict_minimization(self): + def activate_very_strict_minimization(self) -> None: """ Method to modify the set to use very strict SCF minimization scheme :return: @@ -851,20 +1229,89 @@ def activate_very_strict_minimization(self): ) self.update({"FORCE_EVAL": {"DFT": {"SCF": {"OT": ot}}}}) - def activate_nonperiodic(self, solver="MT"): + def activate_nonperiodic(self, solver="ANALYTIC") -> None: """ Activates a calculation with non-periodic calculations by turning of PBC and changing the poisson solver. Still requires a CELL to put the atoms """ - if not self.check("FORCE_EVAL/SUBSYS/CELL"): - x = max(s.coords[0] for s in self.structure.sites) - y = max(s.coords[1] for s in self.structure.sites) - z = max(s.coords[2] for s in self.structure.sites) - self["FORCE_EVAL"]["SUBSYS"].insert(Cell(lattice=Lattice([[x, 0, 0], [0, y, 0], [0, 0, z]]))) - self["FORCE_EVAL"]["SUBSYS"]["CELL"].add(Keyword("PERIODIC", "NONE")) - kwds = {"POISSON_SOLVER": Keyword("POISSON_SOLVER", solver), "PERIODIC": Keyword("PERIODIC", "NONE")} + kwds = { + "POISSON_SOLVER": Keyword("POISSON_SOLVER", solver), + "PERIODIC": Keyword("PERIODIC", "NONE"), + } self["FORCE_EVAL"]["DFT"].insert(Section("POISSON", subsections={}, keywords=kwds)) + def create_subsys(self, structure: Structure | Molecule) -> None: + """ + Create the structure for the input + """ + subsys = Subsys() + if isinstance(structure, Structure): + subsys.insert(Cell(structure.lattice)) + else: + x = max(structure.cart_coords[:, 0]) + y = max(structure.cart_coords[:, 1]) + z = max(structure.cart_coords[:, 2]) + x = x if x else 1 + y = y if y else 1 + z = z if z else 1 + cell = Cell(lattice=Lattice([[10 * x, 0, 0], [0, 10 * y, 0], [0, 0, 10 * z]])) + cell.add(Keyword("PERIODIC", "NONE")) + subsys.insert(cell) + + # Insert atom kinds by identifying the unique sites (unique element and site properties) + unique_kinds = get_unique_site_indices(structure) + for k, v in unique_kinds.items(): + kind = k.split("_")[0] + kwargs = {} + + _ox = ( + self.structure.site_properties["oxi_state"][v[0]] + if "oxi_state" in self.structure.site_properties + else 0 + ) + _sp = self.structure.site_properties["spin"][v[0]] if "spin" in self.structure.site_properties else 0 + + bs = BrokenSymmetry.from_el(kind, _ox, _sp) if _ox else None + + if "magmom" in self.structure.site_properties and not bs: + kwargs["magnetization"] = self.structure.site_properties["magmom"][v[0]] + + if "ghost" in self.structure.site_properties: + kwargs["ghost"] = self.structure.site_properties["ghost"][v[0]] + + if "basis_set" in self.structure.site_properties: + basis_set = self.structure.site_properties["basis_set"][v[0]] + else: + basis_set = self.basis_and_potential[kind].get("basis") + + if "potential" in self.structure.site_properties: + potential = self.structure.site_properties["potential"][v[0]] + else: + potential = self.basis_and_potential[kind].get("potential") + + if "aux_basis" in self.structure.site_properties: + kwargs["aux_basis"] = self.structure.site_properties["aux_basis"][v[0]] + elif self.basis_and_potential[kind].get("aux_basis"): + kwargs["aux_basis"] = self.basis_and_potential[kind].get("aux_basis") + + _kind = Kind( + kind, + alias=k, + basis_set=basis_set, + potential=potential, + subsections={"BS": bs} if bs else {}, + **kwargs, + ) + if self.qs_method.upper() == "GAPW": + _kind.add(Keyword("RADIAL_GRID", 200)) + _kind.add(Keyword("LEBEDEV_GRID", 80)) + + subsys.insert(_kind) + + coord = Coord(structure, aliases=unique_kinds) + subsys.insert(coord) + self["FORCE_EVAL"].insert(subsys) + def modify_dft_print_iters(self, iters, add_last="no"): """ Modify all DFT print iterations at once. Common use is to set iters to the max @@ -873,7 +1320,7 @@ def modify_dft_print_iters(self, iters, add_last="no"): speeding up/saving space on GEO_OPT or MD runs where you don't need the intermediate values. - Args + Args: iters (int): print each "iters" iterations. add_last (str): Whether to explicitly include the last iteration, and how to mark it. numeric: mark last iteration with the iteration number @@ -881,442 +1328,92 @@ def modify_dft_print_iters(self, iters, add_last="no"): no: do not explicitly include the last iteration """ assert add_last.lower() in ["no", "numeric", "symbolic"] - if self.check("FORCE_EVAL/DFT/PRINT"): - run_type = self["global"].get("run_type", Keyword("run_type", "energy")).values[0] + run_type = self["global"].get("run_type", Keyword("run_type", "energy")).values[0].upper() + if run_type not in ["ENERGY_FORCE", "ENERGY", "WAVEFUNCTION_OPTIMIZATION", "WFN_OPT"] and self.check( + "FORCE_EVAL/DFT/PRINT" + ): for v in self["force_eval"]["dft"]["print"].subsections.values(): - - if v.name.upper() in ["ACTIVE_SPACE", "BAND_STRUCTURE", "GAPW", "IMPLICIT_PSOLVER", "SCCS", "WFN_MIX"]: + if v.name.upper() in [ + "ACTIVE_SPACE", + "BAND_STRUCTURE", + "GAPW", + "IMPLICIT_PSOLVER", + "SCCS", + "WFN_MIX", + ]: continue v.insert(Section("EACH", subsections=None, keywords={run_type: Keyword(run_type, iters)})) v.keywords["ADD_LAST"] = Keyword("ADD_LAST", add_last) + def validate(self): + """Implements a few checks for a valid input set""" + if self.check("force_eval/dft/kpoints") and self.check("force_eval/dft/xc/hf"): + raise Cp2kValidationError("Does not support hartree fock with kpoints") -class StaticSet(DftSet): - - """ - Basic static energy calculation. Turns on Quickstep module, sets the run_type in global, - and uses structure object to build the subsystem. - """ - - def __init__( - self, - structure: Structure | Molecule, - project_name: str = "Static", - run_type: str = "ENERGY_FORCE", - override_default_params: dict | None = None, - **kwargs, - ): - """ - Args: - structure: Pymatgen structure object - project_name (str): What to name this cp2k project (controls naming of files printed out) - run_type (str): Run type. As a static set it should be one of the static aliases, like 'ENERGY_FORCE' - """ - super().__init__(structure, **kwargs) - global_section = Global(project_name=project_name, run_type=run_type) - self.structure = structure - self.project_name = project_name - self.run_type = run_type - self.override_default_params = override_default_params or {} - self.insert(global_section) - self.update(self.override_default_params) - self.kwargs = kwargs - - -class RelaxSet(DftSet): - - """ - CP2K input set containing the basic settings for performing geometry optimization. Values are all cp2k - defaults, and should be good for most systems of interest. - """ + for _, v in self["force_eval"]["subsys"].subsections.items(): + if v.name.upper() == "KIND": + if v["POTENTIAL"].values[0].upper() == "ALL": + if self["force_eval"]["dft"]["qs"]["method"].values[0].upper() != "GAPW": + raise Cp2kValidationError("All electron basis sets require GAPW method") - def __init__( - self, - structure: Structure | Molecule, - max_drift: float = 3e-3, - rms_drift: float = 1.5e-3, - max_force: float = 4.5e-4, - rms_force: float = 3e-4, - max_iter: int = 200, - project_name: str = "Relax", - optimizer: str = "BFGS", - override_default_params: dict | None = None, - **kwargs, - ): - """ - Args: - structure: Pymatgen structure object - max_drift: Convergence criterion for the maximum geometry change between the current and the - last optimizer iteration. This keyword cannot be repeated and it expects precisely one real. - Default value: 1.5.00000000E-003 - Default unit: [bohr] - rms_drift: Convergence criterion for the RMS geometry change between the current and the - last optimizer iteration. This keyword cannot be repeated and it expects precisely one real. - Default value: 1.00000000E-003 - Default unit: [bohr] - max_force (float): Convergence criterion for the maximum force component of the current configuration. - This keyword cannot be repeated and it expects precisely one real. - Default value: 1e-3 - Default unit: [bohr^-1*hartree] - rms_force (float): Convergence criterion for the RMS force component of the current configuration. - This keyword cannot be repeated and it expects precisely one real. - Default value: 1e-3 - Default unit: [bohr^-1*hartree] - max_iter (int): Specifies the maximum number of geometry optimization steps. - One step might imply several force evaluations for the CG and LBFGS optimizers. - This keyword cannot be repeated and it expects precisely one integer. - Default value: 200 - optimizer (str): Specify which method to use to perform a geometry optimization. - This keyword cannot be repeated and it expects precisely one keyword. BFGS is a - quasi-newtonian method, and will best for "small" systems near the minimum. LBFGS - is a limited memory version that can be used for "large" (>1000 atom) systems when - efficiency outweighs robustness. CG is more robust, especially when you are far from - the minimum, but it slower. - Default value: BFGS - """ - super().__init__(structure, **kwargs) - self.structure = structure - self.max_drift = max_drift - self.rms_drift = rms_drift - self.max_force = max_force - self.rms_force = rms_force - self.max_iter = max_iter - self.project_name = project_name - self.optimizer = optimizer - self.override_default_params = override_default_params or {} - self.kwargs = kwargs +class StaticSet(DftSet): + """Quick Constructor for static calculations""" - global_section = Global(project_name=project_name, run_type="GEO_OPT") + def __init__(self, **kwargs) -> None: + super().__init__(run_type="ENERGY_FORCE", **kwargs) - geo_opt_params = { - "TYPE": Keyword("TYPE", "MINIMIZATION"), - "MAX_DR": Keyword("MAX_DR", max_drift), - "MAX_FORCE": Keyword("MAX_FORCE", max_force), - "RMS_DR": Keyword("RMS_DR", rms_drift), - "RMS_FORCE": Keyword("RMS_FORCE", rms_force), - "MAX_ITER": Keyword("MAX_ITER", max_iter), - "OPTIMIZER": Keyword("OPTIMIZER", optimizer), - } - geo_opt = Section("GEO_OPT", subsections={}, keywords=geo_opt_params) - if optimizer.upper() == "CG": - ls = Section("LINE_SEARCH", subsections={}, keywords={"TYPE": Keyword("TYPE", "2PNT")}) - cg = Section("CG", subsections={"LINE_SEARCH": ls}, keywords={}) - geo_opt.insert(cg) +class RelaxSet(DftSet): + """Quick Constructor for geometry relaxation""" + def __init__(self, **kwargs) -> None: + super().__init__(run_type="GEO_OPT", **kwargs) self.activate_motion() - self["MOTION"].insert(geo_opt) - self.insert(global_section) - self.modify_dft_print_iters(0, add_last="numeric") - self.update(self.override_default_params) -# TODO Add cell opt convergence criteria class CellOptSet(DftSet): + """Quick Constructor for cell optimization relaxation""" - """ - CP2K input set containing the basic settings for performing geometry optimization. Values are all cp2k - defaults, and should be good for most systems of interest. - """ - - def __init__( - self, - structure: Structure | Molecule, - project_name: str = "CellOpt", - override_default_params: dict | None = None, - **kwargs, - ): - """ - Args: - structure: Pymatgen structure object - max_drift: Convergence criterion for the maximum geometry change between the current and the - last optimizer iteration. This keyword cannot be repeated and it expects precisely one real. - Default value: 3.00000000E-003 - Default unit: [bohr] - max_force (float): Convergence criterion for the maximum force component of the current configuration. - This keyword cannot be repeated and it expects precisely one real. - Default value: 4.50000000E-004 - Default unit: [bohr^-1*hartree] - max_iter (int): Specifies the maximum number of geometry optimization steps. - One step might imply several force evaluations for the CG and LBFGS optimizers. - This keyword cannot be repeated and it expects precisely one integer. - Default value: 200 - optimizer (str): Specify which method to use to perform a geometry optimization. - This keyword cannot be repeated and it expects precisely one keyword. BFGS is a - quasi-newtonian method, and will best for "small" systems near the minimum. LBFGS - is a limited memory version that can be used for "large" (>1000 atom) systems when - efficiency outweighs robustness. CG is more robust, especially when you are far from - the minimum, but it slower. - Default value: BFGS - """ - super().__init__(structure, **kwargs) - - self.structure = structure - self.project_name = project_name - self.override_default_params = override_default_params or {} - self.kwargs = kwargs - global_section = Global(project_name=project_name, run_type="CELL_OPT") - self.insert(global_section) + def __init__(self, **kwargs) -> None: + super().__init__(run_type="CELL_OPT", **kwargs) self.activate_motion() - self.modify_dft_print_iters(0, add_last="numeric") - self.update(self.override_default_params) -class HybridStaticSet(StaticSet): +class HybridStaticSet(DftSet): + """Quick Constructor for static calculations""" - """ - Static calculation using hybrid DFT with the ADMM formalism in Cp2k. - """ + def __init__(self, **kwargs) -> None: + super().__init__(run_type="ENERGY_FORCE", **kwargs) + self.activate_hybrid(**kwargs.get("activate_hybrid", {})) - def __init__( - self, - structure: Structure | Molecule, - hybrid_functional: str = "PBE0", - hf_fraction: float = 0.25, - project_name: str = "Hybrid-Static", - gga_x_fraction: float = 0.75, - gga_c_fraction: float = 1, - potential_type: str | None = None, - scale_coulomb: float = 1, - scale_gaussian: float = 1, - scale_longrange: float = 1, - override_default_params: dict | None = None, - max_memory: int = 2000, - cutoff_radius: float = 8.0, - omega: float = 0.2, - aux_basis: dict | None = None, - admm: bool = True, - eps_schwarz: float = 1e-6, - eps_schwarz_forces: float = 1e-6, - screen_on_initial_p: bool = True, - screen_p_forces: bool = True, - **kwargs, - ): - """ - Args: - structure: pymatgen structure object - method: hybrid dft method to use (currently select between HSE06 and PBE0) - hf_fraction: percentage of exact HF to mix-in - project_name: what to call this project - gga_x_fraction: percentage of gga exchange to use - gga_c_fraction: percentage of gga correlation to use - override_default_params: override settings (see above). - """ - super().__init__(structure, project_name=project_name, **kwargs) - self.structure = structure - self.hybrid_functional = hybrid_functional - self.hf_fraction = hf_fraction - self.project_name = project_name - self.potential_type = potential_type - self.gga_x_fraction = gga_x_fraction - self.gga_c_fraction = gga_c_fraction - self.scale_coulomb = scale_coulomb - self.scale_gaussian = scale_gaussian - self.scale_longrange = scale_longrange - self.override_default_params = override_default_params or {} - self.max_memory = max_memory - self.cutoff_radius = cutoff_radius - self.omega = omega - self.aux_basis = aux_basis - self.admm = admm - self.eps_schwarz = eps_schwarz - self.eps_schwarz_forces = eps_schwarz_forces - self.screen_on_initial_p = screen_on_initial_p - self.screen_p_forces = screen_p_forces - self.kwargs = kwargs +class HybridRelaxSet(DftSet): + """Quick Constructor for hybrid geometry relaxation""" - self.activate_hybrid( - hybrid_functional=self.hybrid_functional, - hf_fraction=self.hf_fraction, - potential_type=self.potential_type, - gga_x_fraction=self.gga_x_fraction, - gga_c_fraction=self.gga_c_fraction, - scale_coulomb=self.scale_coulomb, - scale_gaussian=self.scale_gaussian, - scale_longrange=self.scale_longrange, - max_memory=self.max_memory, - cutoff_radius=cutoff_radius, - omega=self.omega, - aux_basis=self.aux_basis, - admm=self.admm, - eps_schwarz=self.eps_schwarz, - eps_schwarz_forces=self.eps_schwarz_forces, - screen_on_initial_p=self.screen_on_initial_p, - screen_p_forces=self.screen_p_forces, - ) - self.update(self.override_default_params) + def __init__(self, **kwargs) -> None: + super().__init__(run_type="GEO_OPT", **kwargs) + self.activate_hybrid(**kwargs.get("activate_hybrid", {})) -class HybridRelaxSet(RelaxSet): +class HybridCellOptSet(DftSet): + """Quick Constructor for hybrid cell optimization relaxation""" - """ - Static calculation using hybrid DFT with the ADMM formalism in Cp2k. - """ + def __init__(self, **kwargs) -> None: + super().__init__(run_type="CELL_OPT", **kwargs) + self.activate_hybrid(**kwargs.get("activate_hybrid", {})) - def __init__( - self, - structure: Structure | Molecule, - hybrid_functional: str = "PBE0", - hf_fraction: float = 0.25, - project_name: str = "Hybrid-Static", - potential_type: str | None = None, - gga_x_fraction: float = 0.75, - gga_c_fraction: float = 1, - scale_coulomb: float = 1, - scale_gaussian: float = 1, - scale_longrange: float = 1, - override_default_params: dict | None = None, - max_memory: int = 2000, - cutoff_radius: float = 8.0, - omega: float = 0.2, - aux_basis: dict | None = None, - admm: bool = True, - eps_schwarz: float = 1e-6, - eps_schwarz_forces: float = 1e-6, - screen_on_initial_p: bool = True, - screen_p_forces: bool = True, - **kwargs, - ): - """ - Args: - structure: pymatgen structure object - method: hybrid dft method to use (currently select between HSE06 and PBE0) - hf_fraction: percentage of exact HF to mix-in - project_name: what to call this project - gga_x_fraction: percentage of gga exchange to use - gga_c_fraction: percentage of gga correlation to use - override_default_params: override settings (see above). - """ - super().__init__(structure, project_name=project_name, **kwargs) - - self.structure = structure - self.hybrid_functional = hybrid_functional - self.hf_fraction = hf_fraction - self.project_name = project_name - self.potential_type = potential_type - self.gga_x_fraction = gga_x_fraction - self.gga_c_fraction = gga_c_fraction - self.scale_coulomb = scale_coulomb - self.scale_gaussian = scale_gaussian - self.scale_longrange = scale_longrange - self.override_default_params = override_default_params or {} - self.max_memory = max_memory - self.cutoff_radius = cutoff_radius - self.omega = omega - self.aux_basis = aux_basis - self.admm = admm - self.eps_schwarz = eps_schwarz - self.eps_schwarz_forces = eps_schwarz_forces - self.screen_on_initial_p = screen_on_initial_p - self.screen_p_forces = screen_p_forces - self.kwargs = kwargs - - self.activate_hybrid( - hybrid_functional=self.hybrid_functional, - hf_fraction=self.hf_fraction, - potential_type=self.potential_type, - gga_x_fraction=self.gga_x_fraction, - gga_c_fraction=self.gga_c_fraction, - scale_coulomb=self.scale_coulomb, - scale_gaussian=self.scale_gaussian, - scale_longrange=self.scale_longrange, - max_memory=self.max_memory, - cutoff_radius=cutoff_radius, - omega=self.omega, - aux_basis=self.aux_basis, - admm=self.admm, - eps_schwarz=self.eps_schwarz, - eps_schwarz_forces=self.eps_schwarz_forces, - screen_on_initial_p=self.screen_on_initial_p, - screen_p_forces=self.screen_p_forces, - ) - self.update(self.override_default_params) - - -class HybridCellOptSet(CellOptSet): +class Cp2kValidationError(Exception): """ - Static calculation using hybrid DFT with the ADMM formalism in Cp2k. + Cp2k Validation Exception. Not exhausted. May raise validation + errors for features which actually do work if using a newer version + of cp2k """ - def __init__( - self, - structure: Structure | Molecule, - hybrid_functional: str = "PBE0", - hf_fraction: float = 0.25, - project_name: str = "Hybrid-Static", - potential_type: str | None = None, - gga_x_fraction: float = 0.75, - gga_c_fraction: float = 1, - scale_coulomb: float = 1, - scale_gaussian: float = 1, - scale_longrange: float = 1, - override_default_params: dict | None = None, - max_memory: int = 2000, - cutoff_radius: float = 8.0, - omega: float = 0.2, - aux_basis: dict | None = None, - admm: bool = True, - eps_schwarz: float = 1e-6, - eps_schwarz_forces: float = 1e-6, - screen_on_initial_p: bool = True, - screen_p_forces: bool = True, - **kwargs, - ): - """ - Args: - structure: pymatgen structure object - method: hybrid dft method to use (currently select between HSE06 and PBE0) - hf_fraction: percentage of exact HF to mix-in - project_name: what to call this project - gga_x_fraction: percentage of gga exchange to use - gga_c_fraction: percentage of gga correlation to use - override_default_params: override settings (see above). - """ - super().__init__(structure, project_name=project_name, **kwargs) - - self.structure = structure - self.hybrid_functional = hybrid_functional - self.hf_fraction = hf_fraction - self.project_name = project_name - self.potential_type = potential_type - self.gga_x_fraction = gga_x_fraction - self.gga_c_fraction = gga_c_fraction - self.scale_coulomb = scale_coulomb - self.scale_gaussian = scale_gaussian - self.scale_longrange = scale_longrange - self.override_default_params = override_default_params or {} - self.max_memory = max_memory - self.cutoff_radius = cutoff_radius - self.omega = omega - self.aux_basis = aux_basis - self.admm = admm - self.eps_schwarz = eps_schwarz - self.eps_schwarz_forces = eps_schwarz_forces - self.screen_on_initial_p = screen_on_initial_p - self.screen_p_forces = screen_p_forces - self.kwargs = kwargs + CP2K_VERSION = "v2022.1" - self.activate_hybrid( - hybrid_functional=self.hybrid_functional, - hf_fraction=self.hf_fraction, - potential_type=self.potential_type, - gga_x_fraction=self.gga_x_fraction, - gga_c_fraction=self.gga_c_fraction, - scale_coulomb=self.scale_coulomb, - scale_gaussian=self.scale_gaussian, - scale_longrange=self.scale_longrange, - max_memory=self.max_memory, - cutoff_radius=cutoff_radius, - omega=self.omega, - aux_basis=self.aux_basis, - admm=self.admm, - eps_schwarz=self.eps_schwarz, - eps_schwarz_forces=self.eps_schwarz_forces, - screen_on_initial_p=self.screen_on_initial_p, - screen_p_forces=self.screen_p_forces, - ) - self.update(self.override_default_params) + def __init__(self, message) -> None: + message = f"CP2K {self.CP2K_VERSION}: {message}" + super().__init__(message) diff --git a/pymatgen/io/cp2k/settings.yaml b/pymatgen/io/cp2k/settings.yaml deleted file mode 100644 index c07a95f57c2..00000000000 --- a/pymatgen/io/cp2k/settings.yaml +++ /dev/null @@ -1,2661 +0,0 @@ -Ac: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Ag: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q11 - - DZVP-MOLOPT-SR-GTH-q11 - - TZVP-MOLOPT-SR-GTH-q11 - - TZV2P-MOLOPT-SR-GTH-q11 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q11: 2.586709178255 - SZV-MOLOPT-SR-GTH-q11: 2.586709178255 - TZV2P-MOLOPT-SR-GTH-q11: 2.58670918 - TZVP-MOLOPT-SR-GTH-q11: 2.58670918 - best_basis: TZV2P-MOLOPT-SR-GTH-Q11 - preferred_basis: TZVP-MOLOPT-SR-GTH-q11 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q11 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PADE-q19 - - GTH-PBE-q11 -Al: - basis_sets: - aux_basis: - - cFIT6 - - GTH-def2-QZVP - - cFIT3 - - cpFIT3 - - FIT3 - - pFIT3 - - cFIT7 - - cFIT8 - - cFIT9 - - FIT6 - - FIT7 - - FIT8 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q3 - - DZVP-MOLOPT-SR-GTH-q3 - - TZVP-MOLOPT-SR-GTH-q3 - - TZV2P-MOLOPT-SR-GTH-q3 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q3: 1.212902319099 - SZV-MOLOPT-SR-GTH-q3: 1.212902319099 - TZV2P-MOLOPT-SR-GTH-q3: 1.21290232 - TZVP-MOLOPT-SR-GTH-q3: 1.21290232 - best_basis: TZV2P-MOLOPT-SR-GTH-q3 - preferred_basis: TZVP-MOLOPT-SR-GTH-q3 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q3 - - GTH-BP-q3 - - GTH-PADE - - GTH-PBE-q3 -Am: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Ar: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q8 - - DZVP-MOLOPT-SR-GTH-q8 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q8: 3.936450214256 - SZV-MOLOPT-SR-GTH-q8: 3.936450214256 - best_basis: DZVP-MOLOPT-SR-GTH-q8 - preferred_basis: DZVP-MOLOPT-SR-GTH-q8 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q8 - - GTH-BP-q8 - - GTH-HCTH120-q8 - - GTH-PADE - - GTH-PBE-q8 -As: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q5 - - DZVP-MOLOPT-SR-GTH-q5 - - TZVP-MOLOPT-SR-GTH-q5 - - TZV2P-MOLOPT-SR-GTH-q5 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q5: 1.098624139209 - SZV-MOLOPT-SR-GTH-q5: 1.098624139209 - TZV2P-MOLOPT-SR-GTH-q5: 1.09862414 - TZVP-MOLOPT-SR-GTH-q5: 1.09862414 - best_basis: TZV2P-MOLOPT-SR-GTH-q5 - preferred_basis: TZVP-MOLOPT-SR-GTH-q5 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q5 - - GTH-BP-q5 - - GTH-PADE - - GTH-PBE-q5 -At: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q7 - - DZVP-MOLOPT-SR-GTH-q7 - - TZVP-MOLOPT-SR-GTH-q7 - - TZV2P-MOLOPT-SR-GTH-q7 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q7: 1.796641038213 - SZV-MOLOPT-SR-GTH-q7: 1.796641038213 - TZV2P-MOLOPT-SR-GTH-q7: 1.79664104 - TZVP-MOLOPT-SR-GTH-q7: 1.79664104 - best_basis: TZV2P-MOLOPT-SR-GTH-q7 - preferred_basis: TZVP-MOLOPT-SR-GTH-q7 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q7 -Au: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q11 - - DZVP-MOLOPT-SR-GTH-q11 - - TZVP-MOLOPT-SR-GTH-q11 - - TZV2P-MOLOPT-SR-GTH-q11 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q11: 2.950008433436 - SZV-MOLOPT-SR-GTH-q11: 2.950008433436 - TZV2P-MOLOPT-SR-GTH-q11: 2.95000843 - TZVP-MOLOPT-SR-GTH-q11: 2.95000843 - best_basis: TZV2P-MOLOPT-SR-GTH-q11 - preferred_basis: TZVP-MOLOPT-SR-GTH-q11 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q11 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PADE-q19 - - GTH-PBE-q11 -B: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - cpFIT3 - - FIT3 - - pFIT3 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q3 - - DZVP-MOLOPT-SR-GTH-q3 - - TZVP-MOLOPT-SR-GTH-q3 - - TZV2P-MOLOPT-SR-GTH-q3 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q3: 3.053444073497 - SZV-MOLOPT-SR-GTH-q3: 3.053444073497 - TZV2P-MOLOPT-SR-GTH-q3: 3.05344407 - TZVP-MOLOPT-SR-GTH-q3: 3.05344407 - best_basis: TZV2P-MOLOPT-SR-GTH-q3 - preferred_basis: TZVP-MOLOPT-SR-GTH-q3 - preferred_aux_basis: optFIT3 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q3 - - GTH-BP-q3 - - GTH-PADE - - GTH-PBE-q3 - - GTH-PBESol-q3 -Ba: - basis_sets: - aux_basis: - - cFIT8 - - cFIT9 - - cFIT10 - - cFIT11 - - FIT8 - - FIT9 - - FIT10 - - FIT11 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q10 - - DZVP-MOLOPT-SR-GTH-q10 - - TZVP-MOLOPT-SR-GTH-q10 - - TZV2P-MOLOPT-SR-GTH-q10 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q10: 1.099107387393 - SZV-MOLOPT-SR-GTH-q10: 1.099107387393 - TZV2P-MOLOPT-SR-GTH-q10: 1.09910739 - TZVP-MOLOPT-SR-GTH-q10: 1.09910739 - best_basis: TZV2P-MOLOPT-SR-GTH-q10 - preferred_basis: TZVP-MOLOPT-SR-GTH-q10 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q10 - - GTH-PADE - - GTH-PADE-q2 - - GTH-PBE-q10 -Be: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - cpFIT3 - - FIT3 - - pFIT3 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q4 - - DZVP-MOLOPT-SR-GTH-q4 - - TZVP-MOLOPT-SR-GTH-q4 - - TZV2P-MOLOPT-SR-GTH-q4 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q4: 14.92741041093 - SZV-MOLOPT-SR-GTH-q4: 14.92741041093 - TZV2P-MOLOPT-SR-GTH-q4: 14.92741041 - TZVP-MOLOPT-SR-GTH-q4: 14.92741041 - best_basis: TZV2P-MOLOPT-SR-GTH-q4 - preferred_basis: TZVP-MOLOPT-SR-GTH-q4 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q4 - - GTH-BP-q4 - - GTH-PADE-q2 - - GTH-PADE - - GTH-PBE-q4 -Bi: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q5 - - DZVP-MOLOPT-SR-GTH-q5 - - TZVP-MOLOPT-SR-GTH-q5 - - TZV2P-MOLOPT-SR-GTH-q5 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q5: 1.666928293168 - SZV-MOLOPT-SR-GTH-q5: 1.666928293168 - TZV2P-MOLOPT-SR-GTH-q5: 1.66692829 - TZVP-MOLOPT-SR-GTH-q5: 1.66692829 - best_basis: TZV2P-MOLOPT-SR-GTH-q5 - preferred_basis: TZVP-MOLOPT-SR-GTH-q5 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q5 - - GTH-PADE - - GTH-PBE-q5 -Bk: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Br: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q7 - - DZVP-MOLOPT-SR-GTH-q7 - - TZVP-MOLOPT-SR-GTH-q7 - - TZV2P-MOLOPT-SR-GTH-q7 - - SZV-MOLOPT-GTH-q7 - - DZVP-MOLOPT-GTH-q7 - - TZVP-MOLOPT-GTH-q7 - - TZV2P-MOLOPT-GTH-q7 - - TZV2PX-MOLOPT-GTH-q7 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q7: 2.90898813 - DZVP-MOLOPT-SR-GTH-q7: 1.73739273812 - SZV-MOLOPT-GTH-q7: 2.90898813 - SZV-MOLOPT-SR-GTH-q7: 1.73739273812 - TZV2P-MOLOPT-GTH-q7: 2.90898813 - TZV2P-MOLOPT-SR-GTH-q7: 1.73739274 - TZV2PX-MOLOPT-GTH-q7: 2.90898813 - TZVP-MOLOPT-GTH-q7: 2.90898813 - TZVP-MOLOPT-SR-GTH-q7: 1.73739274 - best_basis: TZV2PX-MOLOPT-GTH-q7 - preferred_basis: TZVP-MOLOPT-SR-GTH-q7 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q7 - - GTH-BP-q7 - - GTH-PADE - - GTH-PBE-q7 -C: - basis_sets: - aux_basis: - - cFIT3 - - optFIT3 - - pFIT3 - - cpFIT3 - - FIT3 - - aug-FIT3 - - aug-cFIT3 - - aug-pFIT3 - - aug-cpFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - basis_molopt: - - SZV-MOLOPT-GTH-q4 - - DZVP-MOLOPT-GTH-q4 - - TZVP-MOLOPT-GTH-q4 - - TZV2P-MOLOPT-GTH-q4 - - TZV2PX-MOLOPT-GTH-q4 - - SZV-MOLOPT-SR-GTH-q4 - - DZVP-MOLOPT-SR-GTH-q4 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q4: 6.132624767898 - DZVP-MOLOPT-SR-GTH-q4: 5.605330751705 - SZV-MOLOPT-GTH-q4: 6.132624767898 - SZV-MOLOPT-SR-GTH-q4: 5.605330751705 - TZV2P-MOLOPT-GTH-q4: 6.132624767898 - TZV2PX-MOLOPT-GTH-q4: 6.132624767898 - TZVP-MOLOPT-GTH-q4: 6.132624767898 - best_basis: TZV2PX-MOLOPT-GTH-q4 - preferred_basis: DZVP-MOLOPT-SR-GTH-q4 - preferred_aux_basis: optFIT3 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q4 - - GTH-BP-q4 - - GTH-HCTH120-q4 - - GTH-HCTH407-q4 - - GTH-PADE - - GTH-PBE-q4 -Ca: - basis_sets: - aux_basis: - - cFIT7 - - cFIT8 - - cFIT9 - - cFIT10 - - cFIT11 - - FIT7 - - FIT8 - - FIT9 - - FIT10 - - FIT11 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q10 - - DZVP-MOLOPT-SR-GTH-q10 - - TZVP-MOLOPT-SR-GTH-q10 - - TZV2P-MOLOPT-SR-GTH-q10 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q10: 5.284985596557 - SZV-MOLOPT-SR-GTH-q10: 5.284985596557 - TZV2P-MOLOPT-SR-GTH-q10: 5.28498554 - TZVP-MOLOPT-SR-GTH-q10: 5.28498554 - best_basis: TZV2P-MOLOPT-SR-GTH-q10 - preferred_basis: TZVP-MOLOPT-SR-GTH-q10 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q10 - - GTH-BP-q10 - - GTH-PADE - - GTH-PADE-q2 - - GTH-PBE-q10 -Cd: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q12: 2.617301292227 - SZV-MOLOPT-SR-GTH-q12: 2.617301292227 - TZV2P-MOLOPT-SR-GTH-q12: 2.61730129 - TZVP-MOLOPT-SR-GTH-q12: 2.61730129 - best_basis: TZV2P-MOLOPT-SR-GTH-q12 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q2 - - GTH-PBE-q12 -Ce: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - - SZV-MOLOPT-SR-GTH-q30 - - DZV-MOLOPT-SR-GTH-q30 - - DZVP-MOLOPT-SR-GTH-q30 - - TZVP-MOLOPT-SR-GTH-q30 - - TZV2P-MOLOPT-SR-GTH-q30 - basis_set_largest_exponents: - DZV-MOLOPT-SR-GTH-q30: 18.92175586 - DZVP-MOLOPT-SR-GTH-q12: 4.34805319 - DZVP-MOLOPT-SR-GTH-q30: 18.92175586 - SZV-MOLOPT-SR-GTH-q12: 4.34805319 - SZV-MOLOPT-SR-GTH-q30: 18.92175586 - TZV2P-MOLOPT-SR-GTH-q12: 4.34805319 - TZV2P-MOLOPT-SR-GTH-q30: 18.92175586 - TZVP-MOLOPT-SR-GTH-q12: 4.34805319 - TZVP-MOLOPT-SR-GTH-q30: 18.92175586 - best_basis: TZV2P-MOLOPT-SR-GTH-q30 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q12 - - GTH-PADE - - GTH-PBE-q12 -Cf: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Cl: - basis_sets: - aux_basis: - - cFIT3 - - pFIT3 - - cpFIT3 - - FIT3 - - aug-FIT3 - - aug-cFIT3 - - aug-pFIT3 - - aug-cpFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - basis_molopt: - - SZV-MOLOPT-GTH-q7 - - DZVP-MOLOPT-GTH-q7 - - TZV2P-MOLOPT-GTH-q7 - - TZV2PX-MOLOPT-GTH-q7 - - SZV-MOLOPT-SR-GTH-q7 - - DZVP-MOLOPT-SR-GTH-q7 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q7: 4.57703419411 - DZVP-MOLOPT-SR-GTH-q7: 2.379078117601 - SZV-MOLOPT-GTH-q7: 4.57703419411 - SZV-MOLOPT-SR-GTH-q7: 2.379078117601 - TZV2P-MOLOPT-GTH-q7: 4.57703419411 - TZV2PX-MOLOPT-GTH-q7: 4.57703419411 - TZVP-MOLOPT-GTH-q7: 4.57703419411 - best_basis: DZVP-MOLOPT-SR-GTH-q7 - preferred_basis: DZVP-MOLOPT-SR-GTH-q7 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q7 - - GTH-BP-q7 - - GTH-PADE - - GTH-PBE-q7 -Cm: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Co: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q17 - - DZVP-MOLOPT-SR-GTH-q17 - - TZVP-MOLOPT-SR-GTH-q17 - - TZV2P-MOLOPT-SR-GTH-q17 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q17: 8.365267848849 - SZV-MOLOPT-SR-GTH-q17: 8.365267848849 - TZV2P-MOLOPT-SR-GTH-q17: 8.36526785 - TZVP-MOLOPT-SR-GTH-q17: 8.36526785 - best_basis: TZV2P-MOLOPT-SR-GTH-q17 - preferred_basis: TZVP-MOLOPT-SR-GTH-q17 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q17 - - GTH-BP-q17 - - GTH-PADE - - GTH-PADE-q9 - - GTH-PBE-q17 -Cr: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q14 - - DZVP-MOLOPT-SR-GTH-q14 - - TZVP-MOLOPT-SR-GTH-q14 - - TZV2P-MOLOPT-SR-GTH-q14 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q14: 8.512514788173 - SZV-MOLOPT-SR-GTH-q14: 8.512514788173 - TZV2P-MOLOPT-SR-GTH-q14: 8.51251479 - TZVP-MOLOPT-SR-GTH-q14: 8.51251479 - best_basis: TZV2P-MOLOPT-SR-GTH-q14 - preferred_basis: TZVP-MOLOPT-SR-GTH-q14 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q14 - - GTH-BP-q14 - - GTH-PADE - - GTH-PADE-q6 - - GTH-PBE-q14 -Cs: - basis_sets: - aux_basis: - - cFIT7 - - cFIT8 - - cFIT9 - - cFIT10 - - cFIT11 - - FIT7 - - FIT8 - - FIT9 - - FIT10 - - FIT11 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q9 - - DZVP-MOLOPT-SR-GTH-q9 - - TZVP-MOLOPT-SR-GTH-q9 - - TZV2P-MOLOPT-SR-GTH-q9 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q9: 1.000865707027 - SZV-MOLOPT-SR-GTH-q9: 1.000865707027 - TZV2P-MOLOPT-SR-GTH-q9: 1.00086571 - TZVP-MOLOPT-SR-GTH-q9: 1.00086571 - best_basis: TZV2P-MOLOPT-SR-GTH-q9 - preferred_basis: TZVP-MOLOPT-SR-GTH-q9 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BP-q9 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PBE-q9 -Cu: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q11 - - DZVP-MOLOPT-SR-GTH-q11 - - TZVP-MOLOPT-SR-GTH-q11 - - TZV2P-MOLOPT-SR-GTH-q11 - - SZV-MOLOPT-GTH-q11 - - DZVP-MOLOPT-GTH-q11 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q11: 15.94251414 - DZVP-MOLOPT-SR-GTH-q11: 5.804051150731 - SZV-MOLOPT-GTH-q11: 15.94251414 - SZV-MOLOPT-SR-GTH-q11: 5.804051150731 - TZV2P-MOLOPT-SR-GTH-q11: 5.80405115 - TZVP-MOLOPT-SR-GTH-q11: 5.80405115 - best_basis: TZV2P-MOLOPT-SR-GTH-q11 - preferred_basis: TZVP-MOLOPT-SR-GTH-q11 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q11 - - GTH-BP-q11 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PADE-q19 - - GTH-PBE-q11 -Dy: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q20 - - DZVP-MOLOPT-SR-GTH-q20 - - TZVP-MOLOPT-SR-GTH-q20 - - TZV2P-MOLOPT-SR-GTH-q20 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q20: 6.18926622 - SZV-MOLOPT-SR-GTH-q20: 6.18926622 - TZV2P-MOLOPT-SR-GTH-q20: 6.18926622 - TZVP-MOLOPT-SR-GTH-q20: 6.18926622 - best_basis: TZV2P-MOLOPT-SR-GTH-q20 - preferred_basis: TZVP-MOLOPT-SR-GTH-q20 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q20 -Er: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q22 - - DZVP-MOLOPT-SR-GTH-q22 - - TZVP-MOLOPT-SR-GTH-q22 - - TZV2P-MOLOPT-SR-GTH-q22 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q22: 6.88248204 - SZV-MOLOPT-SR-GTH-q22: 6.88248204 - TZV2P-MOLOPT-SR-GTH-q22: 6.88248204 - TZVP-MOLOPT-SR-GTH-q22: 6.88248204 - best_basis: TZV2P-MOLOPT-SR-GTH-q22 - preferred_basis: TZVP-MOLOPT-SR-GTH-q22 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q22 -Es: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Eu: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q17 - - DZVP-MOLOPT-SR-GTH-q17 - - TZVP-MOLOPT-SR-GTH-q17 - - TZV2P-MOLOPT-SR-GTH-q17 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q17: 5.38735781 - SZV-MOLOPT-SR-GTH-q17: 5.38735781 - TZV2P-MOLOPT-SR-GTH-q17: 5.38735781 - TZVP-MOLOPT-SR-GTH-q17: 5.38735781 - best_basis: TZV2P-MOLOPT-SR-GTH-q17 - preferred_basis: TZVP-MOLOPT-SR-GTH-q17 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q17 -F: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - - cpFIT3 - - aug-cFIT3 - - aug-cpFIT3 - - FIT3 - - pFIT3 - - aug-FIT3 - - aug-pFIT3 - basis_molopt: - - SZV-MOLOPT-GTH-q7 - - DZVP-MOLOPT-GTH-q7 - - TZVP-MOLOPT-GTH-q7 - - TZV2P-MOLOPT-GTH-q7 - - TZV2PX-MOLOPT-GTH-q7 - - SZV-MOLOPT-SR-GTH-q7 - - DZVP-MOLOPT-SR-GTH-q7 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q7: 15.025672765127 - DZVP-MOLOPT-SR-GTH-q7: 13.701520668842 - SZV-MOLOPT-GTH-q7: 15.025672765127 - SZV-MOLOPT-SR-GTH-q7: 13.701520668842 - TZV2P-MOLOPT-GTH-q7: 15.025672765127 - TZV2PX-MOLOPT-GTH-q7: 15.025672765127 - TZVP-MOLOPT-GTH-q7: 15.025672765127 - best_basis: TZV2PX-MOLOPT-GTH-q7 - preferred_basis: DZVP-MOLOPT-SR-GTH-q7 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q7 - - GTH-BP-q7 - - GTH-HCTH120-q7 - - GTH-PADE - - GTH-PBE-q7 -Fe: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q16 - - DZVP-MOLOPT-SR-GTH-q16 - - TZVP-MOLOPT-SR-GTH-q16 - - TZV2P-MOLOPT-SR-GTH-q16 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q16: 8.424366035773 - SZV-MOLOPT-SR-GTH-q16: 8.424366035773 - TZV2P-MOLOPT-SR-GTH-q16: 8.42436604 - TZVP-MOLOPT-SR-GTH-q16: 8.42436604 - best_basis: TZV2P-MOLOPT-SR-GTH-q16 - preferred_basis: TZVP-MOLOPT-SR-GTH-q16 - dft_plus_u: - L: 2 - U_MINUS_J: 4.66 - potentials: - gth_potentials: - - GTH-BLYP-q16 - - GTH-BP-q16 - - GTH-PADE - - GTH-PADE-q8 - - GTH-PBE-q16 -Fm: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Fr: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Ga: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 7.066653970373 - SZV-MOLOPT-SR-GTH-q13: 7.066653970373 - TZV2P-MOLOPT-SR-GTH-q13: 7.06665397 - TZVP-MOLOPT-SR-GTH-q13: 7.06665397 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q13 - - GTH-BP-q13 - - GTH-PADE - - GTH-PADE-q3 - - GTH-PBE-q13 -Gd: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q18 - - DZVP-MOLOPT-SR-GTH-q18 - - TZVP-MOLOPT-SR-GTH-q18 - - TZV2P-MOLOPT-SR-GTH-q18 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q18: 5.51542296 - SZV-MOLOPT-SR-GTH-q18: 5.51542296 - TZV2P-MOLOPT-SR-GTH-q18: 5.51542296 - TZVP-MOLOPT-SR-GTH-q18: 5.51542296 - best_basis: TZV2P-MOLOPT-SR-GTH-q18 - preferred_basis: TZVP-MOLOPT-SR-GTH-q18 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q18 - - GTH-PADE - - GTH-PBE-q18 -Ge: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q4 - - DZVP-MOLOPT-SR-GTH-q4 - - TZVP-MOLOPT-SR-GTH-q4 - - TZV2P-MOLOPT-SR-GTH-q4 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q4: 3.751626352194 - SZV-MOLOPT-SR-GTH-q4: 3.751626352194 - TZV2P-MOLOPT-SR-GTH-q4: 3.75162635 - TZVP-MOLOPT-SR-GTH-q4: 3.75162635 - best_basis: TZV2P-MOLOPT-SR-GTH-q4 - preferred_basis: TZVP-MOLOPT-SR-GTH-q4 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q4 - - GTH-BP-q4 - - GTH-PADE - - GTH-PBE-q4 -H: - basis_sets: - aux_basis: - - cFIT3 - - pFIT3 - - cpFIT3 - - FIT3 - - aug-FIT3 - - aug-pFIT3 - - aug-cFIT3 - - aug-cpFIT3 - - GTH-def-QZVP - - aug-GTH-def-QZVP - basis_molopt: - - SZV-MOLOPT-GTH-q1 - - DZVP-MOLOPT-GTH-q1 - - TZVP-MOLOPT-GTH-q1 - - TZV2P-MOLOPT-GTH-q1 - - TZV2PX-MOLOPT-GTH-q1 - - SZV-MOLOPT-SR-GTH-q1 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q1: 11.478000339908 - DZVP-MOLOPT-SR-GTH-q1: 10.068468228533 - SZV-MOLOPT-GTH-q1: 11.478000339908 - SZV-MOLOPT-SR-GTH-q1: 10.068468228533 - TZV2P-MOLOPT-GTH-q1: 11.478000339908 - TZV2PX-MOLOPT-GTH-q1: 11.478000339908 - TZVP-MOLOPT-GTH-q1: 11.478000339908 - best_basis: TZV2P-MOLOPT-GTH-q1 - preferred_basis: TZVP-MOLOPT-GTH-q1 - dft_plus_u: null - potentials: - gth_potentials: - - PPs - - GTH-BLYP-q1 - - GTH-BP-q1 - - GTH-HCTH120-q1 - - GTH-HCTH407-q1 - - GTH-PADE - - GTH-PBE-q1 - - GTH-OLYP-q1 -He: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - cpFIT3 - - FIT3 - - pFIT3 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q2 - - DZVP-MOLOPT-SR-GTH-q2 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q2: 11.042785405048 - SZV-MOLOPT-SR-GTH-q2: 11.042785405048 - best_basis: DZVP-MOLOPT-SR-GTH-q2 - preferred_basis: DZVP-MOLOPT-SR-GTH-q2 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q2 - - GTH-BP-q2 - - GTH-PADE - - GTH-PBE-q2 -Hf: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q12: 2.671196497548 - SZV-MOLOPT-SR-GTH-q12: 2.671196497548 - TZV2P-MOLOPT-SR-GTH-q12: 2.6711965 - TZVP-MOLOPT-SR-GTH-q12: 2.6711965 - best_basis: TZV2P-MOLOPT-SR-GTH-q12 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q12 -Hg: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q12: 3.031517109734 - SZV-MOLOPT-SR-GTH-q12: 3.031517109734 - TZV2P-MOLOPT-SR-GTH-q12: 3.03151711 - TZVP-MOLOPT-SR-GTH-q12: 3.03151711 - best_basis: TZV2P-MOLOPT-SR-GTH-q12 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q2 - - GTH-PBE-q12 -Ho: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q21 - - DZVP-MOLOPT-SR-GTH-q21 - - TZVP-MOLOPT-SR-GTH-q21 - - TZV2P-MOLOPT-SR-GTH-q21 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q21: 6.54556284 - SZV-MOLOPT-SR-GTH-q21: 6.54556284 - TZV2P-MOLOPT-SR-GTH-q21: 6.54556284 - TZVP-MOLOPT-SR-GTH-q21: 6.54556284 - best_basis: TZV2P-MOLOPT-SR-GTH-q21 - preferred_basis: TZVP-MOLOPT-SR-GTH-q21 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q21 -I: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q7 - - DZVP-MOLOPT-SR-GTH-q7 - - TZVP-MOLOPT-SR-GTH-q7 - - TZV2P-MOLOPT-SR-GTH-q7 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q7: 0.966172693776 - SZV-MOLOPT-SR-GTH-q7: 0.966172693776 - TZV2P-MOLOPT-SR-GTH-q7: 0.96617269 - TZVP-MOLOPT-SR-GTH-q7: 0.96617269 - best_basis: TZV2P-MOLOPT-SR-GTH-q7 - preferred_basis: TZVP-MOLOPT-SR-GTH-q7 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q7 - - GTH-PADE - - GTH-PBE-q7 -In: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 3.101675464995 - SZV-MOLOPT-SR-GTH-q13: 3.101675464995 - TZV2P-MOLOPT-SR-GTH-q13: 3.10167546 - TZVP-MOLOPT-SR-GTH-q13: 3.10167546 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q13 - - GTH-PADE - - GTH-PADE-q3 - - GTH-PBE-q13 -Ir: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q17 - - DZVP-MOLOPT-SR-GTH-q17 - - TZVP-MOLOPT-SR-GTH-q17 - - TZV2P-MOLOPT-SR-GTH-q17 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q17: 3.382588893137 - SZV-MOLOPT-SR-GTH-q17: 3.382588893137 - TZV2P-MOLOPT-SR-GTH-q17: 3.38258889 - TZVP-MOLOPT-SR-GTH-q17: 3.38258889 - best_basis: TZV2P-MOLOPT-SR-GTH-q17 - preferred_basis: TZVP-MOLOPT-SR-GTH-q17 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q9 - - GTH-PBE-q17 -K: - basis_sets: - aux_basis: - - cFIT7 - - cFIT8 - - cFIT9 - - cFIT10 - - cFIT11 - - FIT7 - - FIT8 - - FIT9 - - FIT10 - - FIT11 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q9 - - DZVP-MOLOPT-SR-GTH-q9 - - TZVP-MOLOPT-SR-GTH-q9 - - TZV2P-MOLOPT-SR-GTH-q9 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q9: 2.891270375454 - SZV-MOLOPT-SR-GTH-q9: 2.891270375454 - TZV2P-MOLOPT-SR-GTH-q9: 2.89127038 - TZVP-MOLOPT-SR-GTH-q9: 2.89127038 - best_basis: TZV2P-MOLOPT-SR-GTH-q9 - preferred_basis: TZVP-MOLOPT-SR-GTH-q9 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q9 - - GTH-BP-q9 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PBE-q9 -Kr: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q8 - - DZVP-MOLOPT-SR-GTH-q8 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q8: 1.784435668906 - SZV-MOLOPT-SR-GTH-q8: 1.784435668906 - best_basis: DZVP-MOLOPT-SR-GTH-q8 - preferred_basis: DZVP-MOLOPT-SR-GTH-q8 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q8 - - GTH-BP-q8 - - GTH-PADE - - GTH-PBE-q8 -La: - basis_sets: - aux_basis: null - basis_molopt: - - DZVP-MOLOPT-SR-GTH-q11 - - TZVP-MOLOPT-SR-GTH-q11 - - TZV2P-MOLOPT-SR-GTH-q11 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q11: 2.61043358 - TZV2P-MOLOPT-SR-GTH-q11: 2.61043358 - TZVP-MOLOPT-SR-GTH-q11: 2.61043358 - best_basis: TZV2P-MOLOPT-SR-GTH-q11 - preferred_basis: TZVP-MOLOPT-SR-GTH-q11 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q11 -Li: - basis_sets: - aux_basis: - - cFIT4 - - cFIT4-SR - - cFIT5 - - cFIT5-SR - - FIT4 - - FIT4-SR - - FIT5 - - FIT5-SR - - GTH-def2-QZVP - - cFIT3 - - cpFIT3 - - FIT3 - - pFIT3 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q3 - - DZVP-MOLOPT-SR-GTH-q3 - - TZVP-MOLOPT-SR-GTH-q3 - - TZV2P-MOLOPT-SR-GTH-q3 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q3: 7.133127574876 - SZV-MOLOPT-SR-GTH-q3: 7.133127574876 - TZV2P-MOLOPT-SR-GTH-q3: 7.13312757 - TZVP-MOLOPT-SR-GTH-q3: 7.13312757 - best_basis: TZV2P-MOLOPT-SR-GTH-q3 - preferred_basis: TZVP-MOLOPT-SR-GTH-q3 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q3 - - GTH-BP-q3 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PBE-q3 -Lr: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Lu: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q25 - - DZVP-MOLOPT-SR-GTH-q25 - - TZVP-MOLOPT-SR-GTH-q25 - - TZV2P-MOLOPT-SR-GTH-q25 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q25: 7.81599376 - SZV-MOLOPT-SR-GTH-q25: 7.81599376 - TZV2P-MOLOPT-SR-GTH-q25: 7.81599376 - TZVP-MOLOPT-SR-GTH-q25: 7.81599376 - best_basis: TZV2P-MOLOPT-SR-GTH-q25 - preferred_basis: TZVP-MOLOPT-SR-GTH-q25 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q25 -Md: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Mg: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - cpFIT3 - - FIT3 - - pFIT3 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q10 - - DZVP-MOLOPT-SR-GTH-q10 - - SZV-MOLOPT-SR-GTH-q2 - - DZVP-MOLOPT-SR-GTH-q2 - - TZVP-MOLOPT-SR-GTH-q2 - - TZV2P-MOLOPT-SR-GTH-q2 - - DZVPd-MOLOPT-SR-GTH-q10 - - TZVPd-MOLOPT-SR-GTH-q10 - - TZV2Pd-MOLOPT-SR-GTH-q10 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q10: 30.653047963189 - DZVP-MOLOPT-SR-GTH-q2: 1.45920927 - DZVPd-MOLOPT-SR-GTH-q10: 30.65304796 - SZV-MOLOPT-SR-GTH-q10: 30.653047963189 - SZV-MOLOPT-SR-GTH-q2: 1.45920927 - TZV2P-MOLOPT-SR-GTH-q2: 1.45920927 - TZV2Pd-MOLOPT-SR-GTH-q10: 30.65304796 - TZVP-MOLOPT-SR-GTH-q2: 1.45920927 - TZVPd-MOLOPT-SR-GTH-q10: 30.65304796 - best_basis: TZV2Pd-MOLOPT-SR-GTH-q10 - preferred_basis: TZVPd-MOLOPT-SR-GTH-q10 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q10 - - GTH-BP-q10 - - GTH-PADE - - GTH-PADE-q2 - - GTH-PBE-q10 -Mn: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q15 - - DZVP-MOLOPT-SR-GTH-q15 - - TZVP-MOLOPT-SR-GTH-q15 - - TZV2P-MOLOPT-SR-GTH-q15 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q15: 8.544553301652 - SZV-MOLOPT-SR-GTH-q15: 8.544553301652 - TZV2P-MOLOPT-SR-GTH-q15: 8.5445533 - TZVP-MOLOPT-SR-GTH-q15: 8.5445533 - best_basis: TZV2P-MOLOPT-SR-GTH-q15 - preferred_basis: TZVP-MOLOPT-SR-GTH-q15 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q15 - - GTH-BP-q15 - - GTH-PADE - - GTH-PADE-q7 - - GTH-PBE-q15 -Mo: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q14 - - DZVP-MOLOPT-SR-GTH-q14 - - TZVP-MOLOPT-SR-GTH-q14 - - TZV2P-MOLOPT-SR-GTH-q14 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q14: 2.540273246178 - SZV-MOLOPT-SR-GTH-q14: 2.540273246178 - TZV2P-MOLOPT-SR-GTH-q14: 2.54027325 - TZVP-MOLOPT-SR-GTH-q14: 2.54027325 - best_basis: TZV2P-MOLOPT-SR-GTH-q14 - preferred_basis: TZVP-MOLOPT-SR-GTH-q14 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q14 - - GTH-PADE - - GTH-PADE-q6 - - GTH-PBE-q14 -N: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - - cpFIT3 - - aug-cFIT3 - - aug-cpFIT3 - - FIT3 - - pFIT3 - - aug-FIT3 - - aug-pFIT3 - basis_molopt: - - SZV-MOLOPT-GTH-q5 - - DZVP-MOLOPT-GTH-q5 - - TZVP-MOLOPT-GTH-q5 - - TZV2P-MOLOPT-GTH-q5 - - TZV2PX-MOLOPT-GTH-q5 - - SZV-MOLOPT-SR-GTH-q5 - - DZVP-MOLOPT-SR-GTH-q5 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q5: 9.042730397298 - DZVP-MOLOPT-SR-GTH-q5: 7.341988051825 - SZV-MOLOPT-GTH-q5: 9.042730397298 - SZV-MOLOPT-SR-GTH-q5: 7.341988051825 - TZV2P-MOLOPT-GTH-q5: 9.042730397298 - TZV2PX-MOLOPT-GTH-q5: 9.042730397298 - TZVP-MOLOPT-GTH-q5: 9.042730397298 - best_basis: TZV2PX-MOLOPT-GTH-q5 - preferred_basis: DZVP-MOLOPT-SR-GTH-q5 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q5 - - GTH-BP-q5 - - GTH-HCTH120-q5 - - GTH-HCTH407-q5 - - GTH-PADE - - GTH-PBE-q5 -Na: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - cpFIT3 - - FIT3 - - pFIT3 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q9 - - DZVP-MOLOPT-SR-GTH-q9 - - DZVPd-MOLOPT-SR-GTH-q9 - - TZVPd-MOLOPT-SR-GTH-q9 - - TZV2Pd-MOLOPT-SR-GTH-q9 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q9: 23.51880076196 - DZVPd-MOLOPT-SR-GTH-q9: 23.51880076 - SZV-MOLOPT-SR-GTH-q9: 23.51880076196 - TZV2Pd-MOLOPT-SR-GTH-q9: 23.51880076 - TZVPd-MOLOPT-SR-GTH-q9: 23.51880076 - best_basis: TZV2Pd-MOLOPT-SR-GTH-q9 - preferred_basis: TZVPd-MOLOPT-SR-GTH-q9 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q9 - - GTH-BP-q9 - - GTH-PADE-q1 - - GTH-PADE - - GTH-PBE-q9 -Nb: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 3.445688332127 - SZV-MOLOPT-SR-GTH-q13: 3.445688332127 - TZV2P-MOLOPT-SR-GTH-q13: 3.44568833 - TZVP-MOLOPT-SR-GTH-q13: 3.44568833 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q5 - - GTH-PBE-q13 -Nd: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q14 - - DZVP-MOLOPT-SR-GTH-q14 - - TZVP-MOLOPT-SR-GTH-q14 - - TZV2P-MOLOPT-SR-GTH-q14 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q14: 4.69889675 - SZV-MOLOPT-SR-GTH-q14: 4.69889675 - TZV2P-MOLOPT-SR-GTH-q14: 4.69889675 - TZVP-MOLOPT-SR-GTH-q14: 4.69889675 - best_basis: TZV2P-MOLOPT-SR-GTH-q14 - preferred_basis: TZVP-MOLOPT-SR-GTH-q14 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q14 -Ne: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q8 - - DZVP-MOLOPT-SR-GTH-q8 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q8: 19.144669251814 - SZV-MOLOPT-SR-GTH-q8: 19.144669251814 - best_basis: DZVP-MOLOPT-SR-GTH-q8 - preferred_basis: DZVP-MOLOPT-SR-GTH-q8 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q8 - - GTH-BP-q8 - - GTH-PADE - - GTH-PBE-q8 -Ni: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q18 - - DZVP-MOLOPT-SR-GTH-q18 - - TZVP-MOLOPT-SR-GTH-q18 - - TZV2P-MOLOPT-SR-GTH-q18 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q18: 10.077427756816 - SZV-MOLOPT-SR-GTH-q18: 10.077427756816 - TZV2P-MOLOPT-SR-GTH-q18: 10.07742776 - TZVP-MOLOPT-SR-GTH-q18: 10.07742776 - best_basis: TZV2P-MOLOPT-SR-GTH-q18 - preferred_basis: TZVP-MOLOPT-SR-GTH-q18 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q18 - - GTH-BP-q18 - - GTH-PADE-q10 - - GTH-PADE - - GTH-PBE-q18 -No: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Np: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -O: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - - cpFIT3 - - aug-cFIT3 - - aug-cpFIT3 - - FIT3 - - pFIT3 - - aug-FIT3 - - aug-pFIT3 - - FIT9 - basis_molopt: - - SZV-MOLOPT-GTH-q6 - - DZVP-MOLOPT-GTH-q6 - - TZVP-MOLOPT-GTH-q6 - - TZV2P-MOLOPT-GTH-q6 - - TZV2PX-MOLOPT-GTH-q6 - - SZV-MOLOPT-SR-GTH-q6 - - DZVP-MOLOPT-SR-GTH-q6 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q6: 12.015954705512 - DZVP-MOLOPT-SR-GTH-q6: 10.389228018317 - SZV-MOLOPT-GTH-q6: 12.015954705512 - SZV-MOLOPT-SR-GTH-q6: 10.389228018317 - TZV2P-MOLOPT-GTH-q6: 12.015954705512 - TZV2PX-MOLOPT-GTH-q6: 12.015954705512 - TZVP-MOLOPT-GTH-q6: 12.015954705512 - best_basis: TZV2PX-MOLOPT-GTH-q6 - preferred_basis: DZVP-MOLOPT-SR-GTH-q6 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q6 - - GTH-BP-q6 - - GTH-HCTH120-q6 - - GTH-HCTH407-q6 - - GTH-PADE - - GTH-PBE-q6 - - GTH-OLYP-q6 -Os: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q16 - - DZVP-MOLOPT-SR-GTH-q16 - - TZVP-MOLOPT-SR-GTH-q16 - - TZV2P-MOLOPT-SR-GTH-q16 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q16: 3.25404452124 - SZV-MOLOPT-SR-GTH-q16: 3.25404452124 - TZV2P-MOLOPT-SR-GTH-q16: 3.25404452 - TZVP-MOLOPT-SR-GTH-q16: 3.25404452 - best_basis: TZV2P-MOLOPT-SR-GTH-q16 - preferred_basis: TZVP-MOLOPT-SR-GTH-q16 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q8 - - GTH-PBE-q16 -P: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - - cpFIT3 - - aug-cFIT3 - - aug-cpFIT3 - - FIT3 - - pFIT3 - - aug-FIT3 - - aug-pFIT3 - basis_molopt: - - SZV-MOLOPT-GTH-q5 - - DZVP-MOLOPT-GTH-q5 - - TZVP-MOLOPT-GTH-q5 - - TZV2P-MOLOPT-GTH-q5 - - TZV2PX-MOLOPT-GTH-q5 - - SZV-MOLOPT-SR-GTH-q5 - - DZVP-MOLOPT-SR-GTH-q5 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q5: 3.338153406523 - DZVP-MOLOPT-SR-GTH-q5: 1.631862170786 - SZV-MOLOPT-GTH-q5: 3.338153406523 - SZV-MOLOPT-SR-GTH-q5: 1.631862170786 - TZV2P-MOLOPT-GTH-q5: 3.338153406523 - TZV2PX-MOLOPT-GTH-q5: 3.338153406523 - TZVP-MOLOPT-GTH-q5: 3.338153406523 - best_basis: TZV2PX-MOLOPT-GTH-q5 - preferred_basis: DZVP-MOLOPT-SR-GTH-q5 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q5 - - GTH-BP-q5 - - GTH-HCTH120-q5 - - GTH-PADE - - GTH-PBE-q5 -Pa: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Pb: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q4 - - DZVP-MOLOPT-SR-GTH-q4 - - TZVP-MOLOPT-SR-GTH-q4 - - TZV2P-MOLOPT-SR-GTH-q4 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q4: 1.93359755182 - SZV-MOLOPT-SR-GTH-q4: 1.93359755182 - TZV2P-MOLOPT-SR-GTH-q4: 1.93359755 - TZVP-MOLOPT-SR-GTH-q4: 1.93359755 - best_basis: TZV2P-MOLOPT-SR-GTH-q4 - preferred_basis: TZVP-MOLOPT-SR-GTH-q4 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q4 -Pd: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q18 - - DZVP-MOLOPT-SR-GTH-q18 - - TZVP-MOLOPT-SR-GTH-q18 - - TZV2P-MOLOPT-SR-GTH-q18 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q18: 3.408675573589 - SZV-MOLOPT-SR-GTH-q18: 3.408675573589 - TZV2P-MOLOPT-SR-GTH-q18: 3.40867557 - TZVP-MOLOPT-SR-GTH-q18: 3.40867557 - best_basis: TZV2P-MOLOPT-SR-GTH-q18 - preferred_basis: TZVP-MOLOPT-SR-GTH-q18 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q18 - - GTH-PADE-q10 - - GTH-PADE - - GTH-PBE-q18 -Pm: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q15 - - DZVP-MOLOPT-SR-GTH-q15 - - TZVP-MOLOPT-SR-GTH-q15 - - TZV2P-MOLOPT-SR-GTH-q15 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q15: 4.91020816 - SZV-MOLOPT-SR-GTH-q15: 4.91020816 - TZV2P-MOLOPT-SR-GTH-q15: 4.91020816 - TZVP-MOLOPT-SR-GTH-q15: 4.91020816 - best_basis: TZV2P-MOLOPT-SR-GTH-q15 - preferred_basis: TZVP-MOLOPT-SR-GTH-q15 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q15 -Po: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q6 - - DZVP-MOLOPT-SR-GTH-q6 - - TZVP-MOLOPT-SR-GTH-q6 - - TZV2P-MOLOPT-SR-GTH-q6 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q6: 1.757750856683 - SZV-MOLOPT-SR-GTH-q6: 1.757750856683 - TZV2P-MOLOPT-SR-GTH-q6: 1.75775086 - TZVP-MOLOPT-SR-GTH-q6: 1.75775086 - best_basis: TZV2P-MOLOPT-SR-GTH-q6 - preferred_basis: TZVP-MOLOPT-SR-GTH-q6 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q6 -Pr: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 4.51480477 - SZV-MOLOPT-SR-GTH-q13: 4.51480477 - TZV2P-MOLOPT-SR-GTH-q13: 4.51480477 - TZVP-MOLOPT-SR-GTH-q13: 4.51480477 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q13 -Pt: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q18 - - DZVP-MOLOPT-SR-GTH-q18 - - TZVP-MOLOPT-SR-GTH-q18 - - TZV2P-MOLOPT-SR-GTH-q18 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q18: 3.630667770866 - SZV-MOLOPT-SR-GTH-q18: 3.630667770866 - TZV2P-MOLOPT-SR-GTH-q18: 3.63066777 - TZVP-MOLOPT-SR-GTH-q18: 3.63066777 - best_basis: TZV2P-MOLOPT-SR-GTH-q18 - preferred_basis: TZVP-MOLOPT-SR-GTH-q18 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE-q10 - - GTH-PADE - - GTH-PBE-q18 -Pu: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Ra: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Rb: - basis_sets: - aux_basis: - - cFIT7 - - cFIT8 - - cFIT9 - - cFIT10 - - cFIT11 - - FIT7 - - FIT8 - - FIT9 - - FIT10 - - FIT11 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q9 - - DZVP-MOLOPT-SR-GTH-q9 - - TZVP-MOLOPT-SR-GTH-q9 - - TZV2P-MOLOPT-SR-GTH-q9 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q9: 7.10723069415 - SZV-MOLOPT-SR-GTH-q9: 7.10723069415 - TZV2P-MOLOPT-SR-GTH-q9: 7.10723069 - TZVP-MOLOPT-SR-GTH-q9: 7.10723069 - best_basis: TZV2P-MOLOPT-SR-GTH-q9 - preferred_basis: TZVP-MOLOPT-SR-GTH-q9 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE-q1 - - GTH-PADE - - GTH-PBE-q9 -Re: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q15 - - DZVP-MOLOPT-SR-GTH-q15 - - TZVP-MOLOPT-SR-GTH-q15 - - TZV2P-MOLOPT-SR-GTH-q15 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q15: 3.240620484285 - SZV-MOLOPT-SR-GTH-q15: 3.240620484285 - TZV2P-MOLOPT-SR-GTH-q15: 3.24062048 - TZVP-MOLOPT-SR-GTH-q15: 3.24062048 - best_basis: TZV2P-MOLOPT-SR-GTH-q15 - preferred_basis: TZVP-MOLOPT-SR-GTH-q15 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q7 - - GTH-PBE-q15 -Rh: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q17 - - DZVP-MOLOPT-SR-GTH-q17 - - SZV-MOLOPT-SR-GTH-q9 - - SZVP-MOLOPT-SR-GTH-q9 - - DZVP-MOLOPT-SR-GTH-q9 - - TZVP-MOLOPT-SR-GTH-q9 - - TZV2P-MOLOPT-SR-GTH-q9 - - TZVP-MOLOPT-SR-GTH-q17 - - TZV2P-MOLOPT-SR-GTH-q17 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q17: 3.157817444361 - DZVP-MOLOPT-SR-GTH-q9: 3.902721449032 - SZV-MOLOPT-SR-GTH-q17: 3.157817444361 - SZV-MOLOPT-SR-GTH-q9: 3.902721449032 - SZVP-MOLOPT-SR-GTH-q9: 3.902721449032 - TZV2P-MOLOPT-SR-GTH-q17: 3.15781744 - TZV2P-MOLOPT-SR-GTH-q9: 3.90272145 - TZVP-MOLOPT-SR-GTH-q17: 3.15781744 - TZVP-MOLOPT-SR-GTH-q9: 3.90272145 - best_basis: TZV2P-MOLOPT-SR-GTH-q17 - preferred_basis: TZVP-MOLOPT-SR-GTH-q9 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q17 - - GTH-PADE - - GTH-PADE-q9 - - GTH-PBE-q17 -Rn: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q8 - - DZVP-MOLOPT-SR-GTH-q8 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q8: 2.000005663002 - SZV-MOLOPT-SR-GTH-q8: 2.000005663002 - best_basis: DZVP-MOLOPT-SR-GTH-q8 - preferred_basis: DZVP-MOLOPT-SR-GTH-q8 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q8 -Ru: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q16 - - DZVP-MOLOPT-SR-GTH-q16 - - TZVP-MOLOPT-SR-GTH-q16 - - TZV2P-MOLOPT-SR-GTH-q16 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q16: 2.787485846721 - SZV-MOLOPT-SR-GTH-q16: 2.787485846721 - TZV2P-MOLOPT-SR-GTH-q16: 2.78748585 - TZVP-MOLOPT-SR-GTH-q16: 2.78748585 - best_basis: TZV2P-MOLOPT-SR-GTH-q16 - preferred_basis: TZVP-MOLOPT-SR-GTH-q16 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q16 - - GTH-BP-q16 - - GTH-PADE - - GTH-PADE-q8 - - GTH-PBE-q16 -S: - basis_sets: - aux_basis: - - cFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - - cpFIT3 - - aug-cFIT3 - - aug-cpFIT3 - - FIT3 - - pFIT3 - - aug-FIT3 - - aug-pFIT3 - basis_molopt: - - SZV-MOLOPT-GTH-q6 - - DZVP-MOLOPT-GTH-q6 - - TZVP-MOLOPT-GTH-q6 - - TZV2P-MOLOPT-GTH-q6 - - TZV2PX-MOLOPT-GTH-q6 - - SZV-MOLOPT-SR-GTH-q6 - - DZVP-MOLOPT-SR-GTH-q6 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q6: 3.817590656735 - DZVP-MOLOPT-SR-GTH-q6: 2.215854692813 - SZV-MOLOPT-GTH-q6: 3.817590656735 - SZV-MOLOPT-SR-GTH-q6: 2.215854692813 - TZV2P-MOLOPT-GTH-q6: 3.817590656735 - TZV2PX-MOLOPT-GTH-q6: 3.817590656735 - TZVP-MOLOPT-GTH-q6: 3.817590656735 - best_basis: TZV2PX-MOLOPT-GTH-q6 - preferred_basis: DZVP-MOLOPT-SR-GTH-q6 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q6 - - GTH-BP-q6 - - GTH-PADE - - GTH-PBE-q6 -Sb: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q5 - - DZVP-MOLOPT-SR-GTH-q5 - - TZVP-MOLOPT-SR-GTH-q5 - - TZV2P-MOLOPT-SR-GTH-q5 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q5: 0.757214368696 - SZV-MOLOPT-SR-GTH-q5: 0.757214368696 - TZV2P-MOLOPT-SR-GTH-q5: 0.75721437 - TZVP-MOLOPT-SR-GTH-q5: 0.75721437 - best_basis: TZV2P-MOLOPT-SR-GTH-q5 - preferred_basis: TZVP-MOLOPT-SR-GTH-q5 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q5 - - GTH-PADE - - GTH-PBE-q5 -Sc: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q11 - - DZVP-MOLOPT-SR-GTH-q11 - - TZVP-MOLOPT-SR-GTH-q11 - - TZV2P-MOLOPT-SR-GTH-q11 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q11: 7.596358558474 - SZV-MOLOPT-SR-GTH-q11: 7.596358558474 - TZV2P-MOLOPT-SR-GTH-q11: 7.59635856 - TZVP-MOLOPT-SR-GTH-q11: 7.59635856 - best_basis: TZV2P-MOLOPT-SR-GTH-q11 - preferred_basis: TZVP-MOLOPT-SR-GTH-q11 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q11 - - GTH-BP-q11 - - GTH-PADE - - GTH-PADE-q3 - - GTH-PBE-q11 -Se: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q6 - - DZVP-MOLOPT-SR-GTH-q6 - - TZVP-MOLOPT-SR-GTH-q6 - - TZV2P-MOLOPT-SR-GTH-q6 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q6: 1.465689267622 - SZV-MOLOPT-SR-GTH-q6: 1.465689267622 - TZV2P-MOLOPT-SR-GTH-q6: 1.46568927 - TZVP-MOLOPT-SR-GTH-q6: 1.46568927 - best_basis: TZV2P-MOLOPT-SR-GTH-q6 - preferred_basis: TZVP-MOLOPT-SR-GTH-q6 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q6 - - GTH-BP-q6 - - GTH-PADE - - GTH-PBE-q6 -Si: - basis_sets: - aux_basis: - - cFIT3 - - cpFIT3 - - FIT3 - - pFIT3 - - aug-FIT3 - - aug-cFIT3 - - aug-pFIT3 - - aug-cpFIT3 - - GTH-def2-QZVP - - aug-GTH-def2-QZVP - basis_molopt: - - SZV-MOLOPT-GTH-q4 - - DZVP-MOLOPT-GTH-q4 - - TZVP-MOLOPT-GTH-q4 - - TZV2P-MOLOPT-GTH-q4 - - TZV2PX-MOLOPT-GTH-q4 - - SZV-MOLOPT-SR-GTH-q4 - - DZVP-MOLOPT-SR-GTH-q4 - basis_set_largest_exponents: - DZVP-MOLOPT-GTH-q4: 2.693604434572 - DZVP-MOLOPT-SR-GTH-q4: 1.256767641387 - SZV-MOLOPT-GTH-q4: 2.693604434572 - SZV-MOLOPT-SR-GTH-q4: 1.256767641387 - TZV2P-MOLOPT-GTH-q4: 2.693604434572 - TZV2PX-MOLOPT-GTH-q4: 2.693604434572 - TZVP-MOLOPT-GTH-q4: 2.693604434572 - best_basis: TZV2PX-MOLOPT-GTH-q4 - preferred_basis: DZVP-MOLOPT-SR-GTH-q4 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q4 - - GTH-BP-q4 - - GTH-PADE - - GTH-PBE-q4 -Sm: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q16 - - DZVP-MOLOPT-SR-GTH-q16 - - TZVP-MOLOPT-SR-GTH-q16 - - TZV2P-MOLOPT-SR-GTH-q16 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q16: 5.15953935 - SZV-MOLOPT-SR-GTH-q16: 5.15953935 - TZV2P-MOLOPT-SR-GTH-q16: 5.15953935 - TZVP-MOLOPT-SR-GTH-q16: 5.15953935 - best_basis: TZV2P-MOLOPT-SR-GTH-q16 - preferred_basis: TZVP-MOLOPT-SR-GTH-q16 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q16 -Sn: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q4 - - DZVP-MOLOPT-SR-GTH-q4 - - TZVP-MOLOPT-SR-GTH-q4 - - TZV2P-MOLOPT-SR-GTH-q4 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q4: 0.666669575074 - SZV-MOLOPT-SR-GTH-q4: 0.666669575074 - TZV2P-MOLOPT-SR-GTH-q4: 0.66666958 - TZVP-MOLOPT-SR-GTH-q4: 0.66666958 - best_basis: TZV2P-MOLOPT-SR-GTH-q4 - preferred_basis: TZVP-MOLOPT-SR-GTH-q4 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q4 -Sr: - basis_sets: - aux_basis: - - cFIT8 - - cFIT9 - - cFIT10 - - cFIT11 - - FIT8 - - FIT9 - - FIT10 - - FIT11 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q10 - - DZVP-MOLOPT-SR-GTH-q10 - - TZVP-MOLOPT-SR-GTH-q10 - - TZV2P-MOLOPT-SR-GTH-q10 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q10: 7.290111894735 - SZV-MOLOPT-SR-GTH-q10: 7.290111894735 - TZV2P-MOLOPT-SR-GTH-q10: 7.29011189 - TZVP-MOLOPT-SR-GTH-q10: 7.29011189 - best_basis: TZV2P-MOLOPT-SR-GTH-q10 - preferred_basis: TZVP-MOLOPT-SR-GTH-q10 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q10 - - GTH-PADE - - GTH-PADE-q2 - - GTH-PBE-q10 -Ta: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 2.946055777701 - SZV-MOLOPT-SR-GTH-q13: 2.946055777701 - TZV2P-MOLOPT-SR-GTH-q13: 2.94605578 - TZVP-MOLOPT-SR-GTH-q13: 2.94605578 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q5 - - GTH-PBE-q13 -Tb: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q19 - - DZVP-MOLOPT-SR-GTH-q19 - - TZVP-MOLOPT-SR-GTH-q19 - - TZV2P-MOLOPT-SR-GTH-q19 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q19: 5.84477789 - SZV-MOLOPT-SR-GTH-q19: 5.84477789 - TZV2P-MOLOPT-SR-GTH-q19: 5.84477789 - TZVP-MOLOPT-SR-GTH-q19: 5.84477789 - best_basis: TZV2P-MOLOPT-SR-GTH-q19 - preferred_basis: TZVP-MOLOPT-SR-GTH-q19 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q19 -Tc: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q15 - - DZVP-MOLOPT-SR-GTH-q15 - - TZVP-MOLOPT-SR-GTH-q15 - - TZV2P-MOLOPT-SR-GTH-q15 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q15: 3.164224765901 - SZV-MOLOPT-SR-GTH-q15: 3.164224765901 - TZV2P-MOLOPT-SR-GTH-q15: 3.16422477 - TZVP-MOLOPT-SR-GTH-q15: 3.16422477 - best_basis: TZV2P-MOLOPT-SR-GTH-q15 - preferred_basis: TZVP-MOLOPT-SR-GTH-q15 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q7 - - GTH-PBE-q15 -Te: - basis_sets: - aux_basis: - - cFIT6 - - cFIT7 - - cFIT9 - - FIT6 - - FIT7 - - FIT9 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q6 - - DZVP-MOLOPT-SR-GTH-q6 - - TZVP-MOLOPT-SR-GTH-q6 - - TZV2P-MOLOPT-SR-GTH-q6 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q6: 0.871170553457 - SZV-MOLOPT-SR-GTH-q6: 0.871170553457 - TZV2P-MOLOPT-SR-GTH-q6: 0.87117055 - TZVP-MOLOPT-SR-GTH-q6: 0.87117055 - best_basis: TZV2P-MOLOPT-SR-GTH-q6 - preferred_basis: TZVP-MOLOPT-SR-GTH-q6 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q6 - - GTH-BP-q6 - - GTH-PADE - - GTH-PBE-q6 -Th: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -Ti: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q12: 7.884569925997 - SZV-MOLOPT-SR-GTH-q12: 7.884569925997 - TZV2P-MOLOPT-SR-GTH-q12: 7.88456993 - TZVP-MOLOPT-SR-GTH-q12: 7.88456993 - best_basis: TZV2P-MOLOPT-SR-GTH-q12 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q12 - - GTH-BP-q12 - - GTH-PADE - - GTH-PADE-q4 - - GTH-PBE-q12 -Tl: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 3.381004006201 - SZV-MOLOPT-SR-GTH-q13: 3.381004006201 - TZV2P-MOLOPT-SR-GTH-q13: 3.38100401 - TZVP-MOLOPT-SR-GTH-q13: 3.38100401 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PADE-q3 - - GTH-PBE-q13 -Tm: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q23 - - DZVP-MOLOPT-SR-GTH-q23 - - TZVP-MOLOPT-SR-GTH-q23 - - TZV2P-MOLOPT-SR-GTH-q23 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q23: 7.21251657 - SZV-MOLOPT-SR-GTH-q23: 7.21251657 - TZV2P-MOLOPT-SR-GTH-q23: 7.21251657 - TZVP-MOLOPT-SR-GTH-q23: 7.21251657 - best_basis: TZV2P-MOLOPT-SR-GTH-q23 - preferred_basis: TZVP-MOLOPT-SR-GTH-q23 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q23 -U: - basis_sets: - aux_basis: null - basis_molopt: [] - basis_set_largest_exponents: null - best_basis: null - preferred_basis: null - dft_plus_u: null - potentials: - gth_potentials: [] -V: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q13 - - DZVP-MOLOPT-SR-GTH-q13 - - TZVP-MOLOPT-SR-GTH-q13 - - TZV2P-MOLOPT-SR-GTH-q13 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q13: 7.984623749528 - SZV-MOLOPT-SR-GTH-q13: 7.984623749528 - TZV2P-MOLOPT-SR-GTH-q13: 7.98462375 - TZVP-MOLOPT-SR-GTH-q13: 7.98462375 - best_basis: TZV2P-MOLOPT-SR-GTH-q13 - preferred_basis: TZVP-MOLOPT-SR-GTH-q13 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q13 - - GTH-BP-q13 - - GTH-PADE - - GTH-PADE-q5 - - GTH-PBE-q13 -W: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q14 - - DZVP-MOLOPT-SR-GTH-q14 - - TZVP-MOLOPT-SR-GTH-q14 - - TZV2P-MOLOPT-SR-GTH-q14 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q14: 3.103253876757 - SZV-MOLOPT-SR-GTH-q14: 3.103253876757 - TZV2P-MOLOPT-SR-GTH-q14: 3.10325388 - TZVP-MOLOPT-SR-GTH-q14: 3.10325388 - best_basis: TZV2P-MOLOPT-SR-GTH-q14 - preferred_basis: TZVP-MOLOPT-SR-GTH-q14 - dft_plus_u: - L: 2 - U_MINUS_J: 0 - potentials: - gth_potentials: - - GTH-BLYP-q14 - - GTH-PADE - - GTH-PADE-q6 - - GTH-PBE-q14 -Xe: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q8 - - DZVP-MOLOPT-SR-GTH-q8 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q8: 1.060135338393 - SZV-MOLOPT-SR-GTH-q8: 1.060135338393 - best_basis: DZVP-MOLOPT-SR-GTH-q8 - preferred_basis: DZVP-MOLOPT-SR-GTH-q8 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q8 -Y: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q11 - - DZVP-MOLOPT-SR-GTH-q11 - - TZVP-MOLOPT-SR-GTH-q11 - - TZV2P-MOLOPT-SR-GTH-q11 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q11: 7.169829557085 - SZV-MOLOPT-SR-GTH-q11: 7.169829557085 - TZV2P-MOLOPT-SR-GTH-q11: 7.16982956 - TZVP-MOLOPT-SR-GTH-q11: 7.16982956 - best_basis: TZV2P-MOLOPT-SR-GTH-q11 - preferred_basis: TZVP-MOLOPT-SR-GTH-q11 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q11 - - GTH-PADE - - GTH-PADE-q3 - - GTH-PBE-q11 -Yb: - basis_sets: - aux_basis: null - basis_molopt: - - SZV-MOLOPT-SR-GTH-q24 - - DZVP-MOLOPT-SR-GTH-q24 - - TZVP-MOLOPT-SR-GTH-q24 - - TZV2P-MOLOPT-SR-GTH-q24 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q24: 7.5659643 - SZV-MOLOPT-SR-GTH-q24: 7.5659643 - TZV2P-MOLOPT-SR-GTH-q24: 7.5659643 - TZVP-MOLOPT-SR-GTH-q24: 7.5659643 - best_basis: TZV2P-MOLOPT-SR-GTH-q24 - preferred_basis: TZVP-MOLOPT-SR-GTH-q24 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-PADE - - GTH-PBE-q24 -Zn: - basis_sets: - aux_basis: - - cFIT9 - - cFIT10 - - cFIT11 - - cFIT12 - - FIT9 - - FIT10 - - FIT11 - - FIT12 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q12: 6.400812724595 - SZV-MOLOPT-SR-GTH-q12: 6.400812724595 - TZV2P-MOLOPT-SR-GTH-q12: 6.40081272 - TZVP-MOLOPT-SR-GTH-q12: 6.40081272 - best_basis: TZV2P-MOLOPT-SR-GTH-q12 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q12 - - GTH-BP-q12 - - GTH-PADE - - GTH-PADE-q2 - - GTH-PADE-q20 - - GTH-PBE-q12 -Zr: - basis_sets: - aux_basis: - - cFIT10 - - cFIT11 - - cFIT12 - - cFIT13 - - FIT10 - - FIT11 - - FIT12 - - FIT13 - basis_molopt: - - SZV-MOLOPT-SR-GTH-q12 - - DZVP-MOLOPT-SR-GTH-q12 - - TZVP-MOLOPT-SR-GTH-q12 - - TZV2P-MOLOPT-SR-GTH-q12 - basis_set_largest_exponents: - DZVP-MOLOPT-SR-GTH-q12: 7.568385790028 - SZV-MOLOPT-SR-GTH-q12: 7.568385790028 - TZV2P-MOLOPT-SR-GTH-q12: 7.56838579 - TZVP-MOLOPT-SR-GTH-q12: 7.56838579 - best_basis: TZV2P-MOLOPT-SR-GTH-q12 - preferred_basis: TZVP-MOLOPT-SR-GTH-q12 - dft_plus_u: null - potentials: - gth_potentials: - - GTH-BLYP-q12 - - GTH-BP-q12 - - GTH-PADE - - GTH-PADE-q4 - - GTH-PBE-q12 diff --git a/pymatgen/io/cp2k/tests/test_inputs.py b/pymatgen/io/cp2k/tests/test_inputs.py index 7fc19668092..5ae4f4c3a50 100644 --- a/pymatgen/io/cp2k/tests/test_inputs.py +++ b/pymatgen/io/cp2k/tests/test_inputs.py @@ -7,7 +7,21 @@ import numpy as np from pymatgen.core.structure import Molecule, Structure -from pymatgen.io.cp2k.inputs import Coord, Cp2kInput, Keyword, KeywordList, Kind +from pymatgen.io.cp2k.inputs import ( + BasisFile, + BasisInfo, + Coord, + Cp2kInput, + GaussianTypeOrbitalBasisSet, + GthPotential, + Keyword, + KeywordList, + Kind, + PotentialFile, + PotentialInfo, + Section, + SectionList, +) from pymatgen.util.testing import PymatgenTest Si_structure = Structure( @@ -24,6 +38,113 @@ molecule = Molecule(species=["C", "H"], coords=[[0, 0, 0], [1, 1, 1]]) +basis = """ + H SZV-MOLOPT-GTH SZV-MOLOPT-GTH-q1 + 1 + 2 0 0 7 1 + 11.478000339908 0.024916243200 + 3.700758562763 0.079825490000 + 1.446884268432 0.128862675300 + 0.716814589696 0.379448894600 + 0.247918564176 0.324552432600 + 0.066918004004 0.037148121400 + 0.021708243634 -0.001125195500 +""" +all_H = """ +H ALLELECTRON ALL + 1 0 0 + 0.20000000 0 +""" +pot_H = """ +H GTH-PBE-q1 GTH-PBE + 1 + 0.20000000 2 -4.17890044 0.72446331 + 0 +""" + + +class BasisAndPotentialTest(PymatgenTest): + def test_basis_info(self): + # Ensure basis metadata can be read from string + b = BasisInfo.from_string("cc-pc-DZVP-MOLOPT-q1-SCAN") + self.assertEqual(b.valence, 2) + self.assertEqual(b.molopt, True) + self.assertEqual(b.electrons, 1) + self.assertEqual(b.polarization, 1) + self.assertEqual(b.cc, True) + self.assertEqual(b.pc, True) + self.assertEqual(b.xc, "SCAN") + + # Ensure one-way softmatching works + b2 = BasisInfo.from_string("cc-pc-DZVP-MOLOPT-q1") + self.assertTrue(b2.softmatch(b)) + self.assertFalse(b.softmatch(b2)) + + b3 = BasisInfo.from_string("cpFIT3") + self.assertEqual(b3.valence, 3) + self.assertEqual(b3.polarization, 1) + self.assertTrue(b3.contracted, True) + + def test_potential_info(self): + # Ensure potential metadata can be read from string + p = PotentialInfo.from_string("GTH-PBE-q1-NLCC") + self.assertEqual(p.potential_type, "GTH") + self.assertEqual(p.xc, "PBE") + self.assertEqual(p.nlcc, True) + + # Ensure one-way softmatching works + p2 = PotentialInfo.from_string("GTH-q1-NLCC") + self.assertTrue(p2.softmatch(p)) + self.assertFalse(p.softmatch(p2)) + + def test_basis(self): + # Ensure cp2k formatted string can be read for data correctly + molopt = GaussianTypeOrbitalBasisSet.from_string(basis) + self.assertEqual(molopt.nexp, [7]) + # Basis file can read from strings + bf = BasisFile.from_string(basis) + for obj in [molopt, bf.objects[0]]: + self.assertArrayAlmostEqual( + obj.exponents[0], + [ + 11.478000339908, + 3.700758562763, + 1.446884268432, + 0.716814589696, + 0.247918564176, + 0.066918004004, + 0.021708243634, + ], + ) + + # Ensure keyword can be properly generated + kw = molopt.get_keyword() + self.assertEqual(kw.values[0], "SZV-MOLOPT-GTH") + molopt.info.admm = True + kw = molopt.get_keyword() + self.assertArrayEqual(kw.values, ["AUX_FIT", "SZV-MOLOPT-GTH"]) + molopt.info.admm = False + + def test_potentials(self): + # Ensure cp2k formatted string can be read for data correctly + alle = GthPotential.from_string(all_H) + self.assertEqual(alle.potential, "All Electron") + pot = GthPotential.from_string(pot_H) + self.assertEqual(pot.potential, "Pseudopotential") + self.assertAlmostEqual(pot.r_loc, 0.2) + self.assertAlmostEqual(pot.nexp_ppl, 2) + self.assertArrayAlmostEqual(pot.c_exp_ppl, [-4.17890044, 0.72446331]) + + # Basis file can read from strings + pf = PotentialFile.from_string(pot_H) + self.assertEqual(pf.objects[0], pot) + + # Ensure keyword can be properly generated + kw = pot.get_keyword() + self.assertEqual(kw.values[0], "GTH-PBE-q1") + kw = alle.get_keyword() + self.assertEqual(kw.values[0], "ALL") + class InputTest(PymatgenTest): def setUp(self): @@ -42,6 +163,17 @@ def test_basic_sections(self): self.assertEqual(ci["GLOBAL"]["PROJECT_NAME"].description, "default name") self.assertMSONable(ci) + def test_sectionlist(self): + s1 = Section("TEST") + sl = SectionList(sections=[s1, s1]) + for s in sl: + assert isinstance(s, Section) + self.assertEqual(sl[0].name, "TEST") + self.assertEqual(sl[1].name, "TEST") + self.assertEqual(len(sl), 2) + sl += s1 + self.assertEqual(len(sl), 3) + def test_basic_keywords(self): kwd = Keyword("TEST1", 1, 2) self.assertEqual(kwd.values, (1, 2)) @@ -54,9 +186,8 @@ def test_basic_keywords(self): def test_coords(self): for strucs in [nonsense_Structure, Si_structure, molecule]: coords = Coord(strucs) - self.assertEqual(len(strucs.symbol_set), len(coords.keywords)) for c in coords.keywords.values(): - self.assertIsInstance(c, KeywordList) + self.assertTrue(isinstance(c, (Keyword, KeywordList))) def test_kind(self): for s in [nonsense_Structure, Si_structure, molecule]: @@ -64,15 +195,8 @@ def test_kind(self): self.assertEqual(spec, Kind(spec).specie) def test_ci_file(self): - # proper keyword retrieval - self.assertEqual( - self.ci["FORCE_EVAL"]["DFT"]["SCF"]["OT"]["MINIMIZER"], - Keyword("MINIMIZER", "DIIS"), - ) - # proper type retrieval self.assertIsInstance(self.ci["FORCE_EVAL"]["DFT"]["MGRID"]["NGRIDS"].values[0], int) - # self.assertIsInstance(self.ci["FORCE_EVAL"]["SUBSYS"]["COORD"]["Si"], Sequence) self.assertIsInstance(self.ci["FORCE_EVAL"]["DFT"]["UKS"].values[0], bool) self.assertIsInstance(self.ci["FORCE_EVAL"]["DFT"]["QS"]["EPS_DEFAULT"].values[0], float) @@ -118,7 +242,7 @@ def test_preprocessor(self): self.assertTrue(self.ci.check("INCLUDE")) self.assertEqual(self.ci["INCLUDE"]["KEYWORD"], Keyword("KEYWORD", "VALUE")) self.assertEqual(self.ci["FORCE_EVAL"]["METHOD"], Keyword("METHOD", "QS")) - self.assertEqual(self.ci["FORCE_EVAL"]["DFT"]["SCF"]["MAX_SCF"], Keyword("MAX_SCF", 20)) + self.assertEqual(self.ci["FORCE_EVAL"]["DFT"]["SCF"]["MAX_SCF"], Keyword("MAX_SCF", 1)) def test_mongo(self): s = """ diff --git a/pymatgen/io/cp2k/tests/test_outputs.py b/pymatgen/io/cp2k/tests/test_outputs.py index 881bec01160..0b967de01df 100644 --- a/pymatgen/io/cp2k/tests/test_outputs.py +++ b/pymatgen/io/cp2k/tests/test_outputs.py @@ -8,21 +8,108 @@ from pymatgen.util.testing import PymatgenTest -# TODO More comprehensive testing class SetTest(PymatgenTest): def setUp(self): self.TEST_FILES_DIR = Path.joinpath(self.TEST_FILES_DIR, "cp2k") self.out = Cp2kOutput(Path.joinpath(self.TEST_FILES_DIR, "cp2k.out"), auto_load=True) def test_files(self): + """Can find files successfully""" self.out.parse_files() - self.assertEqual(len(self.out.filenames["PDOS"]), 2) + self.assertEqual(len(self.out.filenames["PDOS"]), 1) + self.assertEqual(len(self.out.filenames["PDOS"]), 1) + self.assertEqual(len(self.out.filenames["band_structure"]), 1) + self.assertEqual(len(self.out.filenames["hyperfine_tensor"]), 1) + self.assertEqual(len(self.out.filenames["chi_tensor"]), 1) + self.assertEqual(len(self.out.filenames["g_tensor"]), 1) - def test(self): - self.assertEqual(self.out.spin_polarized, False) + def test_run_info(self): + """Can extract run info from out file""" + self.assertEqual(self.out.spin_polarized, True) self.assertEqual(self.out.completed, True) - self.assertEqual(self.out.num_warnings, [[1]]) - self.assertEqual(self.out.run_type.upper(), "GEO_OPT") + self.assertEqual(self.out.num_warnings, [[2]]) + self.assertEqual(self.out.charge, 0) + self.assertEqual(self.out.cp2k_version, "2022.1") + self.assertEqual(self.out.run_type.upper(), "ENERGY_FORCE") + + def energy_force(self): + """Can get energy and forces""" + self.assertEqual(self.out.final_energy, -197.40000341992783) + self.assertArrayAlmostEqual( + self.out.data["forces"][0], [[-0.00000001, -0.00000001, -0.00000001], [0.00000002, 0.00000002, 0.00000002]] + ) + + def test_band(self): + """Can parse bandstructure files""" + self.assertTrue(self.out.band_structure) + self.assertEqual(self.out.band_structure.get_band_gap().get("energy"), 0.27940141999999923) + + def test_dos(self): + """Can parse dos files""" + self.assertAlmostEqual(self.out.data["pdos"]["Si_1"]["s"]["efermi"], -6.7370756409404455) + self.assertAlmostEqual(self.out.data["tdos"].energies[0], -6.781065751604123) + + def test_chi(self): + self.out.parse_chi_tensor() + self.assertEqual(len(self.out.data["chi_total"]), 1) + self.assertAlmostEqual(self.out.data["PV1"][0], 0.1587) + self.assertAlmostEqual(self.out.data["PV2"][0], 0.4582) + self.assertAlmostEqual(self.out.data["PV3"][0], 0.4582) + self.assertAlmostEqual(self.out.data["ISO"][0], 0.3584) + self.assertAlmostEqual(self.out.data["ANISO"][0], 0.1498) + self.assertArrayAlmostEqual( + self.out.data["chi_soft"][0], + [[5.9508, -1.6579, -1.6579], [-1.6579, 5.9508, -1.6579], [-1.6579, -1.6579, 5.9508]], + ) + self.assertArrayAlmostEqual(self.out.data["chi_local"][0], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) + self.assertArrayAlmostEqual( + self.out.data["chi_total"][0], + [[5.9508, -1.6579, -1.6579], [-1.6579, 5.9508, -1.6579], [-1.6579, -1.6579, 5.9508]], + ) + self.assertArrayAlmostEqual( + self.out.data["chi_total_ppm_cgs"][0], + [[0.3584, -0.0998, -0.0998], [-0.0998, 0.3584, -0.0998], [-0.0998, -0.0998, 0.3584]], + ) + + def test_gtensor(self): + self.out.parse_gtensor() + self.assertEqual(len(self.out.data["gtensor_total"]), 1) + self.assertArrayAlmostEqual(self.out.data["gmatrix_zke"][0], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) + self.assertArrayAlmostEqual(self.out.data["gmatrix_so"][0], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) + self.assertArrayAlmostEqual(self.out.data["gmatrix_soo"][0], [[0, 0, 0], [0, 0, 0], [0, 0, 0]]) + self.assertArrayAlmostEqual( + self.out.data["gmatrix_total"][0], + [[2.0023193044, 0.0, 0.0], [0.0, 2.0023193044, 0.0], [0.0, 0.0, 2.0023193044]], + ) + self.assertArrayAlmostEqual( + self.out.data["gtensor_total"][0], + [[2.0023193044, 0.0, 0.0], [0.0, 2.0023193044, 0.0], [0.0, 0.0, 2.0023193044]], + ) + self.assertArrayAlmostEqual( + self.out.data["delta_g"][0], + [ + [0.7158445077, -0.6982592888, 0.0007786468], + [0.4071365712, 0.4164835801, -0.8128845182], + [0.5672798720, 0.5822159333, 0.5824243761], + ], + ) + + def test_hyperfine(self): + self.out.parse_hyperfine() + dat = self.out.data["hyperfine_tensor"] + ref = [ + [ + [0.0000000000, 0.0000001288, 0.0000001288], + [0.0000001288, -0.0000000000, 0.0000001288], + [0.0000001288, 0.0000001288, 0.0000000000], + ], + [ + [0.0000000000, -0.0000001288, -0.0000001288], + [-0.0000001288, 0.0000000000, -0.0000001288], + [-0.0000001288, -0.0000001288, 0.0000000000], + ], + ] + self.assertArrayAlmostEqual(dat[0], ref) if __name__ == "__main__": diff --git a/pymatgen/io/cp2k/tests/test_sets.py b/pymatgen/io/cp2k/tests/test_sets.py index 01ec7689817..70a96eb2b9f 100644 --- a/pymatgen/io/cp2k/tests/test_sets.py +++ b/pymatgen/io/cp2k/tests/test_sets.py @@ -2,17 +2,15 @@ # Distributed under the terms of the MIT License. import unittest +from pathlib import Path -from pymatgen.core.structure import Molecule, Species, Structure +from pymatgen.core.structure import Molecule, Structure from pymatgen.io.cp2k.sets import ( - CellOptSet, - Cp2kInputSet, + SETTINGS, + Cp2kValidationError, DftSet, - HybridCellOptSet, - HybridRelaxSet, - HybridStaticSet, - RelaxSet, - StaticSet, + GaussianTypeOrbitalBasisSet, + GthPotential, ) from pymatgen.util.testing import PymatgenTest @@ -21,59 +19,111 @@ species=["Si", "Si"], coords=[[0, 0, 0], [0.25, 0.25, 0.25]], ) +molecule = Molecule(species=["Si"], coords=[[0, 0, 0]]) -nonsense_Structure = Structure( - lattice=[[-1, -10, -100], [0.1, 0.01, 0.001], [7, 11, 21]], # type: ignore[arg-type] - species=["X"], - coords=[[-1, -1, -1]], -) -molecule = Molecule(species=["C", "H"], coords=[[0, 0, 0], [1, 1, 1]]) +class SetTest(PymatgenTest): + def setUp(self) -> None: + self.TEST_FILES_DIR = Path.joinpath(self.TEST_FILES_DIR, "cp2k") + SETTINGS["PMG_CP2K_DATA_DIR"] = self.TEST_FILES_DIR + self.setkwargs = { + "print_pdos": False, + "print_dos": False, + "print_v_hartree": False, + "print_e_density": False, + } + return super().setUp() + def test_dft_set(self): -property_structure = Structure( - lattice=[[10, 0, 0], [0, 10, 0], [0, 0, 10]], - species=[ - Species("Ni", oxidation_state=4, properties={"spin": 0}), - Species("O", oxidation_state=-2, properties={"spin": 0}), - "Ni", - "O", - ], - coords=[[0, 0, 0], [0.25, 0.25, 0.25], [0.5, 0.5, 0.5], [1, 1, 1]], -) + # Basis sets / potentials searching + basis_and_potential = {"basis_type": "SZV", "potential_type": "Pseudopotential", "functional": None} + ss = DftSet(Si_structure, basis_and_potential=basis_and_potential, xc_functionals="PBE") + # Basis sets / potentials by name + basis_and_potential = {"Si": {"basis": "SZV-GTH-q4", "potential": "GTH-PBE-q4"}} + ss = DftSet(Si_structure, basis_and_potential=basis_and_potential, xc_functionals="PBE") -# TODO More comprehensive testing -class SetTest(PymatgenTest): - def setUp(self): - pass - - def test_all_sets(self): - for s in [Si_structure, molecule]: - cis = Cp2kInputSet(s) - self.assertMSONable(cis) - cis = Cp2kInputSet.from_dict(cis.as_dict()) - Cp2kInputSet.from_string(cis.get_string()) - - DftSet(s) - StaticSet(s) - HybridStaticSet(s) - RelaxSet(s) - HybridRelaxSet(s) - CellOptSet(s) - HybridCellOptSet(s) - - def test_aux_basis(self): - Si_aux_bases = ["FIT", "cFIT", "pFIT", "cpFIT"] - for s in Si_aux_bases: - HybridStaticSet(Si_structure, aux_basis={"Si": s}) - - def test_prints(self): - cis = RelaxSet(Si_structure, print_ldos=False, print_pdos=False) - self.assertFalse(cis.check("FORCE_EVAL/DFT/PRINT/PRINT/PDOS")) - cis = RelaxSet(Si_structure, print_ldos=True, print_hartree_potential=True) - self.assertTrue(cis.check("FORCE_EVAL/DFT/PRINT/PDOS/LDOS 1")) - self.assertTrue(cis.check("FORCE_EVAL/DFT/PRINT/V_HARTREE_CUBE")) + # Basis sets / potentials by name with ADMM + basis_and_potential = {"Si": {"basis": "SZV-GTH-q4", "potential": "GTH-PBE-q4", "aux_basis": "cFIT3"}} + ss = DftSet(Si_structure, basis_and_potential=basis_and_potential, xc_functionals="PBE") + basis_sets = ss["force_eval"]["subsys"]["Si_1"].get("basis_set") + self.assertTrue(any("AUX_FIT" in b.values for b in basis_sets)) + self.assertTrue(any("cFIT3" in b.values for b in basis_sets)) + + # Basis sets / potentials by hash value + basis_and_potential = { + "Si": {"basis": "30767c18f6e7e46c1b56c1d34ff6007d", "potential": "21e2f468a18404ff6119fe801da81e43"} + } + ss = DftSet(Si_structure, basis_and_potential=basis_and_potential, xc_functionals="PBE") + + # Basis set / potential with objects + gto = """ + Si SZV-MOLOPT-GTH SZV-MOLOPT-GTH-q4 + 1 + 2 0 1 6 1 1 + 2.693604434572 0.015333179500 -0.005800105400 + 1.359613855428 -0.283798205000 -0.059172026000 + 0.513245176029 -0.228939692700 0.121487149900 + 0.326563011394 0.728834000900 0.423382421100 + 0.139986977410 0.446205299300 0.474592116300 + 0.068212286977 0.122025292800 0.250129397700 + """ + pot = """Si GTH-BLYP-q4 GTH-BLYP + 2 2 + 0.44000000 1 -6.25958674 + 2 + 0.44465247 2 8.31460936 -2.33277947 + 3.01160535 + 0.50279207 1 2.33241791""" + basis_and_potential = { + "Si": {"basis": GaussianTypeOrbitalBasisSet.from_string(gto), "potential": GthPotential.from_string(pot)} + } + ss = DftSet(Si_structure, basis_and_potential=basis_and_potential, xc_functionals="PBE", **self.setkwargs) + self.assertAlmostEqual(ss.cutoff, 150) + + # Test that printing will activate sections + self.assertFalse(ss.check("motion")) + ss.activate_motion() + self.assertTrue(ss.check("motion")) + self.assertFalse(ss.check("force_eval/dft/print/pdos")) + ss.print_pdos() + self.assertTrue(ss.check("force_eval/dft/print/pdos")) + self.assertFalse(ss.check("force_eval/dft/print/v_hartree_cube")) + ss.print_v_hartree() + self.assertTrue(ss.check("force_eval/dft/print/v_hartree_cube")) + + # Test property activators + self.assertFalse(ss.check("force_eval/properties")) + ss.activate_nmr() + ss.activate_epr() + ss.activate_hyperfine() + ss.activate_polar() + ss.activate_tddfpt() + self.assertTrue(ss.check("force_eval/properties/linres/localize")) + self.assertTrue(ss.check("force_eval/properties/linres/nmr/print/chi_tensor")) + self.assertTrue(ss.check("force_eval/properties/linres/epr/print/g_tensor")) + self.assertTrue(ss.check("force_eval/properties/tddfpt")) + self.assertTrue(ss.check("force_eval/dft/print/hyperfine_coupling_tensor")) + + # For at least up to v2022.1, DOS doesn't work without kpoints + self.assertFalse(ss.check("force_eval/dft/print/dos")) + ss.print_dos() + self.assertFalse(ss.check("force_eval/dft/print/dos")) + + self.assertFalse(ss.check("force_eval/dft/xc/hf")) + ss.activate_hybrid() + self.assertTrue(ss.check("force_eval/dft/xc/hf")) + self.assertTrue(ss.check("force_eval/dft/auxiliary_density_matrix_method")) + + # Validator will trip for kpoints + hfx + ss.update({"force_eval": {"dft": {"kpoints": {}}}}) + with self.assertRaises(Cp2kValidationError): + ss.validate() + + ss = DftSet(molecule, basis_and_potential=basis_and_potential, xc_functionals="PBE") + self.assertTrue(ss.check("force_eval/dft/poisson")) + self.assertEqual(ss["force_eval"]["dft"]["poisson"].get("periodic").values[0].upper(), "NONE") if __name__ == "__main__": diff --git a/pymatgen/io/cp2k/utils.py b/pymatgen/io/cp2k/utils.py index b468a296dc4..39c8e9d1e90 100644 --- a/pymatgen/io/cp2k/utils.py +++ b/pymatgen/io/cp2k/utils.py @@ -2,59 +2,60 @@ Utility functions for assisting with cp2k IO """ +from __future__ import annotations + import os import re -import warnings -from pathlib import Path import numpy as np from monty.io import zopen -from ruamel.yaml import YAML - -from pymatgen.core import SETTINGS -MODULE_DIR = Path(__file__).resolve().parent +from pymatgen.core import Molecule, Structure -def _postprocessor(s): +def postprocessor(data: str) -> str | int | float | bool | None: """ - Helper function to post process the results of the pattern matching functions in Cp2kOutput and turn them to - python types. + Helper function to post process the results of the pattern matching functions in Cp2kOutput + and turn them to Python types. + + Args: + data (str): The data to be post processed. + + Raises: + ValueError: If the data cannot be parsed. + + Returns: + str | int | float | bool | None: The post processed data. """ - s = s.rstrip() # Remove leading/trailing whitespace - s = s.replace(" ", "_") # Remove whitespaces + data = data.strip().replace(" ", "_") # remove leading/trailing whitespace, replace spaces with _ - if s.lower() == "no": + if data.lower() in ("false", "no", "f"): return False - if s.lower() == "none": + if data.lower() == "none": return None - if s.lower() == "yes" or s.lower() == "true": + if data.lower() in ("true", "yes", "t"): return True - if re.match(r"^-?\d+$", s): - try: - return int(s) - except ValueError: - raise OSError("Error in parsing CP2K file.") - if re.match(r"^[+\-]?(?=.)(?:0|[1-9]\d*)?(?:\.\d*)?(?:\d[eE][+\-]?\d+)?$", s): + if re.match(r"^-?\d+$", data): try: - return float(s) - except ValueError: - raise OSError("Error in parsing CP2K file.") - if re.match(r"\*+", s): + return int(data) + except ValueError as exc: + raise ValueError(f"Error parsing '{data}' as int in CP2K file.") from exc + if re.match(r"^[+\-]?(?=.)(?:0|[1-9]\d*)?(?:\.\d*)?(?:\d[eE][+\-]?\d+)?$", data): try: - return np.NaN - except ValueError: - raise OSError("Error in parsing CP2K file.") - return s + return float(data) + except ValueError as exc: + raise ValueError(f"Error parsing '{data}' as float in CP2K file.") from exc + if re.match(r"\*+", data): + return np.NaN + return data -def _preprocessor(s, d="."): +def preprocessor(data: str, dir: str = ".") -> str: """ - Cp2k contains internal preprocessor flags that are evaluated before - execution. This helper function recognizes those preprocessor flags - and replacees them with an equivalent cp2k input (this way everything - is contained neatly in the cp2k input structure, even if the user - preferred to use the flags. + Cp2k contains internal preprocessor flags that are evaluated before execution. This helper + function recognizes those preprocessor flags and replaces them with an equivalent cp2k input + (this way everything is contained neatly in the cp2k input structure, even if the user preferred + to use the flags. CP2K preprocessor flags (with arguments) are: @@ -66,32 +67,50 @@ def _preprocessor(s, d="."): @IF/@ELIF: Not implemented yet. Args: - s (str): string representation of cp2k input to preprocess + data (str): cp2k input to preprocess + dir (str, optional): Path for include files. Default is '.' (current directory). + + Returns: + Preprocessed string """ - includes = re.findall(r"(@include.+)", s, re.IGNORECASE) + includes = re.findall(r"(@include.+)", data, re.IGNORECASE) for incl in includes: inc = incl.split() assert len(inc) == 2 # @include filename inc = inc[1].strip("'") inc = inc.strip('"') - with zopen(os.path.join(d, inc)) as f: - s = re.sub(rf"{incl}", f.read(), s) - variable_sets = re.findall(r"(@SET.+)", s, re.IGNORECASE) + with zopen(os.path.join(dir, inc)) as f: + data = re.sub(rf"{incl}", f.read(), data) + variable_sets = re.findall(r"(@SET.+)", data, re.IGNORECASE) for match in variable_sets: v = match.split() assert len(v) == 3 # @SET VAR value var, value = v[1:] - s = re.sub(rf"{match}", "", s) - s = re.sub(r"\${?" + var + "}?", value, s) + data = re.sub(rf"{match}", "", data) + data = re.sub(r"\${?" + var + "}?", value, data) - c1 = re.findall(r"@IF", s, re.IGNORECASE) - c2 = re.findall(r"@ELIF", s, re.IGNORECASE) + c1 = re.findall(r"@IF", data, re.IGNORECASE) + c2 = re.findall(r"@ELIF", data, re.IGNORECASE) if len(c1) > 0 or len(c2) > 0: raise NotImplementedError("This cp2k input processor does not currently support conditional blocks.") - return s + return data + + +def chunk(string: str): + """ + Chunk the string from a cp2k basis or potential file + """ + lines = iter(line for line in (l.strip() for l in string.split("\n")) if line and not line.startswith("#")) + chunks: list = [] + for line in lines: + if line.split()[0].isalpha(): + chunks.append([]) + chunks[-1].append(line) + chunks = ["\n".join(c) for c in chunks] + return chunks -def natural_keys(text): +def natural_keys(text: str): """ Sort text by numbers coming after an underscore with natural number convention, @@ -104,127 +123,32 @@ def atoi(t): return [atoi(c) for c in re.split(r"_(\d+)", text)] -def get_basis_and_potential(species, basis_and_potential_map, functional="PBE"): - """ - Retrieve basis/potential dictionary - - Args: - species: (list) list of species for which to get the potential/basis strings - basis_and_potential_map: (dict or str) a keyword string or a dictionary - specifying how bases and/or potentials should be assigned - functional: (str) functional type. Default: 'PBE' - - Returns: - (dict) of the form {'specie': {'potential': potential, 'basis': basis}...} - """ - - potential_filename = SETTINGS.get("PMG_DEFAULT_CP2K_POTENTIAL_FILE", "GTH_POTENTIALS") - basis_filenames = ["BASIS_MOLOPT", "BASIS_MOLOPT_UCL"] - - functional = functional or SETTINGS.get("PMG_DEFAULT_FUNCTIONAL", "PBE") - - basis_and_potential = { - "basis_filenames": basis_filenames, - "potential_filename": potential_filename, - } - - with open(os.path.join(MODULE_DIR, "settings.yaml")) as f: - yaml = YAML(typ="unsafe", pure=True) - settings = yaml.load(f) - - if basis_and_potential_map == "best": - basis_and_potential.update( - { - s: { - "basis": settings[s]["basis_sets"]["best_basis"], - "potential": [p for p in settings[s]["potentials"]["gth_potentials"] if functional in p][0], - } - for s in species - } - ) - elif basis_and_potential_map == "preferred": - basis_and_potential.update( - { - s: { - "basis": settings[s]["basis_sets"]["preferred_basis"], - "potential": [p for p in settings[s]["potentials"]["gth_potentials"] if functional in p][0], - } - for s in species - } - ) - else: - basis_and_potential.update(basis_and_potential_map) - - return basis_and_potential - - -def get_aux_basis(basis_type, default_basis_type="cpFIT"): - """ - Get auxiliary basis info for a list of species. - - Args: - basis_type (dict): dict of auxiliary basis sets to use. i.e: - basis_type = {'Si': 'cFIT', 'O': 'cpFIT'}. Basis type needs to - exist for that species. - - Basis types: - FIT - cFIT - pFIT - cpFIT - GTH-def2 - aug-{FIT,cFIT,pFIT,cpFIT, GTH-def2} - - default_basis_type (str) default basis type if n - +def get_unique_site_indices(structure: Structure | Molecule): """ - with open(os.path.join(MODULE_DIR, "settings.yaml")) as f: - yaml = YAML(typ="unsafe", pure=True) - settings = yaml.load(f) - aux_bases = { - s: [settings[s]["basis_sets"]["preferred_aux_basis"]] - if "preferred_aux_basis" in settings[s]["basis_sets"] - else settings[s]["basis_sets"]["aux_basis"] - for s in settings - } - - default_basis_type = default_basis_type or SETTINGS.get("PMG_CP2K_DEFAULT_AUX_BASIS_TYPE") - basis_type = {k: basis_type[k] if basis_type[k] else default_basis_type for k in basis_type} - basis = {k: {} for k in basis_type} - for k in basis_type: - if aux_bases.get(k) is None: - basis[k] = None - continue - for i in aux_bases[k]: - if i.startswith(basis_type[k]): - basis[k] = i - break - for k in basis: - if not basis[k]: - if aux_bases[k]: - basis[k] = aux_bases[k][0] - else: - raise LookupError(f"No basis of that type found for: {k}") - return basis - - -def get_unique_site_indices(structure): - """ - Get unique site indices for a structure according to site properties. Whatever site-property has the most - unique values is used for indexing. + Get unique site indices for a structure according to site properties. Whatever site-property + has the most unique values is used for indexing. - For example, if you have magnetic CoO with half Co atoms having a positive moment, and the other - half having a negative moment. Then this function will create a dict of sites for Co_1, Co_2, O. This - function also deals with "Species" properties like oxi_state and spin by pushing them to site - properties. + For example, if you have magnetic CoO with half Co atoms having a positive moment, and the + other half having a negative moment. Then this function will create a dict of sites for + Co_1, Co_2, O. This function also deals with "Species" properties like oxi_state and spin by + pushing them to site properties. - This creates unique sites, based on site properties, but does not have anything to do with turning - those site properties into CP2K input parameters. This will only be done for properties which can be - turned into CP2K input parameters, which are stored in parsable_site_properties. + This creates unique sites, based on site properties, but does not have anything to do with + turning those site properties into CP2K input parameters. This will only be done for properties + which can be turned into CP2K input parameters, which are stored in parsable_site_properties. """ spins = [] oxi_states = [] - parsable_site_properties = {"magmom", "oxi_state", "spin", "u_minus_j", "basis", "potential", "ghost", "aux_basis"} + parsable_site_properties = { + "magmom", + "oxi_state", + "spin", + "u_minus_j", + "basis", + "potential", + "ghost", + "aux_basis", + } for site in structure: for sp in site.species: @@ -246,7 +170,7 @@ def get_unique_site_indices(structure): for i, site in enumerate(structure) ] unique_itms = list(set(items)) - _sites = {u: [] for u in unique_itms} + _sites: dict[tuple, list] = {u: [] for u in unique_itms} for i, itm in enumerate(items): _sites[itm].append(i) sites = {} @@ -258,71 +182,10 @@ def get_unique_site_indices(structure): return sites -def get_cutoff_from_basis(els, bases, rel_cutoff=50): - """ - Gets the appropriate cutoff for the calculation given the elements/basis sets being used - and the desired relative cutoff. - - Args: - els: list of element symbols - bases: corresponding basis set names for the elements - rel_cutoff: The desired relative cutoff - Returns: - Ideal cutoff for calculation. - """ - with open(os.path.join(MODULE_DIR, "settings.yaml")) as f: - yaml = YAML(typ="unsafe", pure=True) - _exponents = yaml.load(f) - _exponents = { - k: v["basis_sets"].get("basis_set_largest_exponents") - for k, v in _exponents.items() - if v["basis_sets"].get("basis_set_largest_exponents") - } - exponents = {el.upper(): {b.upper(): v for b, v in basis.items()} for el, basis in _exponents.items()} - return max(np.ceil(exponents[el.upper()][basis.upper()]) * rel_cutoff for el, basis in zip(els, bases)) - - -# TODO this is not comprehensive. There are so many libxc functionals (e.g. see r2scan) -# and their availability changes with libxc version. I see no easy way to deal with this -# So these are just a few of the most common ones. -# TODO whenever ADMM gets interfaced with LibXC, this should include hybrid functionals -# and the sets will get more streamlined. -def get_xc_functionals(name): - """ - Get the XC functionals for a given functional name. This utility does - not deal with defining hybrid functionals since those may or may not - require ADMM, which is not supported by LibXC and so needs to be manually - defined. - - Args: - name: Name of the functional. - """ - name = name.upper() - if name == "PBE": - return ["PBE"] - if name in ("LDA", "PADE"): - return ["PADE"] - if name == "B3LYP": - return ["B3LYP"] - if name == "BLYP": - return ["BLYP"] - if name == "SCAN": - return ["MGGA_X_SCAN", "MGGA_C_SCAN"] - if name == "SCANL": - return ["MGGA_X_SCANL", "MGGA_C_SCANL"] - if name == "R2SCAN": - return ["MGGA_X_R2SCAN", "MGGA_C_R2SCAN"] - if name == "R2SCANL": - return ["MGGA_X_R2SCANL", "MGGA_C_R2SCANL"] - warnings.warn(f"Unknown XC functionals: {name}") - return [name] - - -def get_truncated_coulomb_cutoff(inp_struct): +def get_truncated_coulomb_cutoff(inp_struct: Structure): """ Get the truncated Coulomb cutoff for a given structure. """ - m = inp_struct.lattice.matrix m = (abs(m) > 1e-5) * m a, b, c = m[0], m[1], m[2] diff --git a/pymatgen/util/typing.py b/pymatgen/util/typing.py index 72c5ac7542b..e380a087b44 100644 --- a/pymatgen/util/typing.py +++ b/pymatgen/util/typing.py @@ -23,7 +23,7 @@ ArrayLike = Union[Sequence[float], Sequence[Sequence[float]], Sequence[np.ndarray], np.ndarray] # type: ignore if TYPE_CHECKING: # needed to avoid circular imports - from pymatgen.analysis.cost import CostEntry + from pymatgen.analysis.cost import CostEntry # type: ignore[attr-defined] from pymatgen.analysis.phase_diagram import ( GrandPotPDEntry, PDEntry, diff --git a/test_files/cp2k/BAND.bs b/test_files/cp2k/BAND.bs new file mode 100644 index 00000000000..56d8b43a138 --- /dev/null +++ b/test_files/cp2k/BAND.bs @@ -0,0 +1,1150 @@ +# Set 1: 2 special points, 2 k-points, 26 bands +# Special point 1 0.00000000 0.00000000 0.00000000 Gamma +# Special point 2 0.50000000 0.00000000 0.50000000 X +# Point 1 Spin 1: 0.00000000 0.00000000 0.00000000 0.50000000 +# Band Energy [eV] Occupation + 1 -5.79106773 1.00000000 + 2 6.19388499 1.00000000 + 3 6.19388499 1.00000000 + 4 6.19388520 1.00000000 + 5 8.47416282 0.00000000 + 6 8.47416629 0.00000000 + 7 8.47416629 0.00000000 + 8 9.61925800 0.00000000 + 9 14.27669094 0.00000000 + 10 14.27669094 0.00000000 + 11 21.31341509 0.00000000 + 12 21.31341509 0.00000000 + 13 21.31341997 0.00000000 + 14 31.84840681 0.00000000 + 15 31.84840681 0.00000000 + 16 32.45940899 0.00000000 + 17 32.45940899 0.00000000 + 18 32.45941091 0.00000000 + 19 43.96451655 0.00000000 + 20 43.96462667 0.00000000 + 21 43.96462667 0.00000000 + 22 46.82120191 0.00000000 + 23 46.82120191 0.00000000 + 24 46.82122120 0.00000000 + 25 88.03515093 0.00000000 + 26 93.98308289 0.00000000 +# Point 1 Spin 2: 0.00000000 0.00000000 0.00000000 0.50000000 +# Band Energy [eV] Occupation + 1 -5.79106773 1.00000000 + 2 6.19388499 1.00000000 + 3 6.19388499 1.00000000 + 4 6.19388520 1.00000000 + 5 8.47416282 0.00000000 + 6 8.47416629 0.00000000 + 7 8.47416629 0.00000000 + 8 9.61925800 0.00000000 + 9 14.27669094 0.00000000 + 10 14.27669094 0.00000000 + 11 21.31341509 0.00000000 + 12 21.31341509 0.00000000 + 13 21.31341997 0.00000000 + 14 31.84840681 0.00000000 + 15 31.84840681 0.00000000 + 16 32.45940899 0.00000000 + 17 32.45940899 0.00000000 + 18 32.45941091 0.00000000 + 19 43.96451655 0.00000000 + 20 43.96462667 0.00000000 + 21 43.96462667 0.00000000 + 22 46.82120191 0.00000000 + 23 46.82120191 0.00000000 + 24 46.82122120 0.00000000 + 25 88.03515093 0.00000000 + 26 93.98308289 0.00000000 +# Point 2 Spin 1: 0.50000000 0.00000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.64632427 1.00000000 + 2 -1.64632410 1.00000000 + 3 3.19819363 1.00000000 + 4 3.19819387 1.00000000 + 5 6.47328662 0.00000000 + 6 6.47328687 0.00000000 + 7 16.30600684 0.00000000 + 8 16.30600854 0.00000000 + 9 17.85399046 0.00000000 + 10 17.85399316 0.00000000 + 11 19.86692789 0.00000000 + 12 19.86692931 0.00000000 + 13 20.87360768 0.00000000 + 14 20.87360785 0.00000000 + 15 28.89902823 0.00000000 + 16 28.89902990 0.00000000 + 17 30.96376087 0.00000000 + 18 30.96376804 0.00000000 + 19 31.60486554 0.00000000 + 20 31.60486685 0.00000000 + 21 32.46630983 0.00000000 + 22 32.46631886 0.00000000 + 23 53.74973928 0.00000000 + 24 53.74985101 0.00000000 + 25 94.51200698 0.00000000 + 26 94.51200826 0.00000000 +# Point 2 Spin 2: 0.50000000 0.00000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.64632427 1.00000000 + 2 -1.64632410 1.00000000 + 3 3.19819363 1.00000000 + 4 3.19819387 1.00000000 + 5 6.47328662 0.00000000 + 6 6.47328687 0.00000000 + 7 16.30600684 0.00000000 + 8 16.30600854 0.00000000 + 9 17.85399046 0.00000000 + 10 17.85399316 0.00000000 + 11 19.86692789 0.00000000 + 12 19.86692931 0.00000000 + 13 20.87360768 0.00000000 + 14 20.87360785 0.00000000 + 15 28.89902823 0.00000000 + 16 28.89902990 0.00000000 + 17 30.96376087 0.00000000 + 18 30.96376804 0.00000000 + 19 31.60486554 0.00000000 + 20 31.60486685 0.00000000 + 21 32.46630983 0.00000000 + 22 32.46631886 0.00000000 + 23 53.74973928 0.00000000 + 24 53.74985101 0.00000000 + 25 94.51200698 0.00000000 + 26 94.51200826 0.00000000 +# Set 2: 2 special points, 2 k-points, 26 bands +# Special point 1 0.50000000 0.00000000 0.50000000 X +# Special point 2 0.50000000 0.25000000 0.75000000 W +# Point 1 Spin 1: 0.50000000 0.00000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.64632427 1.00000000 + 2 -1.64632410 1.00000000 + 3 3.19819363 1.00000000 + 4 3.19819387 1.00000000 + 5 6.47328662 0.00000000 + 6 6.47328687 0.00000000 + 7 16.30600684 0.00000000 + 8 16.30600854 0.00000000 + 9 17.85399046 0.00000000 + 10 17.85399316 0.00000000 + 11 19.86692789 0.00000000 + 12 19.86692931 0.00000000 + 13 20.87360768 0.00000000 + 14 20.87360785 0.00000000 + 15 28.89902823 0.00000000 + 16 28.89902990 0.00000000 + 17 30.96376087 0.00000000 + 18 30.96376804 0.00000000 + 19 31.60486554 0.00000000 + 20 31.60486685 0.00000000 + 21 32.46630983 0.00000000 + 22 32.46631886 0.00000000 + 23 53.74973928 0.00000000 + 24 53.74985101 0.00000000 + 25 94.51200698 0.00000000 + 26 94.51200826 0.00000000 +# Point 1 Spin 2: 0.50000000 0.00000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.64632427 1.00000000 + 2 -1.64632410 1.00000000 + 3 3.19819363 1.00000000 + 4 3.19819387 1.00000000 + 5 6.47328662 0.00000000 + 6 6.47328687 0.00000000 + 7 16.30600684 0.00000000 + 8 16.30600854 0.00000000 + 9 17.85399046 0.00000000 + 10 17.85399316 0.00000000 + 11 19.86692789 0.00000000 + 12 19.86692931 0.00000000 + 13 20.87360768 0.00000000 + 14 20.87360785 0.00000000 + 15 28.89902823 0.00000000 + 16 28.89902990 0.00000000 + 17 30.96376087 0.00000000 + 18 30.96376804 0.00000000 + 19 31.60486554 0.00000000 + 20 31.60486685 0.00000000 + 21 32.46630983 0.00000000 + 22 32.46631886 0.00000000 + 23 53.74973928 0.00000000 + 24 53.74985101 0.00000000 + 25 94.51200698 0.00000000 + 26 94.51200826 0.00000000 +# Point 2 Spin 1: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Point 2 Spin 2: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Set 3: 2 special points, 2 k-points, 26 bands +# Special point 1 0.50000000 0.25000000 0.75000000 W +# Special point 2 0.37500000 0.37500000 0.75000000 K +# Point 1 Spin 1: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Point 1 Spin 2: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Point 2 Spin 1: 0.37500000 0.37500000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 2 Spin 2: 0.37500000 0.37500000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Set 4: 2 special points, 2 k-points, 26 bands +# Special point 1 0.37500000 0.37500000 0.75000000 K +# Special point 2 0.00000000 0.00000000 0.00000000 Gamma +# Point 1 Spin 1: 0.37500000 0.37500000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 1 Spin 2: 0.37500000 0.37500000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 2 Spin 1: 0.00000000 0.00000000 0.00000000 0.50000000 +# Band Energy [eV] Occupation + 1 -5.79106773 1.00000000 + 2 6.19388499 1.00000000 + 3 6.19388499 1.00000000 + 4 6.19388520 1.00000000 + 5 8.47416282 0.00000000 + 6 8.47416629 0.00000000 + 7 8.47416629 0.00000000 + 8 9.61925800 0.00000000 + 9 14.27669094 0.00000000 + 10 14.27669094 0.00000000 + 11 21.31341509 0.00000000 + 12 21.31341509 0.00000000 + 13 21.31341997 0.00000000 + 14 31.84840681 0.00000000 + 15 31.84840681 0.00000000 + 16 32.45940899 0.00000000 + 17 32.45940899 0.00000000 + 18 32.45941091 0.00000000 + 19 43.96451655 0.00000000 + 20 43.96462667 0.00000000 + 21 43.96462667 0.00000000 + 22 46.82120191 0.00000000 + 23 46.82120191 0.00000000 + 24 46.82122120 0.00000000 + 25 88.03515093 0.00000000 + 26 93.98308289 0.00000000 +# Point 2 Spin 2: 0.00000000 0.00000000 0.00000000 0.50000000 +# Band Energy [eV] Occupation + 1 -5.79106773 1.00000000 + 2 6.19388499 1.00000000 + 3 6.19388499 1.00000000 + 4 6.19388520 1.00000000 + 5 8.47416282 0.00000000 + 6 8.47416629 0.00000000 + 7 8.47416629 0.00000000 + 8 9.61925800 0.00000000 + 9 14.27669094 0.00000000 + 10 14.27669094 0.00000000 + 11 21.31341509 0.00000000 + 12 21.31341509 0.00000000 + 13 21.31341997 0.00000000 + 14 31.84840681 0.00000000 + 15 31.84840681 0.00000000 + 16 32.45940899 0.00000000 + 17 32.45940899 0.00000000 + 18 32.45941091 0.00000000 + 19 43.96451655 0.00000000 + 20 43.96462667 0.00000000 + 21 43.96462667 0.00000000 + 22 46.82120191 0.00000000 + 23 46.82120191 0.00000000 + 24 46.82122120 0.00000000 + 25 88.03515093 0.00000000 + 26 93.98308289 0.00000000 +# Set 5: 2 special points, 2 k-points, 26 bands +# Special point 1 0.00000000 0.00000000 0.00000000 Gamma +# Special point 2 0.50000000 0.50000000 0.50000000 L +# Point 1 Spin 1: 0.00000000 0.00000000 0.00000000 0.50000000 +# Band Energy [eV] Occupation + 1 -5.79106773 1.00000000 + 2 6.19388499 1.00000000 + 3 6.19388499 1.00000000 + 4 6.19388520 1.00000000 + 5 8.47416282 0.00000000 + 6 8.47416629 0.00000000 + 7 8.47416629 0.00000000 + 8 9.61925800 0.00000000 + 9 14.27669094 0.00000000 + 10 14.27669094 0.00000000 + 11 21.31341509 0.00000000 + 12 21.31341509 0.00000000 + 13 21.31341997 0.00000000 + 14 31.84840681 0.00000000 + 15 31.84840681 0.00000000 + 16 32.45940899 0.00000000 + 17 32.45940899 0.00000000 + 18 32.45941091 0.00000000 + 19 43.96451655 0.00000000 + 20 43.96462667 0.00000000 + 21 43.96462667 0.00000000 + 22 46.82120191 0.00000000 + 23 46.82120191 0.00000000 + 24 46.82122120 0.00000000 + 25 88.03515093 0.00000000 + 26 93.98308289 0.00000000 +# Point 1 Spin 2: 0.00000000 0.00000000 0.00000000 0.50000000 +# Band Energy [eV] Occupation + 1 -5.79106773 1.00000000 + 2 6.19388499 1.00000000 + 3 6.19388499 1.00000000 + 4 6.19388520 1.00000000 + 5 8.47416282 0.00000000 + 6 8.47416629 0.00000000 + 7 8.47416629 0.00000000 + 8 9.61925800 0.00000000 + 9 14.27669094 0.00000000 + 10 14.27669094 0.00000000 + 11 21.31341509 0.00000000 + 12 21.31341509 0.00000000 + 13 21.31341997 0.00000000 + 14 31.84840681 0.00000000 + 15 31.84840681 0.00000000 + 16 32.45940899 0.00000000 + 17 32.45940899 0.00000000 + 18 32.45941091 0.00000000 + 19 43.96451655 0.00000000 + 20 43.96462667 0.00000000 + 21 43.96462667 0.00000000 + 22 46.82120191 0.00000000 + 23 46.82120191 0.00000000 + 24 46.82122120 0.00000000 + 25 88.03515093 0.00000000 + 26 93.98308289 0.00000000 +# Point 2 Spin 1: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Point 2 Spin 2: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Set 6: 2 special points, 2 k-points, 26 bands +# Special point 1 0.50000000 0.50000000 0.50000000 L +# Special point 2 0.62500000 0.25000000 0.62500000 U +# Point 1 Spin 1: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Point 1 Spin 2: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Point 2 Spin 1: 0.62500000 0.25000000 0.62500000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 2 Spin 2: 0.62500000 0.25000000 0.62500000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Set 7: 2 special points, 2 k-points, 26 bands +# Special point 1 0.62500000 0.25000000 0.62500000 U +# Special point 2 0.50000000 0.25000000 0.75000000 W +# Point 1 Spin 1: 0.62500000 0.25000000 0.62500000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 1 Spin 2: 0.62500000 0.25000000 0.62500000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 2 Spin 1: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Point 2 Spin 2: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Set 8: 2 special points, 2 k-points, 26 bands +# Special point 1 0.50000000 0.25000000 0.75000000 W +# Special point 2 0.50000000 0.50000000 0.50000000 L +# Point 1 Spin 1: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Point 1 Spin 2: 0.50000000 0.25000000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.45525848 1.00000000 + 2 -1.45525833 1.00000000 + 3 2.06576763 1.00000000 + 4 2.06576768 1.00000000 + 5 10.27056670 0.00000000 + 6 10.27056749 0.00000000 + 7 11.12237383 0.00000000 + 8 11.12237403 0.00000000 + 9 17.06452213 0.00000000 + 10 17.06452432 0.00000000 + 11 20.67691915 0.00000000 + 12 20.67692066 0.00000000 + 13 25.96683853 0.00000000 + 14 25.96684165 0.00000000 + 15 27.78330601 0.00000000 + 16 27.78330785 0.00000000 + 17 28.50100499 0.00000000 + 18 28.50100681 0.00000000 + 19 30.17956323 0.00000000 + 20 30.17956495 0.00000000 + 21 33.67706743 0.00000000 + 22 33.67707035 0.00000000 + 23 45.94241616 0.00000000 + 24 45.94247074 0.00000000 + 25 94.41707721 0.00000000 + 26 94.41707843 0.00000000 +# Point 2 Spin 1: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Point 2 Spin 2: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Set 9: 2 special points, 2 k-points, 26 bands +# Special point 1 0.50000000 0.50000000 0.50000000 L +# Special point 2 0.37500000 0.37500000 0.75000000 K +# Point 1 Spin 1: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Point 1 Spin 2: 0.50000000 0.50000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -3.43450916 1.00000000 + 2 -0.96323625 1.00000000 + 3 4.95342085 1.00000000 + 4 4.95342085 1.00000000 + 5 7.50738594 0.00000000 + 6 9.20040915 0.00000000 + 7 9.20040915 0.00000000 + 8 16.89172704 0.00000000 + 9 17.62192732 0.00000000 + 10 17.62192732 0.00000000 + 11 18.31050655 0.00000000 + 12 19.10445550 0.00000000 + 13 19.10445550 0.00000000 + 14 22.10697538 0.00000000 + 15 27.51909013 0.00000000 + 16 29.84021869 0.00000000 + 17 29.84021869 0.00000000 + 18 30.31739140 0.00000000 + 19 32.96896269 0.00000000 + 20 32.96896269 0.00000000 + 21 41.03560641 0.00000000 + 22 41.03560641 0.00000000 + 23 44.94033805 0.00000000 + 24 44.94033805 0.00000000 + 25 93.50844855 0.00000000 + 26 94.26117255 0.00000000 +# Point 2 Spin 1: 0.37500000 0.37500000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 2 Spin 2: 0.37500000 0.37500000 0.75000000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Set 10: 2 special points, 2 k-points, 26 bands +# Special point 1 0.62500000 0.25000000 0.62500000 U +# Special point 2 0.50000000 0.00000000 0.50000000 X +# Point 1 Spin 1: 0.62500000 0.25000000 0.62500000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 1 Spin 2: 0.62500000 0.25000000 0.62500000 0.50000000 +# Band Energy [eV] Occupation + 1 -2.02876393 1.00000000 + 2 -1.06316226 1.00000000 + 3 1.59675699 1.00000000 + 4 3.64098232 1.00000000 + 5 6.96214012 0.00000000 + 6 10.22070334 0.00000000 + 7 13.63283684 0.00000000 + 8 14.35829559 0.00000000 + 9 14.49759232 0.00000000 + 10 15.39237291 0.00000000 + 11 21.62772672 0.00000000 + 12 23.03124332 0.00000000 + 13 23.48873047 0.00000000 + 14 24.14743427 0.00000000 + 15 26.91707891 0.00000000 + 16 27.39678162 0.00000000 + 17 28.10227602 0.00000000 + 18 29.64545238 0.00000000 + 19 31.27523077 0.00000000 + 20 33.21839600 0.00000000 + 21 33.28878070 0.00000000 + 22 34.07690329 0.00000000 + 23 44.19750039 0.00000000 + 24 49.76264983 0.00000000 + 25 94.33671075 0.00000000 + 26 94.51463520 0.00000000 +# Point 2 Spin 1: 0.50000000 0.00000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.64632427 1.00000000 + 2 -1.64632410 1.00000000 + 3 3.19819363 1.00000000 + 4 3.19819387 1.00000000 + 5 6.47328662 0.00000000 + 6 6.47328687 0.00000000 + 7 16.30600684 0.00000000 + 8 16.30600854 0.00000000 + 9 17.85399046 0.00000000 + 10 17.85399316 0.00000000 + 11 19.86692789 0.00000000 + 12 19.86692931 0.00000000 + 13 20.87360768 0.00000000 + 14 20.87360785 0.00000000 + 15 28.89902823 0.00000000 + 16 28.89902990 0.00000000 + 17 30.96376087 0.00000000 + 18 30.96376804 0.00000000 + 19 31.60486554 0.00000000 + 20 31.60486685 0.00000000 + 21 32.46630983 0.00000000 + 22 32.46631886 0.00000000 + 23 53.74973928 0.00000000 + 24 53.74985101 0.00000000 + 25 94.51200698 0.00000000 + 26 94.51200826 0.00000000 +# Point 2 Spin 2: 0.50000000 0.00000000 0.50000000 0.50000000 +# Band Energy [eV] Occupation + 1 -1.64632427 1.00000000 + 2 -1.64632410 1.00000000 + 3 3.19819363 1.00000000 + 4 3.19819387 1.00000000 + 5 6.47328662 0.00000000 + 6 6.47328687 0.00000000 + 7 16.30600684 0.00000000 + 8 16.30600854 0.00000000 + 9 17.85399046 0.00000000 + 10 17.85399316 0.00000000 + 11 19.86692789 0.00000000 + 12 19.86692931 0.00000000 + 13 20.87360768 0.00000000 + 14 20.87360785 0.00000000 + 15 28.89902823 0.00000000 + 16 28.89902990 0.00000000 + 17 30.96376087 0.00000000 + 18 30.96376804 0.00000000 + 19 31.60486554 0.00000000 + 20 31.60486685 0.00000000 + 21 32.46630983 0.00000000 + 22 32.46631886 0.00000000 + 23 53.74973928 0.00000000 + 24 53.74985101 0.00000000 + 25 94.51200698 0.00000000 + 26 94.51200826 0.00000000 diff --git a/test_files/cp2k/CP2K-1.dos b/test_files/cp2k/CP2K-1.dos new file mode 100644 index 00000000000..fc66d05e616 --- /dev/null +++ b/test_files/cp2k/CP2K-1.dos @@ -0,0 +1,4 @@ + # DOS at iteration step i = 0 + # Energy[a.u.] Alpha_Density Occupation Beta_Density Occupation + -0.24919957 0.0625 0.2500 0.0625 0.2500 + -0.24819957 0.0000 0.0000 0.0000 0.0000 diff --git a/test_files/cp2k/CP2K-CHI-1_0.data b/test_files/cp2k/CP2K-CHI-1_0.data new file mode 100644 index 00000000000..8c8c683fa65 --- /dev/null +++ b/test_files/cp2k/CP2K-CHI-1_0.data @@ -0,0 +1,20 @@ + Magnetic Susceptibility Tensor + CHI from SOFT J in 10^-30 J/T^2 units + XX = 5.9508 XY = -1.6579 XZ = -1.6579 + YX = -1.6579 YY = 5.9508 YZ = -1.6579 + ZX = -1.6579 ZY = -1.6579 ZZ = 5.9508 + CHI from LOCAL J in 10^-30 J/T^2 units + XX = 0.0000 XY = 0.0000 XZ = 0.0000 + YX = 0.0000 YY = 0.0000 YZ = 0.0000 + ZX = 0.0000 ZY = 0.0000 ZZ = 0.0000 + Total CHI in 10^-30 J/T^2 units + XX = 5.9508 XY = -1.6579 XZ = -1.6579 + YX = -1.6579 YY = 5.9508 YZ = -1.6579 + ZX = -1.6579 ZY = -1.6579 ZZ = 5.9508 + Total CHI in ppm-cgs units + XX = 0.3584 XY = -0.0998 XZ = -0.0998 + YX = -0.0998 YY = 0.3584 YZ = -0.0998 + ZX = -0.0998 ZY = -0.0998 ZZ = 0.3584 + + PV1= 0.1587 PV2= 0.4582 PV3= 0.4582 + ISO= 0.3584 ANISO= 0.1498 diff --git a/test_files/cp2k/CP2K-GTENSOR-1_0.data b/test_files/cp2k/CP2K-GTENSOR-1_0.data new file mode 100644 index 00000000000..820403e73b1 --- /dev/null +++ b/test_files/cp2k/CP2K-GTENSOR-1_0.data @@ -0,0 +1,25 @@ + G tensor + gmatrix_zke + XX= 0.0000000000 XY= 0.0000000000 XZ= 0.0000000000 + YX= 0.0000000000 YY= 0.0000000000 YZ= 0.0000000000 + ZX= 0.0000000000 ZY= 0.0000000000 ZZ= 0.0000000000 + gmatrix_so + XX= 0.0000000000 XY= 0.0000000000 XZ= 0.0000000000 + YX= 0.0000000000 YY= 0.0000000000 YZ= 0.0000000000 + ZX= 0.0000000000 ZY= 0.0000000000 ZZ= 0.0000000000 + gmatrix_soo + XX= 0.0000000000 XY= -0.0000000000 XZ= -0.0000000000 + YX= -0.0000000000 YY= 0.0000000000 YZ= -0.0000000000 + ZX= -0.0000000000 ZY= -0.0000000000 ZZ= 0.0000000000 + gmatrix_total + XX= 2.0023193044 XY= 0.0000000000 XZ= 0.0000000000 + YX= 0.0000000000 YY= 2.0023193044 YZ= 0.0000000000 + ZX= 0.0000000000 ZY= 0.0000000000 ZZ= 2.0023193044 + gtensor_total + XX= 2.0023193044 XY= 0.0000000000 XZ= 0.0000000000 + YX= 0.0000000000 YY= 2.0023193044 YZ= 0.0000000000 + ZX= 0.0000000000 ZY= 0.0000000000 ZZ= 2.0023193044 + delta_g principal values in ppm + 0.000 X= 0.7158445077 Y= -0.6982592888 Z= 0.0007786468 + 0.000 X= 0.4071365712 Y= 0.4164835801 Z= -0.8128845182 + 0.000 X= 0.5672798720 Y= 0.5822159333 Z= 0.5824243761 diff --git a/test_files/cp2k/CP2K-HYPERFINE-1_0.eprhyp b/test_files/cp2k/CP2K-HYPERFINE-1_0.eprhyp new file mode 100644 index 00000000000..bdc7bd2642b --- /dev/null +++ b/test_files/cp2k/CP2K-HYPERFINE-1_0.eprhyp @@ -0,0 +1,13 @@ + + Calculation of EPR hyperfine coupling tensors + ------------------------------------------------------------------------------- + 1 H 1 42.5774690577 [Mhz/T] Sca-Rel A_iso [Mhz] 0.0000179874 + Non-Rel A_iso [Mhz] 0.0000179905 + 0.0000000000 0.0000001288 0.0000001288 + A_ani [Mhz] 0.0000001288 -0.0000000000 0.0000001288 + 0.0000001288 0.0000001288 0.0000000000 + 2 H 1 42.5774690577 [Mhz/T] Sca-Rel A_iso [Mhz] -0.0000180743 + Non-Rel A_iso [Mhz] -0.0000180774 + -0.0000000000 -0.0000001288 -0.0000001288 + A_ani [Mhz] -0.0000001288 0.0000000000 -0.0000001288 + -0.0000001288 -0.0000001288 0.0000000000 diff --git a/test_files/cp2k/Si b/test_files/cp2k/Si new file mode 100644 index 00000000000..2affb3bf214 --- /dev/null +++ b/test_files/cp2k/Si @@ -0,0 +1,195 @@ +# Test data file for cp2k +potentials: + 21e2f468a18404ff6119fe801da81e43: + '@class': GthPotential + '@module': pymatgen.io.cp2k.inputs + '@version': null + alias_names: + - GTH-GGA-q4 + c_exp_ppl: + - -6.26927043053227 + element: + '@class': Element + '@module': pymatgen.core.periodic_table + element: Si + filename: POTENTIAL_UZH + hprj_ppnl: + '0': + '0': + '0': 8.95185227086162 + '1': -2.70627090617658 + '1': + '0': 3.49378652994003 + '1': + '0': + '0': 2.4312767590505 + info: + '@class': PotentialInfo + '@module': pymatgen.io.cp2k.inputs + '@version': null + electrons: 4 + nlcc: null + potential_type: GTH + xc: PBE + n_elecs: + '0': 2 + '1': 2 + '2': 0 + '3': 0 + name: GTH-PBE-q4 + nexp_ppl: 1 + nprj: 2 + nprj_ppnl: + '0': 2 + '1': 1 + potential: Pseudopotential + r_loc: 0.43998262317118 + radii: + '0': 0.43563454498612 + '1': 0.49795764581723 + version: null +basis_sets: + 30767c18f6e7e46c1b56c1d34ff6007d: + '@class': GaussianTypeOrbitalBasisSet + '@module': pymatgen.io.cp2k.inputs + '@version': null + alias_names: + - SZV-GTH + coefficients: + - '0': + '0': + '0': 0.3290356759 + '1': + '0': 0.0474536439 + '1': + '0': + '0': -0.2533162616 + '1': + '0': -0.2594495462 + '2': + '0': + '0': -0.7870936517 + '1': + '0': -0.5440932235 + '3': + '0': + '0': -0.1909870193 + '1': + '0': -0.3623984652 + element: + '@class': Element + '@module': pymatgen.core.periodic_table + element: Si + exponents: + - - 1.20324036 + - 0.468838597 + - 0.167985391 + - 0.057561689 + filename: GTH_BASIS_SETS + info: + '@class': BasisInfo + '@module': pymatgen.io.cp2k.inputs + '@version': null + admm: false + cc: false + contracted: null + core: null + diffuse: 0 + electrons: 4 + lri: false + molopt: false + pc: false + polarization: 0 + sr: false + valence: 1 + xc: null + lmax: + - 1 + lmin: + - 0 + n: + - 3 + name: SZV-GTH-q4 + nset: 1 + nshell: + - '0': 1 + '1': 1 + potential: Pseudopotential + version: null + da9aa03297b93d6b497c19c7def10af0: + '@class': GaussianTypeOrbitalBasisSet + '@module': pymatgen.io.cp2k.inputs + '@version': null + alias_names: [] + coefficients: + - '0': + '0': + '0': 1.0 + - '0': + '0': + '0': -2.467978079989986 + '1': + '0': + '0': 1.0 + - '0': + '1': + '0': 1.0 + - '0': + '1': + '0': 1.0 + '1': + '1': + '0': -0.03233631711903798 + element: + '@class': Element + '@module': pymatgen.core.periodic_table + element: Si + exponents: + - - 0.09648 + - - 0.24696 + - 1.27756 + - - 0.08949 + - - 0.29563 + - 2.20247 + filename: BASIS_ADMM + info: + '@class': BasisInfo + '@module': pymatgen.io.cp2k.inputs + '@version': null + admm: true + cc: false + contracted: true + core: null + diffuse: 0 + electrons: null + lri: false + molopt: false + pc: false + polarization: 0 + sr: false + valence: 3 + xc: null + lmax: + - 0 + - 0 + - 1 + - 1 + lmin: + - 0 + - 0 + - 1 + - 1 + n: + - 1 + - 1 + - 1 + - 1 + name: cFIT3 + nset: 4 + nshell: + - '0': 1 + - '0': 1 + - '1': 1 + - '1': 1 + potential: Pseudopotential + version: null \ No newline at end of file diff --git a/test_files/cp2k/Static-ALPHA_k1-1.pdos b/test_files/cp2k/Static-ALPHA_k1-1.pdos new file mode 100644 index 00000000000..6b39285d02e --- /dev/null +++ b/test_files/cp2k/Static-ALPHA_k1-1.pdos @@ -0,0 +1,4 @@ +# Projected DOS for atomic kind Si_1 at iteration step i = 0, E(Fermi) = 0.187273 a.u. +# MO Eigenvalue [a.u.] Occupation s py pz px d-2 d-1 d0 d+1 d+2 + 1 -0.247583 1.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 + 2 0.281171 0.000000 0.00000000 0.18690139 0.18690139 0.18690139 0.14643195 0.14643194 0.00000000 0.14643195 0.00000000 \ No newline at end of file diff --git a/test_files/cp2k/cp2k.inp b/test_files/cp2k/cp2k.inp index 032f107aa6c..580b385d0df 100644 --- a/test_files/cp2k/cp2k.inp +++ b/test_files/cp2k/cp2k.inp @@ -1,418 +1,163 @@ @include include.inc -@SET METHOD QS -@SET MAX_SCF 20 +@SET MAX_SCF 1 -! parameters needed to calculate energy and forces -! and describe the system you want to analyze. &FORCE_EVAL - METHOD ${METHOD} - - ! a subsystem: coordinates, topology, molecules - ! and cell + METHOD QS + STRESS_TENSOR ANALYTICAL &SUBSYS - ! Input parameters needed to set up the CELL. &CELL - A 16.40863458717344 0.0 1.0047390912780253e-15 - B -1.0047390912780253e-15 16.40863458717344 1.0047390912780253e-15 - C 0.0 0.0 16.40863458717344 + A 0.0 2.734364 2.734364 + B 2.734364 0.0 2.734364 + C 2.734364 2.734364 0.0 &END CELL - - ! The coordinates for simple systems (like small - ! QM cells) are specified here by default using - ! explicit XYZ coordinates. More complex systems - ! should be given via an external coordinate - ! file in the SUBSYS%TOPOLOGY section. - &COORD - Si 1.3673862155977867 1.3673862155977867 1.367386215597787 - Si 1.3673862155977867 1.3673862155977867 6.836931077988934 - Si 1.3673862155977867 1.3673862155977867 12.30647594038008 - Si 1.3673862155977863 6.836931077988933 1.3673862155977874 - Si 1.3673862155977863 6.836931077988933 6.836931077988935 - Si 1.3673862155977863 6.836931077988933 12.30647594038008 - Si 1.367386215597786 12.306475940380082 1.3673862155977876 - Si 1.367386215597786 12.306475940380082 6.836931077988934 - Si 1.367386215597786 12.306475940380082 12.30647594038008 - Si 6.836931077988933 1.3673862155977867 1.3673862155977874 - Si 6.836931077988933 1.3673862155977867 6.836931077988935 - Si 6.836931077988933 1.3673862155977867 12.30647594038008 - Si 6.836931077988933 6.836931077988933 1.3673862155977876 - Si 6.836931077988933 6.836931077988933 6.836931077988934 - Si 6.836931077988933 6.836931077988933 12.30647594038008 - Si 6.8369310779889325 12.306475940380082 1.367386215597788 - Si 6.8369310779889325 12.306475940380082 6.836931077988934 - Si 6.8369310779889325 12.306475940380082 12.306475940380082 - Si 12.306475940380082 1.3673862155977867 1.3673862155977876 - Si 12.306475940380082 1.3673862155977867 6.836931077988934 - Si 12.306475940380082 1.3673862155977867 12.30647594038008 - Si 12.306475940380082 6.836931077988933 1.367386215597788 - Si 12.306475940380082 6.836931077988933 6.836931077988934 - Si 12.306475940380082 6.836931077988933 12.306475940380082 - Si 12.306475940380082 12.306475940380082 1.3673862155977883 - Si 12.306475940380082 12.306475940380082 6.836931077988934 - Si 12.306475940380082 12.306475940380082 12.306475940380082 - Si 16.40863458717344 2.7347724311955734 2.734772431195575 - Si 16.40863458717344 2.7347724311955734 8.204317293586723 - Si 16.40863458717344 2.7347724311955734 13.673862155977869 - Si 16.40863458717344 8.20431729358672 2.734772431195575 - Si 16.40863458717344 8.20431729358672 8.204317293586723 - Si 16.40863458717344 8.20431729358672 13.673862155977869 - Si 16.40863458717344 13.673862155977867 2.7347724311955752 - Si 16.40863458717344 13.673862155977867 8.204317293586723 - Si 16.40863458717344 13.673862155977867 13.673862155977869 - Si 5.469544862391147 2.7347724311955734 2.734772431195574 - Si 5.469544862391147 2.7347724311955734 8.20431729358672 - Si 5.469544862391147 2.7347724311955734 13.673862155977867 - Si 5.469544862391147 8.20431729358672 2.7347724311955743 - Si 5.469544862391147 8.20431729358672 8.20431729358672 - Si 5.469544862391147 8.20431729358672 13.673862155977867 - Si 5.469544862391146 13.673862155977867 2.7347724311955743 - Si 5.469544862391146 13.673862155977867 8.20431729358672 - Si 5.469544862391146 13.673862155977867 13.673862155977869 - Si 10.939089724782294 2.7347724311955734 2.7347724311955743 - Si 10.939089724782294 2.7347724311955734 8.20431729358672 - Si 10.939089724782294 2.7347724311955734 13.673862155977867 - Si 10.939089724782294 8.20431729358672 2.7347724311955743 - Si 10.939089724782294 8.20431729358672 8.20431729358672 - Si 10.939089724782294 8.20431729358672 13.673862155977869 - Si 10.939089724782294 13.673862155977867 2.734772431195575 - Si 10.939089724782294 13.673862155977867 8.20431729358672 - Si 10.939089724782294 13.673862155977867 13.673862155977869 - Si 1.3673862155977865 4.10215864679336 4.10215864679336 - Si 1.3673862155977865 4.10215864679336 9.571703509184507 - Si 1.3673862155977865 4.10215864679336 15.041248371575655 - Si 1.367386215597786 9.571703509184509 4.10215864679336 - Si 1.367386215597786 9.571703509184509 9.571703509184507 - Si 1.367386215597786 9.571703509184509 15.041248371575655 - Si 1.3673862155977858 15.041248371575657 4.102158646793361 - Si 1.3673862155977858 15.041248371575657 9.571703509184509 - Si 1.3673862155977858 15.041248371575657 15.041248371575655 - Si 6.836931077988933 4.10215864679336 4.10215864679336 - Si 6.836931077988933 4.10215864679336 9.571703509184507 - Si 6.836931077988933 4.10215864679336 15.041248371575655 - Si 6.836931077988933 9.571703509184509 4.102158646793361 - Si 6.836931077988933 9.571703509184509 9.571703509184509 - Si 6.836931077988933 9.571703509184509 15.041248371575655 - Si 6.8369310779889325 15.041248371575657 4.102158646793361 - Si 6.8369310779889325 15.041248371575657 9.571703509184509 - Si 6.8369310779889325 15.041248371575657 15.041248371575655 - Si 12.306475940380082 4.10215864679336 4.102158646793361 - Si 12.306475940380082 4.10215864679336 9.571703509184509 - Si 12.306475940380082 4.10215864679336 15.041248371575655 - Si 12.306475940380082 9.571703509184509 4.102158646793361 - Si 12.306475940380082 9.571703509184509 9.571703509184509 - Si 12.306475940380082 9.571703509184509 15.041248371575655 - Si 12.306475940380082 15.041248371575657 4.102158646793362 - Si 12.306475940380082 15.041248371575657 9.571703509184509 - Si 12.306475940380082 15.041248371575657 15.041248371575655 - Si 0.0 0.0 0.0 - Si 0.0 0.0 5.469544862391147 - Si 0.0 0.0 10.939089724782294 - Si 16.40863458717344 5.469544862391147 1.3396521217040336e-15 - Si 16.40863458717344 5.469544862391147 5.469544862391148 - Si 16.40863458717344 5.469544862391147 10.939089724782296 - Si 16.40863458717344 10.939089724782294 1.674565152130042e-15 - Si 16.40863458717344 10.939089724782294 5.469544862391149 - Si 16.40863458717344 10.939089724782294 10.939089724782296 - Si 5.469544862391147 0.0 3.3491303042600846e-16 - Si 5.469544862391147 0.0 5.469544862391147 - Si 5.469544862391147 0.0 10.939089724782294 - Si 5.469544862391147 5.469544862391147 6.698260608520169e-16 - Si 5.469544862391147 5.469544862391147 5.469544862391148 - Si 5.469544862391147 5.469544862391147 10.939089724782294 - Si 5.469544862391146 10.939089724782294 1.0047390912780255e-15 - Si 5.469544862391146 10.939089724782294 5.469544862391148 - Si 5.469544862391146 10.939089724782294 10.939089724782296 - Si 10.939089724782294 0.0 6.698260608520169e-16 - Si 10.939089724782294 0.0 5.469544862391148 - Si 10.939089724782294 0.0 10.939089724782294 - Si 10.939089724782294 5.469544862391147 1.0047390912780255e-15 - Si 10.939089724782294 5.469544862391147 5.469544862391148 - Si 10.939089724782294 5.469544862391147 10.939089724782296 - Si 10.939089724782294 10.939089724782294 1.3396521217040338e-15 - Si 10.939089724782294 10.939089724782294 5.469544862391148 - Si 10.939089724782294 10.939089724782294 10.939089724782296 - Si 4.10215864679336 1.3673862155977867 4.10215864679336 - Si 4.10215864679336 1.3673862155977867 9.571703509184507 - Si 4.10215864679336 1.3673862155977867 15.041248371575655 - Si 4.10215864679336 6.836931077988933 4.10215864679336 - Si 4.10215864679336 6.836931077988933 9.571703509184507 - Si 4.10215864679336 6.836931077988933 15.041248371575655 - Si 4.1021586467933595 12.306475940380082 4.102158646793361 - Si 4.1021586467933595 12.306475940380082 9.571703509184509 - Si 4.1021586467933595 12.306475940380082 15.041248371575655 - Si 9.571703509184509 1.3673862155977867 4.10215864679336 - Si 9.571703509184509 1.3673862155977867 9.571703509184507 - Si 9.571703509184509 1.3673862155977867 15.041248371575655 - Si 9.571703509184509 6.836931077988933 4.102158646793361 - Si 9.571703509184509 6.836931077988933 9.571703509184509 - Si 9.571703509184509 6.836931077988933 15.041248371575655 - Si 9.571703509184506 12.306475940380082 4.102158646793361 - Si 9.571703509184506 12.306475940380082 9.571703509184509 - Si 9.571703509184506 12.306475940380082 15.041248371575655 - Si 15.041248371575657 1.3673862155977867 4.102158646793361 - Si 15.041248371575657 1.3673862155977867 9.571703509184509 - Si 15.041248371575657 1.3673862155977867 15.041248371575655 - Si 15.041248371575657 6.836931077988933 4.102158646793361 - Si 15.041248371575657 6.836931077988933 9.571703509184509 - Si 15.041248371575657 6.836931077988933 15.041248371575655 - Si 15.041248371575657 12.306475940380082 4.102158646793362 - Si 15.041248371575657 12.306475940380082 9.571703509184509 - Si 15.041248371575657 12.306475940380082 15.041248371575655 - Si 2.7347724311955734 2.7347724311955734 3.3491303042600846e-16 - Si 2.7347724311955734 2.7347724311955734 5.469544862391147 - Si 2.7347724311955734 2.7347724311955734 10.939089724782294 - Si 2.734772431195573 8.20431729358672 6.698260608520169e-16 - Si 2.734772431195573 8.20431729358672 5.469544862391147 - Si 2.734772431195573 8.20431729358672 10.939089724782294 - Si 2.7347724311955726 13.673862155977867 1.0047390912780255e-15 - Si 2.7347724311955726 13.673862155977867 5.469544862391148 - Si 2.7347724311955726 13.673862155977867 10.939089724782296 - Si 8.20431729358672 2.7347724311955734 16.40863458717344 - Si 8.20431729358672 2.7347724311955734 5.469544862391147 - Si 8.20431729358672 2.7347724311955734 10.939089724782294 - Si 8.20431729358672 8.20431729358672 16.40863458717344 - Si 8.20431729358672 8.20431729358672 5.469544862391148 - Si 8.20431729358672 8.20431729358672 10.939089724782296 - Si 8.204317293586719 13.673862155977867 1.3396521217040336e-15 - Si 8.204317293586719 13.673862155977867 5.469544862391148 - Si 8.204317293586719 13.673862155977867 10.939089724782296 - Si 13.673862155977867 2.7347724311955734 1.0047390912780255e-15 - Si 13.673862155977867 2.7347724311955734 5.469544862391148 - Si 13.673862155977867 2.7347724311955734 10.939089724782296 - Si 13.673862155977867 8.20431729358672 1.3396521217040338e-15 - Si 13.673862155977867 8.20431729358672 5.469544862391148 - Si 13.673862155977867 8.20431729358672 10.939089724782296 - Si 13.673862155977867 13.673862155977867 1.6745651521300422e-15 - Si 13.673862155977867 13.673862155977867 5.469544862391148 - Si 13.673862155977867 13.673862155977867 10.939089724782296 - Si 4.10215864679336 4.10215864679336 1.3673862155977872 - Si 4.10215864679336 4.10215864679336 6.836931077988935 - Si 4.10215864679336 4.10215864679336 12.30647594038008 - Si 4.10215864679336 9.571703509184509 1.3673862155977876 - Si 4.10215864679336 9.571703509184509 6.836931077988934 - Si 4.10215864679336 9.571703509184509 12.30647594038008 - Si 4.1021586467933595 15.041248371575657 1.3673862155977878 - Si 4.1021586467933595 15.041248371575657 6.836931077988935 - Si 4.1021586467933595 15.041248371575657 12.30647594038008 - Si 9.571703509184509 4.10215864679336 1.3673862155977876 - Si 9.571703509184509 4.10215864679336 6.836931077988934 - Si 9.571703509184509 4.10215864679336 12.30647594038008 - Si 9.571703509184509 9.571703509184509 1.3673862155977878 - Si 9.571703509184509 9.571703509184509 6.836931077988935 - Si 9.571703509184509 9.571703509184509 12.30647594038008 - Si 9.571703509184507 15.041248371575657 1.3673862155977883 - Si 9.571703509184507 15.041248371575657 6.836931077988935 - Si 9.571703509184507 15.041248371575657 12.306475940380082 - Si 15.041248371575657 4.10215864679336 1.3673862155977878 - Si 15.041248371575657 4.10215864679336 6.836931077988935 - Si 15.041248371575657 4.10215864679336 12.30647594038008 - Si 15.041248371575657 9.571703509184509 1.3673862155977883 - Si 15.041248371575657 9.571703509184509 6.836931077988935 - Si 15.041248371575657 9.571703509184509 12.306475940380082 - Si 15.041248371575657 15.041248371575657 1.3673862155977885 - Si 15.041248371575657 15.041248371575657 6.836931077988935 - Si 15.041248371575657 15.041248371575657 12.306475940380084 - Si 2.7347724311955734 0.0 2.7347724311955734 - Si 2.7347724311955734 0.0 8.20431729358672 - Si 2.7347724311955734 0.0 13.673862155977867 - Si 2.734772431195573 5.469544862391147 2.734772431195574 - Si 2.734772431195573 5.469544862391147 8.20431729358672 - Si 2.734772431195573 5.469544862391147 13.673862155977867 - Si 2.734772431195572 10.939089724782294 2.7347724311955743 - Si 2.734772431195572 10.939089724782294 8.20431729358672 - Si 2.734772431195572 10.939089724782294 13.673862155977867 - Si 8.20431729358672 0.0 2.734772431195574 - Si 8.20431729358672 0.0 8.20431729358672 - Si 8.20431729358672 0.0 13.673862155977867 - Si 8.20431729358672 5.469544862391147 2.7347724311955743 - Si 8.20431729358672 5.469544862391147 8.20431729358672 - Si 8.20431729358672 5.469544862391147 13.673862155977867 - Si 8.204317293586719 10.939089724782294 2.7347724311955743 - Si 8.204317293586719 10.939089724782294 8.20431729358672 - Si 8.204317293586719 10.939089724782294 13.673862155977869 - Si 13.673862155977867 0.0 2.7347724311955743 - Si 13.673862155977867 0.0 8.20431729358672 - Si 13.673862155977867 0.0 13.673862155977867 - Si 13.673862155977867 5.469544862391147 2.7347724311955743 - Si 13.673862155977867 5.469544862391147 8.20431729358672 - Si 13.673862155977867 5.469544862391147 13.673862155977869 - Si 13.673862155977867 10.939089724782294 2.734772431195575 - Si 13.673862155977867 10.939089724782294 8.20431729358672 - Si 13.673862155977867 10.939089724782294 13.673862155977869 - &END COORD - - ! The description of the kind of the atoms - ! (mostly for QM) - &KIND Si + &KIND Si_1 ELEMENT Si MAGNETIZATION 0.0 - BASIS_SET DZVP-MOLOPT-GTH - POTENTIAL GTH-PBE + BASIS_SET DZVP-MOLOPT-SR-GTH-q4 + POTENTIAL GTH-PBE-q4 BASIS_SET AUX_FIT cFIT3 - &POTENTIAL - 1 2 3 # Nonsense - 11 3 0.1 # Nonsense - &END + &POTENTIAL + 1 2 3 # Nonsense + 11 3 0.1 # Nonsense + &END + GHOST False &END KIND + &COORD + Si_1 1.367182 1.367182 1.367182 + Si_1 0.0 0.0 0.0 + &END COORD &END SUBSYS - - ! parameter needed by dft programs + &PRINT + &FORCES + &END FORCES + &STRESS_TENSOR + &END STRESS_TENSOR + &END PRINT &DFT - BASIS_SET_FILE_NAME BASIS_MOLOPT + BASIS_SET_FILE_NAME BASIS_MOLOPT + BASIS_SET_FILE_NAME BASIS_MOLOPT_UCL POTENTIAL_FILE_NAME GTH_POTENTIALS - UKS True + UKS True ! Whether to run unrestricted Kohn Sham (i.e. spin polarized) MULTIPLICITY 0 CHARGE 0 - BASIS_SET_FILE_NAME BASIS_ADMM - - ! parameters needed to set up the Quickstep - ! framework &QS METHOD GPW - EPS_DEFAULT 1e-12 - EXTRAPOLATION ASPC + EPS_DEFAULT 1e-12 ! Base precision level (in Ha) + EXTRAPOLATION ASPC ! WFN extrapolation between steps &END QS - - ! Parameters needed to perform an SCF run. &SCF - MAX_SCF $MAX_SCF - EPS_SCF 1e-07 - SCF_GUESS RESTART - - ! Sets the various options for the orbital - ! transformation (OT) method. Default settings - ! already provide an efficient, yet robust - ! method. Most systems benefit from using the - ! FULL_ALL preconditioner combined with a small - ! value (0.001) of ENERGY_GAP. Well-behaved - ! systems might benefit from using a DIIS - ! minimizer. Advantages: It's fast, because no - ! expensive diagonalisationis performed. If - ! preconditioned correctly, method guaranteed - ! to find minimum. Disadvantages: Sensitive to - ! preconditioning. A good preconditioner can be - ! expensive. No smearing, or advanced SCF - ! mixing possible: POOR convergence for metalic - ! systems. - &OT - MINIMIZER DIIS - PRECONDITIONER FULL_ALL - ENERGY_GAP 0.01 - &END OT - &OUTER_SCF - MAX_SCF 20 - EPS_SCF 1e-07 - &END OUTER_SCF + MAX_SCF $MAX_SCF ! Max number of steps for an inner SCF loop + EPS_SCF 1 ! Convergence threshold for SCF + added_mos -1 -1 + SCF_GUESS RESTART ! How to initialize the density matrix + MAX_ITER_LUMO 400 ! Iterations for solving for unoccupied levels when running OT &END SCF - - ! Multigrid information. Multigrid allows for - ! sharp gaussians and diffuse gaussians to be - ! treated on different grids, where the spacing - ! of FFT integration points can be tailored to - ! the degree of sharpness/diffusiveness of the - ! gaussians. &MGRID - CUTOFF 1200 ! Cutoff in [Ry] for finest level of the MG. - REL_CUTOFF 80 ! Controls which gaussians are mapped to which level of the MG - NGRIDS 5 + CUTOFF 100.0 ! Cutoff in [Ry] for finest level of the MG. + REL_CUTOFF 50 ! Controls which gaussians are mapped to which level of the MG + NGRIDS 5 ! Number of grid levels in the MG PROGRESSION_FACTOR 3 &END MGRID &XC &XC_FUNCTIONAL &PBE - PARAMETRIZATION ORIG - SCALE_C 1 - SCALE_X 0.75 &END PBE - &XWPBE - SCALE_X0 1 - SCALE_X -0.25 - OMEGA 0.11 - &END XWPBE &END XC_FUNCTIONAL - &HF - FRACTION 0.25 - &SCREENING - EPS_SCHWARZ 1e-07 - EPS_SCHWARZ_FORCES 1e-07 - SCREEN_ON_INITIAL_P True - SCREEN_P_FORCES True - &END SCREENING - &INTERACTION_POTENTIAL - POTENTIAL_TYPE SHORTRANGE - OMEGA 0.11 - &END INTERACTION_POTENTIAL - &LOAD_BALANCE - RANDOMIZE True - &END LOAD_BALANCE - &MEMORY - EPS_STORAGE_SCALING 0.1 - MAX_MEMORY 5000 - &END MEMORY - &END HF &END XC &PRINT - - ! Controls printing of the projected density of - ! states &PDOS NLUMO -1 COMPONENTS - - ! Controls printing of the projected density - ! of states decomposed by atom type &LDOS COMPONENTS + LIST 1 + &END LDOS + &LDOS + COMPONENTS + LIST 2 &END LDOS &END PDOS - - ! Controls the printing of cube files with the - ! electronic density and, for LSD calculations, - ! the spin density. - &E_DENSITY_CUBE - &END E_DENSITY_CUBE - - ! Controls the printing of a cube file with - ! eletrostatic potential generated by the total - ! density (electrons+ions). It is valid only - ! for QS with GPW formalism. Note that by - ! convention the potential has opposite sign - ! than the expected physical one. - &V_HARTREE_CUBE - &END V_HARTREE_CUBE - - ! Controls the printing of a cube file with - ! eletrostatic potential generated by the total - ! density (electrons+ions). It is valid only - ! for QS with GPW formalism. Note that by - ! convention the potential has opposite sign - ! than the expected physical one. &MO_CUBES WRITE_CUBE False - NHOMO 1 - NLUMO 1 + NHOMO -1 + NLUMO -1 &END MO_CUBES + &V_HARTREE_CUBE + STRIDE 2 2 2 + &END V_HARTREE_CUBE + &E_DENSITY_CUBE + STRIDE 2 2 2 + &END E_DENSITY_CUBE + &BAND_STRUCTURE + FILE_NAME BAND.bs + ADDED_MOS 100 + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT Gamma 0.0 0.0 0.0 + SPECIAL_POINT X 0.5 0.0 0.5 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT X 0.5 0.0 0.5 + SPECIAL_POINT W 0.5 0.25 0.75 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT W 0.5 0.25 0.75 + SPECIAL_POINT K 0.375 0.375 0.75 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT K 0.375 0.375 0.75 + SPECIAL_POINT Gamma 0.0 0.0 0.0 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT Gamma 0.0 0.0 0.0 + SPECIAL_POINT L 0.5 0.5 0.5 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT L 0.5 0.5 0.5 + SPECIAL_POINT U 0.625 0.25 0.625 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT U 0.625 0.25 0.625 + SPECIAL_POINT W 0.5 0.25 0.75 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT W 0.5 0.25 0.75 + SPECIAL_POINT L 0.5 0.5 0.5 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT L 0.5 0.5 0.5 + SPECIAL_POINT K 0.375 0.375 0.75 + &END KPOINT_SET + &KPOINT_SET + NPOINTS 1 + UNITS B_VECTOR + SPECIAL_POINT U 0.625 0.25 0.625 + SPECIAL_POINT X 0.5 0.0 0.5 + &END KPOINT_SET + &END BAND_STRUCTURE &END PRINT - &AUXILIARY_DENSITY_MATRIX_METHOD - ADMM_PURIFICATION_METHOD MO_DIAG - METHOD BASIS_PROJECTION - &END AUXILIARY_DENSITY_MATRIX_METHOD &END DFT &END FORCE_EVAL -&MOTION - &PRINT - &TRAJECTORY HIGH - &END TRAJECTORY - &CELL - &END CELL - &END PRINT -&END MOTION - -! Section with general information regarding which -! kind of simulationto perform an parameters for -! the whole PROGRAM &GLOBAL - PROJECT_NAME Hybrid-Relax - RUN_TYPE GEO_OPT + PROJECT_NAME Static + RUN_TYPE ENERGY_FORCE + EXTENDED_FFT_LENGTHS True &END GLOBAL diff --git a/test_files/cp2k/cp2k.out b/test_files/cp2k/cp2k.out index 9a155f7a502..8b138b4f36f 100644 --- a/test_files/cp2k/cp2k.out +++ b/test_files/cp2k/cp2k.out @@ -1,61 +1,75 @@ - DBCSR| Multiplication driver XSMM + WARNING in start/cp2k.F:171 macOS' Accelerate framework has its own threading enabled which may interfere with the OpenMP threading. You can disable the Accelerate threading by setting the environment variable VECLIB_MAXIMUM_THREADS=1 + DBCSR| CPU Multiplication driver BLAS DBCSR| Multrec recursion limit 512 DBCSR| Multiplication stack size 1000 DBCSR| Maximum elements for images UNLIMITED DBCSR| Multiplicative factor virtual images 1 + DBCSR| Use multiplication densification T DBCSR| Multiplication size stacks 3 + DBCSR| Use memory pool for CPU allocation F DBCSR| Number of 3D layers SINGLE - DBCSR| Use MPI memory allocation T + DBCSR| Use MPI memory allocation F DBCSR| Use RMA algorithm F DBCSR| Use Communication thread T - DBCSR| Communication thread load 87 + DBCSR| Communication thread load 45 + DBCSR| MPI: My node id 0 + DBCSR| MPI: Number of nodes 1 + DBCSR| OMP: Current number of threads 12 + DBCSR| OMP: Max number of threads 12 + DBCSR| Split modifier for TAS multiplication algorithm 1.0E+00 - **** **** ****** ** PROGRAM STARTED AT 2019-11-01 13:36:35.973 - ***** ** *** *** ** PROGRAM STARTED ON nid02952 + **** **** ****** ** PROGRAM STARTED AT 2022-10-11 10:44:08.186 + ***** ** *** *** ** PROGRAM STARTED ON Nicholass-MacBook-Pro-2.local ** **** ****** PROGRAM STARTED BY nwinner - ***** ** ** ** ** PROGRAM PROCESS ID 155863 - **** ** ******* ** PROGRAM STARTED IN /global/u1/n/nwinner/test/cp2k/geo_op - t - - CP2K| version string: CP2K version 6.1 - CP2K| source code revision number: svn:18464 - CP2K| cp2kflags: libint fftw3 libxc parallel mpi3 scalapack xsmm has_no_shared_ - CP2K| glibc max_contr=4 plumed2 no_abort mkl + ***** ** ** ** ** PROGRAM PROCESS ID 47586 + **** ** ******* ** PROGRAM STARTED IN /Users/nwinner/scratch/atomate2_testi + ng/band_structure + + CP2K| version string: CP2K version 2022.1 + CP2K| source code revision number: git:2caeb6f + CP2K| cp2kflags: omp libint fftw3 libxc parallel mpi3 scalapack no_statm_access + CP2K| accelerate CP2K| is freely available from https://www.cp2k.org/ - CP2K| Program compiled at Wed Aug 21 17:08:09 PDT 2019 - CP2K| Program compiled on cori02 - CP2K| Program compiled for cori-gnu - CP2K| Data directory path /global/common/cori/software/cp2k/6.1/data + CP2K| Program compiled at Tue Aug 9 08:56:01 UTC 2022 + CP2K| Program compiled on Monterey + CP2K| Program compiled for Darwin-gfortran + CP2K| Data directory path /private/tmp/cp2k-20220809-8293-10x96hg/cp2k-2022. CP2K| Input file name cp2k.inp GLOBAL| Force Environment number 1 - GLOBAL| Basis set file name GTH_BASIS_SETS + GLOBAL| Basis set file name BASIS_MOLOPT GLOBAL| Potential file name GTH_POTENTIALS GLOBAL| MM Potential file name MM_POTENTIAL GLOBAL| Coordinate file name __STD_INPUT__ GLOBAL| Method name CP2K - GLOBAL| Project name Si - GLOBAL| Preferred FFT library FFTW3 - GLOBAL| Preferred diagonalization lib. SL - GLOBAL| Run type GEO_OPT + GLOBAL| Project name Static + GLOBAL| Run type ENERGY_FORCE + GLOBAL| FFT library FFTW3 + GLOBAL| Diagonalization library ScaLAPACK + GLOBAL| Orthonormality check for eigenvectors DISABLED + GLOBAL| Matrix multiplication library ScaLAPACK GLOBAL| All-to-all communication in single precision F - GLOBAL| FFTs using library dependent lengths F + GLOBAL| FFTs using library dependent lengths T + GLOBAL| Grid backend AUTO GLOBAL| Global print level MEDIUM - GLOBAL| Total number of message passing processes 128 - GLOBAL| Number of threads for this process 1 + GLOBAL| MPI I/O enabled T + GLOBAL| Total number of message passing processes 1 + GLOBAL| Number of threads for this process 12 GLOBAL| This output is from process 0 - GLOBAL| CPU model name : Intel(R) Xeon Phi(TM) CPU 7250 @ 1.40GHz + GLOBAL| Stack size for threads created by OpenMP (OMP_STACKSIZE) default + GLOBAL| CPU model name UNKNOWN + GLOBAL| CPUID 1000 MEMORY| system memory details [Kb] MEMORY| rank 0 min max average - MEMORY| MemTotal 98828780 98828780 98828780 98828780 - MEMORY| MemFree 93635796 93635796 93771588 93733374 - MEMORY| Buffers 6996 3228 6996 4308 - MEMORY| Cached 521644 477684 521644 490871 - MEMORY| Slab 1176348 1162288 1180560 1171497 - MEMORY| SReclaimable 178040 176916 178040 177592 - MEMORY| MemLikelyFree 94342476 94342476 94435300 94406145 + MEMORY| MemTotal 0 0 0 0 + MEMORY| MemFree 0 0 0 0 + MEMORY| Buffers 0 0 0 0 + MEMORY| Cached 0 0 0 0 + MEMORY| Slab 0 0 0 0 + MEMORY| SReclaimable 0 0 0 0 + MEMORY| MemLikelyFree 0 0 0 0 *** Fundamental physical constants (SI units) *** @@ -102,34 +116,199 @@ [a.u./Bohr**2] -> [1/cm] 5.14048714338585E+03 - CELL_TOP| Volume [angstrom^3]: 40.888 - CELL_TOP| Vector a [angstrom 3.349 0.000 1.933 |a| = 3.867 - CELL_TOP| Vector b [angstrom 1.116 3.157 1.933 |b| = 3.867 - CELL_TOP| Vector c [angstrom 0.000 0.000 3.867 |c| = 3.867 - CELL_TOP| Angle (b,c), alpha [degree]: 60.000 - CELL_TOP| Angle (a,c), beta [degree]: 60.000 - CELL_TOP| Angle (a,b), gamma [degree]: 60.000 + CELL_TOP| Volume [angstrom^3]: 40.888293 + CELL_TOP| Vector a [angstrom 0.000 2.734 2.734 |a| = 3.866975 + CELL_TOP| Vector b [angstrom 2.734 0.000 2.734 |b| = 3.866975 + CELL_TOP| Vector c [angstrom 2.734 2.734 0.000 |c| = 3.866975 + CELL_TOP| Angle (b,c), alpha [degree]: 60.000000 + CELL_TOP| Angle (a,c), beta [degree]: 60.000000 + CELL_TOP| Angle (a,b), gamma [degree]: 60.000000 CELL_TOP| Numerically orthorhombic: NO GENERATE| Preliminary Number of Bonds generated: 0 GENERATE| Achieved consistency in connectivity generation. - CELL| Volume [angstrom^3]: 40.888 - CELL| Vector a [angstrom]: 3.349 0.000 1.933 |a| = 3.867 - CELL| Vector b [angstrom]: 1.116 3.157 1.933 |b| = 3.867 - CELL| Vector c [angstrom]: 0.000 0.000 3.867 |c| = 3.867 - CELL| Angle (b,c), alpha [degree]: 60.000 - CELL| Angle (a,c), beta [degree]: 60.000 - CELL| Angle (a,b), gamma [degree]: 60.000 + CELL| Volume [angstrom^3]: 40.888293 + CELL| Vector a [angstrom]: 0.000 2.734 2.734 |a| = 3.866975 + CELL| Vector b [angstrom]: 2.734 0.000 2.734 |b| = 3.866975 + CELL| Vector c [angstrom]: 2.734 2.734 0.000 |c| = 3.866975 + CELL| Angle (b,c), alpha [degree]: 60.000000 + CELL| Angle (a,c), beta [degree]: 60.000000 + CELL| Angle (a,b), gamma [degree]: 60.000000 CELL| Numerically orthorhombic: NO - CELL_REF| Volume [angstrom^3]: 40.888 - CELL_REF| Vector a [angstrom 3.349 0.000 1.933 |a| = 3.867 - CELL_REF| Vector b [angstrom 1.116 3.157 1.933 |b| = 3.867 - CELL_REF| Vector c [angstrom 0.000 0.000 3.867 |c| = 3.867 - CELL_REF| Angle (b,c), alpha [degree]: 60.000 - CELL_REF| Angle (a,c), beta [degree]: 60.000 - CELL_REF| Angle (a,b), gamma [degree]: 60.000 + CELL_REF| Volume [angstrom^3]: 40.888293 + CELL_REF| Vector a [angstrom 0.000 2.734 2.734 |a| = 3.866975 + CELL_REF| Vector b [angstrom 2.734 0.000 2.734 |b| = 3.866975 + CELL_REF| Vector c [angstrom 2.734 2.734 0.000 |c| = 3.866975 + CELL_REF| Angle (b,c), alpha [degree]: 60.000000 + CELL_REF| Angle (a,c), beta [degree]: 60.000000 + CELL_REF| Angle (a,b), gamma [degree]: 60.000000 + CELL_REF| Numerically orthorhombic: NO + + ******************************************************************************* + * ___ * + * / \ * + * [ABORT] The specified OLD file cannot be opened. It does not * + * \___/ exist. Data directory path: * + * | /private/tmp/cp2k-20220809-8293-10x96hg/cp2k-2022.1/data * + * O/| * + * /| | * + * / \ common/cp_files.F:395 * + ******************************************************************************* + + + ===== Routine Calling Stack ===== + + 3 read_qs_kind + 2 create_qs_kind_set + 1 CP2K + WARNING in start/cp2k.F:171 macOS' Accelerate framework has its own threading enabled which may interfere with the OpenMP threading. You can disable the Accelerate threading by setting the environment variable VECLIB_MAXIMUM_THREADS=1 + DBCSR| CPU Multiplication driver BLAS + DBCSR| Multrec recursion limit 512 + DBCSR| Multiplication stack size 1000 + DBCSR| Maximum elements for images UNLIMITED + DBCSR| Multiplicative factor virtual images 1 + DBCSR| Use multiplication densification T + DBCSR| Multiplication size stacks 3 + DBCSR| Use memory pool for CPU allocation F + DBCSR| Number of 3D layers SINGLE + DBCSR| Use MPI memory allocation F + DBCSR| Use RMA algorithm F + DBCSR| Use Communication thread T + DBCSR| Communication thread load 45 + DBCSR| MPI: My node id 0 + DBCSR| MPI: Number of nodes 1 + DBCSR| OMP: Current number of threads 12 + DBCSR| OMP: Max number of threads 12 + DBCSR| Split modifier for TAS multiplication algorithm 1.0E+00 + + + **** **** ****** ** PROGRAM STARTED AT 2022-10-11 10:44:35.012 + ***** ** *** *** ** PROGRAM STARTED ON Nicholass-MacBook-Pro-2.local + ** **** ****** PROGRAM STARTED BY nwinner + ***** ** ** ** ** PROGRAM PROCESS ID 47600 + **** ** ******* ** PROGRAM STARTED IN /Users/nwinner/scratch/atomate2_testi + ng/band_structure + + CP2K| version string: CP2K version 2022.1 + CP2K| source code revision number: git:2caeb6f + CP2K| cp2kflags: omp libint fftw3 libxc parallel mpi3 scalapack no_statm_access + CP2K| accelerate + CP2K| is freely available from https://www.cp2k.org/ + CP2K| Program compiled at Tue Aug 9 08:56:01 UTC 2022 + CP2K| Program compiled on Monterey + CP2K| Program compiled for Darwin-gfortran + CP2K| Data directory path /private/tmp/cp2k-20220809-8293-10x96hg/cp2k-2022. + CP2K| Input file name cp2k.inp + + GLOBAL| Force Environment number 1 + GLOBAL| Basis set file name BASIS_MOLOPT + GLOBAL| Potential file name GTH_POTENTIALS + GLOBAL| MM Potential file name MM_POTENTIAL + GLOBAL| Coordinate file name __STD_INPUT__ + GLOBAL| Method name CP2K + GLOBAL| Project name Static + GLOBAL| Run type ENERGY_FORCE + GLOBAL| FFT library FFTW3 + GLOBAL| Diagonalization library ScaLAPACK + GLOBAL| Orthonormality check for eigenvectors DISABLED + GLOBAL| Matrix multiplication library ScaLAPACK + GLOBAL| All-to-all communication in single precision F + GLOBAL| FFTs using library dependent lengths T + GLOBAL| Grid backend AUTO + GLOBAL| Global print level MEDIUM + GLOBAL| MPI I/O enabled T + GLOBAL| Total number of message passing processes 1 + GLOBAL| Number of threads for this process 12 + GLOBAL| This output is from process 0 + GLOBAL| Stack size for threads created by OpenMP (OMP_STACKSIZE) default + GLOBAL| CPU model name UNKNOWN + GLOBAL| CPUID 1000 + + MEMORY| system memory details [Kb] + MEMORY| rank 0 min max average + MEMORY| MemTotal 0 0 0 0 + MEMORY| MemFree 0 0 0 0 + MEMORY| Buffers 0 0 0 0 + MEMORY| Cached 0 0 0 0 + MEMORY| Slab 0 0 0 0 + MEMORY| SReclaimable 0 0 0 0 + MEMORY| MemLikelyFree 0 0 0 0 + + + *** Fundamental physical constants (SI units) *** + + *** Literature: B. J. Mohr and B. N. Taylor, + *** CODATA recommended values of the fundamental physical + *** constants: 2006, Web Version 5.1 + *** http://physics.nist.gov/constants + + Speed of light in vacuum [m/s] 2.99792458000000E+08 + Magnetic constant or permeability of vacuum [N/A**2] 1.25663706143592E-06 + Electric constant or permittivity of vacuum [F/m] 8.85418781762039E-12 + Planck constant (h) [J*s] 6.62606896000000E-34 + Planck constant (h-bar) [J*s] 1.05457162825177E-34 + Elementary charge [C] 1.60217648700000E-19 + Electron mass [kg] 9.10938215000000E-31 + Electron g factor [ ] -2.00231930436220E+00 + Proton mass [kg] 1.67262163700000E-27 + Fine-structure constant 7.29735253760000E-03 + Rydberg constant [1/m] 1.09737315685270E+07 + Avogadro constant [1/mol] 6.02214179000000E+23 + Boltzmann constant [J/K] 1.38065040000000E-23 + Atomic mass unit [kg] 1.66053878200000E-27 + Bohr radius [m] 5.29177208590000E-11 + + *** Conversion factors *** + + [u] -> [a.u.] 1.82288848426455E+03 + [Angstrom] -> [Bohr] = [a.u.] 1.88972613288564E+00 + [a.u.] = [Bohr] -> [Angstrom] 5.29177208590000E-01 + [a.u.] -> [s] 2.41888432650478E-17 + [a.u.] -> [fs] 2.41888432650478E-02 + [a.u.] -> [J] 4.35974393937059E-18 + [a.u.] -> [N] 8.23872205491840E-08 + [a.u.] -> [K] 3.15774647902944E+05 + [a.u.] -> [kJ/mol] 2.62549961709828E+03 + [a.u.] -> [kcal/mol] 6.27509468713739E+02 + [a.u.] -> [Pa] 2.94210107994716E+13 + [a.u.] -> [bar] 2.94210107994716E+08 + [a.u.] -> [atm] 2.90362800883016E+08 + [a.u.] -> [eV] 2.72113838565563E+01 + [a.u.] -> [Hz] 6.57968392072181E+15 + [a.u.] -> [1/cm] (wave numbers) 2.19474631370540E+05 + [a.u./Bohr**2] -> [1/cm] 5.14048714338585E+03 + + + CELL_TOP| Volume [angstrom^3]: 40.888293 + CELL_TOP| Vector a [angstrom 0.000 2.734 2.734 |a| = 3.866975 + CELL_TOP| Vector b [angstrom 2.734 0.000 2.734 |b| = 3.866975 + CELL_TOP| Vector c [angstrom 2.734 2.734 0.000 |c| = 3.866975 + CELL_TOP| Angle (b,c), alpha [degree]: 60.000000 + CELL_TOP| Angle (a,c), beta [degree]: 60.000000 + CELL_TOP| Angle (a,b), gamma [degree]: 60.000000 + CELL_TOP| Numerically orthorhombic: NO + + GENERATE| Preliminary Number of Bonds generated: 0 + GENERATE| Achieved consistency in connectivity generation. + + CELL| Volume [angstrom^3]: 40.888293 + CELL| Vector a [angstrom]: 0.000 2.734 2.734 |a| = 3.866975 + CELL| Vector b [angstrom]: 2.734 0.000 2.734 |b| = 3.866975 + CELL| Vector c [angstrom]: 2.734 2.734 0.000 |c| = 3.866975 + CELL| Angle (b,c), alpha [degree]: 60.000000 + CELL| Angle (a,c), beta [degree]: 60.000000 + CELL| Angle (a,b), gamma [degree]: 60.000000 + CELL| Numerically orthorhombic: NO + + CELL_REF| Volume [angstrom^3]: 40.888293 + CELL_REF| Vector a [angstrom 0.000 2.734 2.734 |a| = 3.866975 + CELL_REF| Vector b [angstrom 2.734 0.000 2.734 |b| = 3.866975 + CELL_REF| Vector c [angstrom 2.734 2.734 0.000 |c| = 3.866975 + CELL_REF| Angle (b,c), alpha [degree]: 60.000000 + CELL_REF| Angle (a,c), beta [degree]: 60.000000 + CELL_REF| Angle (a,b), gamma [degree]: 60.000000 CELL_REF| Numerically orthorhombic: NO ******************************************************************************* @@ -147,13 +326,14 @@ ** ** ** ... make the atoms dance ** ** ** - ** Copyright (C) by CP2K developers group (2000 - 2018) ** + ** Copyright (C) by CP2K developers group (2000-2022) ** + ** J. Chem. Phys. 152, 194103 (2020) ** ** ** ******************************************************************************* - DFT| Spin restricted Kohn-Sham (RKS) calculation RKS + DFT| Spin unrestricted (spin-polarized) Kohn-Sham calculation UKS DFT| Multiplicity 1 - DFT| Number of spin states 1 + DFT| Number of spin states 2 DFT| Charge 0 DFT| Self-interaction correction (SIC) NO DFT| Cutoffs: density 1.000000E-10 @@ -162,50 +342,42 @@ DFT| cutoff_smoothing_range 0.000000E+00 DFT| XC density smoothing NONE DFT| XC derivatives PW - FUNCTIONAL| ROUTINE=NEW + FUNCTIONAL| PBE: FUNCTIONAL| J.P.Perdew, K.Burke, M.Ernzerhof, Phys. Rev. Letter, vol. 77, n 18, - FUNCTIONAL| pp. 3865-3868, (1996){spin unpolarized} - vdW POTENTIAL| Pair Potential - vdW POTENTIAL| DFT-D3 (Version 3.1) - vdW POTENTIAL| Potential Form: S. Grimme et al, JCP 132: 154104 (2010) - vdW POTENTIAL| Zero Damping - vdW POTENTIAL| Cutoff Radius [Bohr]: 30.24 - vdW POTENTIAL| s6 Scaling Factor: 1.0000 - vdW POTENTIAL| sr6 Scaling Factor: 1.2170 - vdW POTENTIAL| s8 Scaling Factor: 0.7220 - vdW POTENTIAL| Cutoff for CN calculation: 0.1000E-05 + FUNCTIONAL| pp. 3865-3868, (1996){spin polarized} + QS| Method: GPW QS| Density plane wave grid type NON-SPHERICAL FULLSPACE - QS| Number of grid levels: 4 - QS| Density cutoff [a.u.]: 200.0 - QS| Multi grid cutoff [a.u.]: 1) grid level 200.0 - QS| 2) grid level 66.7 - QS| 3) grid level 22.2 - QS| 4) grid level 7.4 + QS| Number of grid levels: 5 + QS| Density cutoff [a.u.]: 50.0 + QS| Multi grid cutoff [a.u.]: 1) grid level 50.0 + QS| 2) grid level 16.7 + QS| 3) grid level 5.6 + QS| 4) grid level 1.9 + QS| 5) grid level 0.6 QS| Grid level progression factor: 3.0 - QS| Relative density cutoff [a.u.]: 30.0 - QS| Consistent realspace mapping and integration - QS| Interaction thresholds: eps_pgf_orb: 1.0E-05 + QS| Relative density cutoff [a.u.]: 25.0 + QS| Interaction thresholds: eps_pgf_orb: 1.0E-06 QS| eps_filter_matrix: 0.0E+00 - QS| eps_core_charge: 1.0E-12 - QS| eps_rho_gspace: 1.0E-10 - QS| eps_rho_rspace: 1.0E-10 - QS| eps_gvg_rspace: 1.0E-05 + QS| eps_core_charge: 1.0E-14 + QS| eps_rho_gspace: 1.0E-12 + QS| eps_rho_rspace: 1.0E-12 + QS| eps_gvg_rspace: 1.0E-06 QS| eps_ppl: 1.0E-02 - QS| eps_ppnl: 1.0E-07 + QS| eps_ppnl: 1.0E-08 ATOMIC KIND INFORMATION - 1. Atomic kind: Si Number of atoms: 2 + 1. Atomic kind: Si_1 Number of atoms: 2 - Orbital Basis Set DZVP-GTH-q4 + Orbital Basis Set DZVP-MOLOPT-SR-GTH-q4 - Number of orbital shell sets: 2 + Number of orbital shell sets: 1 Number of orbital shells: 5 - Number of primitive Cartesian functions: 5 + Number of primitive Cartesian functions: 4 Number of Cartesian basis functions: 14 Number of spherical basis functions: 13 Norm type: 2 @@ -214,48 +386,70 @@ Set Shell Orbital Exponent Coefficient - 1 1 3s 1.203240 0.269412 - 0.468839 -0.102292 - 0.167985 -0.147194 - 0.057562 -0.015996 - - 1 2 4s 1.203240 0.000000 - 0.468839 0.000000 - 0.167985 0.000000 - 0.057562 0.083755 - - 1 3 4px 1.203240 0.085241 - 0.468839 -0.143474 - 0.167985 -0.083407 - 0.057562 -0.014564 - 1 3 4py 1.203240 0.085241 - 0.468839 -0.143474 - 0.167985 -0.083407 - 0.057562 -0.014564 - 1 3 4pz 1.203240 0.085241 - 0.468839 -0.143474 - 0.167985 -0.083407 - 0.057562 -0.014564 - - 1 4 5px 1.203240 0.000000 - 0.468839 0.000000 - 0.167985 0.000000 - 0.057562 0.040189 - 1 4 5py 1.203240 0.000000 - 0.468839 0.000000 - 0.167985 0.000000 - 0.057562 0.040189 - 1 4 5pz 1.203240 0.000000 - 0.468839 0.000000 - 0.167985 0.000000 - 0.057562 0.040189 - - 2 1 3dx2 0.275000 0.171886 - 2 1 3dxy 0.275000 0.297716 - 2 1 3dxz 0.275000 0.297716 - 2 1 3dy2 0.275000 0.171886 - 2 1 3dyz 0.275000 0.297716 - 2 1 3dz2 0.275000 0.171886 + 1 1 2s 1.256768 0.294045 + 0.506394 -0.015884 + 0.238884 -0.207657 + 0.087337 -0.036225 + + 1 2 3s 1.256768 -1.532347 + 0.506394 0.524539 + 0.238884 0.025013 + 0.087337 -0.052203 + + 1 3 3px 1.256768 0.152274 + 0.506394 -0.154145 + 0.238884 -0.115581 + 0.087337 -0.028372 + 1 3 3py 1.256768 0.152274 + 0.506394 -0.154145 + 0.238884 -0.115581 + 0.087337 -0.028372 + 1 3 3pz 1.256768 0.152274 + 0.506394 -0.154145 + 0.238884 -0.115581 + 0.087337 -0.028372 + + 1 4 4px 1.256768 0.313378 + 0.506394 -0.415360 + 0.238884 -0.022539 + 0.087337 0.078473 + 1 4 4py 1.256768 0.313378 + 0.506394 -0.415360 + 0.238884 -0.022539 + 0.087337 0.078473 + 1 4 4pz 1.256768 0.313378 + 0.506394 -0.415360 + 0.238884 -0.022539 + 0.087337 0.078473 + + 1 5 4dx2 1.256768 0.325879 + 0.506394 0.163831 + 0.238884 0.044076 + 0.087337 0.010608 + 1 5 4dxy 1.256768 0.564439 + 0.506394 0.283764 + 0.238884 0.076342 + 0.087337 0.018373 + 1 5 4dxz 1.256768 0.564439 + 0.506394 0.283764 + 0.238884 0.076342 + 0.087337 0.018373 + 1 5 4dy2 1.256768 0.325879 + 0.506394 0.163831 + 0.238884 0.044076 + 0.087337 0.010608 + 1 5 4dyz 1.256768 0.564439 + 0.506394 0.283764 + 0.238884 0.076342 + 0.087337 0.018373 + 1 5 4dz2 1.256768 0.325879 + 0.506394 0.163831 + 0.238884 0.044076 + 0.087337 0.010608 + + Atomic covalent radius [Angstrom]: 1.110 + + Atomic van der Waals radius [Angstrom]: 2.100 GTH Potential information for GTH-PBE-q4 @@ -291,9 +485,9 @@ Total number of - Atomic kinds: 1 - Atoms: 2 - - Shell sets: 4 + - Shell sets: 2 - Shells: 10 - - Primitive Cartesian functions: 10 + - Primitive Cartesian functions: 8 - Cartesian basis functions: 28 - Spherical basis functions: 26 @@ -304,147 +498,140 @@ MODULE QUICKSTEP: ATOMIC COORDINATES IN angstrom - Atom Kind Element X Y Z Z(eff) Mass - - 1 1 Si 14 3.907048 2.762700 6.767206 4.00 28.0855 - 2 1 Si 14 0.558150 0.394671 0.966744 4.00 28.0855 + Atom Kind Element X Y Z Z(eff) Mass + 1 1 Si 14 1.367182 1.367182 1.367182 4.0000 28.0855 + 2 1 Si 14 0.000000 0.000000 0.000000 4.0000 28.0855 - SCF PARAMETERS Density guess: ATOMIC + SCF PARAMETERS Density guess: RESTART -------------------------------------------------------- - max_scf: 30 + max_scf: 1 max_scf_history: 0 max_diis: 4 -------------------------------------------------------- - eps_scf: 1.00E-07 + eps_scf: 1.00E+00 eps_scf_history: 0.00E+00 eps_diis: 1.00E-01 eps_eigval: 1.00E-05 -------------------------------------------------------- - level_shift [a.u.]: 0.00 + level_shift [a.u.]: 0.000000 + added MOs 22 22 + -------------------------------------------------------- + Mixing method: DIRECT_P_MIXING -------------------------------------------------------- No outer SCF PW_GRID| Information for grid number 1 - PW_GRID| Grid distributed over 128 processors - PW_GRID| Real space group dimensions 8 16 - PW_GRID| the grid is blocked: YES - PW_GRID| Cutoff [a.u.] 200.0 + PW_GRID| Cutoff [a.u.] 50.0 PW_GRID| spherical cutoff: NO - PW_GRID| Bounds 1 -24 23 Points: 48 - PW_GRID| Bounds 2 -24 23 Points: 48 - PW_GRID| Bounds 3 -24 23 Points: 48 - PW_GRID| Volume element (a.u.^3) 0.2495E-02 Volume (a.u.^3) 275.9279 + PW_GRID| Bounds 1 -12 11 Points: 24 + PW_GRID| Bounds 2 -12 11 Points: 24 + PW_GRID| Bounds 3 -12 11 Points: 24 + PW_GRID| Volume element (a.u.^3) 0.1996E-01 Volume (a.u.^3) 275.9279 PW_GRID| Grid span FULLSPACE - PW_GRID| Distribution Average Max Min - PW_GRID| G-Vectors 864.0 864 864 - PW_GRID| G-Rays 18.0 18 18 - PW_GRID| Real Space Points 864.0 864 864 PW_GRID| Information for grid number 2 - PW_GRID| Grid distributed over 128 processors - PW_GRID| Real space group dimensions 8 16 - PW_GRID| the grid is blocked: NO - PW_GRID| Cutoff [a.u.] 66.7 + PW_GRID| Number of the reference grid 1 + PW_GRID| Cutoff [a.u.] 16.7 PW_GRID| spherical cutoff: NO - PW_GRID| Bounds 1 -13 13 Points: 27 - PW_GRID| Bounds 2 -13 13 Points: 27 - PW_GRID| Bounds 3 -13 13 Points: 27 - PW_GRID| Volume element (a.u.^3) 0.1402E-01 Volume (a.u.^3) 275.9279 + PW_GRID| Bounds 1 -7 6 Points: 14 + PW_GRID| Bounds 2 -7 6 Points: 14 + PW_GRID| Bounds 3 -7 6 Points: 14 + PW_GRID| Volume element (a.u.^3) 0.1006 Volume (a.u.^3) 275.9279 PW_GRID| Grid span FULLSPACE - PW_GRID| Distribution Average Max Min - PW_GRID| G-Vectors 153.8 486 0 - PW_GRID| G-Rays 5.7 18 0 - PW_GRID| Real Space Points 153.8 216 81 PW_GRID| Information for grid number 3 - PW_GRID| Grid distributed over 128 processors - PW_GRID| Real space group dimensions 8 16 - PW_GRID| the grid is blocked: NO - PW_GRID| Cutoff [a.u.] 22.2 + PW_GRID| Number of the reference grid 1 + PW_GRID| Cutoff [a.u.] 5.6 PW_GRID| spherical cutoff: NO - PW_GRID| Bounds 1 -7 7 Points: 15 - PW_GRID| Bounds 2 -7 7 Points: 15 - PW_GRID| Bounds 3 -7 7 Points: 15 - PW_GRID| Volume element (a.u.^3) 0.8176E-01 Volume (a.u.^3) 275.9279 + PW_GRID| Bounds 1 -3 3 Points: 7 + PW_GRID| Bounds 2 -3 3 Points: 7 + PW_GRID| Bounds 3 -3 3 Points: 7 + PW_GRID| Volume element (a.u.^3) 0.8045 Volume (a.u.^3) 275.9279 PW_GRID| Grid span FULLSPACE - PW_GRID| Distribution Average Max Min - PW_GRID| G-Vectors 26.4 270 0 - PW_GRID| G-Rays 1.8 18 0 - PW_GRID| Real Space Points 26.4 30 0 PW_GRID| Information for grid number 4 - PW_GRID| Grid distributed over 128 processors - PW_GRID| Real space group dimensions 8 16 - PW_GRID| the grid is blocked: NO - PW_GRID| Cutoff [a.u.] 7.4 + PW_GRID| Number of the reference grid 1 + PW_GRID| Cutoff [a.u.] 1.9 PW_GRID| spherical cutoff: NO - PW_GRID| Bounds 1 -4 4 Points: 9 - PW_GRID| Bounds 2 -4 4 Points: 9 - PW_GRID| Bounds 3 -4 4 Points: 9 - PW_GRID| Volume element (a.u.^3) 0.3785 Volume (a.u.^3) 275.9279 + PW_GRID| Bounds 1 -2 2 Points: 5 + PW_GRID| Bounds 2 -2 2 Points: 5 + PW_GRID| Bounds 3 -2 2 Points: 5 + PW_GRID| Volume element (a.u.^3) 2.207 Volume (a.u.^3) 275.9279 + PW_GRID| Grid span FULLSPACE + + PW_GRID| Information for grid number 5 + PW_GRID| Number of the reference grid 1 + PW_GRID| Cutoff [a.u.] 0.6 + PW_GRID| spherical cutoff: NO + PW_GRID| Bounds 1 -1 1 Points: 3 + PW_GRID| Bounds 2 -1 1 Points: 3 + PW_GRID| Bounds 3 -1 1 Points: 3 + PW_GRID| Volume element (a.u.^3) 10.22 Volume (a.u.^3) 275.9279 PW_GRID| Grid span FULLSPACE - PW_GRID| Distribution Average Max Min - PW_GRID| G-Vectors 5.7 135 0 - PW_GRID| G-Rays 0.6 15 0 - PW_GRID| Real Space Points 5.7 18 0 POISSON| Solver PERIODIC POISSON| Periodicity XYZ RS_GRID| Information for grid number 1 - RS_GRID| Bounds 1 -24 23 Points: 48 - RS_GRID| Bounds 2 -24 23 Points: 48 - RS_GRID| Bounds 3 -24 23 Points: 48 - RS_GRID| Real space fully replicated - RS_GRID| Group size 1 + RS_GRID| Bounds 1 -12 11 Points: 24 + RS_GRID| Bounds 2 -12 11 Points: 24 + RS_GRID| Bounds 3 -12 11 Points: 24 RS_GRID| Information for grid number 2 - RS_GRID| Bounds 1 -13 13 Points: 27 - RS_GRID| Bounds 2 -13 13 Points: 27 - RS_GRID| Bounds 3 -13 13 Points: 27 - RS_GRID| Real space fully replicated - RS_GRID| Group size 1 + RS_GRID| Bounds 1 -7 6 Points: 14 + RS_GRID| Bounds 2 -7 6 Points: 14 + RS_GRID| Bounds 3 -7 6 Points: 14 RS_GRID| Information for grid number 3 - RS_GRID| Bounds 1 -7 7 Points: 15 - RS_GRID| Bounds 2 -7 7 Points: 15 - RS_GRID| Bounds 3 -7 7 Points: 15 - RS_GRID| Real space fully replicated - RS_GRID| Group size 1 + RS_GRID| Bounds 1 -3 3 Points: 7 + RS_GRID| Bounds 2 -3 3 Points: 7 + RS_GRID| Bounds 3 -3 3 Points: 7 RS_GRID| Information for grid number 4 - RS_GRID| Bounds 1 -4 4 Points: 9 - RS_GRID| Bounds 2 -4 4 Points: 9 - RS_GRID| Bounds 3 -4 4 Points: 9 - RS_GRID| Real space fully replicated - RS_GRID| Group size 1 + RS_GRID| Bounds 1 -2 2 Points: 5 + RS_GRID| Bounds 2 -2 2 Points: 5 + RS_GRID| Bounds 3 -2 2 Points: 5 - BFGS| Use rational function optimization for step estimation: NO - BFGS| Use model Hessian for initial guess: YES - BFGS| Restart Hessian: NO - BFGS| Trust radius: 0.472 + RS_GRID| Information for grid number 5 + RS_GRID| Bounds 1 -1 1 Points: 3 + RS_GRID| Bounds 2 -1 1 Points: 3 + RS_GRID| Bounds 3 -1 1 Points: 3 + + *** WARNING in qs_scf_initialization.F:761 :: the DIIS scheme is *** + *** disabled, since EPS_DIIS < EPS_SCF *** - ******************************************************************************* - *** STARTING GEOMETRY OPTIMIZATION *** - *** BFGS *** - ******************************************************************************* - Number of electrons: 8 + Spin 1 + + Number of electrons: 4 Number of occupied orbitals: 4 - Number of molecular orbitals: 4 + Number of molecular orbitals: 26 + + Spin 2 + + Number of electrons: 4 + Number of occupied orbitals: 4 + Number of molecular orbitals: 26 Number of orbital functions: 26 Number of independent orbital functions: 26 Extrapolation method: initial_guess + *** WARNING in qs_initial_guess.F:310 :: User requested to restart the *** + *** wavefunction from the file named: Static-RESTART.wfn. This file does *** + *** not exist. Please check the existence of the file or change properly *** + *** the value of the keyword WFN_RESTART_FILE_NAME. Calculation continues *** + *** using ATOMIC GUESS. *** + + Atomic guess: The first density matrix is obtained in terms of atomic orbitals and electronic configurations assigned to each atomic kind - Guess for atomic kind: Si + Guess for atomic kind: Si_1 Electronic structure Total number of core electrons 10.00 @@ -458,314 +645,399 @@ ******************************************************************************* Iteration Convergence Energy [au] ******************************************************************************* - 1 0.195541 -3.582494092186 - 2 0.773517E-01 -3.657362253026 - 3 0.413237E-02 -3.666974954558 - 4 0.237669E-02 -3.666990677417 - 5 0.213903E-02 -3.666992145309 - 6 0.199987E-02 -3.666992932869 - 7 0.243200E-05 -3.666998397025 - 8 0.782699E-08 -3.666998397033 - - Energy components [Hartree] Total Energy :: -3.666998397033 - Band Energy :: -1.003216345610 - Kinetic Energy :: 1.369497204524 - Potential Energy :: -5.036495601557 - Virial (-V/T) :: 3.677623864378 - Core Energy :: -5.652967288373 - XC Energy :: -0.972340293300 - Coulomb Energy :: 2.958309184640 - Total Pseudopotential Energy :: -7.068603880017 - Local Pseudopotential Energy :: -7.902613087561 - Nonlocal Pseudopotential Energy :: 0.834009207544 - Confinement :: 0.461393871202 + 1 0.526541E-01 -3.659692963728 + 2 0.125823E-01 -3.661785675622 + 3 0.408986E-04 -3.661911567360 + 4 0.675570E-07 -3.661911568709 + + Energy components [Hartree] Total Energy :: -3.661911568709 + Band Energy :: -0.941881516273 + Kinetic Energy :: 1.409736465412 + Potential Energy :: -5.071648034121 + Virial (-V/T) :: 3.597585902439 + Core Energy :: -5.690149137281 + XC Energy :: -0.992569238249 + Coulomb Energy :: 3.020806806821 + Total Pseudopotential Energy :: -7.143143335066 + Local Pseudopotential Energy :: -8.006124475851 + Nonlocal Pseudopotential Energy :: 0.862981140786 + Confinement :: 0.432577323720 Orbital energies State L Occupation Energy[a.u.] Energy[eV] - 1 0 2.000 -0.374799 -10.198801 + 1 0 2.000 -0.357276 -9.721984 + + 1 1 2.000 -0.113664 -3.092965 - 1 1 2.000 -0.126809 -3.450652 + Total Electron Density at R=0: 0.000026 - Total Electron Density at R=0: 0.000023 - Re-scaling the density matrix to get the right number of electrons + Spin 1 + Re-scaling the density matrix to get the right number of electrons for spin 1 # Electrons Trace(P) Scaling factor - 8 8.286 0.965 + 4 3.698 1.082 + Spin 2 + Re-scaling the density matrix to get the right number of electrons for spin 2 + # Electrons Trace(P) Scaling factor + 4 3.698 1.082 - SCF WAVEFUNCTION OPTIMIZATION - ----------------------------------- OT --------------------------------------- - Minimizer : DIIS : direct inversion - in the iterative subspace - using 7 DIIS vectors - safer DIIS on - Preconditioner : FULL_ALL : diagonalization, state selective - Precond_solver : DEFAULT - stepsize : 0.15000000 energy_gap : 0.08000000 - eps_taylor : 0.10000E-15 max_taylor : 4 - ----------------------------------- OT --------------------------------------- + SCF WAVEFUNCTION OPTIMIZATION Step Update method Time Convergence Total energy Change ------------------------------------------------------------------------------ - 1 OT DIIS 0.15E+00 2.2 0.19708244 -6.7988759893 -6.80E+00 - 2 OT DIIS 0.15E+00 4.0 0.13618305 -7.0486277841 -2.50E-01 - 3 OT DIIS 0.15E+00 4.0 0.06861931 -7.1578571109 -1.09E-01 - 4 OT DIIS 0.15E+00 4.0 0.03958475 -7.2143422453 -5.65E-02 - 5 OT DIIS 0.15E+00 4.0 0.02182841 -7.2321308930 -1.78E-02 - 6 OT DIIS 0.15E+00 4.0 0.00774376 -7.2376221384 -5.49E-03 - 7 OT DIIS 0.15E+00 4.0 0.00347918 -7.2385137294 -8.92E-04 - 8 OT DIIS 0.15E+00 4.0 0.00220374 -7.2386683039 -1.55E-04 - 9 OT DIIS 0.15E+00 4.0 0.00062310 -7.2387216536 -5.33E-05 - 10 OT DIIS 0.15E+00 4.0 0.00014348 -7.2387261283 -4.47E-06 - 11 OT DIIS 0.15E+00 4.0 0.00007283 -7.2387263910 -2.63E-07 - 12 OT DIIS 0.15E+00 4.0 0.00003894 -7.2387264723 -8.13E-08 - 13 OT DIIS 0.15E+00 4.0 0.00002007 -7.2387265001 -2.77E-08 - 14 OT DIIS 0.15E+00 4.0 0.00001312 -7.2387265049 -4.82E-09 - 15 OT DIIS 0.15E+00 4.0 0.00000531 -7.2387265076 -2.78E-09 - 16 OT DIIS 0.15E+00 4.0 0.00000291 -7.2387265082 -5.98E-10 - 17 OT DIIS 0.15E+00 4.0 0.00000138 -7.2387265085 -2.07E-10 - 18 OT DIIS 0.15E+00 4.0 0.00000066 -7.2387265085 -3.02E-11 - 19 OT DIIS 0.15E+00 4.0 0.00000035 -7.2387265085 3.71E-12 - 20 OT DIIS 0.15E+00 4.0 0.00000014 -7.2387265085 9.40E-12 - 21 OT DIIS 0.15E+00 4.0 0.00000006 -7.2387265085 2.78E-12 - - *** SCF run converged in 21 steps *** - - - Electronic density on regular grids: -8.0000000010 -0.0000000010 - Core density on regular grids: 7.9999999986 -0.0000000014 - Total charge density on r-space grids: -0.0000000025 - Total charge density g-space grids: -0.0000000025 + 1 P_Mix/Diag. 0.40E+00 0.4 0.85358360 -8.3426168857 -8.34E+00 + + *** SCF run converged in 1 steps *** + + + Electronic density on regular grids: -8.0000000000 0.0000000000 + Core density on regular grids: 8.0000000000 -0.0000000000 + Total charge density on r-space grids: -0.0000000000 + Total charge density g-space grids: -0.0000000000 Overlap energy of the core charge distribution: 0.00000000000917 Self energy of the core charge distribution: -20.51598485628205 - Core Hamiltonian energy: 5.24509890429286 - Hartree energy: 10.58588088685028 - Exchange-correlation energy: -2.54302524283273 - Dispersion energy: -0.01069620050649 + Core Hamiltonian energy: 4.18098779371414 + Hartree energy: 10.39240556630242 + Exchange-correlation energy: -2.40002538948680 - Total energy: -7.23872650846896 + Total energy: -8.34261688574313 - !-----------------------------------------------------------------------------! - Mulliken Population Analysis + Calculate DOS at iteration step 0 - # Atom Element Kind Atomic population Net charge - 1 Si 1 3.999997 0.000003 - 2 Si 1 4.000003 -0.000003 - # Total charge 8.000000 -0.000000 + Calculate PDOS at iteration step 0 - !-----------------------------------------------------------------------------! + Prepare the list of atoms for LDOS. Number of lists: 2 + List 1 contains 1 atoms + List 2 contains 1 atoms - !-----------------------------------------------------------------------------! - Hirshfeld Charges + ---- PDOS: start iteration on the KS states --- - #Atom Element Kind Ref Charge Population Net charge - 1 Si 1 4.000 4.000 -0.000 - 2 Si 1 4.000 4.000 0.000 + Calculate PDOS at iteration step 0 - Total Charge -0.000 - !-----------------------------------------------------------------------------! - - ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -7.238726508468534 + Prepare the list of atoms for LDOS. Number of lists: 2 + List 1 contains 1 atoms + List 2 contains 1 atoms + ---- PDOS: start iteration on the KS states --- - -------- Informations at step = 0 ------------ - Optimization Method = BFGS - Total Energy = -7.2387265085 - Used time = 88.859 - --------------------------------------------------- + Integrated absolute spin density : 0.0000000000 + Ideal and single determinant S**2 : 0.000000 0.000000 - -------------------------- - OPTIMIZATION STEP: 1 - -------------------------- + The sum of alpha and beta density is written in cube file format to the file: - Number of electrons: 8 - Number of occupied orbitals: 4 - Number of molecular orbitals: 4 + Static-ELECTRON_DENSITY-1_0.cube - Number of orbital functions: 26 - Number of independent orbital functions: 26 + The spin density is written in cube file format to the file: - Parameters for the always stable predictor-corrector (ASPC) method: + Static-SPIN_DENSITY-1_0.cube - ASPC order: 0 + !-----------------------------------------------------------------------------! + Mulliken Population Analysis - B(1) = 1.000000 + # Atom Element Kind Atomic population (alpha,beta) Net charge Spin moment + 1 Si 1 2.000000 2.000000 -0.000000 -0.000000 + 2 Si 1 2.000000 2.000000 0.000000 0.000000 + # Total charge and spin 4.000000 4.000000 0.000000 0.000000 - Extrapolation method: ASPC + !-----------------------------------------------------------------------------! + !-----------------------------------------------------------------------------! + Hirshfeld Charges - SCF WAVEFUNCTION OPTIMIZATION + #Atom Element Kind Ref Charge Population Spin moment Net charge + 1 Si 1 4.000 2.000 2.000 -0.000 -0.000 + 2 Si 1 4.000 2.000 2.000 0.000 0.000 - ----------------------------------- OT --------------------------------------- - Minimizer : DIIS : direct inversion - in the iterative subspace - using 7 DIIS vectors - safer DIIS on - Preconditioner : FULL_ALL : diagonalization, state selective - Precond_solver : DEFAULT - stepsize : 0.15000000 energy_gap : 0.08000000 - eps_taylor : 0.10000E-15 max_taylor : 4 - ----------------------------------- OT --------------------------------------- + Total Charge -0.000 + !-----------------------------------------------------------------------------! + + Eigenvalues of the occupied subspace spin 1 + --------------------------------------------- + -0.24758290 0.18727298 0.18727298 0.18727300 + Fermi Energy [eV] : 5.095958 + + Eigenvalues of the occupied subspace spin 2 + --------------------------------------------- + -0.24758290 0.18727298 0.18727298 0.18727300 + Fermi Energy [eV] : 5.095958 + + Lowest eigenvalues of the unoccupied subspace spin 1 + --------------------------------------------- + 0.28117070 0.28117079 0.28117079 0.30634483 + 0.49568291 0.49568291 0.74190298 0.74190298 + 0.74190309 1.12696372 1.12696372 1.15267622 + 1.15267622 1.15267630 1.57044838 1.57045280 + 1.57045280 1.69467348 1.69467348 1.69467422 + 3.21631123 3.43300443 + + Lowest eigenvalues of the unoccupied subspace spin 2 + --------------------------------------------- + 0.28117070 0.28117079 0.28117079 0.30634483 + 0.49568291 0.49568291 0.74190298 0.74190298 + 0.74190309 1.12696372 1.12696372 1.15267622 + 1.15267622 1.15267630 1.57044838 1.57045280 + 1.57045280 1.69467348 1.69467348 1.69467422 + 3.21631123 3.43300443 + + CELL| Volume [angstrom^3]: 40.888293 + CELL| Vector a [angstrom]: 0.000 2.734 2.734 |a| = 3.866975 + CELL| Vector b [angstrom]: 2.734 0.000 2.734 |b| = 3.866975 + CELL| Vector c [angstrom]: 2.734 2.734 0.000 |c| = 3.866975 + CELL| Angle (b,c), alpha [degree]: 60.000000 + CELL| Angle (a,c), beta [degree]: 60.000000 + CELL| Angle (a,b), gamma [degree]: 60.000000 + CELL| Numerically orthorhombic: NO - Step Update method Time Convergence Total energy Change - ------------------------------------------------------------------------------ - 1 OT DIIS 0.15E+00 2.1 0.00001881 -7.2387264881 -7.24E+00 - 2 OT DIIS 0.15E+00 3.9 0.00000701 -7.2387264918 -3.68E-09 - 3 OT DIIS 0.15E+00 3.9 0.00000130 -7.2387264924 -5.77E-10 - 4 OT DIIS 0.15E+00 3.9 0.00000071 -7.2387264924 -7.47E-12 - 5 OT DIIS 0.15E+00 3.9 0.00000006 -7.2387264924 -2.16E-12 + CELL_REF| Volume [angstrom^3]: 40.888293 + CELL_REF| Vector a [angstrom 0.000 2.734 2.734 |a| = 3.866975 + CELL_REF| Vector b [angstrom 2.734 0.000 2.734 |b| = 3.866975 + CELL_REF| Vector c [angstrom 2.734 2.734 0.000 |c| = 3.866975 + CELL_REF| Angle (b,c), alpha [degree]: 60.000000 + CELL_REF| Angle (a,c), beta [degree]: 60.000000 + CELL_REF| Angle (a,b), gamma [degree]: 60.000000 + CELL_REF| Numerically orthorhombic: NO - *** SCF run converged in 5 steps *** + PW_GRID| Information for grid number 6 + PW_GRID| Cutoff [a.u.] 50.0 + PW_GRID| spherical cutoff: NO + PW_GRID| Bounds 1 -12 11 Points: 24 + PW_GRID| Bounds 2 -12 11 Points: 24 + PW_GRID| Bounds 3 -12 11 Points: 24 + PW_GRID| Volume element (a.u.^3) 0.1996E-01 Volume (a.u.^3) 275.9279 + PW_GRID| Grid span FULLSPACE + PW_GRID| Information for grid number 7 + PW_GRID| Number of the reference grid 6 + PW_GRID| Cutoff [a.u.] 16.7 + PW_GRID| spherical cutoff: NO + PW_GRID| Bounds 1 -7 6 Points: 14 + PW_GRID| Bounds 2 -7 6 Points: 14 + PW_GRID| Bounds 3 -7 6 Points: 14 + PW_GRID| Volume element (a.u.^3) 0.1006 Volume (a.u.^3) 275.9279 + PW_GRID| Grid span FULLSPACE - Electronic density on regular grids: -7.9999999987 0.0000000013 - Core density on regular grids: 7.9999999986 -0.0000000014 - Total charge density on r-space grids: -0.0000000001 - Total charge density g-space grids: -0.0000000001 + PW_GRID| Information for grid number 8 + PW_GRID| Number of the reference grid 6 + PW_GRID| Cutoff [a.u.] 5.6 + PW_GRID| spherical cutoff: NO + PW_GRID| Bounds 1 -3 3 Points: 7 + PW_GRID| Bounds 2 -3 3 Points: 7 + PW_GRID| Bounds 3 -3 3 Points: 7 + PW_GRID| Volume element (a.u.^3) 0.8045 Volume (a.u.^3) 275.9279 + PW_GRID| Grid span FULLSPACE - Overlap energy of the core charge distribution: 0.00000000000917 - Self energy of the core charge distribution: -20.51598485628205 - Core Hamiltonian energy: 5.24509886486752 - Hartree energy: 10.58588092711779 - Exchange-correlation energy: -2.54302522753198 - Dispersion energy: -0.01069620055661 + PW_GRID| Information for grid number 9 + PW_GRID| Number of the reference grid 6 + PW_GRID| Cutoff [a.u.] 1.9 + PW_GRID| spherical cutoff: NO + PW_GRID| Bounds 1 -2 2 Points: 5 + PW_GRID| Bounds 2 -2 2 Points: 5 + PW_GRID| Bounds 3 -2 2 Points: 5 + PW_GRID| Volume element (a.u.^3) 2.207 Volume (a.u.^3) 275.9279 + PW_GRID| Grid span FULLSPACE - Total energy: -7.23872649237617 + PW_GRID| Information for grid number 10 + PW_GRID| Number of the reference grid 6 + PW_GRID| Cutoff [a.u.] 0.6 + PW_GRID| spherical cutoff: NO + PW_GRID| Bounds 1 -1 1 Points: 3 + PW_GRID| Bounds 2 -1 1 Points: 3 + PW_GRID| Bounds 3 -1 1 Points: 3 + PW_GRID| Volume element (a.u.^3) 10.22 Volume (a.u.^3) 275.9279 + PW_GRID| Grid span FULLSPACE - !-----------------------------------------------------------------------------! - Mulliken Population Analysis + POISSON| Solver PERIODIC + POISSON| Periodicity XYZ - # Atom Element Kind Atomic population Net charge - 1 Si 1 4.000000 0.000000 - 2 Si 1 4.000000 -0.000000 - # Total charge 8.000000 0.000000 + RS_GRID| Information for grid number 6 + RS_GRID| Bounds 1 -12 11 Points: 24 + RS_GRID| Bounds 2 -12 11 Points: 24 + RS_GRID| Bounds 3 -12 11 Points: 24 - !-----------------------------------------------------------------------------! + RS_GRID| Information for grid number 7 + RS_GRID| Bounds 1 -7 6 Points: 14 + RS_GRID| Bounds 2 -7 6 Points: 14 + RS_GRID| Bounds 3 -7 6 Points: 14 - !-----------------------------------------------------------------------------! - Hirshfeld Charges + RS_GRID| Information for grid number 8 + RS_GRID| Bounds 1 -3 3 Points: 7 + RS_GRID| Bounds 2 -3 3 Points: 7 + RS_GRID| Bounds 3 -3 3 Points: 7 - #Atom Element Kind Ref Charge Population Net charge - 1 Si 1 4.000 4.000 -0.000 - 2 Si 1 4.000 4.000 -0.000 + RS_GRID| Information for grid number 9 + RS_GRID| Bounds 1 -2 2 Points: 5 + RS_GRID| Bounds 2 -2 2 Points: 5 + RS_GRID| Bounds 3 -2 2 Points: 5 - Total Charge -0.000 - !-----------------------------------------------------------------------------! + RS_GRID| Information for grid number 10 + RS_GRID| Bounds 1 -1 1 Points: 3 + RS_GRID| Bounds 2 -1 1 Points: 3 + RS_GRID| Bounds 3 -1 1 Points: 3 - ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -7.238726492376183 - - - -------- Informations at step = 1 ------------ - Optimization Method = BFGS - Total Energy = -7.2387264924 - Real energy change = 0.0000000161 - Predicted change in energy = -0.0000000040 - Scaling factor = 0.0000000000 - Step size = 0.0001718346 - Trust radius = 0.4724315332 - Decrease in energy = NO - Used time = 25.217 - - Convergence check : - Max. step size = 0.0001718346 - Conv. limit for step size = 0.0030000000 - Convergence in step size = YES - RMS step size = 0.0001156733 - Conv. limit for RMS step = 0.0015000000 - Convergence in RMS step = YES - Max. gradient = 0.0000863579 - Conv. limit for gradients = 0.0004500000 - Conv. in gradients = YES - RMS gradient = 0.0000582333 - Conv. limit for RMS grad. = 0.0003000000 - Conv. in RMS gradients = YES - --------------------------------------------------- + Spin 1 - ******************************************************************************* - *** GEOMETRY OPTIMIZATION COMPLETED *** - ******************************************************************************* + Number of electrons: 4 + Number of occupied orbitals: 4 + Number of molecular orbitals: 26 - Reevaluating energy at the minimum + Spin 2 - Number of electrons: 8 + Number of electrons: 4 Number of occupied orbitals: 4 - Number of molecular orbitals: 4 + Number of molecular orbitals: 26 Number of orbital functions: 26 Number of independent orbital functions: 26 - Parameters for the always stable predictor-corrector (ASPC) method: + Extrapolation method: initial_guess - ASPC order: 0 + Atomic guess: The first density matrix is obtained in terms of atomic orbitals + and electronic configurations assigned to each atomic kind - B(1) = 2.000000 - B(2) = -1.000000 + Guess for atomic kind: Si_1 - Extrapolation method: ASPC + Electronic structure + Total number of core electrons 10.00 + Total number of valence electrons 4.00 + Total number of electrons 14.00 + Multiplicity not specified + S [ 2.00 2.00] 2.00 + P [ 6.00] 2.00 - SCF WAVEFUNCTION OPTIMIZATION + ******************************************************************************* + Iteration Convergence Energy [au] + ******************************************************************************* + 1 0.526541E-01 -3.659692963728 + 2 0.125823E-01 -3.661785675622 + 3 0.408986E-04 -3.661911567360 + 4 0.675570E-07 -3.661911568709 + + Energy components [Hartree] Total Energy :: -3.661911568709 + Band Energy :: -0.941881516273 + Kinetic Energy :: 1.409736465412 + Potential Energy :: -5.071648034121 + Virial (-V/T) :: 3.597585902439 + Core Energy :: -5.690149137281 + XC Energy :: -0.992569238249 + Coulomb Energy :: 3.020806806821 + Total Pseudopotential Energy :: -7.143143335066 + Local Pseudopotential Energy :: -8.006124475851 + Nonlocal Pseudopotential Energy :: 0.862981140786 + Confinement :: 0.432577323720 - ----------------------------------- OT --------------------------------------- - Minimizer : DIIS : direct inversion - in the iterative subspace - using 7 DIIS vectors - safer DIIS on - Preconditioner : FULL_ALL : diagonalization, state selective - Precond_solver : DEFAULT - stepsize : 0.15000000 energy_gap : 0.08000000 - eps_taylor : 0.10000E-15 max_taylor : 4 - ----------------------------------- OT --------------------------------------- + Orbital energies State L Occupation Energy[a.u.] Energy[eV] - Step Update method Time Convergence Total energy Change - ------------------------------------------------------------------------------ - 1 OT DIIS 0.15E+00 2.1 0.00001881 -7.2387264879 -7.24E+00 - 2 OT DIIS 0.15E+00 3.9 0.00000701 -7.2387264917 -3.84E-09 - 3 OT DIIS 0.15E+00 3.9 0.00000130 -7.2387264924 -6.65E-10 - 4 OT DIIS 0.15E+00 3.9 0.00000071 -7.2387264924 -1.06E-11 - 5 OT DIIS 0.15E+00 3.9 0.00000006 -7.2387264924 -3.51E-12 + 1 0 2.000 -0.357276 -9.721984 - *** SCF run converged in 5 steps *** + 1 1 2.000 -0.113664 -3.092965 - Electronic density on regular grids: -7.9999999987 0.0000000013 - Core density on regular grids: 7.9999999986 -0.0000000014 - Total charge density on r-space grids: -0.0000000001 - Total charge density g-space grids: -0.0000000001 + Total Electron Density at R=0: 0.000026 - Overlap energy of the core charge distribution: 0.00000000000917 - Self energy of the core charge distribution: -20.51598485628205 - Core Hamiltonian energy: 5.24509886497571 - Hartree energy: 10.58588092707528 - Exchange-correlation energy: -2.54302522759771 - Dispersion energy: -0.01069620055661 + Spin 1 + Re-scaling the density matrix to get the right number of electrons for spin 1 + # Electrons Trace(P) Scaling factor + 4 4.000 1.000 - Total energy: -7.23872649237621 + Spin 2 + Re-scaling the density matrix to get the right number of electrons for spin 2 + # Electrons Trace(P) Scaling factor + 4 4.000 1.000 + + KPOINTS| Band Structure Calculation + KPOINTS| Number of k-point sets 10 + KPOINTS| Number of added MOs/bands 100 + KPOINTS| Number of k-points in set 1 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 Gamma 0.000000 0.000000 0.000000 + KPOINTS| Special point 2 X 0.500000 0.000000 0.500000 + KPOINTS| Time for k-point line 0.051 + KPOINTS| Number of k-points in set 2 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 X 0.500000 0.000000 0.500000 + KPOINTS| Special point 2 W 0.500000 0.250000 0.750000 + KPOINTS| Time for k-point line 0.043 + KPOINTS| Number of k-points in set 3 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 W 0.500000 0.250000 0.750000 + KPOINTS| Special point 2 K 0.375000 0.375000 0.750000 + KPOINTS| Time for k-point line 0.042 + KPOINTS| Number of k-points in set 4 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 K 0.375000 0.375000 0.750000 + KPOINTS| Special point 2 Gamma 0.000000 0.000000 0.000000 + KPOINTS| Time for k-point line 0.043 + KPOINTS| Number of k-points in set 5 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 Gamma 0.000000 0.000000 0.000000 + KPOINTS| Special point 2 L 0.500000 0.500000 0.500000 + KPOINTS| Time for k-point line 0.041 + KPOINTS| Number of k-points in set 6 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 L 0.500000 0.500000 0.500000 + KPOINTS| Special point 2 U 0.625000 0.250000 0.625000 + KPOINTS| Time for k-point line 0.042 + KPOINTS| Number of k-points in set 7 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 U 0.625000 0.250000 0.625000 + KPOINTS| Special point 2 W 0.500000 0.250000 0.750000 + KPOINTS| Time for k-point line 0.042 + KPOINTS| Number of k-points in set 8 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 W 0.500000 0.250000 0.750000 + KPOINTS| Special point 2 L 0.500000 0.500000 0.500000 + KPOINTS| Time for k-point line 0.046 + KPOINTS| Number of k-points in set 9 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 L 0.500000 0.500000 0.500000 + KPOINTS| Special point 2 K 0.375000 0.375000 0.750000 + KPOINTS| Time for k-point line 0.047 + KPOINTS| Number of k-points in set 10 2 + KPOINTS| In units of b-vector [2pi/Bohr] + KPOINTS| Special point 1 U 0.625000 0.250000 0.625000 + KPOINTS| Special point 2 X 0.500000 0.000000 0.500000 + KPOINTS| Time for k-point line 0.043 - !-----------------------------------------------------------------------------! - Mulliken Population Analysis + ------------------------------------------------------------------------------- + ---- MULTIGRID INFO ---- + ------------------------------------------------------------------------------- + count for grid 1: 2275 cutoff [a.u.] 50.00 + count for grid 2: 2277 cutoff [a.u.] 16.67 + count for grid 3: 924 cutoff [a.u.] 5.56 + count for grid 4: 0 cutoff [a.u.] 1.85 + count for grid 5: 0 cutoff [a.u.] 0.62 + total gridlevel count : 5476 - # Atom Element Kind Atomic population Net charge - 1 Si 1 4.000000 -0.000000 - 2 Si 1 4.000000 0.000000 - # Total charge 8.000000 0.000000 + ENERGY| Total FORCE_EVAL ( QS ) energy [a.u.]: -7.254316323154326 - !-----------------------------------------------------------------------------! + ATOMIC FORCES in [a.u.] - !-----------------------------------------------------------------------------! - Hirshfeld Charges + # Atom Kind Element X Y Z + 1 1 Si -0.00000001 -0.00000001 -0.00000001 + 2 1 Si 0.00000002 0.00000002 0.00000002 + SUM OF ATOMIC FORCES 0.00000000 0.00000000 0.00000000 0.00000000 - #Atom Element Kind Ref Charge Population Net charge - 1 Si 1 4.000 4.000 -0.000 - 2 Si 1 4.000 4.000 -0.000 + STRESS| Analytical stress tensor [GPa] + STRESS| x y z + STRESS| x Infinity -Infinity -Infinity + STRESS| y -Infinity Infinity -Infinity + STRESS| z -Infinity -Infinity Infinity + STRESS| 1/3 Trace Infinity + STRESS| Determinant NaN - Total Charge -0.000 - !-----------------------------------------------------------------------------! + Too many iterations in jacobi - ENERGY| Total FORCE_EVAL ( QS ) energy (a.u.): -7.238726492376212 + STRESS| Eigenvectors and eigenvalues of the analytical stress tensor [GPa] + STRESS| 1 2 3 + STRESS| Eigenvalues Infinity NaN NaN + STRESS| x 0.000000000000 NaN NaN + STRESS| y 0.000000000000 NaN NaN + STRESS| z 1.000000000000 NaN NaN ------------------------------------------------------------------------------- - - @@ -773,58 +1045,68 @@ - - ------------------------------------------------------------------------------- COUNTER TOTAL BLAS SMM ACC - flops 4 x 4 x 4 24704 0.0% 100.0% 0.0% - flops 4 x 4 x 13 105664 0.0% 100.0% 0.0% - flops 26 x 4 x 4 131456 0.0% 100.0% 0.0% - flops 13 x 13 x 4 146016 0.0% 100.0% 0.0% - flops 26 x 4 x 13 367744 0.0% 100.0% 0.0% - flops 13 x 4 x 13 459680 0.0% 100.0% 0.0% + flops 13 x 26 x 13 35152 100.0% 0.0% 0.0% + flops 13 x 13 x 26 105456 100.0% 0.0% 0.0% flops inhomo. stacks 0 0.0% 0.0% 0.0% - flops total 1.235264E+06 0.0% 100.0% 0.0% - flops max/rank 1.137920E+06 0.0% 100.0% 0.0% + flops total 140.608000E+03 100.0% 0.0% 0.0% + flops max/rank 140.608000E+03 100.0% 0.0% 0.0% matmuls inhomo. stacks 0 0.0% 0.0% 0.0% - matmuls total 1189 0.0% 100.0% 0.0% - number of processed stacks 983 0.0% 100.0% 0.0% - average stack size 0.0 1.2 0.0 - marketing flops 1.286432E+06 + matmuls total 16 100.0% 0.0% 0.0% + number of processed stacks 10 100.0% 0.0% 0.0% + average stack size 1.6 0.0 0.0 + marketing flops 27.040000E+03 ------------------------------------------------------------------------------- - # multiplications 670 - max memory usage/rank 21.651456E+06 - # max total images/rank 2 + # multiplications 5 + max memory usage/rank 0.000000E+00 + # max total images/rank 1 # max 3D layers 1 - # MPI messages exchanged 3859200 - MPI messages size (bytes): - total size 21.405600E+06 - min size 0.000000E+00 - max size 2.704000E+03 - average size 5.546642E+00 - MPI breakdown and total messages size (bytes): - size <= 128 3838410 1044480 - 128 < size <= 8192 20790 20361120 - 8192 < size <= 32768 0 0 - 32768 < size <= 131072 0 0 - 131072 < size <= 4194304 0 0 - 4194304 < size <= 16777216 0 0 - 16777216 < size 0 0 + # MPI messages exchanged 0 + ------------------------------------------------------------------------------- + - - + - DBCSR MESSAGE PASSING PERFORMANCE - + - - + ------------------------------------------------------------------------------- + ROUTINE CALLS AVE VOLUME [Bytes] + MP_Bcast 3 12. + MP_Allreduce 1246 8. + MP_Alltoall 2872 3821. + MP_ISend 20 44. + MP_IRecv 20 44. ------------------------------------------------------------------------------- - *** WARNING in dbcsr/mm/dbcsr_mm.F:268 :: Using a non-square number of *** - *** MPI ranks might lead to poor performance. *** - *** Used ranks: 128 *** - *** Suggested: 121 256 *** + ------------------------------------------------------------------------------- + - - + - DBM STATISTICS - + - - + ------------------------------------------------------------------------------- + M x N x K COUNT PERCENT + ------------------------------------------------------------------------------- + ------------------------------------------------------------------------------- + - - + - GRID STATISTICS - + - - + ------------------------------------------------------------------------------- + LP KERNEL BACKEND COUNT PERCENT + 4 collocate general REF 20256 49.99% + 4 integrate general REF 13504 33.32% + 7 integrate general REF 6752 16.66% + 0 collocate general REF 6 0.01% + 0 integrate general REF 4 0.01% + 3 integrate general REF 2 0.00% ------------------------------------------------------------------------------- - MEMORY| Estimated peak process memory [MiB] 21 + MEMORY| Estimated peak process memory [MiB] 0 ------------------------------------------------------------------------------- ---- MULTIGRID INFO ---- ------------------------------------------------------------------------------- - count for grid 1: 8210 cutoff [a.u.] 200.00 - count for grid 2: 70218 cutoff [a.u.] 66.67 - count for grid 3: 59100 cutoff [a.u.] 22.22 - count for grid 4: 34138 cutoff [a.u.] 7.41 - total gridlevel count : 171666 + count for grid 1: 2275 cutoff [a.u.] 50.00 + count for grid 2: 2277 cutoff [a.u.] 16.67 + count for grid 3: 924 cutoff [a.u.] 5.56 + count for grid 4: 0 cutoff [a.u.] 1.85 + count for grid 5: 0 cutoff [a.u.] 0.62 + total gridlevel count : 5476 ------------------------------------------------------------------------------- - - @@ -833,19 +1115,13 @@ ------------------------------------------------------------------------------- ROUTINE CALLS AVE VOLUME [Bytes] - MP_Group 67 - MP_Bcast 338 681246. - MP_Allreduce 4552 30. - MP_Sync 438 - MP_Alltoall 3710 - MP_SendRecv 1016 1928. - MP_ISendRecv 35433 2440. - MP_Wait 132315 - MP_comm_split 32 - MP_ISend 65681 93. - MP_IRecv 65407 82. - MP_Recv 5 48. - MP_Memory 38082 + MP_Group 10 + MP_Bcast 964 7. + MP_Allreduce 659 99. + MP_Sync 446 + MP_Wait 800 + MP_ISend 1120 778. + MP_IRecv 1120 778. ------------------------------------------------------------------------------- @@ -855,40 +1131,48 @@ - - ------------------------------------------------------------------------------- - CP2K version 6.1, the CP2K developers group (2018). + CP2K version 2022.1, the CP2K developers group (2022). CP2K is freely available from https://www.cp2k.org/ . + Kuehne,Thomas D.; Iannuzzi,Marcella; Del Ben,Mauro; + Rybkin,Vladimir V.; Seewald,Patrick; Stein,Frederick; Laino,Teodoro; + Khaliullin,Rustam Z.; Schuett,Ole; Schiffmann,Florian; Golze,Dorothea; + Wilhelm,Jan; Chulkov,Sergey; Bani-Hashemian,Mohammad Hossein; + Weber,Valery; Borstnik,Urban; Taillefumier,Mathieu; + Jakobovits,Alice Shoshana; Lazzaro,Alfio; Pabst,Hans; Mueller,Tiziano; + Schade,Robert; Guidon,Manuel; Andermatt,Samuel; Holmberg,Nico; + Schenter,Gregory K.; Hehn,Anna; Bussy,Augustin; Belleflamme,Fabian; + Tabacchi,Gloria; Gloess,Andreas; Lass,Michael; Bethune,Iain; + Mundy,Christopher J.; Plessl,Christian; Watkins,Matt; + VandeVondele,Joost; Krack,Matthias; Hutter,Juerg. + The Journal of Chemical Physics, 152 (19), (2020). + CP2K: An electronic structure and molecular dynamics software package - + Quickstep: Efficient and accurate electronic structure calculations. + https://doi.org/10.1063/5.0007045 + Schuett, Ole; Messmer, Peter; Hutter, Juerg; VandeVondele, Joost. - Electronic Structure Calculations on Graphics Processing Units, John Wiley & Sons, Ltd, 173-190 (2016). - GPU-Accelerated Sparse Matrix-Matrix Multiplication for Linear Scaling Density Functional Theory. + Electronic Structure Calculations on Graphics Processing Units, John + Wiley & Sons, Ltd, 173-190 (2016). + GPU-Accelerated Sparse Matrix-Matrix Multiplication for + Linear Scaling Density Functional Theory. https://doi.org/10.1002/9781118670712.ch8 - Borstnik, U; VandeVondele, J; Weber, V; Hutter, J. PARALLEL COMPUTING, 40 (5-6), 47-58 (2014). Sparse matrix multiplication: The distributed block-compressed sparse row library. https://doi.org/10.1016/j.parco.2014.03.012 - Hutter, J; Iannuzzi, M; Schiffmann, F; VandeVondele, J. - WILEY INTERDISCIPLINARY REVIEWS-COMPUTATIONAL MOLECULAR SCIENCE, 4 (1), 15-25 (2014). + WIREs Comput Mol Sci., 4 (1), 15-25 (2014). CP2K: atomistic simulations of condensed matter systems. https://doi.org/10.1002/wcms.1159 - - Grimme, S; Ehrlich, S; Goerigk, L. - JOURNAL OF COMPUTATIONAL CHEMISTRY, 32, 1456 (2011). - Effect of the damping function in dispersion corrected density functional theory. - https://doi.org/10.1002/jcc.21759 - - - Grimme, S; Antony, J; Ehrlich, S; Krieg, H. - JOURNAL OF CHEMICAL PHYSICS, 132 (15), 154104 (2010). - A consistent and accurate ab initio parametrization of density - functional dispersion correction (DFT-D) for the 94 elements H-Pu. - https://doi.org/10.1063/1.3382344 - + VandeVondele, J; Hutter, J. + JOURNAL OF CHEMICAL PHYSICS, 127 (11), 114105 (2007). + Gaussian basis sets for accurate calculations on molecular systems in + gas and condensed phases. + https://doi.org/10.1063/1.2770708 Krack, M. THEORETICAL CHEMISTRY ACCOUNTS, 114 (1-3), 145-152 (2005). @@ -896,51 +1180,32 @@ exchange-correlation functionals. https://doi.org/10.1007/s00214-005-0655-y - VandeVondele, J; Krack, M; Mohamed, F; Parrinello, M; Chassaing, T; Hutter, J. COMPUTER PHYSICS COMMUNICATIONS, 167 (2), 103-128 (2005). QUICKSTEP: Fast and accurate density functional calculations using a mixed Gaussian and plane waves approach. https://doi.org/10.1016/j.cpc.2004.12.014 - Frigo, M; Johnson, SG. PROCEEDINGS OF THE IEEE, 93 (2), 216-231 (2005). The design and implementation of FFTW3. https://doi.org/10.1109/JPROC.2004.840301 - - Kolafa, J. - JOURNAL OF COMPUTATIONAL CHEMISTRY, 25 (3), 335-342 (2004). - Time-reversible always stable predictor-corrector method for molecular dynamics of polarizable molecules. - https://doi.org/10.1002/jcc.10385 - - - VandeVondele, J; Hutter, J. - JOURNAL OF CHEMICAL PHYSICS, 118 (10), 4365-4369 (2003). - An efficient orbital transformation method for electronic structure - calculations. - https://doi.org/10.1063/1.1543154 - - Hartwigsen, C; Goedecker, S; Hutter, J. PHYSICAL REVIEW B, 58 (7), 3641-3662 (1998). Relativistic separable dual-space Gaussian pseudopotentials from H to Rn. https://doi.org/10.1103/PhysRevB.58.3641 - Lippert, G; Hutter, J; Parrinello, M. MOLECULAR PHYSICS, 92 (3), 477-487 (1997). A hybrid Gaussian and plane wave density functional scheme. https://doi.org/10.1080/002689797170220 - Perdew, JP; Burke, K; Ernzerhof, M. PHYSICAL REVIEW LETTERS, 77 (18), 3865-3868 (1996). Generalized gradient approximation made simple. https://doi.org/10.1103/PhysRevLett.77.3865 - Goedecker, S; Teter, M; Hutter, J. PHYSICAL REVIEW B, 54 (3), 1703-1710 (1996). Separable dual-space Gaussian pseudopotentials. @@ -954,50 +1219,46 @@ ------------------------------------------------------------------------------- SUBROUTINE CALLS ASD SELF TIME TOTAL TIME MAXIMUM AVERAGE MAXIMUM AVERAGE MAXIMUM - CP2K 1 1.0 0.020 0.040 137.217 137.256 - cp_geo_opt 1 2.0 0.000 0.001 136.391 136.430 - geoopt_bfgs 1 3.0 0.003 0.004 136.391 136.430 - cp_eval_at 3 4.0 0.002 0.002 136.304 136.343 - qs_energies 3 5.7 0.001 0.002 130.736 130.773 - scf_env_do_scf 3 6.7 0.000 0.001 123.735 123.770 - scf_env_do_scf_inner_loop 31 7.8 0.004 0.009 117.556 117.589 - qs_forces 2 5.0 0.001 0.001 114.100 114.133 - rs_pw_transfer 279 13.1 0.010 0.013 66.438 67.258 - mp_waitall_1 132315 16.6 66.270 67.197 66.270 67.197 - rs_pw_transfer_RS2PW_200 40 12.6 0.111 0.123 65.663 66.491 - qs_rho_update_rho 34 8.9 0.001 0.001 66.178 66.198 - calculate_rho_elec 34 9.9 0.787 65.493 66.177 66.197 - density_rs2pw 34 10.9 0.003 0.004 65.379 66.180 - dbcsr_multiply_generic 670 13.9 0.118 0.127 64.298 65.060 - rebuild_ks_matrix 33 9.7 0.001 0.001 62.693 62.709 - qs_ks_build_kohn_sham_matrix 33 10.7 0.014 0.015 62.692 62.708 - sum_up_and_integrate 33 11.7 0.002 0.002 1.359 62.066 - integrate_v_rspace 33 12.7 0.736 61.436 1.357 62.064 - mp_sum_l 3206 14.9 61.064 61.835 61.064 61.835 - qs_ks_update_qs_env 34 8.8 0.002 0.002 58.482 58.497 - init_scf_loop 3 7.7 0.001 0.001 6.165 6.167 - init_scf_run 3 6.7 0.000 0.001 5.374 5.375 - scf_env_initial_rho_setup 3 7.7 0.000 0.001 5.374 5.375 - qs_ks_update_qs_env_forces 2 6.0 0.000 0.000 4.219 4.221 - wfi_extrapolate 3 8.7 0.001 0.001 3.994 3.995 - qs_scf_new_mos 31 8.8 0.001 0.001 3.703 3.707 - qs_scf_loop_do_ot 31 9.8 0.000 0.001 3.702 3.706 - ot_scf_mini 31 10.8 0.004 0.004 3.529 3.532 + CP2K 1 1.0 0.023 0.023 4.006 4.006 + qs_forces 1 2.0 0.002 0.002 3.918 3.918 + qs_energies 1 3.0 0.014 0.014 2.682 2.682 + rebuild_ks_matrix 3 5.3 0.000 0.000 1.765 1.765 + qs_ks_build_kohn_sham_matrix 3 6.3 0.005 0.005 1.765 1.765 + sum_up_and_integrate 3 7.3 0.001 0.001 1.670 1.670 + integrate_v_rspace 6 8.3 0.005 0.005 1.670 1.670 + grid_integrate_task_list 6 9.3 1.647 1.647 1.647 1.647 + qs_ks_update_qs_env_forces 1 3.0 0.000 0.000 1.139 1.139 + qs_rho_update_rho_low 3 6.0 0.000 0.000 1.001 1.001 + calculate_rho_elec 6 7.0 0.001 0.001 1.001 1.001 + grid_collocate_task_list 6 8.0 0.973 0.973 0.973 0.973 + scf_env_do_scf 1 4.0 0.001 0.001 0.787 0.787 + scf_env_do_scf_inner_loop 1 5.0 0.000 0.000 0.786 0.786 + init_scf_run 2 4.0 0.001 0.001 0.679 0.679 + scf_env_initial_rho_setup 2 5.0 0.000 0.000 0.673 0.673 + qs_ks_update_qs_env 2 5.0 0.000 0.000 0.630 0.630 + do_general_diag_kp 10 4.0 0.002 0.002 0.429 0.429 + qs_energies_init_hamiltonians 2 4.0 0.003 0.003 0.323 0.323 + dbcsr_create_new 3474 6.7 0.147 0.147 0.270 0.270 + copy_dbcsr_to_fm 166 5.1 0.003 0.003 0.239 0.239 + build_core_hamiltonian_matrix 2 5.0 0.003 0.003 0.208 0.208 + dbcsr_finalize 5371 7.2 0.039 0.039 0.192 0.192 + dbcsr_complete_redistribute 176 6.3 0.007 0.007 0.152 0.152 + dbcsr_merge_all 207 8.5 0.115 0.115 0.128 0.128 + dbcsr_make_index_exist 3474 7.7 0.120 0.120 0.120 0.120 + qs_env_update_s_mstruct 2 5.0 0.001 0.001 0.109 0.109 + build_core_hamiltonian_matrix_ 1 3.0 0.000 0.000 0.096 0.096 + qs_env_rebuild_rho 2 6.0 0.000 0.000 0.089 0.089 + qs_rho_rebuild 2 7.0 0.002 0.002 0.089 0.089 + dbcsr_set 2136 6.3 0.002 0.002 0.084 0.084 + dbcsr_zero 2136 7.3 0.082 0.082 0.082 0.082 ------------------------------------------------------------------------------- - The number of warnings for this run is : 1 + The number of warnings for this run is : 2 ------------------------------------------------------------------------------- - **** **** ****** ** PROGRAM ENDED AT 2019-11-01 13:38:54.181 - ***** ** *** *** ** PROGRAM RAN ON nid02952 + **** **** ****** ** PROGRAM ENDED AT 2022-10-11 10:44:39.536 + ***** ** *** *** ** PROGRAM RAN ON Nicholass-MacBook-Pro-2.local ** **** ****** PROGRAM RAN BY nwinner - ***** ** ** ** ** PROGRAM PROCESS ID 155863 - **** ** ******* ** PROGRAM STOPPED IN /global/u1/n/nwinner/test/cp2k/geo_opt - - - - - - - - + ***** ** ** ** ** PROGRAM PROCESS ID 47600 + **** ** ******* ** PROGRAM STOPPED IN /Users/nwinner/scratch/atomate2_testi + ng/band_structure diff --git a/test_files/cp2k/pdos_ALPHA b/test_files/cp2k/pdos_ALPHA deleted file mode 100644 index 8e7f815b6eb..00000000000 --- a/test_files/cp2k/pdos_ALPHA +++ /dev/null @@ -1,28 +0,0 @@ -# Projected DOS for atomic kind Si at iteration step i = 0, E(Fermi) = 0.225209 a.u. -# MO Eigenvalue [a.u.] Occupation s py pz px d-2 d-1 d0 d+1 d+2 - 1 -0.214663 2.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - 2 0.225209 2.000000 0.00000000 0.45235511 0.23665190 0.02535089 0.00337892 0.03154244 0.08056594 0.06308482 0.10706998 - 3 0.225209 2.000000 0.00000000 0.24129960 0.47243195 0.00062628 0.00008347 0.06296870 0.02772254 0.12593723 0.06893023 - 4 0.225209 2.000000 0.00000000 0.02070309 0.00527408 0.68838050 0.09175168 0.00070296 0.10594330 0.00140593 0.08583847 - 5 0.310060 0.000000 0.00000000 0.00444872 0.16224503 0.39519159 0.10271309 0.04216877 0.13181935 0.08433747 0.07707598 - 6 0.310060 0.000000 0.00000000 0.39558316 0.13719744 0.02910428 0.00756444 0.03565884 0.02929892 0.07131726 0.29427565 - 7 0.310060 0.000000 0.00000000 0.16185286 0.26244236 0.13758954 0.03576057 0.06821107 0.16746811 0.13642174 0.03025373 - 8 0.350959 0.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - 9 0.522845 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00420510 0.66246098 0.00157692 0.33123136 0.00052564 - 10 0.522845 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.66246161 0.00420512 0.24842294 0.00210253 0.08280779 - 11 0.781609 0.000000 0.00000000 0.00664421 0.00803027 0.31026458 0.21485820 0.00556096 0.25904005 0.01112188 0.18447986 - 12 0.781609 0.000000 0.00000000 0.00406805 0.31105773 0.00981284 0.00679539 0.21540745 0.02158743 0.43081634 0.00045476 - 13 0.781609 0.000000 0.00000000 0.31422678 0.00585066 0.00486162 0.00336670 0.00405152 0.22566813 0.00810319 0.43387140 - 14 1.167832 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.65631199 0.01035474 0.24611699 0.00517735 0.08203892 - 15 1.167832 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.01035474 0.65631242 0.00388304 0.32815549 0.00129432 - 16 1.190015 0.000000 0.00000000 0.06241943 0.55215396 0.10023497 0.01333052 0.07343214 0.04853723 0.14686388 0.00302788 - 17 1.190015 0.000000 0.00000000 0.50496607 0.00199626 0.20784558 0.02764193 0.00026549 0.00043276 0.00053097 0.25632094 - 18 1.190015 0.000000 0.00000000 0.14742244 0.16065846 0.40672697 0.05409172 0.02136631 0.16492437 0.04273253 0.00207718 - 19 1.613481 0.000000 0.00000000 0.22047180 0.00000003 0.50283507 0.06411797 0.00000000 0.02719795 0.00000001 0.18537716 - 20 1.613482 0.000000 0.00000000 0.00247086 0.71973899 0.00109664 0.00013984 0.09177636 0.00089132 0.18355243 0.00033355 - 21 1.613483 0.000000 0.00000000 0.50036465 0.00356747 0.21937535 0.02797321 0.00045490 0.17943013 0.00090980 0.06792449 - 22 1.718540 0.000000 0.00000000 0.00112656 0.94397808 0.01559878 0.00021269 0.01287077 0.00045179 0.02574169 0.00001965 - 23 1.718541 0.000000 0.00000000 0.00415482 0.01500795 0.94154051 0.01283762 0.00020463 0.01748989 0.00040926 0.00835532 - 24 1.718542 0.000000 0.00000000 0.95542178 0.00171737 0.00356400 0.00004859 0.00002342 0.01153091 0.00004683 0.02764709 - 25 3.228522 0.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - 26 3.446332 0.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 \ No newline at end of file diff --git a/test_files/cp2k/pdos_BETA b/test_files/cp2k/pdos_BETA deleted file mode 100644 index 8e7f815b6eb..00000000000 --- a/test_files/cp2k/pdos_BETA +++ /dev/null @@ -1,28 +0,0 @@ -# Projected DOS for atomic kind Si at iteration step i = 0, E(Fermi) = 0.225209 a.u. -# MO Eigenvalue [a.u.] Occupation s py pz px d-2 d-1 d0 d+1 d+2 - 1 -0.214663 2.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - 2 0.225209 2.000000 0.00000000 0.45235511 0.23665190 0.02535089 0.00337892 0.03154244 0.08056594 0.06308482 0.10706998 - 3 0.225209 2.000000 0.00000000 0.24129960 0.47243195 0.00062628 0.00008347 0.06296870 0.02772254 0.12593723 0.06893023 - 4 0.225209 2.000000 0.00000000 0.02070309 0.00527408 0.68838050 0.09175168 0.00070296 0.10594330 0.00140593 0.08583847 - 5 0.310060 0.000000 0.00000000 0.00444872 0.16224503 0.39519159 0.10271309 0.04216877 0.13181935 0.08433747 0.07707598 - 6 0.310060 0.000000 0.00000000 0.39558316 0.13719744 0.02910428 0.00756444 0.03565884 0.02929892 0.07131726 0.29427565 - 7 0.310060 0.000000 0.00000000 0.16185286 0.26244236 0.13758954 0.03576057 0.06821107 0.16746811 0.13642174 0.03025373 - 8 0.350959 0.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - 9 0.522845 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00420510 0.66246098 0.00157692 0.33123136 0.00052564 - 10 0.522845 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.66246161 0.00420512 0.24842294 0.00210253 0.08280779 - 11 0.781609 0.000000 0.00000000 0.00664421 0.00803027 0.31026458 0.21485820 0.00556096 0.25904005 0.01112188 0.18447986 - 12 0.781609 0.000000 0.00000000 0.00406805 0.31105773 0.00981284 0.00679539 0.21540745 0.02158743 0.43081634 0.00045476 - 13 0.781609 0.000000 0.00000000 0.31422678 0.00585066 0.00486162 0.00336670 0.00405152 0.22566813 0.00810319 0.43387140 - 14 1.167832 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.65631199 0.01035474 0.24611699 0.00517735 0.08203892 - 15 1.167832 0.000000 0.00000000 0.00000000 0.00000000 0.00000000 0.01035474 0.65631242 0.00388304 0.32815549 0.00129432 - 16 1.190015 0.000000 0.00000000 0.06241943 0.55215396 0.10023497 0.01333052 0.07343214 0.04853723 0.14686388 0.00302788 - 17 1.190015 0.000000 0.00000000 0.50496607 0.00199626 0.20784558 0.02764193 0.00026549 0.00043276 0.00053097 0.25632094 - 18 1.190015 0.000000 0.00000000 0.14742244 0.16065846 0.40672697 0.05409172 0.02136631 0.16492437 0.04273253 0.00207718 - 19 1.613481 0.000000 0.00000000 0.22047180 0.00000003 0.50283507 0.06411797 0.00000000 0.02719795 0.00000001 0.18537716 - 20 1.613482 0.000000 0.00000000 0.00247086 0.71973899 0.00109664 0.00013984 0.09177636 0.00089132 0.18355243 0.00033355 - 21 1.613483 0.000000 0.00000000 0.50036465 0.00356747 0.21937535 0.02797321 0.00045490 0.17943013 0.00090980 0.06792449 - 22 1.718540 0.000000 0.00000000 0.00112656 0.94397808 0.01559878 0.00021269 0.01287077 0.00045179 0.02574169 0.00001965 - 23 1.718541 0.000000 0.00000000 0.00415482 0.01500795 0.94154051 0.01283762 0.00020463 0.01748989 0.00040926 0.00835532 - 24 1.718542 0.000000 0.00000000 0.95542178 0.00171737 0.00356400 0.00004859 0.00002342 0.01153091 0.00004683 0.02764709 - 25 3.228522 0.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 - 26 3.446332 0.000000 1.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 \ No newline at end of file