scine_autocas.interfaces.molcas.environment

The Molcas environment.

This module handles the molcas environment, while respecting already set environment variable, without overwriting them.

Classes

Environment([settings_dict])

Class to control and set up the environment for Molcas.

class scine_autocas.interfaces.molcas.environment.Environment(settings_dict=None)[source]

Class to control and set up the environment for Molcas.

The environment respects already set system variables. So if you have already set variables in the current session, these are not overwritten by the Environment class.

Notes

if no molcas_binary is set and the “MOLCAS” variable is found in the environment, e.g. through a .bashrc, the environemnt sets the binary to the path $MOLCAS/pymolcas

Attributes

environment

(Dict[str, str]) the system environment

project_name

(str) the molcas project name

molcas_binary

(str) path to the pymolcas binary

molcas_flags

(str, default = “-b 1 -f”) all pymolcas flags

molcas_memory

(str, default = “12000”) the amount of memory accessible by molcas in [mb]

molcas_scratch_dir

(str) the molcas scratch dir, NOT the work dir

molcas_nprocs

(str) the number of molcas mpi nodes and qcmaquis omp_threads

__slots__ = ('environment', 'project_name', 'molcas_binary', 'molcas_flags', 'molcas_memory', 'molcas_scratch_dir', 'molcas_nprocs')
__init__(settings_dict=None)[source]

Init function.

environment: Dict[str, str]

The environment

project_name: str

name of the project. Will be used by Molcas to name some files

molcas_binary: str

name of the Molcas binar

molcas_flags: str

flags for the Molcas binar

molcas_memory: str

amount available memory for Molca

__doc__ = 'Class to control and set up the environment for Molcas.\n\n    The environment respects already set system variables. So if you have\n    already set variables in the current session, these are not overwritten\n    by the Environment class.\n\n    Attributes\n    ----------\n    environment : Dict[str, str]\n        the system environment\n    project_name : str\n        the molcas project name\n    molcas_binary : str\n        path to the pymolcas binary\n    molcas_flags : str, default = "-b 1 -f"\n        all pymolcas flags\n    molcas_memory : str, default = "12000"\n        the amount of memory accessible by molcas in [mb]\n    molcas_scratch_dir : str\n        the molcas scratch dir, NOT the work dir\n    molcas_nprocs : str\n        the number of molcas mpi nodes and qcmaquis omp_threads\n\n    Notes\n    -----\n    if no molcas_binary is set and the "MOLCAS" variable is found in the environment, e.g. through a .bashrc,\n    the environemnt sets the binary to the path $MOLCAS/pymolcas\n    '
__module__ = 'scine_autocas.interfaces.molcas.environment'
molcas_scratch_dir: str

dir for molcas to store internal stuff

molcas_nprocs: str

number of mpi nodes

__str__()[source]

Print environment.

Returns
outputstr

the output if class is printed

rtype

str ..

_set_environment(envir_string, environment_variable)[source]

Set the environment variable.

Parameters
envir_stringstr

Name of the environment to set

environment_variablestr

if environment not set, the value to set

make_environment(calc_dir)[source]

Set up the environment for Molcas.

Parameters
calc_dirstr

Path to the current work directory

Returns
environmentDict[str, str]

environment object

Raises
EnvironmentError

if neither molcas_binary, nor the system variable MOLCAS is defined.

rtype

Dict[str, str] ..