Psi4 Project Logo

Counterpoise Correct

Code author: Daniel G. A. Smith

_nbody_gufunc(func, method_string[, molecule, bsse_type, max_nbody, ptype, return_total_data])[source]

Computes the nbody interaction energy, gradient, or Hessian depending on input. This is a generalized univeral function for computing interaction quantities.


return type of func – The interaction data.


(float, Wavefunction) – interaction data and wavefunction with energy/gradient/hessian set appropriately when return_wfn specified.

  • func (function) –

    energy || etc.

    Python function that accepts method_string and a molecule. Returns a energy, gradient, or Hessian as requested.

  • method_string (string) –

    'scf' || 'mp2' || 'ci5' || etc.

    First argument, lowercase and usually unlabeled. Indicates the computational method to be passed to func.

  • molecule (molecule) –

    h2o || etc.

    The target molecule, if not the last molecule defined.

  • return_wfn (boolean) –

    'on' || \Rightarrow 'off' \Leftarrow

    Indicate to additionally return the Wavefunction calculation result as the second element of a tuple.

  • bsse_type (string or list) –

    'cp' || ['nocp', 'vmfc'] || \Rightarrow None \Leftarrow || etc.

    Type of BSSE correction to compute: CP, NoCP, or VMFC. The first in this list is returned by this function. By default, this function is not called.

  • max_nbody (int) –

    3 || etc.

    Maximum n-body to compute, cannot exceed the number of fragments in the moleucle.

  • ptype (string) –

    'energy' || 'gradient' || 'hessian'

    Type of the procedure passed in.

  • return_total_data (boolean) –

    'on' || \Rightarrow 'off' \Leftarrow

    If True returns the total data (energy/gradient/etc) of the system, otherwise returns interaction data.

The nbody function computes counterpoise-corrected (CP), non-CP (noCP), and Valiron-Mayer Function Couterpoise (VMFC) interaction energies for complexes composed of arbitrary numbers of monomers.

Examples :

# Counterpoise corrected CCSD(T) energy for the Helium dimer
molecule mol {
  He 1 3

energy('CCSD(T)', bsse_type='cp')

# noCP, VMFC, and CP energy for a helium cluster, limited at 3 bodies
molecule mol {
  He 0 0 0
  He 0 0 4
  He 0 4 0
  He 4 0 0

# Returns the nocp energy as its first in the list
energy('CCSD(T)', bsse_type=['nocp', 'cp', 'vmfc'], max_nbody=3)