IBRION=3 bulk optimization: Difference between revisions
No edit summary |
|||
| (16 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
To choose a proper value for the POTIM in case of a IBRION=3 bulk optimization | go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]] | ||
= Procedure = | |||
''See next section for the Script and Executable needed!'' | |||
To choose a proper value for the POTIM in case of a IBRION=3 bulk optimization | |||
1. First you need to perform a frequency calculation, setting in the INCAR file | |||
frequencies: | frequencies: | ||
| Line 7: | Line 15: | ||
NFREE = 2 # | NFREE = 2 # | ||
When this calculation converge you need to | NWRITE = 3 # | ||
'''PLEASE NOTE''': just the degrees of freedom of the investigated bonds must be relaxed. For instance in case of a Cu2O bulk relaxation, I relaxed two neighbour Cu atoms and the O in between. | |||
2. When this calculation converge, based on the POSCAR and OUTCAR of the frequency calculation, you need to execute | |||
getdimer POSCAR OUTCAR POSCAR | |||
which will generate a ''eigenvectors.dat'' file, presenting the following format | |||
Info: 0 | |||
Eigenvalues | |||
-31.491683333336404 -29.378686935390292 -14.997850470930652 -9.6057143126896563 -5.4292953596452289 -1.6881155935524064 -1.3100285123688000 -1.1825456664410310 -0.59115181564548613 | |||
3. Taken the highest eigenvalue, the proper POTIM is given, in this case, by | |||
1/31.491683333336404*0.7=0.0222280909 | |||
where 0.7 is set as a ''control parameter''. | |||
go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]], [[Computational Resources]] | |||
= Script and Executable needed = | |||
''' 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. | |||
''''' 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 | |||
3. Edit the script; change "rgarcia" by your username in this part: | |||
# PART 3 - DIAGONALIZE | |||
/home/rgarcia/bin/exe/dimerdiag | |||
go back to [[Main Page]], [[Group Pages]], [[Núria López and Group]], [[Scripts_for_VASP]], [[Computational Resources]] | |||
Latest revision as of 13:13, 31 October 2018
go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP
Procedure[edit]
See next section for the Script and Executable needed!
To choose a proper value for the POTIM in case of a IBRION=3 bulk optimization
1. First you need to perform a frequency calculation, setting in the INCAR file
frequencies: IBRION = 5 # EDIFF = 1E-7 # POTIM = 0.010 # NFREE = 2 #
NWRITE = 3 #
PLEASE NOTE: just the degrees of freedom of the investigated bonds must be relaxed. For instance in case of a Cu2O bulk relaxation, I relaxed two neighbour Cu atoms and the O in between.
2. When this calculation converge, based on the POSCAR and OUTCAR of the frequency calculation, you need to execute
getdimer POSCAR OUTCAR POSCAR
which will generate a eigenvectors.dat file, presenting the following format
Info: 0 Eigenvalues -31.491683333336404 -29.378686935390292 -14.997850470930652 -9.6057143126896563 -5.4292953596452289 -1.6881155935524064 -1.3100285123688000 -1.1825456664410310 -0.59115181564548613
3. Taken the highest eigenvalue, the proper POTIM is given, in this case, by
1/31.491683333336404*0.7=0.0222280909
where 0.7 is set as a control parameter.
go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP, Computational Resources
Script and Executable needed[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.
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
3. Edit the script; change "rgarcia" by your username in this part:
# PART 3 - DIAGONALIZE /home/rgarcia/bin/exe/dimerdiag
go back to Main Page, Group Pages, Núria López and Group, Scripts_for_VASP, Computational Resources