Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Environment

VeloxChem implements both implicit (CPCM and SMD) and explicit (polarizable embedding) solvation models.

Implicit solvation

Implicit solvation models describe the effect of a surrounding liquid environment by replacing the explicit solvent molecules with a continuous dielectric medium that interacts self‑consistently with the electronic structure of the solute. Tomasi et al. (2005)

A separation is made between equilibrium and non-equilibrium solvation. In the former case, the timescale is such that both nuclear and electronic relaxations take place in the environment, such as in molecular structure optimizations. In the latter case, only electrons are fully equilibrated with the time-dependent solute charge density, such as in UV/vis spectrum simulations.

CPCM

In the conductor‑like polarizable continuum model (CPCM), the solute is placed inside a cavity defined by its molecular surface, and the reaction field is obtained by solving surface‑charge equations that approximate the dielectric screening of a perfect conductor and are subsequently scaled to represent the desired solvent permittivity.

VeloxChem implements the CPCM model for:

  • SCF energies

  • gradients (structure optimizations)

  • linear response (UV/vis spectra and more)

Python script

import veloxchem as vlx

molecule = vlx.Molecule.read_name("ammonia")
basis = vlx.MolecularBasis.read(molecule, "def2-svp")

scf_drv = vlx.ScfRestrictedDriver()
scf_drv.xcfun = "b3lyp"
scf_drv.solvation_model = "cpcm"
scf_results = scf_drv.compute(molecule, basis)

rsp_drv = vlx.LinearResponseEigenSolver()
rsp_drv.nstates = 10
rsp_results = rsp_drv.compute(molecule, basis, scf_results)

opt_drv = vlx.OptimizationDriver(scf_drv)
opt_results = opt_drv.compute(molecule, basis, scf_results)

In CPCM, the induced charge density on the cavity (due to the presence of the solute) is represented on a surface grid and discretized as Gaussian charges centred at the grid points. The converged grid charges can be visualized using the CPCM driver.

opt_molecule = opt_results["final_molecule"]
scf_drv.cpcm_drv.visualize_cpcm_charges(opt_molecule)
Loading...
<Figure size 600x100 with 1 Axes>

Text file

@jobs
task: scf
@end

@method settings
basis: def2-svp
xcfun: b3lyp
solvation model: cpcm
cpcm epsilon : 78.39
@end

@molecule
charge: 0
multiplicity: 1
xyz:
...
@end

SMD

The solvation model based on density (SMD) combines a self‑consistent reaction‑field description of the electrostatic polarization with empirically parametrized terms for cavitation, dispersion, and solvent–solute interactions based on the solute’s electron density, enabling accurate free‑energy predictions across a wide range of solvents. For further details, see Marenich et al. (2009).

In Veloxchem, the electrostatic contribution is determined using the CPCM model.

Python script

import veloxchem as vlx

molecule = vlx.Molecule.read_name("methanol")
basis = vlx.MolecularBasis.read(molecule, "def2-svp")

scf_drv = vlx.ScfRestrictedDriver()

scf_drv.solvation_model = "smd"
scf_drv.smd_solvent = "water"

scf_results = scf_drv.compute(molecule, basis)

Text file

@jobs
task: scf
@end

@method settings
basis: def2-svp
xcfun: b3lyp
solvation model: smd
smd solvent : water
@end

@molecule
charge: 0
multiplicity: 1
xyz:
...
@end

Explicit solvation

An explicit representation of the environment is available with the polarizable embedding (PE) model. Molecules in the environment are represented by site charges and polarizabilities. VeloxChem supports the PE model for:

  • SCF energies

  • linear response (UV/vis spectra and more)

The PE model is invoked in input files by giving the name of the associated potential file.

Loading...

Python script

import veloxchem as vlx

solute_xyz = """35
HS276
C        4.3399560215    0.0305428946    0.0828144786
C        4.4095576538    1.3683610158   -0.3235192595
H        3.5134027643    1.9937601903   -0.3924032993
N        5.5723395543    1.9197433737   -0.6488743924
C        6.6935279309    1.1757794133   -0.5864329168
H        7.6224068215    1.6875951052   -0.8616425839
C        6.7276910108   -0.1635918452   -0.2107845581
H        7.6695032300   -0.7162266137   -0.1924428573
C        5.5097537075   -0.7720747162    0.1336293537
C        5.1009824698   -2.0878240657    0.5406435604
H        5.7372998568   -2.9570654838    0.6892873628
C        3.7438801169   -2.0443763598    0.7226497610
H        3.0543062251   -2.8214265706    1.0462619034
N        3.2609508451   -0.7683360554    0.4549835483
C        1.9260075376   -0.3749845510    0.5283176588
S        0.6782993391   -1.3889716576   -0.1542613778
C        1.4061153730    0.7824770017    1.0601625728
H        2.0181143215    1.5416160613    1.5454703546
C       -0.0068851194    0.8477465652    0.9398680126
H       -0.6059313977    1.6741214421    1.3245241162
C       -0.5667478467   -0.2580211398    0.3294429618
C       -1.9604337493   -0.5533359638    0.0792123648
C       -2.5277285148   -1.7535587315   -0.3270277748
H       -1.9416881983   -2.6565543003   -0.5031604314
C       -3.9321104260   -1.6831753283   -0.4684223853
H       -4.5766877637   -2.5081858439   -0.7717042735
S       -3.1787442841    0.6764078755    0.2764099378
C       -4.4390511633   -0.4347565024   -0.1731766944
C       -5.8556810641   -0.0499048614   -0.2240721981
O       -6.7574530303   -0.7927799637   -0.5363405829
O       -6.0328437022    1.2420382988    0.1214233024
C       -7.3762795865    1.7182783197    0.1021539149
H       -8.0044633860    1.1450501374    0.8009438574
H       -7.3321515876    2.7714270760    0.4053723170
H       -7.8085678845    1.6284781442   -0.9060973811
"""

molecule = vlx.Molecule.read_xyz_string(solute_xyz)
basis = vlx.MolecularBasis.read(molecule, "def2-svp")

scf_drv = vlx.ScfRestrictedDriver()

scf_drv.potfile = "solvent.pot"

scf_results = scf_drv.compute(molecule, basis)

Text file

@jobs
task: scf
@end

@method settings
basis: aug-cc-pvdz
potfile: solvent.pot
@end

@molecule
charge: 0
multiplicity: 1
xyz:
C        4.3399560215    0.0305428946    0.0828144786
C        4.4095576538    1.3683610158   -0.3235192595
H        3.5134027643    1.9937601903   -0.3924032993
N        5.5723395543    1.9197433737   -0.6488743924
C        6.6935279309    1.1757794133   -0.5864329168
H        7.6224068215    1.6875951052   -0.8616425839
C        6.7276910108   -0.1635918452   -0.2107845581
H        7.6695032300   -0.7162266137   -0.1924428573
C        5.5097537075   -0.7720747162    0.1336293537
C        5.1009824698   -2.0878240657    0.5406435604
H        5.7372998568   -2.9570654838    0.6892873628
C        3.7438801169   -2.0443763598    0.7226497610
H        3.0543062251   -2.8214265706    1.0462619034
N        3.2609508451   -0.7683360554    0.4549835483
C        1.9260075376   -0.3749845510    0.5283176588
S        0.6782993391   -1.3889716576   -0.1542613778
C        1.4061153730    0.7824770017    1.0601625728
H        2.0181143215    1.5416160613    1.5454703546
C       -0.0068851194    0.8477465652    0.9398680126
H       -0.6059313977    1.6741214421    1.3245241162
C       -0.5667478467   -0.2580211398    0.3294429618
C       -1.9604337493   -0.5533359638    0.0792123648
C       -2.5277285148   -1.7535587315   -0.3270277748
H       -1.9416881983   -2.6565543003   -0.5031604314
C       -3.9321104260   -1.6831753283   -0.4684223853
H       -4.5766877637   -2.5081858439   -0.7717042735
S       -3.1787442841    0.6764078755    0.2764099378
C       -4.4390511633   -0.4347565024   -0.1731766944
C       -5.8556810641   -0.0499048614   -0.2240721981
O       -6.7574530303   -0.7927799637   -0.5363405829
O       -6.0328437022    1.2420382988    0.1214233024
C       -7.3762795865    1.7182783197    0.1021539149
H       -8.0044633860    1.1450501374    0.8009438574
H       -7.3321515876    2.7714270760    0.4053723170
H       -7.8085678845    1.6284781442   -0.9060973811
@end

Non-polarizable embedding

Potential file

The potential file named solvent_npe.pot in this example takes the following form, where all water molecules are treated as non-polarizable.


@environment
units: angstrom
xyz:
O     -5.672000     2.390000    -4.911000  HOH_npe  1  OW
H     -6.099000     2.789000    -4.153000  HOH_npe  1  H1
H     -6.322000     2.449000    -5.611000  HOH_npe  1  H2
O      1.174000     1.993000    -1.482000  HOH_npe  2  OW
H      0.455000     2.074000    -0.855000  HOH_npe  2  H1
H      1.964000     2.142000    -0.963000  HOH_npe  2  H2
.
.
.
O     -7.851000    -3.106000     2.147000  HOH_npe  50  OW
H     -7.879000    -3.950000     1.697000  HOH_npe  50  H1
H     -8.589000    -2.616000     1.786000  HOH_npe  50  H2
@end

@charges
O   -0.83400000  HOH_npe
H    0.41700000  HOH_npe
H    0.41700000  HOH_npe
@end

Polarizable embedding

The following potential file solvent_pe.pot contains most water molecules treated as polarizable and others as non-polarizable.


@environment
units: angstrom
xyz:
O     -5.672000     2.390000    -4.911000  HOH_pe  1  OW
H     -6.099000     2.789000    -4.153000  HOH_pe  1  H1
H     -6.322000     2.449000    -5.611000  HOH_pe  1  H2
O      1.174000     1.993000    -1.482000  HOH_pe  2  OW
H      0.455000     2.074000    -0.855000  HOH_pe  2  H1
H      1.964000     2.142000    -0.963000  HOH_pe  2  H2
.
.
.
O     -6.018000     6.513000     1.666000  HOH_npe  49  OW
H     -6.698000     7.133000     1.402000  HOH_npe  49  H1
H     -5.908000     6.663000     2.605000  HOH_npe  49  H2
@end

@charges
O   -0.67444000  HOH_pe
H    0.33722000  HOH_pe
H    0.33722000  HOH_pe
O   -0.83400000  HOH_npe
H    0.41700000  HOH_npe
H    0.41700000  HOH_npe
@end

@polarizabilities
O    5.73935000   0.00000000   0.00000000   5.73935000   0.00000000   5.73935000  HOH_pe
H    2.30839000   0.00000000   0.00000000   2.30839000   0.00000000   2.30839000  HOH_pe
H    2.30839000   0.00000000   0.00000000   2.30839000   0.00000000   2.30839000  HOH_pe
@end

The polarizability components are listed in the order xx, xy, xz, yy, yz, zz.

References
  1. Tomasi, J., Mennucci, B., & Cammi, R. (2005). Quantum Mechanical Continuum Solvation Models. Chem. Rev., 105(8), 2999–3094. 10.1021/cr9904009
  2. Marenich, A. V., Cramer, C. J., & Truhlar, D. G. (2009). Universal Solvation Model Based on Solute Electron Density and on a Continuum Model of the Solvent Defined by the Bulk Dielectric Constant and Atomic Surface Tensions. J. Phys. Chem. B, 113(18), 6378–6396. 10.1021/jp810292n