scine_autocas.interfaces.serenity¶
Provide interface to Serenity.
All calls are done through Serenity’s Python interface.
Classes
|
Interface to the electronic structure program Serenity. |
- class scine_autocas.interfaces.serenity.Serenity(molecules, settings_dict=None, load_paths=[])[source]¶
Interface to the electronic structure program Serenity.
Serenity is called through its Python interface.
See also
settings
Interface.Settings
Notes
The settings object is already in the __slots__ of the base interface.
- class Settings(molecules, settings_dict=None)[source]¶
Control the input parameters and writes input file for Serenity.
- __slots__ = ('uhf', 'localisation_method', 'alignment', 'localize_virtuals', 'read_and_write_to_molcas', 'molcas_orbital_files', 'partitioning_thresholds', 'optimized_mapping', 'xyz_files', 'skip_localization', 'score_start', 'score_end', 'system_names', 'use_pi_bias', 'write_orbital_map_file')¶
- localisation_method: str¶
localisation method. Options are PIPEK_MEZEY, BOYS, EDMINSTON_RUEDENBERG, IBO.
- alignment¶
Align orbitals for multiple structures
- localize_virtuals¶
Localize the virtual orbitals
- read_and_write_to_molcas¶
Replace the orbitals in a molcas orbital file
- optimized_mapping¶
Optimize the first threshold of the direct orbital selection to give the best mapping
- score_start¶
Start score for the threshold search
- score_end¶
Maximum score for the threshold search
- use_pi_bias: bool¶
If true the orbital comparison thresholds are scaled as presented in JCTC 16, 3607 (2020).
- __doc__ = 'Control the input parameters and writes input file for Serenity.'¶
- __module__ = 'scine_autocas.interfaces.serenity'¶
- __slots__ = ('systems',)¶
- __doc__ = 'Interface to the electronic structure program Serenity.\n\n Serenity is called through its Python interface.\n\n Notes\n -----\n The settings object is already in the __slots__ of the base interface.\n\n See Also\n --------\n settings : Interface.Settings\n '¶
- __init__(molecules, settings_dict=None, load_paths=[])[source]¶
Construct a Serenity interface.
All Serenity-System Controllers are constructed upon call.
- Parameters
- moleculeMolecule
contains molecular information
- settings_dictDict[str, Any], optional
holds additional settings. Must contain the information about all xyz files.
- __module__ = 'scine_autocas.interfaces.serenity'¶
- dumper: Optional[Any]¶
if a dumper is provided in the main class it can be used
- settings: Interface.Settings¶
contains information on the input of the electronic structure program
- systems: List[spy.System]¶
- calculate(cas_occupation=None, cas_indices=None)[source]¶
DMRG calculations including orbitals corresponding to cas_indices and electrons corresponding to occupations.
- Parameters
- cas_occupation: List[int], optional
contains the occupation for each spatial orbital. 2: doubly occupied, 1: singly occupied, 0: virtual
- cas_indices: List[int], optional
contains the indices of the orbitals for the CAS calculation
Notes
Either cas_occupations and cas_indices is provided and a CAS calculation is started, or if none are provided a plain HF calculation is started. This function must be implemented by the corresponding interface.
- get_orbital_map()[source]¶
Getter for an orbital map in terms of orbital groups. See also:
interfaces/__init__.py::get_orbital_map(self)
- load_or_write_molcas_orbitals(write=False)[source]¶
Read or write orbitals from or to a molcas orbital file. Parameters: ———–
- writebool
If true, the orbitals in the molcas orbital file are replaced by Serenity’s orbitals.
- static run_scf(sys, settings=None, restricted=True)[source]¶
Run a SCF calculation for the given system.#
- localize_orbitals(sys, loc_settings, template=None)[source]¶
Localize the orbitals of the given system. If a template system is given and orbital alignment is required, the orbitals are aligned first.
- build_fragments(sys)[source]¶
Build fragments for the system. The number of fragments is determined by the number of partitioning thresholds plus one.
- Parameters:
- sysspy.System
The system.
- Returns:
- fragmentsList[spy.System]
The fragments.
- build_orbital_map(fragments)[source]¶
Build the orbital group indices for all systems. Parameters:
- fragmentsList[spy.System]
The total list of fragments.
- Returns:
- Tuple[List[List[List[int]]], List[List[List[int]]]}
The list of mappable orbital groups (vide supra), the list of unmappable orbital groups.