qrunch.chemistry.molecule.solvent

Module containing a solvent class used for embedding molecular configurations in solvents.

Classes

PCMMethod

Enum representing different Polarizable Continuum Model (PCM) methods.

Solvent

Protocol for solvent objects that indicate their solvent model type.

SolventCreator

Builder for all solvent model types.

SolventFrame

Class for storing and passing solvents used for embedding molecular configurations.

SolventFrameCreator

Builder for a frame-based (polarizable embedding) solvent.

SolventPCM

Class for defining a Polarizable Continuum Model solvent.

SolventPCMCreator

Builder for a Polarizable Continuum Model (PCM) solvent.

class PCMMethod

Bases: Enum

Enum representing different Polarizable Continuum Model (PCM) methods.

Abbreviations:

IEF_PCM: Integral Equation Formalism Polarizable Continuum Model. C_PCM: Conductor-like Polarizable Continuum Model. SS_V_PE: Surface and Simulation of Volume Polarization for Electrostatics. COSMO: Conductor-like Screening Model.

COSMO = 'COSMO'
C_PCM = 'C-PCM'
IEF_PCM = 'IEF-PCM'
SS_V_PE = 'SS(V)PE'
class Solvent

Bases: Protocol

Protocol for solvent objects that indicate their solvent model type.

Provides a method to return the specific solvent type.

__init__(*args, **kwargs)
set_solvent(molecular_problem: PyscfKernelInterface) PyscfKernelInterface

Set solvent properties for the given molecular problem.

This method adjusts the molecular_problem based on the provided molecular_configuration. The type of molecular_problem is preserved in the return value.

Parameters:

molecular_problem (PyscfKernelInterface) – The molecular problem instance.

Return type:

PyscfKernelInterface

class SolventCreator

Bases: object

Builder for all solvent model types.

static frame(potential_file: str | Path) SolventFrameCreator

Narrow to a Polarizable Embedding (PE) solvent.

This model uses a classical representation of the solvent based on atom-centered multipoles and polarizabilities, allowing the solvent environment to respond to the solute’s electrostatic field.

Parameters:

potential_file (str | Path) – Path to the potential file.

Return type:

SolventFrameCreator

static pcm(dielectric_constant: float) SolventPCMCreator

Narrow to a Polarizable Continuum Model (PCM) solvent.

This model describes the solvent as a uniform dielectric continuum characterized by its macroscopic dielectric constant.

Sets the dielectric constant of the solvent.

Typical values:
  • Water: ~78.4

  • Methanol: ~33.0

  • Benzene: ~2.3

Parameters:

dielectric_constant (float) – The dielectric constant of the solvent (> 1.0).

Return type:

SolventPCMCreator

class SolventFrame

Bases: Solvent

Class for storing and passing solvents used for embedding molecular configurations.

__init__(potential_file: Path | str) None

Initialize an instance of the solvent class using a Polarizable Embedding potential file.

Note

BETA FEATURE — This feature is experimental and may change or be removed in future versions without notice.

Parameters:

potential_file (Path | str)

Return type:

None

set_solvent(molecular_problem: PyscfKernelInterface) PyscfKernelInterface

Set solvent properties for the given molecular problem.

This method adjusts the molecular_problem based on the provided molecular_configuration. The type of molecular_problem is preserved in the return value.

Note

BETA FEATURE — This feature is experimental and may change or be removed in future versions without notice.

Parameters:

molecular_problem (PyscfKernelInterface) – The molecular problem instance.

Return type:

PyscfKernelInterface

class SolventFrameCreator

Bases: object

Builder for a frame-based (polarizable embedding) solvent.

__init__(potential_file: str | Path) None

Initialize builder for SolventFrame.

The potential file defines the distributed multipoles and polarizabilities representing the solvent environment.

Parameters:

potential_file (str | Path) – Path to the potential file

Return type:

None

create() SolventFrame

Create an instance of SolventFrame.

Return type:

SolventFrame

class SolventPCM

Bases: Solvent

Class for defining a Polarizable Continuum Model solvent.

__init__(dielectric_constant: float, method: PCMMethod | None = PCMMethod.IEF_PCM) None

Initialize an instance of the solvent class.

Parameters:
  • dielectric_constant (float)

  • method (PCMMethod | None)

Return type:

None

set_solvent(molecular_problem: PyscfKernelInterface) PyscfKernelInterface

Set solvent properties for the given molecular problem.

This method adjusts the molecular_problem based on the provided molecular_configuration. The type of molecular_problem is preserved in the return value.

Parameters:

molecular_problem (PyscfKernelInterface) – The molecular problem instance.

Return type:

PyscfKernelInterface

class SolventPCMCreator

Bases: object

Builder for a Polarizable Continuum Model (PCM) solvent.

__init__(dielectric_constant: float) None

Initialize builder for SolventPCM.

Set dielectric constant of the solvent.

Typical values:
  • Water: ~78.4

  • Methanol: ~33.0

  • Benzene: ~2.3

Parameters:

dielectric_constant (float) – The dielectric constant of the solvent (> 1.0).

Raises:

ValueError – If the dielectric constant is < 1.0.

Return type:

None

create() SolventPCM

Create an instance of SolventPCM.

Return type:

SolventPCM

with_method(method: Literal['IEF-PCM', 'C-PCM', 'SS(V)PE', 'COSMO'] | PCMMethod) Self

Select PCM method to use.

Parameters:

method (Literal['IEF-PCM', 'C-PCM', 'SS(V)PE', 'COSMO'] | ~qrunch.chemistry.molecule.solvent.PCMMethod) – PCM method to use, either as a PCMMethod enum or a string literal (e.g., "IEF-PCM" or "COSMO").

Raises:

ValueError – If the given method is not a valid PCM formulation.

Return type:

Self

solvent_creator() SolventCreator

Create a solvent model.

This is the intended starting point for creating any type of solvent. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

SolventCreator