spycci.functions sub-module

calculate_pka function

spycci.functions.calculate_pka(protonated, deprotonated, only_return=False)

Calculates the pKa of a molecule using the direct method. The function expects as arguments the protonated and deprotonated forms of the molecule as a System objects for which the energies must have already been computed. The function returns the computed pKa and sets (if not otherwise indicated by the user) the pka property of the protonated system.

Parameters:
  • protonated (System) – molecule in the protonated form

  • deprotonated (System) – molecule in the deprotonated form

  • only_return (bool) – If set to True will not set the computed pKa value in the properties of the protonated object. Else (default) the pKa property will be initialized using the DIRECT method.

Returns:

pKa – the pKa object encoding the pka of the molecule computed using the direct method.

Return type:

pKa

auto_calculate_pka function

spycci.functions.auto_calculate_pka(protonated, method_el, method_vib=None, method_opt=None, ncores=None, maxcore=350)

Automatically calculates the pKa of a given protonated molecule. The routine computes all the deprotomers of the molecule using CREST, orders the deprotomers according to their energy computed with a user-defined level of theory and calculates the pKa.

Parameters:
  • protonated (System) – The protonated molecule for which the pKa must be computed

  • method_el (Engine) – The computational engine to be used in the electronic level of theory calculations

  • method_vib (Engine (optional)) – The computational engine to be used in the vibrational level of theory calculations. If set to None (default) the pKa will be computed without the free energy corrections (only electronic energy).

  • method_opt (Engine (optional)) – The computational engine to be used in the geometry optimization of the protonated molecule and its deprotomers. If set to None (default) will use xTB gfn2 and the alpb solvent model for water.

  • ncores (int (optional)) – The number of cores to be used in the calculations. If set to None (default) will use the maximun number of available cores.

  • maxcore (int (optional)) – For the engines that supprots it, the memory assigned to each core used in the computation.

Returns:

  • pKa – pKa object computed for the molecule.

  • System – the structure of the considered deprotomer.

Return type:

Tuple[pKa, System]


calculate_reduction_potential function

spycci.functions.calculate_reduction_potential(oxidised, reduced, pH=7.0)

Calculates the reduction potential of a molecule, given the oxidized and reduced forms assuming that energies have already been computed. The number of electrons exchanged in the process is automatically computed.

Parameters:
  • oxidised (System object) – molecule in the oxidised state

  • reduced (System object) – molecule in the reduced state

  • pH (float) – pH at which the redox potential is evaluated, by default pH=7. This is important in case of a proton-coupled electron transfer (PCET) redox process

Raises:
  • TypeError – Exception raised if either oxidised or reduced molecules are Ensembles

  • RuntimeError – Exception raised if a mismatch is detected between electronic levels of theory.

Returns:

  • float – reduction potential of the molecule.

  • int – number of exchanged electrons

  • int – number of exchanged protons

Return type:

Tuple[float, int, int]

calculate_fukui function

spycci.functions.calculate_fukui(molecule, engine, spins_states=None, cube_grid=CubeGrids.NORMAL, ncores=None, maxcore=1000)

Computes the Fukui f+, f- and f0 functions starting from a given input molecule. The functions are saved in Gaussian cube compatible format and stored in the output_densities folder. Localized Fukui functions are also computed from the Mulliken and Hirshfeld charges and saved in the molecule properties. Please notice that the charges in the .fukui.cube produced are replaced by the Mulliken condensed fukui functions.

Parameters:
  • molecule (System) – The System object containing the geometry of the selected molecule (if the geometry has not been optimized, please enable the optimize option)

  • orca (Engine) – The engine object that defines the protocol to be used in the calculation.

  • spin_states (Union[None, List[int]]) – If set to None, when adding or subtracting electrons will automatically switch the spin state from singlet to doublet and vice versa (Maximum one unpaired electrons). If manually set to List[int] will force the spin multeplicities according to the user specified values. The order of the spin multiplicity values is: molecule with one electron added (-1), the molecule as it is (0) and the molecule with one of its electrons removed (+1).

  • cube_grid (Union[CubeGrids, None]) – Resolution for the cube files (default Normal). If set to None the function will avoid the generation of cube files and will only compute condensed fukui values.

  • ncores (int, optional) – The number of cores, by default all available cores (None)

  • maxcore (int) – The maximum amount of memory in MB to be allocated for each core.

  • engine (OrcaInput | XtbInput)

  • spins_states (None | List[int])

Return type:

None