qm
- class isicle.qm.NWChemWrapper[source]
Wrapper for NWChem functionality.
- temp_dir
Path to temporary directory used for simulation.
- Type:
str
- result
Dictionary containing simulation results.
- Type:
dict
- _abc_impl = <_abc._abc_data object>
- _configure_basis(basis_set='6-31G*', ao_basis='cartesian')[source]
Generate basis set block of NWChem configuration.
- Parameters:
basis_set (str) – Basis set selection.
ao_basis (str) – Angular function selection (“spherical”, “cartesian”).
- Returns:
Basis set block of NWChem configuration.
- Return type:
str
- _configure_cosmo(solvent='H2O', gas=False)[source]
Generate COSMO block of NWChem configuration.
- Parameters:
solvent (str) – Solvent selection.
gas (bool) – Indicate whether to use gas phase calculations.
- Returns:
COSMO block of NWChem configuration.
- Return type:
str
- _configure_dft(functional='b3lyp', odft=False)[source]
Generate DFT block of NWChem configuration.
- Parameters:
functional (str) – Functional selection.
odft (bool) – Indicate whether to use open DFT functional (required for spin-spin couplings).
- Returns:
DFT block of NWChem configuration.
- Return type:
str
- _configure_driver(max_iter=150)[source]
Generate driver block of NWChem configuration.
- Parameters:
max_iter (int) – Maximum number of optimization iterations.
- Returns:
Driver block of NWChem configuration.
- Return type:
str
- _configure_energy(basis_set='6-31G*', ao_basis='cartesian', functional='b3lyp', cosmo=False, solvent='H2O', gas=False, **kwargs)[source]
Configure energy block of NWChem configuration.
- Parameters:
basis_set (str) – Basis set selection.
ao_basis (str) – Angular function selection (“spherical”, “cartesian”).
functional (str) – Functional selection.
cosmo (bool) – Indicate whether to include COSMO block.
solvent (str) – Solvent selection. Only used if cosmo is True.
gas (bool) – Indicate whether to use gas phase calculations. Only used if cosmo is True.
- Returns:
Energy block of NWChem configuration.
- Return type:
str
- _configure_frequency(temp=298.15, basis_set='6-31G*', ao_basis='cartesian', functional='b3lyp', cosmo=False, solvent='H2O', gas=False, **kwargs)[source]
Configure frequency block of NWChem configuration.
- Parameters:
temp (float) – Temperature for frequency calculation.
basis_set (str) – Basis set selection.
ao_basis (str) – Angular function selection (“spherical”, “cartesian”).
functional (str) – Functional selection.
cosmo (bool) – Indicate whether to include COSMO block.
solvent (str) – Solvent selection. Only used if cosmo is True.
gas (bool) – Indicate whether to use gas phase calculations. Only used if cosmo is True.
- Returns:
Frequency block of NWChem configuration.
- Return type:
str
- _configure_header(scratch_dir=None, mem_global=1600, mem_heap=100, mem_stack=600)[source]
Generate header block of NWChem configuration.
- Parameters:
scratch_dir (str) – Path to simulation scratch directory.
mem_global (int) – Global memory allocation in MB.
mem_heap (int) – Heap memory allocation in MB.
mem_stack (int) – Stack memory allocation in MB.
- Returns:
Header block of NWChem configuration.
- Return type:
str
- _configure_load()[source]
Generate geometry load block of NWChem configuration.
- Returns:
Load block of NWChem configuration.
- Return type:
str
- _configure_optimize(basis_set='6-31G*', ao_basis='cartesian', functional='b3lyp', max_iter=150, cosmo=False, solvent='H2O', gas=False, **kwargs)[source]
Generate meta optimization block of NWChem configuration.
Includes basis, DFT, and driver blocks; can include COSMO block.
- Parameters:
basis_set (str) – Basis set selection.
ao_basis (str) – Angular function selection (“spherical”, “cartesian”).
functional (str) – Functional selection.
max_iter (int) – Maximum number of optimization iterations.
cosmo (bool) – Indicate whether to include COSMO block.
solvent (str) – Solvent selection. Only used if cosmo is True.
gas (bool) – Indicate whether to u se gas phase calculations. Only used if cosmo is True.
- Returns:
Optimization meta block of NWChem configuration.
- Return type:
str
- _configure_shielding(basis_set='6-31G*', ao_basis='cartesian', functional='b3lyp', cosmo=True, solvent='H2O', gas=False, **kwargs)[source]
Generate meta shielding block of NWChem configuration.
- Parameters:
basis_set (str) – Basis set selection.
ao_basis (str) – Angular function selection (“spherical”, “cartesian”).
functional (str) – Functional selection.
max_iter (int) – Maximum number of optimization iterations.
cosmo (bool) – Indicate whether to include COSMO block.
solvent (str) – Solvent selection. Only used if cosmo is True.
gas (bool) – Indicate whether to use gas phase calculations. Only used if cosmo is True.
- Returns:
Shielding meta block of NWChem configuration.
- Return type:
str
- _configure_spin(bonds=1, basis_set='6-31G*', ao_basis='spherical', functional='b3lyp', cosmo=True, solvent='H2O', gas=False, **kwargs)[source]
Generate meta spin-spin coupling block of NWChem configuration.
- Parameters:
max_pairs (int) – Maximum number of spin-spin pairs per spin-spin coupling block. Note: do not modify.
basis_set (str) – Basis set selection.
ao_basis (str) – Angular function selection (“spherical”, “cartesian”).
functional (str) – Functional selection.
cosmo (bool) – Indicate whether to include COSMO block.
solvent (str) – Solvent selection. Only used if cosmo is True.
gas (bool) – Indicate whether to use gas phase calculations. Only used if cosmo is True.
- Returns:
Spin-spin coupling meta block of NWChem configuration.
- Return type:
str
- _default_value = None
- _defaults = ['geom', 'result', 'temp_dir']
- configure(tasks='energy', functional='b3lyp', basis_set='6-31g*', ao_basis='cartesian', atoms=['C', 'H'], bonds=1, temp=298.15, cosmo=False, solvent='H2O', gas=False, max_iter=150, mem_global=1600, mem_heap=100, mem_stack=600, scratch_dir=None, processes=12)[source]
Configure NWChem simulation.
- Parameters:
tasks (str or list of str) – Tasks text. Tasks text.
functional (str or list of str) – Functional selection. Supply globally or per task.
basis_set (str or list of str) – Basis set selection. Supply globally or per task.
ao_basis (str or list of str) – Angular function selection (“spherical”, “cartesian”). Supply globally or per task.
atoms (list of str) – Atom types of interest. Only used for spin and shielding tasks.
temp (float) – Temperature for frequency calculation. Only used if frequency is a selected task.
cosmo (bool) – Indicate whether to include COSMO block. Supply globally or per task.
solvent (str) – Solvent selection. Only used if cosmo is True. Supply globally or per task.
gas (bool) – Indicate whether to use gas phase calculations. Only used if cosmo is True. Supply globally or per task.
max_iter (int) – Maximum number of optimization iterations.
scratch_dir (str) – Path to simulation scratch directory.
mem_global (int) – Global memory allocation in MB.
mem_heap (int) – Heap memory allocation in MB.
mem_stack (int) – Stack memory allocation in MB.
- Returns:
NWChem configuration.
- Return type:
str
- configure_from_template(path, basename_override=None, dirname_override=None, **kwargs)[source]
Configure NWChem simulation from template file.
Use for NWChem functionality not exposed by the wrapper. Template contains ${keyword} entries that will be replaced by entries in **kwargs, if present. By default, ${basename} and ${dirname} must be included in the template and will be populated automatically. Override this behavior through use of appropriate keyword arguments.
- Parameters:
path (str) – Path to template file.
basename_override (str) – Override managed basename with user-supplied alternative.
dirname_override (str) – Override managed directory name with user-supplied alternative.
**kwargs – Keyword arguments that will be subsituted in the template.
- Returns:
NWChem configuration.
- Return type:
str
- finish()[source]
Parse NWChem simulation results.
- Returns:
Dictionary containing simulation results.
- Return type:
dict
- parse()[source]
Parse NWChem simulation results.
- Returns:
Dictionary containing parsed outputs from the simulation.
- Return type:
dict
- run(geom, template=None, tasks='energy', functional='b3lyp', basis_set='6-31g*', ao_basis='cartesian', atoms=['C', 'H'], bonds=1, temp=298.15, cosmo=False, solvent='H2O', gas=False, max_iter=150, mem_global=1600, mem_heap=100, mem_stack=600, scratch_dir=None, processes=12)[source]
Perform density functional theory calculations according to supplied task list and configuration parameters.
- Parameters:
geom (
Geometry) – Molecule representation.template (str) – Path to optional template to bypass default configuration process.
tasks (str or list of str) – List of calculations to perform. One or more of “optimize”, “energy”, “frequency”, “shielding”, “spin”.
functional (str or list of str) – Functional selection. Supply globally or per task.
basis_set (str or list of str) – Basis set selection. Supply globally or per task.
ao_basis (str or list of str) – Angular function selection (“spherical”, “cartesian”). Supply globally or per task.
atoms (list of str) – Atom types of interest. Only used for spin and shielding tasks.
temp (float) – Temperature for frequency calculation. Only used if frequency is a selected task.
cosmo (bool) – Indicate whether to include COSMO block. Supply globally or per task.
solvent (str) – Solvent selection. Only used if cosmo is True. Supply globally or per task.
gas (bool) – Indicate whether to use gas phase calculations. Only used if cosmo is True. Supply globally or per task.
max_iter (int) – Maximum number of optimization iterations.
scratch_dir (str) – Path to simulation scratch directory.
mem_global (int) – Global memory allocation in MB.
mem_heap (int) – Heap memory allocation in MB.
mem_stack (int) – Stack memory allocation in MB.
- Returns:
Dictionary containing simulation results.
- Return type:
dict
- class isicle.qm.ORCAWrapper[source]
Wrapper for ORCA functionality.
Implements
WrapperInterfaceto ensure required methods are exposed.- temp_dir
Path to temporary directory used for simulation.
- Type:
str
- config
Configuration information for simulation.
- Type:
str
- result
Dictionary containing simulation results.
- Type:
dict
- _abc_impl = <_abc._abc_data object>
- _default_value = None
- _defaults = ['geom', 'result', 'temp_dir']
- configure(simple_input=[], block_input={}, spin_multiplicity=1, processes=1, **kwargs)[source]
Configure ORCA simulation.
- Parameters:
simple_input (list) – List of simple input keywords. See this section of the ORCA docs.
block_input (dict) – Dictionary defining configuration “blocks”. Use names of blocks as keys, lists of each block’s content as values. To configure a line of block content directly, include as a complete string. Include key:value pairs as tuples. See this section of the ORCA docs.
spin_multiplicity (int) – Spin multiplicity of the molecule.
processes (int) – Number of parallel processes.
kwargs – Additional keyword arguments fed as key:value pairs.
- Returns:
ORCA configuration text.
- Return type:
str
- finish()[source]
Collect ORCA simulation results.
- Returns:
Dictionary containing relevant outputs from the simulation.
- Return type:
dict
- parse()[source]
Parse ORCA simulation results.
- Returns:
Dictionary containing parsed outputs from the simulation.
- Return type:
dict
- run(geom, **kwargs)[source]
Optimize geometry via density functional theory using supplied functional and basis set.
- Parameters:
geom (
Geometry) – Molecule representation.template (str) – Path to optional template to bypass default configuration process.
**kwargs – Keyword arguments to configure the simulation. See
configure().
- Returns:
Dictionary containing relevant outputs from the simulation.
- Return type:
dict
- isicle.qm._backend_selector(backend)[source]
Selects a supported quantum mechanical backend for associated simulation. Currently only NWChem and ORCA have been implemented.
- Parameters:
backend (str) – Alias for backend selection (e.g. NWChem, ORCA).
- Returns:
Wrapped functionality of the selected backend. Must implement
WrapperInterface.- Return type:
backend
- isicle.qm.dft(geom, backend='NWChem', **kwargs)[source]
Perform density functional theory calculations according to supplied task list and configuration parameters.
- Parameters:
geom (
Geometry) – Molecule representation.backend (str) – Alias for backend selection (NWChem, ORCA).
kwargs – Keyword arguments passed to selected backend.
- Returns:
Wrapper object containing relevant outputs from the simulation.
- Return type:
QMWrapper