IDM: Difference between revisions
mNo edit summary |
|||
| (41 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
go back to [[Main Page]], [[Computational Resources]], [[Chemistry & More]], [[Computational Codes]], [[VASP]] | go back to [[Main Page]], [[Computational Resources]], [[Chemistry & More]], [[Computational Codes]], [[VASP]], [[Scripts for VASP]] | ||
= | = Instructions = | ||
Before start, please read about the Improved Dimer Method by Henkelman & Jónsson [https://aip.scitation.org/doi/10.1063/1.480097] and implemented in VASP by Heyden[http://dx.doi.org/10.1063/1.2104507]. Then kindly follow the procedures detailed here: | |||
1. Generate your initial guess for the structure (POSCAR). To this end, you can either pre-converge with a NEB calculation, or do it by hand. | |||
2. Be sure the metal or solid phase is frozen and the molecule is relaxed. Do a frequency calculation based on your initial guess. Specify the following in your INCAR file: | |||
== | frequencies: | ||
IBRION = 5 # | |||
EDIFF = 1E-6 # | |||
POTIM = 0.010 # | |||
NFREE = 2 # | |||
3. Based on your POSCAR and OUTCAR of the frequencies calculation, generate in a new folder the input of the IDM with the getdimer script. For example: | |||
getdimer ../freq/POSCAR ../freq/OUTCAR POSCAR | |||
4. Specify the following in your INCAR file: | |||
improved dimer method: | |||
IBRION = 44 # IDM | |||
EDIFF = 1E-6 # | |||
EDIFFG = -0.030 # use force criteria | |||
POTIM = 0.050 # Between 0.010 and 0.100. | |||
NFREE = 2 # Between 2&5 | |||
FINDIFF= 2 # | |||
DIMER_DIST=0.010 # | |||
MINROT = 0.010 # | |||
STEP_SIZE= 0.010 # | |||
STEP_MAX= 0.100 # | |||
NSW = 100 # Never use more than 200. Check periodically for divergence. | |||
( | 5. To check that it is converging well, (1) check with p4vasp that all forces are small, and (2) check that the curvature is always negative. Normal values are between -1.0 and -30.0: | ||
grep curv OUTCAR | |||
= | = Script and Executable = | ||
''' Instructions ''' | |||
1. Download the program [[Image:dimerdiag.tgz]]. Extract it and put it in your ~/bin/exe/ folder | |||
2. Copy the script in the ~/bin folder. Recommended name: getdimer. | |||
3. Edit the script; change "rgarcia" by your username in this part: | |||
: | |||
# PART 3 - DIAGONALIZE | |||
/home/rgarcia/bin/exe/dimerdiag | |||
: | 4. Now you can go to any folder and generate your dimer: | ||
$ getdimer <input:POSCAR> <input:OUTCAR> <output:POSCAR> | |||
''''' SCRIPT ''''' | |||
#!/bin/bash | |||
# | |||
# Generates the POSCAR of a dimer calculation from the non mass-weighted Hessian matrix | |||
# Rodrigo García-Muelas | |||
# November 14th, 2014 - Created | |||
# March 9th, 2015 - Debugged 1 (Thanks to Marçal & Luca) | |||
# | |||
# Use with VASP 5.x or higher | |||
# | |||
# INPUT | |||
# $1 Path of the POSCAR file containing the coordinates | |||
# $2 Path of the OUTCAR file containing the frequencies of the structure | |||
# $3 <OUTPUT> POSCAR file | |||
# | |||
# PART 0 - SECURITY CHECKS | |||
if [ -e $3 ] ; then | |||
echo "Warning! $3 already exist. Overwrite? (y/Y for yes)" | |||
read overwrite | |||
case $overwrite in | |||
y|Y|Yes|yes|YES) echo "$3 will be overwriten" ;; | |||
*) echo "No actions taken " ; exit 1 ;; | |||
esac | |||
fi | |||
IBRION=`grep IBRION $2 | awk '{print $3}'` | |||
if <tt><nowiki> [[ </nowiki></tt> $IBRION -gt "8" || $IBRION -lt "5" ]] ; then | |||
echo "$2 is not an OUTCAR of a frequency job." | |||
echo "No actions taken" ; exit 1 ; fi | |||
# PART 1 - READ POSCAR AND PREPARE INPUTS | |||
cp $1 diagonalizer_poscar.tmp | |||
# PART 2 - READ OUTCAR | |||
grep "Degrees of freedom DOF " $2 > temp01.tmp | |||
freedom=`awk '{print $6}' temp01.tmp` | |||
echo "$freedom" > diagonalizer_matrix.tmp | |||
grep -A $(($freedom+2)) 'SECOND DERIVATIVES' $2 > temp02.tmp | |||
cut -b 5- temp02.tmp > temp03.tmp | |||
tail -n $freedom temp03.tmp >> diagonalizer_matrix.tmp | |||
# PART 3 - DIAGONALIZE | |||
/home/rgarcia/bin/exe/dimerdiag | |||
# PART 4 - CLEAN | |||
head -n 9 $1 > $3 | |||
cat diagonalizer_taildm.tmp >> $3 | |||
mv -f diagonalizer_output.tmp eigenvectors.dat | |||
rm -fv *.tmp | |||
= Alternative (old) versions = | |||
WARNING: Some of the topics discussed by David Karhánek are outdated. For instance, it is not necessary to set NWRITE=3 for the frequency calculation: [[IDM-IRC]] [[get-dimer-dir.sh]] [[get-irc-path.sh]] (''by David Karhanek'') | |||
--[[User:Rgarcia|Rgarcia]] 12:32, 18 November 2014 (CET) | |||
go back to [[Main Page]], [[Computational Resources]], [[Chemistry & More]], [[Computational Codes]], [[VASP]], [[Scripts for VASP]] | |||
Latest revision as of 18:20, 5 November 2019
go back to Main Page, Computational Resources, Chemistry & More, Computational Codes, VASP, Scripts for VASP
Instructions[edit]
Before start, please read about the Improved Dimer Method by Henkelman & Jónsson [1] and implemented in VASP by Heyden[2]. Then kindly follow the procedures detailed here:
1. Generate your initial guess for the structure (POSCAR). To this end, you can either pre-converge with a NEB calculation, or do it by hand.
2. Be sure the metal or solid phase is frozen and the molecule is relaxed. Do a frequency calculation based on your initial guess. Specify the following in your INCAR file:
frequencies: IBRION = 5 # EDIFF = 1E-6 # POTIM = 0.010 # NFREE = 2 #
3. Based on your POSCAR and OUTCAR of the frequencies calculation, generate in a new folder the input of the IDM with the getdimer script. For example:
getdimer ../freq/POSCAR ../freq/OUTCAR POSCAR
4. Specify the following in your INCAR file:
improved dimer method: IBRION = 44 # IDM EDIFF = 1E-6 # EDIFFG = -0.030 # use force criteria POTIM = 0.050 # Between 0.010 and 0.100. NFREE = 2 # Between 2&5 FINDIFF= 2 # DIMER_DIST=0.010 # MINROT = 0.010 # STEP_SIZE= 0.010 # STEP_MAX= 0.100 # NSW = 100 # Never use more than 200. Check periodically for divergence.
5. To check that it is converging well, (1) check with p4vasp that all forces are small, and (2) check that the curvature is always negative. Normal values are between -1.0 and -30.0:
grep curv OUTCAR
Script and Executable[edit]
Instructions
1. Download the program File:Dimerdiag.tgz. Extract it and put it in your ~/bin/exe/ folder
2. Copy the script in the ~/bin folder. Recommended name: getdimer.
3. Edit the script; change "rgarcia" by your username in this part:
# PART 3 - DIAGONALIZE /home/rgarcia/bin/exe/dimerdiag
4. Now you can go to any folder and generate your dimer:
$ getdimer <input:POSCAR> <input:OUTCAR> <output:POSCAR>
SCRIPT
#!/bin/bash
#
# Generates the POSCAR of a dimer calculation from the non mass-weighted Hessian matrix
# Rodrigo García-Muelas
# November 14th, 2014 - Created
# March 9th, 2015 - Debugged 1 (Thanks to Marçal & Luca)
#
# Use with VASP 5.x or higher
#
# INPUT
# $1 Path of the POSCAR file containing the coordinates
# $2 Path of the OUTCAR file containing the frequencies of the structure
# $3 <OUTPUT> POSCAR file
#
# PART 0 - SECURITY CHECKS
if [ -e $3 ] ; then
echo "Warning! $3 already exist. Overwrite? (y/Y for yes)"
read overwrite
case $overwrite in
y|Y|Yes|yes|YES) echo "$3 will be overwriten" ;;
*) echo "No actions taken " ; exit 1 ;;
esac
fi
IBRION=`grep IBRION $2 | awk '{print $3}'`
if [[ $IBRION -gt "8" || $IBRION -lt "5" ]] ; then
echo "$2 is not an OUTCAR of a frequency job."
echo "No actions taken" ; exit 1 ; fi
# PART 1 - READ POSCAR AND PREPARE INPUTS
cp $1 diagonalizer_poscar.tmp
# PART 2 - READ OUTCAR
grep "Degrees of freedom DOF " $2 > temp01.tmp
freedom=`awk '{print $6}' temp01.tmp`
echo "$freedom" > diagonalizer_matrix.tmp
grep -A $(($freedom+2)) 'SECOND DERIVATIVES' $2 > temp02.tmp
cut -b 5- temp02.tmp > temp03.tmp
tail -n $freedom temp03.tmp >> diagonalizer_matrix.tmp
# PART 3 - DIAGONALIZE
/home/rgarcia/bin/exe/dimerdiag
# PART 4 - CLEAN
head -n 9 $1 > $3
cat diagonalizer_taildm.tmp >> $3
mv -f diagonalizer_output.tmp eigenvectors.dat
rm -fv *.tmp
Alternative (old) versions[edit]
WARNING: Some of the topics discussed by David Karhánek are outdated. For instance, it is not necessary to set NWRITE=3 for the frequency calculation: IDM-IRC get-dimer-dir.sh get-irc-path.sh (by David Karhanek)
--Rgarcia 12:32, 18 November 2014 (CET)
go back to Main Page, Computational Resources, Chemistry & More, Computational Codes, VASP, Scripts for VASP