scine_autocas.autocas_utils.input_handler

Handle input files for autoCAS.

This module provides the InputHandler class, which parses and modifies yaml input files.

Classes

InputHandler(yaml_input)

A class to handle the input for autoCAS.

class scine_autocas.autocas_utils.input_handler.InputHandler(yaml_input)[source]

A class to handle the input for autoCAS.

AutoCASs input is formated in the yaml format, so that the provided input is modified into a dictionary by the yaml library, which can be used easiely to store the current state of an autoCAS calculation or set up a calculation from an input.

Attributes

input_file

(str) location of the yaml input file

settings_dir

(Dict[str, Any]) the dict created from the yaml input

interface

(Interface) the interface providing electronic structure caluclations

molecule

(Molecule) the molecule object, created from the yaml input

autocas

(Autocas) the Autocas object, created from the yaml input

large_cas

(bool) flag to enable the large active space protocol

__slots__ = ('input_file', 'settings_dir', 'interface', 'molecule', 'autocas', 'large_cas')
__init__(yaml_input)[source]

Construct the InputHandler.

The constructor directly read the provided yaml input and sets all class attributes.

Parameters
yaml_inputstr

path to the yaml input file

input_file: str

path to the yaml input

settings_dir: Dict[str, Any]

all settings provided by the yaml input are stored in a dict

interface: scine_autocas.interfaces.Interface

providing the electronic structure software

molecule: scine_autocas.autocas_utils.molecule.Molecule

stores molecular system information

autocas: scine_autocas.Autocas

handles the active space search

large_cas: bool

enables the large active space protocol

__doc__ = 'A class to handle the input for autoCAS.\n\n    AutoCASs input is formated in the yaml format, so that the provided input\n    is modified into a dictionary by the yaml library, which can be used easiely to\n    store the current state of an autoCAS calculation or set up a calculation from an\n    input.\n\n    Attributes\n    ----------\n    input_file : str\n        location of the yaml input file\n    settings_dir : Dict[str, Any]\n        the dict created from the yaml input\n    interface : Interface\n        the interface providing electronic structure caluclations\n    molecule : Molecule\n        the molecule object, created from the yaml input\n    autocas : Autocas\n        the Autocas object, created from the yaml input\n    large_cas : bool\n        flag to enable the large active space protocol\n    '
__module__ = 'scine_autocas.autocas_utils.input_handler'
print_settings()[source]

Print all settings from yaml file

read_input(input_file)[source]

Read yaml input and set up class attributes.

Parameters
input_filestr

path to the yaml input file

get_molecule()[source]

Create molecule object from input.

Returns
moleculeMolecule

the molecule object, based on provided input file.

rtype

Molecule ..

get_autocas()[source]

Set up Autocas object from input.

Returns
autocasAutocas

the Autocas object, based on provided input file.

Notes

The autocas object relies on information of the molecule.

Return type

Autocas

get_interface()[source]

Set up interface from input.

Returns
interfaceInterface

an object, which is based on a inherited class of Interface, based on the provided input.

Notes

The interface object relies on information of the molecule.

Return type

Interface