Topological Analysis using xTB and Multiwfn

This is a short guide to perform electron density topological analysis using the Bader QTAIM theory.

Software:

(both software are expected to be run in Linux from the prompt)

xTB: Semiempirical Extended Tight-Binding Program Package.

References:

  • C. Bannwarth, E. Caldeweyher, S. Ehlert, A. Hansen, P. Pracht, J. Seibert, S. Spicher, S. Grimme WIREs Comput. Mol. Sci., 2020, 11, e01493. DOI: 10.1002/wcms.1493 (pdf)
  • S. Grimme, C. Bannwarth, P. Shushkov, J. Chem. Theory Comput., 2017, 13, 1989-2009. DOI: 10.1021/acs.jctc.7b00118 (pdf)
  • C. Bannwarth, S. Ehlert and S. Grimme., J. Chem. Theory Comput., 2019, 15, 1652-1671. DOI: 10.1021/acs.jctc.8b01176 (pdf)
  • P. Pracht, E. Caldeweyher, S. Ehlert, S. Grimme, ChemRxiv, 2019, preprint. DOI: 10.26434/chemrxiv.8326202.v1 (pdf)

Multiwfn: an extremely powerful program for realizing electronic wavefunction analysis.

References:

Information:

Steps:

  • Generate XYZ file for your system, ex. structure.xyz.
  • Create an input file for xTB, in_xtb.inp (link):

$scc
     temp=0
$write
    output file=properties.out
    json=true
    esp=true
   density=true
   spin population=true
   spin density=true
   mos=true
   wiberg=true
  charges=true
   mulliken=false

  • Run xTB calculation with the --molden option (to generate the wavefunctions file in MOLDEN format):

xtb  --input in_xtb.inp structure.xyz  --molden --pop --opt [level] > output.log &

The option --opt is for geometry optimization and [level] is related to the accuracy (if not defined, the default level ‘normal’ is used).

The option --pop is to export the atom charges.

The maximum number of optimization cycles is 200. To increase this number, add the option --cycles integer where integer is the new number of cycles.

  • To run xTB in parallel, to variable need to be exported with the number of processors to use. The example below is for running using 4 processors:
export OMP_NUM_THREADS=4,1
export MKL_NUM_THREADS=4
  • Run Multiwfn with wavefunction file as input.

Multiwfn wavefunction_file

Tips:

  • You can put all the desired options for Multiwfn calculations in a file Topological_analysis.inp (link), and load it once from command line:

Multiwfn wavefunction_file < Topological_analysis.inp > output_Multiwfn.out

  • For running both calculation at once, create a bash script Topological_analysis_scripts.sh with the text bellow (link), and run it as ./Topological_analysis_scripts.sh filename &.

#!/bin/bash

export OMP_NUM_THREADS=4,1
export MKL_NUM_THREADS=4            # 4 is the number of cores used (you can change it to your specific value

clear                                    # clean screen
if [ -z $1 ]                          # Check if the argument with the filename (without extension) exist.
      then
          echo “Use:”
         echo “script_name input_system_name”
         echo
     else
            Filename=$1

xtb --input in_xtb.inp $Filename.xyz --molden --pop --opt [level] > $Filename.xtb.log
mv molden.input $Filename.molden
mv properties.out $Filename.properties.out

Multiwfn $Filename.molden < Topological_analysis.in > $Filename.xtb_Multiwfn.out
fi