Skip to content

Multiwfn#

Multiwfn short introduction#

  1. Make Multiwfn input .mwfn, .wfn, .wfx, .fch, .molden, .gms (or .cub, .grd, .pdb, .xyz, .mol - for specific purposes).

  2. Run Multiwfn in interactive mode

    Bash
    srun --pty bash
    module load rocky8/all
    module load multiwfn
    
    Multiwfn <job.name>
    
    answers for Critical Points (CPs) search output
    Bash
    Multiwfn  hf.wfn  << EOF > /dev/null
    2      <- Topological analysis
    2      <- Search CPs from nuclear positions
    3      <- Search CPs from midpoint of atom pairs
    0      <- Print and visualize all generated CPs, paths and surfaces
    -4     <- Modify or export CPs (critical points)
    -1     <- Print summary of CPs (in Angstrom)
    4      <- Save CPs to CPs.txt in current folder
    6      <- Export CPs as CPs.pdb file in current folder
    0      <- Return
    7      <- Show real space function values at specific CP or all CPs
    0      <- If input 0, then properties of all CPs will be outputted to CPprop.txt in current folder
    -10    <- Return
    100    <- Other functions
    2      <- Export various files 
    1      <- Output current structure to .pdb file
    mol.pdb <- File name
    q   <- Exit program gracefully
    EOF
    

    or with multiwfn.slurm batch script as a non-interactive mode with pre-prepared responses:

    Bash
    #!/bin/bash
    #SBATCH --nodes=1
    #SBATCH --ntasks=1
    #SBATCH --job-name=test
    #SBATCH --mem=2GB
    #SBATCH -t 10:00
    #SBATCH --partition=short
    
    module load rocky8/all
    module load multiwfn 
    
    Multiwfn  hf.wfn  << EOF > /dev/null
    
    ***ANSWERS***
    
    q
    EOF
    

    In this case job is submitted using sbatch command:

    Bash
    sbatch multiwfn.slurm
    
  3. Visualize results if needed using ondemand.hpc.taltech.ee and VMD

    Bash
    module load rocky8-spack
    module load vmd
    vmd job.pdb
    

    NB! It is recommended to visualize Multiwfn results in VMD program, corresponding scripts are provided in Multiwfn examples (/gpfs/mariana/software/green/MultiWFN/Multiwfn_3.7_bin_Linux/examples/).

Multiwfn long version#

Options#

Multiwfn is an interactive program performing almost all of important wavefunction analyszes (showing molecular structure and orbitals, calculating real space function, topology analysis, population analysis, orbital composition analysis, bond order/strength analysis, plotting population density-of-states, plotting various kinds of spectra (including conformational weighted spectrum), quantitative analysis of molecular surface, charge decomposition analysis, basin analysis, electron excitation analyses, orbital localization analysis, visual study of weak interaction, conceptual density functional theory (CDFT) analysis, energy decomposition analysis).

For many frequently used analyszes Multiwfn has short youtube videos and "quick start" examples (/gpfs/mariana/software/green/MultiWFN/Multiwfn_3.7_bin_Linux/examples/). More information can be found in the manual.

Input#

As an input Multiwfn uses output files of other quantum chemistry programs, including Gaussian, ORCA, GAMESS-US, NWChem, xtb, Turbomole. For example, .wfn (wavefunction file), .fch (Gaussian check file), .molden (Molden input file), .gms (GAMESS-US output file), .mwfn (Multiwfn wavefunction file). Other types of files, such as such as .cub, .grd, .pdb, .xyz, .log, .out and .mol files, may be used in certain cases and purposes.

Environment#

Environment is set up by the commands:

Bash
module load rocky8/all
module load multiwfn

The first time use, user has to agree to the licenses:

Bash
touch ~/.licenses/multiwfn-accepted 

if this is the first user license agreement, the following commands should be given:

Bash
mkdir .licenses
touch ~/.licenses/multiwfn-accepted 

NB! After agreeing to the license, user has to log out and log in again to be able run Multiwfn.

Running Multiwfn#

NB! Since Multiwfn has a lot of functionality, we recommend that the user first study the corresponding section in the manuals (text, video) or examples (/gpfs/mariana/software/green/MultiWFN/Multiwfn_3.7_bin_Linux/examples/). This will greatly simplify the selection of answers in the interactive menu.

The best practice is to try to reproduce something from the examples folder. To do this, the corresponding files will need to be copied to the user's derictory using the following commands:

Bash
mkdir examples
cp -r /gpfs/mariana/software/green/MultiWFN/Multiwfn_3.7_bin_Linux/examples/* examples/

NB! The user can run Multiwfn only from his own folder, not from the shared.

For jobs connected to electron density analysis especially in large systems it is recommended to run multiwfn.slurm batch script with pre-prepared responses. Below is shown slurm script for Critical Points (CPs) search using job.wfn:

Bash
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --job-name=test
#SBATCH --mem=2GB
#SBATCH -t 10:00
#SBATCH --partition=short

module load rocky8/all
module load multiwfn 

Multiwfn  hf.wfn  << EOF > /dev/null
2    <- Topological analysis
2    <- Search CPs from nuclear positions
3    <- Search CPs from midpoint of atom pairs
0    <- Print and visualize all generated CPs, paths and surfaces
-4    <- Modify or export CPs (critical points)
-1    <- Print summary of CPs (in Angstrom)
4    <- Save CPs to CPs.txt in current folder   
6    <- Export CPs as CPs.pdb file in current folder
0    <- Return
7       <- Show real space function values at specific CP or all CPs
0       <- If input 0, then properties of all CPs will be outputted to CPprop.txt in current folder
-10    <- Return
100 <- Other functions
2   <- Export various files 
1   <- Output current structure to .pdb file
mol.pdb <- File name
q
EOF

Job is submitted by sbatch command:

Bash
sbatch multiwfn.slurm   

Results visualization#

Although Multiwfn has its own graphical interface, we recommend to visualize Multiwfn results in VMD (Visual Molecular Dynamics) program, corresponding scripts are provided in Multiwfn examples (/gpfs/mariana/software/green/MultiWFN/Multiwfn_3.7_bin_Linux/examples/) (with .vmd extensions). For visualisation we recommend to use ondemand.hpc.taltech.ee. More about ondemand use and VMD.

VMD environment is set up by the commands:

Bash
module load rocky8-spack
module load vmd

VMD is run by command vmd:

Bash
vmd job.pdb

How to cite:#

Citing the original paper of Multiwfn is mandatory - DOI: 10.1002/jcc.22885

In addition, the following articles should be cited depending on the analyzes performed: