# Interface to PCMSolver by R. Di Remigio

Code author: Roberto Di Remigio, T. Daniel Crawford, Andrew C. Simmonett

Section author: Roberto Di Remigio

Module: Keywords, PSI Variables, PCMSolver

PSI4 contains code to interface to the PCMSolver library developed by R. Di Remigio and L. Frediani. The PCMSolver library requires no additional licence, downloads, or configuration. The library allows for calculations in solution with the polarizable continuum model (PCM), a continuum solvation model [Tomasi:2005:2999].

## Installation

Binary

- PCMSolver is available as a conda package for Linux and macOS (and Windows, through the Ubuntu shell).

- If using the PSI4 binary, PCMSolver has already been installed alongside.

- If using PSI4 built from source, and anaconda or miniconda has already been installed (instructions at Quick Installation), PCMSolver can be obtained through `conda install pcmsolver -c psi4`. Then enable it as a feature with ENABLE_PCMSolver, hint its location with CMAKE_PREFIX_PATH, and rebuild PSI4 to detect PCMSolver and activate dependent code.

- Previous bullet had details. To build PSI4 from source and use pcmsolver from conda without thinking, consult sec:condapsi4dev.

- To remove a conda installation, `conda remove pcmsolver`.

Source

- If using PSI4 built from source and you want PCMSolver built from from source also, enable it as a feature with ENABLE_PCMSolver, and let the build system fetch and build it and activate dependent code.

## Using the polarizable continuum model

The inclusion of a PCM description of the solvent into your calculation is achieved by setting PCM `true` in your input file. PSI4 understands the additional option |globals__pcm_scf_type| with possible values `total` (the default) or `separate`. The latter forces the separate handling of nuclear and electronic electrostatic potentials and polarization charges. It is mainly useful for debugging.

Note

At present PCM can only be used for energy calculations with SCF wavefunctions and CC wavefunctions in the PTE approximation [Cammi:2009:164104]. All ERI algorithms (`PK`, `OUT_OF_CORE`, `DIRECT`, `DF`, `CD`) are supported.

Warning

The PCMSolver library cannot exploit molecular point group symmetry.

Warning

ROHF with PCM is known not to work. See issue #999 on GitHub. For the adventurous, a fix is available in pull request #953 on GitHub

Warning

Analytic gradients and Hessians are not available with PCM. Finite differences will be used regardless of the `dertype` passed to the `optimize` function. See pcmsolver/opt-fd for a sample input.

The PCM model and molecular cavity are specified in a `pcm` section that has to be explicitly typed in by the user. This additional section follows a syntax that is slightly different from that of PSI4 and is fully documented here

A typical input for a Hartree–Fock calculation with PCM would look like the following:

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33

    molecule NH3 {
    symmetry c1
    N     -0.0000000001    -0.1040380466      0.0000000000
    H     -0.9015844116     0.4818470201     -1.5615900098
    H     -0.9015844116     0.4818470201      1.5615900098
    H      1.8031688251     0.4818470204      0.0000000000
    units bohr
    no_reorient
    no_com
    }

    set {
      basis STO-3G
      scf_type pk
      pcm true
      pcm_scf_type total
    }

    pcm = {
       Units = Angstrom
       Medium {
       SolverType = IEFPCM
       Solvent = Water
       }

       Cavity {
       RadiiSet = UFF
       Type = GePol
       Scaling = False
       Area = 0.3
       Mode = Implicit
       }
    }

More examples can be found in the directories with PCM tests pcmsolver/ccsd-pte, pcmsolver/scf, pcmsolver/opt-fd, pcmsolver/dft, and pcmsolver/dipole.

## Keywords for PCMSolver

### PCM

> PCM boolean for pcmsolver module

> - Type: boolean
> - Default: false

## How to configure PCMSolver for building Psi4

Role and Dependencies

- Role — In PSI4, PCMSolver is a library that provides additional quantum chemical capabilities (solvation modeling).
- Downstream Dependencies — PSI4 (\(\Leftarrow\) optional) PCMSolver
- Upstream Dependencies — PCMSolver \(\Leftarrow\) Fortran, zlib

CMake Variables

- ENABLE_PCMSolver — CMake variable toggling whether Psi4 builds with PCMSolver
- CMAKE_PREFIX_PATH — CMake list variable to specify where pre-built dependencies can be found. For PCMSolver, set to an installation directory containing `include/PCMSolver/pcmsolver.h`
- PCMSolver_DIR — CMake variable to specify where pre-built PCMSolver can be found. Set to installation directory containing `share/cmake/PCMSolver/PCMSolverConfig.cmake`
- CMAKE_DISABLE_FIND_PACKAGE_PCMSolver — CMake variable to force internal build of PCMSolver instead of detecting pre-built
- CMAKE_INSIST_FIND_PACKAGE_PCMSolver — CMake variable to force detecting pre-built PCMSolver and not falling back on internal build

Examples

1. Build bundled

>     >>> cmake -DENABLE_PCMSolver=ON

2. Build without PCMSolver

>     >>> cmake