nanoCAT.recipes.cdft_utils

Recipes for running conceptual dft calculations.

Index

run_jobs(mol, *settings[, job_type, ...])

Run multiple jobs in succession.

get_global_descriptors(results)

Extract a dictionary with all ADF conceptual DFT global descriptors from results.

cdft

Automatic multi-level dictionary.

API

nanoCAT.recipes.run_jobs(mol, *settings, job_type=ADF(__annotations__={'settings': <class 'qmflows.settings.Settings'>, 'mol': typing.Union[ForwardRef('rdkit.Chem.rdchem.Mol'), ForwardRef('scm.plams.mol.molecule.Molecule')], 'job_name': <class 'str'>, 'validate_output': <class 'bool'>, 'kwargs': typing.Any, 'return': <class 'qmflows.packages.packages.Result'>}, __name__='adf', __qualname__='adf', pkg_name='adf'), job_name=None, path=None, folder=None, **kwargs)[source]

Run multiple jobs in succession.

Examples

>>> from scm.plams import Molecule
>>> from qmflows import Settings
>>> from qmflows.templates import geometry
>>> from qmflows.utils import InitRestart
>>> from qmflows.packages.SCM import ADF_Result

>>> from CAT.recipes import run_jobs, cdft

>>> mol = Molecule(...)

>>> settings_opt = Settings(...)
>>> settings_opt += geometry
>>> settings_cdft = Settings(...)
>>> settings_cdft += cdft

>>> result: ADF_Result = run_jobs(mol, settings_opt, settings_cdft)
Parameters
  • mol (Molecule) – The input molecule.

  • *settings (Mapping) – One or more input settings. A single job will be run for each provided settings object. The output molecule of each job will be passed on to the next one.

  • job_type (Package) – A QMFlows package instance.

  • job_name (str, optional) – The name basename of the job. The name will be append with ".{i}", where {i} is the number of the job.

  • path (str or PathLike, optional) – The path to the working directory.

  • folder (str or PathLike, optional) – The name of the working directory.

  • **kwargs (Any) – Further keyword arguments for job_type and the noodles job runner.

Returns

A QMFlows Result object as constructed by the last calculation. The exact type depends on the passed job_type.

Return type

Result

See also

noodles.run.threading.sqlite3.run_parallel()

Run a workflow in parallel threads, storing results in a Sqlite3 database.

nanoCAT.recipes.get_global_descriptors(results)[source]

Extract a dictionary with all ADF conceptual DFT global descriptors from results.

Examples

>>> import pandas as pd
>>> from scm.plams import ADFResults
>>> from CAT.recipes import get_global_descriptors

>>> results = ADFResults(...)

>>> series: pd.Series = get_global_descriptors(results)
>>> print(dct)
Electronic chemical potential (mu)     -0.113
Electronegativity (chi=-mu)             0.113
Hardness (eta)                          0.090
Softness (S)                           11.154
Hyperhardness (gamma)                  -0.161
Electrophilicity index (w=omega)        0.071
Dissocation energy (nucleofuge)         0.084
Dissociation energy (electrofuge)       6.243
Electrodonating power (w-)              0.205
Electroaccepting power(w+)              0.092
Net Electrophilicity                    0.297
Global Dual Descriptor Deltaf+          0.297
Global Dual Descriptor Deltaf-         -0.297
Electronic chemical potential (mu+)    -0.068
Electronic chemical potential (mu-)    -0.158
Name: global descriptors, dtype: float64
Parameters

results (plams.ADFResults or qmflows.ADF_Result) – A PLAMS Results or QMFlows Result instance of an ADF calculation.

Returns

A Series with all ADF global decsriptors as extracted from results.

Return type

pandas.Series

nanoCAT.recipes.cdft = qmflows.Settings(...)

A QMFlows-style template for conceptual DFT calculations.

specific:
    adf:
        symmetry: nosym
        conceptualdft:
            enabled: yes
            analysislevel: extended
            electronegativity: yes
            domains:
                enabled: yes
        qtaim:
            enabled: yes
            analysislevel: extended
            energy: yes
        basis:
            core: none
            type: DZP
        xc:
            libxc:
                CAM-B3LYP
        numericalquality: good