Gaussian: BSSE calculation

Basis set superposition error

       Basis set superposition error (BSSE) is an important key you probably have to consider for your intermolecular system. Technically, we can apply the counterpoise correction for a single molecule by dividing it into two fragments and BSSE can be computed from the total single energy. 

        Herein, I studied the role of the size of the basis set in BSSE for density functional theory (DFT). The simplest model is a water cluster. I simulated monomer and dimer water and computed the geometry optimization to search their ground state using different basis sets: 3-21G and aug-cc-pVTZ. All calculations were performed using Gaussian09 software and molecular visualizations were done by Gaussview software. Then I compared the total energy of two water dimer systems, where one system was done with BSSE correction, but the other was not. The counterpoise parameters of this model were approximated.

Keywords: Dispersion correction, Effect of basis set, BSSE

∆E(AB) = E(AB|AB) − E(AB|A) − E(AB|B)                BSSE correction

∆E(AB) = E(AB|AB) − E(A|A)  − E(B|B)                 No BSSE correction

Counterpoise BSSE  =  ∆E(BSSE) - ∆E(No-BSSE)

where E(a|b) denote Energy of optimized geometry of b calculated using basis set a. [1]


Model system and computational details

Method: HF, MP2, and DFT

Functional (for DFT): B3LYP with and without dispersion correction [2]

Basis set: - 3-21G (small) and aug-cc-PVTz (big)


Ex. of Gaussian's input file for BSSE calculation

%chk=dimer-water-b3lyp-bigbasis-bsse.chk 

%mem=800MW 

%nproc=2 

#p Opt Freq SCF(tight) B3LYP/aug-cc-PVTz  gfinput counterpoise=2    ! Input calculation setting deck


BSSE Correction: water dimer

 

0 1 0 1 0 1                                                ! Charge and Multiplicity for whole system,  

O       -0.006859   -1.448901    0.000000,1                ! fragment, 1 and fragment 2, respectively. 

H       -0.411233   -1.840395    0.754906,1 

H       -0.411233   -1.840395   -0.754906,1 

O       -0.006859    1.588958    0.000000,2 

H        0.056868    0.646169    0.000000,2 

H        0.875345    1.914160    0.000000,2



Ex. Comparison of water molecules for before and after optimization.

Water structure for before (left) and after (right) optimization using Density Functional Theory (DFT) calculation for a single water molecule. 


Ex. 3D Optimized structure of dimer water system calculated at B3LYP/aug-cc-pvtz

    This dimer water molecule was carried out using DFT calculation at the level of B3LYP/aug-cc-PVTZ. The selected structural parameter of interest is the bond distance between the oxygen atom and hydrogen on an adjacent molecule which is about 0.9 angstroms. The interaction between those is a hydrogen bond.


Computational results

    The data below is the calculated total energies and different energies as well as a comparison of counterpoise BSSE in A.U. and kcal/mol.

Example of an analyzed BSSE calculation using my homemade script to extract computed energy.

Run by nutt at black.localdomain on Wed Jul  5 18:49:35 +07 2017 

--------------------------------------------------------------------------------------------------------------

File Name: ./hf-small/dimer-hf-small-bsse.log    Standard basis: 3-21G (6D, 7F)

E(AB|AB)  =  -151.189403605  A.U.

 E(AB|A)  =  -75.5930128444  A.U.

 E(AB|B)  =  -75.5867354514  A.U.

 E(A|A)   =  -75.5859247853  A.U.

 E(B|B)   =  -75.5859153974  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0096553092  A.U.  =  -6.0587354889276  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0175634223  A.U.  =  -11.0211001835169  kcal/mol

Counterpoise BSSE = .0079081131  A.U.  =  4.9623646945893  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./hf-big/dimer-hf-big-bsse.log    Standard basis: Aug-CC-pVTZ (5D, 7F)

E(AB|AB)  =  -152.128367980  A.U.

 E(AB|A)  =  -76.0612614459  A.U.

 E(AB|B)  =  -76.0612241877  A.U.

 E(A|A)   =  -76.0612000125  A.U.

 E(B|B)   =  -76.0611851156  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0058823464  A.U.  =  -3.6911900130392  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0059828519  A.U.  =  -3.7542575158057  kcal/mol

Counterpoise BSSE = .0001005055  A.U.  =  .0630675027665  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./dft-big/dimer-dft-big-bsse.log    Standard basis: Aug-CC-pVTZ (5D, 7F)

E(AB|AB)  =  -152.939679072  A.U.

 E(AB|A)  =  -76.4662439466  A.U.

 E(AB|B)  =  -76.4661663671  A.U.

 E(A|A)   =  -76.4661927076  A.U.

 E(B|B)   =  -76.4661343916  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0072687583  A.U.  =  -4.5611676395249  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0073519728  A.U.  =  -4.6133849879184  kcal/mol

Counterpoise BSSE = .0000832145  A.U.  =  .0522173483935  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./dft-big/dimer-dft-vdw-big-bsse.log    Standard basis: Aug-CC-pVTZ (5D, 7F)

E(AB|AB)  =  -152.940860116  A.U.

 E(AB|A)  =  -76.4662529092  A.U.

 E(AB|B)  =  -76.4661784556  A.U.

 E(A|A)   =  -76.4662001779  A.U.

 E(B|B)   =  -76.4661462431  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0084287512  A.U.  =  -5.2890666642536  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0085136950  A.U.  =  -5.3423691535850  kcal/mol

Counterpoise BSSE = .0000849438  A.U.  =  .0533024893314  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./dft-small/dimer-dft-small-bsse.log    Standard basis: 3-21G (6D, 7F)

E(AB|AB)  =  -151.969280289  A.U.

 E(AB|A)  =  -75.9826456042  A.U.

 E(AB|B)  =  -75.9748224415  A.U.

 E(A|A)   =  -75.9739148995  A.U.

 E(B|B)   =  -75.9738721616  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0118122433  A.U.  =  -7.4122181074799  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0214932279  A.U.  =  -13.4870649869337  kcal/mol

Counterpoise BSSE = .0096809846  A.U.  =  6.0748468794538  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./dft-small/dimer-dft-vdw-small-bsse.log    Standard basis: 3-21G (6D, 7F)

E(AB|AB)  =  -151.970535444  A.U.

 E(AB|A)  =  -75.9827298506  A.U.

 E(AB|B)  =  -75.9748530475  A.U.

 E(A|A)   =  -75.9739230221  A.U.

 E(B|B)   =  -75.9738846171  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0129525459  A.U.  =  -8.1277614098877  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0227278048  A.U.  =  -14.2617656954144  kcal/mol

Counterpoise BSSE = .0097752589  A.U.  =  6.1340042855267  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./mp2-small/dimer-mp2-small-bsse.log    Standard basis: 3-21G (6D, 7F)

E(AB|AB)  =  -151.189403605  A.U.

 E(AB|A)  =  -75.5930128444  A.U.

 E(AB|B)  =  -75.5867354515  A.U.

 E(A|A)   =  -75.5859247853  A.U.

 E(B|B)   =  -75.5859153975  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0096553091  A.U.  =  -6.0587354261773  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0175634222  A.U.  =  -11.0211001207666  kcal/mol

Counterpoise BSSE = .0079081131  A.U.  =  4.9623646945893  kcal/mol

--------------------------------------------------------------------------------------------------------------

File Name: ./mp2-big/dimer-mp2-big-bsse.log    Standard basis: Aug-CC-pVTZ (5D, 7F)

E(AB|AB)  =  -152.128367980  A.U.

 E(AB|A)  =  -76.0612614459  A.U.

 E(AB|B)  =  -76.0612241877  A.U.

 E(A|A)   =  -76.0612000125  A.U.

 E(B|B)   =  -76.0611851156  A.U.

Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  -.0058823464  A.U.  =  -3.6911900130392  kcal/mol

Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  -.0059828519  A.U.  =  -3.7542575158057  kcal/mol

Counterpoise BSSE = .0001005055  A.U.  =  .0630675027665  kcal/mol

--------------------------------------------------------------------------------------------------------------


Code script.

#!/bin/bash

# Written by Rangsiman Ketkaew, CompChem TU, June, 2017

# Usage: $ chmod +x ./calc_bsse.sh

#      : $ ./calc_bsse.sh

read -p "Enter Your Gaussian Output: " file

who=`whoami`

node=`hostname`

now=`date`

where=`pwd`

if [ -e $file ]; then

echo "

---------------------------------------- BSSE Energy Extraction -----------------------------------------

Run by $who at $node on $now

---------------------------------------------------------------------------------------------------------

" > $where/results.BSSE.$file.txt

#echo "We are at $where"

#for f in `find ./ -name "*bsse*.log"`

bs=`grep 'Standard basis' $file|tail -1`

for f in $file

  do

  echo "File Name: $f   $bs" >> $where/results.BSSE.$file.txt

  E_AB_AB=`grep 'SCF D' $f | awk '{print $5}'|tail -5|sed -n '1p'`

  E_AB_A=`grep 'SCF D' $f | awk '{print $5}'|tail -5|sed -n '2p'`

  E_AB_B=`grep 'SCF D' $f | awk '{print $5}'|tail -5|sed -n '3p'`

  E_A_A=`grep 'SCF D' $f | awk '{print $5}'|tail -5|sed -n '4p'`

  E_B_B=`grep 'SCF D' $f | awk '{print $5}'|tail -5|sed -n '5p'`

  echo -e "E(AB|AB)  =  $E_AB_AB  A.U.\n" \

   "E(AB|A)  =  $E_AB_A  A.U.\n" \

   "E(AB|B)  =  $E_AB_B  A.U.\n" \

   "E(A|A)   =  $E_A_A  A.U.\n" \

   "E(B|B)   =  $E_B_B  A.U." >> $where/results.BSSE.$file.txt

  deltaE_bsse=`echo $E_AB_AB - $E_AB_A - $E_AB_B | bc -l` ; deltaE_bsse_con=`expr $deltaE_bsse*627.503 | bc -l`

  deltaE_norm=`echo $E_AB_AB - $E_A_A - $E_B_B |bc -l` ; deltaE_norm_con=`expr $deltaE_norm*627.503 | bc -l`

  cp_bsse=`echo $deltaE_bsse - $deltaE_norm | bc -l` ; cp_bsse_con=`expr $cp_bsse*627.503 | bc -l`

  echo "Diff Energy with BSSE     =  E(AB|AB) - E(AB|A) - E(AB|B) =  $deltaE_bsse  A.U.  =  $deltaE_bsse_con  kcal/mol" \

  >> $where/results.BSSE.$file.txt

  echo "Diff Energy without BSSE  =  E(AB|AB) - E(A|A) - E(B|B)   =  $deltaE_norm  A.U.  =  $deltaE_norm_con  kcal/mol" \

  >> $where/results.BSSE.$file.txt

  echo "Counterpoise BSSE = $cp_bsse  A.U.  =  $cp_bsse_con  kcal/mol" \

  >> $where/results.BSSE.$file.txt

  #echo $E_AB_AB - $E_AB_A - $E_AB_B | bc -l

  echo -e "---------------------------------------------------------------------------------------------------------\n" \

  >> $where/results.BSSE.$file.txt

 done

 echo "Congrats !!! Please check file results.BSSE.$file.txt"

else

 echo "Error !!! File $file does not exist."


References.


Rangsiman Ketkaew