Editing
Get-dimer-dir.sh
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
go back to [[Main Page]], [[Computational Resources]], [[Chemistry & More]], [[Computational Codes]], [[VASP]], [[IDM]] or [[Scripts for VASP]] Warning! This version might contain obsolete features. For a newer one please reffer to [[Dimer Method]]. == Description == Use the script "<TT>get-dimer-dir.sh</TT>" (''vide infra'') to process OUTCAR from a VASP frequency job in order to extract the eigenvetors of the hardest imaginary vibrational mode to utilize them in a subsequent IDM run. Use the script as simply as: <nowiki> get-dimer-dir.sh</nowiki> No arguments needed, it reads the OUTCAR (in the current directory!) and creates a '''"TS" up-directory''' with the IDM-ready POSCAR file therein. == Code == <nowiki> #!/bin/bash # Script for extracting the displacement vector of the (lowest) imaginary frequency # from an OUTCAR file in order to setup IDM (Improved Dimer Method) calculation. # David Karhanek, 2011-03-10 @ ICIQ Tarragona # Get basic data from OUTCAR printf " Checking for OUTCAR file... " if [[ -f OUTCAR ]] ; then printf "present, OK.\n" ; else printf "NOT PRESENT! Bye-bye.\n" ; exit ; fi IBRION=`grep IBRION OUTCAR | awk '{print $3}'` if [[ $IBRION -gt "8" || $IBRION -lt "5" ]] ; then printf " However, it is not a frequency job. Bye-Bye.\n" ; exit ; fi VASPVER=`head -1 OUTCAR | cut -c 7` # VASP version check NIONS=`grep NIONS OUTCAR | awk '{print $12}'` # Number of atoms grep -A $(($NIONS+1)) 'cm-1' OUTCAR > temp.tmp # Snip eigenvectors parts of OUTCAR only NVIBS=`grep 'cm-1' temp.tmp | wc -l` # Total nr. of printed frequencies NIMAG=`grep 'f/i' temp.tmp | wc -l` # ... of which so many are imaginary if [[ $VASPVER -lt "5" ]] || [[ $VASPVER -ge "5" && $NWRITE -lt "3" ]] ; then NVIBS=$(($NVIBS/2)) ; NIMAG=$(($NIMAG/2)) ; fi NWRITE=`grep NWRITE OUTCAR | awk '{print $3}'` # Verbosity check - v 5.* needs NWRITE=3 printf " VASP version %1g.*. Total of %3g atoms, %3g vibration modes, %3g imaginary mode(s).\n" $VASPVER $NIONS $NVIBS $NIMAG if [[ $VASPVER -gt "4" && $NWRITE -lt "3" ]] ; then printf " Restart your calculation with NWRITE=3 tag in INCAR! Bye-Bye.\n" ; rm temp.tmp ; exit ; fi # Parse the lowest imaginary mode displacement vector if [[ ! -d ../TS ]] ; then mkdir ../TS ; fi tail -$NIONS temp.tmp | awk '{printf " %12.6f%12.6f%12.6f\n",$4,$5,$6}' > ../TS/DIMERDIRECTION # The file DIMERDIRECTION may be needed for some obsolete implementations of the IDM. cp POSCAR ../TS/ ; echo >> ../TS/POSCAR ; cat ../TS/DIMERDIRECTION >> ../TS/POSCAR rm temp.tmp printf " The POSCAR for IDM was saved into 'TS' up-dir.\n" </nowiki> == Remarks == Note that the <TT>NWRITE=3</TT> is an important setting, as it enables mass-weighted eigenvectors to be printed in the frequency-run OUTCAR. [[User:Dkarhanek|Dkarhanek]] 19:37, 1 June 2011 (CEST)
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information