aiida_lsmo.workchains package

Submodules

aiida_lsmo.workchains.binding_site module

BindingSite workchain.

class aiida_lsmo.workchains.binding_site.BindingSiteWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

A workchain that combines SimAnnealing & Cp2kBindingEnergy

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.binding_site'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
classmethod define(spec)[source]

Define workflow specification.

return_results()[source]

Return exposed outputs and info.

run_cp2k_binding_energy()[source]

Pass the ouptput molecule’s geometry to Cp2kBindingEnergy.

run_sim_annealing()[source]

Run SimAnnealing

aiida_lsmo.workchains.cp2k_binding_energy module

Binding energy workchain

class aiida_lsmo.workchains.cp2k_binding_energy.Cp2kBindingEnergyWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

Submits Cp2kBase work chain for structure + molecule system, first optimizing the geometry of the molecule and later computing the BSSE corrected interaction energy. This work chain is inspired to Cp2kMultistage, and shares some logics and data from it.

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.cp2k_binding_energy'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
_spec = <aiida.engine.processes.workchains.workchain.WorkChainSpec object>
classmethod define(spec)[source]
inspect_and_update_settings_geo_opt()[source]

Inspect the settings_{idx} calculation and check if it is needed to update the settings and resubmint the calculation.

results()[source]

Gather final outputs of the workchain.

run_bsse()[source]

Update parameters and run BSSE calculation. BSSE assumes that the molecule has no charge and unit multiplicity: this can be customized from builder.cp2k_base.cp2k.parameters.

run_geo_opt()[source]

Prepare inputs, submit and direct output to context.

setup()[source]

Setup initial parameters.

should_run_geo_opt()[source]

Returns True if it is the first iteration or the settings are not ok.

aiida_lsmo.workchains.cp2k_binding_energy.get_loaded_molecule(loaded_structure, input_molecule)[source]

Return only the molecule’s atoms in the unit cell as a StructureData object.

aiida_lsmo.workchains.cp2k_binding_energy.get_output_parameters(**cp2k_out_dict)[source]

Extracts important results to include in the output_parameters.

aiida_lsmo.workchains.cp2k_multistage module

Multistage work chain.

class aiida_lsmo.workchains.cp2k_multistage.Cp2kMultistageWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

Submits Cp2kBase workchains for ENERGY, GEO_OPT, CELL_OPT and MD jobs iteratively The protocol_yaml file contains a series of settings_x and stage_x: the workchains starts running the settings_0/stage_0 calculation, and, in case of a failure, changes the settings untill the SCF of stage_0 converges. Then it uses the same settings to run the next stages (i.e., stage_1, etc.).

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.cp2k_multistage'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
classmethod define(spec)[source]
inspect_and_update_settings_stage0()[source]

Inspect the stage0/settings_{idx} calculation and check if it is needed to update the settings and resubmint the calculation.

inspect_and_update_stage()[source]

Update geometry, parent folder and the new &MOTION settings.

results()[source]

Gather final outputs of the workchain.

run_stage()[source]

Check for restart, prepare input, submit and direct output to context.

setup_multistage()[source]

Setup initial parameters.

should_run_stage()[source]

Return True if it exists a new stage to compute.

should_run_stage0()[source]

Returns True if it is the first iteration or the settings are not ok.

aiida_lsmo.workchains.cp2k_multistage.extract_results(resize, **kwargs)[source]

Extracts restults form the output_parameters of the single calculations (i.e., scf-converged stages) into a single Dict output. - resize (Dict) contains the unit cell resizing values - kwargs contains all the output_parameters for the stages and the extra initial change of settings, e.g.: ‘out_0’: cp2k’s output_parameters with Dict.label = ‘settings_0_stage_0_discard’ ‘out_1’: cp2k’s output_parameters with Dict.label = ‘settings_1_stage_0_valid’ ‘out_2’: cp2k’s output_parameters with Dict.label = ‘settings_1_stage_0_valid’ ‘out_3’: cp2k’s output_parameters with Dict.label = ‘settings_1_stage_0_valid’ This will be read as: output_dict = {‘nstages_valid’: 3, ‘nsettings_discarded’: 1}.

aiida_lsmo.workchains.cp2k_multistage_ddec module

Cp2kMultistageDdecWorkChain workchain

class aiida_lsmo.workchains.cp2k_multistage_ddec.Cp2kMultistageDdecWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

A workchain that combines: Cp2kMultistageWorkChain + Cp2kDdecWorkChain

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.cp2k_multistage_ddec'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
classmethod define(spec)[source]

Define workflow specification.

return_results()[source]

Return exposed outputs and print the pk of the CifData w/DDEC

run_cp2kddec()[source]

Pass the Cp2kMultistageWorkChain outputs as inputs for Cp2kDdecWorkChain: cp2k_base (metadata), cp2k_params, structure and WFN.

run_cp2kmultistage()[source]

Run CP2K-Multistage

aiida_lsmo.workchains.isotherm module

Isotherm workchain

class aiida_lsmo.workchains.isotherm.IsothermWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

Workchain that computes volpo and blocking spheres: if accessible volpo>0 it also runs a raspa widom calculation for the Henry coefficient.

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.isotherm'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
_get_widom_param()[source]

Write Raspa input parameters from scratch, for a Widom calculation

_update_param_for_gcmc()[source]

Update Raspa input parameter, from Widom to GCMC

classmethod define(spec)[source]
init_raspa_gcmc()[source]

Choose the pressures we want to sample, report some details, and update settings for GCMC

return_output_parameters()[source]

Merge all the parameters into output_parameters, depending on is_porous and is_kh_ehough.

run_raspa_gcmc()[source]

Run a GCMC calculation in Raspa @ T,P.

run_raspa_widom()[source]

Run a Widom calculation in Raspa.

run_zeopp()[source]

Perform Zeo++ block and VOLPO calculations.

setup()[source]

Initialize the parameters

should_run_another_gcmc()[source]

We run another raspa calculation only if the current iteration is smaller than the total number of pressures we want to compute.

should_run_gcmc()[source]

Output the widom results and decide to compute the isotherm if kH > kHmin, as defined by the user

should_run_widom()[source]

Submit widom calculation only if there is some accessible volume, also check the number of blocking spheres and estimate the saturation loading. Also, stop if called by IsothermMultiTemp for geometric results only.

aiida_lsmo.workchains.isotherm.choose_pressure_points(inp_param, geom, raspa_widom_out)[source]

If ‘presure_list’ is not provide, model the isotherm as single-site langmuir and return the most important pressure points to evaluate for an isotherm, in a List.

aiida_lsmo.workchains.isotherm.get_atomic_radii(isotparam)[source]

Get {ff_framework}.rad as SinglefileData form workchain/isotherm_data. If not existing use DEFAULT.rad.

aiida_lsmo.workchains.isotherm.get_ff_parameters(molecule_dict, isotparam)[source]

Get the parameters for ff_builder.

aiida_lsmo.workchains.isotherm.get_geometric_dict(zeopp_out, molecule)[source]

Return the geometric Dict from Zeopp results, including Qsat and is_porous

aiida_lsmo.workchains.isotherm.get_molecule_dict(molecule_name)[source]

Get a Dict from the isotherm_molecules.yaml

aiida_lsmo.workchains.isotherm.get_output_parameters(geom_out, inp_params, widom_out=None, pressures=None, **gcmc_out_dict)[source]

Merge results from all the steps of the work chain.

aiida_lsmo.workchains.isotherm.get_zeopp_parameters(molecule_dict, isotparam)[source]

Get the ZeoppParameters from the inputs of the workchain

aiida_lsmo.workchains.isotherm_calc_pe module

IsothermCalcPE work chain.

class aiida_lsmo.workchains.isotherm_calc_pe.IsothermCalcPEWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

Compute CO2 parassitic energy (PE) after running IsothermWorkChain for CO2 and N2 at 300K.

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.isotherm_calc_pe'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
classmethod define(spec)[source]
run_calcpe()[source]

Expose isotherm outputs, prepare calc_pe, run it and return the output.

run_isotherms()[source]

Run Isotherm work chain for CO2 and N2.

aiida_lsmo.workchains.isotherm_multi_temp module

IsothermMultiTemp workchain.

class aiida_lsmo.workchains.isotherm_multi_temp.IsothermMultiTempWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

Run IsothermWorkChain for multiple temperatures: first compute geometric properties and then submit Widom+GCMC at different temperatures in parallel

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.isotherm_multi_temp'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
collect_isotherms()[source]

Collect all the results in one Dict

classmethod define(spec)[source]
run_geometric()[source]

Perform Zeo++ block and VOLPO calculation with IsothermWC.

run_isotherms()[source]

Compute isotherms at different temperatures.

should_continue()[source]

Continue if porous

aiida_lsmo.workchains.isotherm_multi_temp.get_output_parameters(geom_dict, **isotherm_dict)[source]

Gather together all the results, returning lists for the multi temperature values

aiida_lsmo.workchains.isotherm_multi_temp.get_parameters_singletemp(i, parameters)[source]

aiida_lsmo.workchains.nanoporous_screening_1 module

ZeoppMultistageDdecPeWorkChain workchain

class aiida_lsmo.workchains.nanoporous_screening_1.NanoporousScreening1WorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

A workchain that combines: ZeoppMultistageDdecWorkChain wc1 and IsothermCalcPEWorkChain wc2. In future I will use this to include more applications to run in parallel.

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.nanoporous_screening_1'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
classmethod define(spec)[source]

Define workflow specification.

include_results_wc1()[source]

Include results of work chain 1 in group.

include_results_wc2()[source]

Include results of work chain 2 in group.

make_group()[source]

Create curated-xxx_XXXX_vx group and put the orig_cif inside, and exit if it already exists.

run_wc1()[source]

Run work chain 1.

run_wc2()[source]

Run work chain 2.

aiida_lsmo.workchains.nanoporous_screening_1.include_node(tag, node, group)[source]

Given an aiida-node and a (string) tag, add the node in the curated-cof_XXX_vX group, and set the tag as the extra of the node for the query.

aiida_lsmo.workchains.sim_annealing module

Isotherm workchain

class aiida_lsmo.workchains.sim_annealing.SimAnnealingWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

A work chain to compute the minimum energy geometry of a molecule inside a framework, using simulated annealing, i.e., decreasing the temperature of a Monte Carlo simulation and finally running and energy minimization step.

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.sim_annealing'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
_get_raspa_nvt_param()[source]

Write Raspa input parameters from scratch, for an MC NVT calculation

_spec = <aiida.engine.processes.workchains.workchain.WorkChainSpec object>
classmethod define(spec)[source]
return_results()[source]

Return molecule position and energy info.

run_raspa_min()[source]

Run a Energy Minimization in Raspa.

run_raspa_nvt()[source]

Run a NVT calculation in Raspa.

setup()[source]

Initialize the parameters

should_run_nvt()[source]

Update temperature untill the last of the list.

aiida_lsmo.workchains.sim_annealing.get_ff_parameters(molecule_dict, isotparam)[source]

Get the parameters for ff_builder.

aiida_lsmo.workchains.sim_annealing.get_molecule_dict(molecule_name)[source]

Get a Dict from the isotherm_molecules.yaml

aiida_lsmo.workchains.sim_annealing.get_molecule_from_restart_file(structure_cif, molecule_folderdata, input_dict, molecule_dict)[source]

Get a CifData file having the cell of the initial (unexpanded) structure and the geometry of the loaded molecule. TODO: this is source of error if there are more than one molecule AND the cell has been expanded, as you can not wrap them in the small cell.

aiida_lsmo.workchains.sim_annealing.get_output_parameters(input_dict, min_out_dict, **nvt_out_dict)[source]

Merge energy info from the calculations.

aiida_lsmo.workchains.sim_annealing.load_yaml()[source]

Load the ff_data.yaml as a dict.

aiida_lsmo.workchains.zeopp_multistage_ddec module

ZeoppMultistageDdecWorkChain work chain

class aiida_lsmo.workchains.zeopp_multistage_ddec.ZeoppMultistageDdecWorkChain(*args, **kwargs)[source]

Bases: aiida.engine.processes.workchains.workchain.WorkChain

A workchain that combines: Zeopp + Cp2kMultistageWorkChain + Cp2kDdecWorkChain + Zeopp

__abstractmethods__ = frozenset({})
__module__ = 'aiida_lsmo.workchains.zeopp_multistage_ddec'
_abc_cache = <_weakrefset.WeakSet object>
_abc_negative_cache = <_weakrefset.WeakSet object>
_abc_negative_cache_version = 110
_abc_registry = <_weakrefset.WeakSet object>
_spec = <aiida.engine.processes.workchains.workchain.WorkChainSpec object>
classmethod define(spec)[source]

Define workflow specification.

return_results()[source]

Return exposed outputs

run_multistageddec()[source]

Run MultistageDdec work chain

run_zeopp_after()[source]

Run Zeo++ for the oprimized structure

run_zeopp_before()[source]

Run Zeo++ for the original structure

Module contents

Workchains developed at LSMO laboratory.