Editing
Loop.s
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]], [[Scripts]], [[Scripts for VASP]] This is an example loop for finding the lattice constant of an FCC primitive cell (a rhomboeder: see the figure below for elements appearing in FCC lattice). [[Image:CrystalStructures.png|frame|none|alt=Crystal Structures|Crystal Structures of The Elements (for usual form at room temeperature).]] The loop creates a series of <TT>POSCAR</TT> files with primitive cell size length specified in the <TT>seq</TT> command (3.1 to 4.0 Å with steps of 0.1 Å, i.e. 10 runs). This cell size parameter, cell volume from <TT>OUTCAR</TT> and energy form <TT>OSZICAR</TT> are extracted into the output files. Evaluation using a proper EOS method (preferentially the ''[http://en.wikipedia.org/wiki/Murnaghan_Equation Murnaghan equation]'' or ''Birch-Murnaghan equation'') should follow. '''Important''' Do not use quadratic regression (second order polynom)! - it's not an equation of state (EOS)!! Some tools for the non-linear fitting of Murnaghan Equation are listed online here: [http://courses.cit.cornell.edu/das248/equation_of_state.html Online Resources for Calculating the Equation of State]) '''Note''' In the <TT>INCAR</TT> file, please take care that you set up a rigid calculation - <TT>NSW=1</TT> - and that the electronic density is properly converged - <TT>NELMIN=10</TT>. The <TT>KPOINTS</TT> should define a very dense ''k''-point grid (such as 10x10x10 or more). The script <TT>loop.s</TT> itself: #!/bin/bash #$ -N Cu-lattice #$ -pe c8m24_ompi 8 #$ -cwd #$ -o vasp-ompi.out #$ -e vasp-ompi.err #$ -S /bin/bash . /etc/profile.d/modules.sh module load vasp/5.2 export OMP_NUM_THREADS=1 for L in `seq -f %3.1f 3.2 0.1 4.0` do cat >POSCAR <<! Copper bulk - Cu1 $L 0.500000000000000 0.500000000000000 0.000000000000000 0.000000000000000 0.500000000000000 0.500000000000000 0.500000000000000 0.000000000000000 0.500000000000000 1 Selective dynamics Direct 0.000000000000000 0.000000000000000 0.000000000000000 T T T ! echo "a= $L" mpirun -np $NSLOTS vasp V=`grep "volume " OUTCAR | tail -1 | awk '{print $5}'` E=`tail -1 OSZICAR | awk '{print $5}'` printf "%3.1f %6.2f %13.7f\n" $L $V $E >> SUMMARY-LVE.log printf "%3.1f %13.7f\n" $L $E >> SUMMARY-LE.log printf "%6.2f %13.7f\n" $V $E >> SUMMARY-VE.log cp OSZICAR OSZICAR-$L cp OUTCAR OUTCAR-$L done rm -f CHG* WAVE* --[[User:Dkarhanek|Dkarhanek]] 13:53, 15 December 2010 (CET)
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