Generate figures
To map several molecules at once, put together the CONTCAR files (CONT*). Then use this script:
- # # # # # # # # # # # # # # # # # # # # #
- Edited by Rodrigo García, July 10, 2012.#
- This program requires v2kxsf conversor. # <--- Available on https://nano.tu-dresden.de/~jkunstmann/software.html
- Tested on vasp 5.x files #
- Author: David Karhanek #
- # # # # # # # # # # # # # # # # # # # # #
- Batch conversion .pos (POSCAR) to .xsf (XCRYSDEN)
mkdir xsf eps # pos echo "Converting POSCARs to XSF files..." for j in `ls CONT*` ; do
./v2xsf $j # You need the program v2kxsf uncompress $j.xsf.gz # The program automatically compress, so unzip
- Old code fragment
- upu -q '{quiet; layers@create byatom 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 ;\
- layers@delete hard 0; export xsf}' $j > /dev/null
- mv $j $j.pos
done
- EPS Print Preparation
echo "Preparing TCL script for EPS export..." for i in `ls *.xsf` do # resize 640 480
cat >>epsprinting.tcl<<!
scripting::open --xsf $i scripting::displayWindow resize 1200 900 xc_newvalue .mesa 8 0 1.000000 1.000000 1.000000 xc_newvalue .mesa 8 1 0.500000 1.000000 1.000000 xc_newvalue .mesa 8 6 0.750000 0.750000 0.750000 xc_newvalue .mesa 8 22 1.000000 1.000000 1.000000 scripting::displayMode3D BallStick set myParam(COV_SCALE) 1.25 set myParam(FRAMECOL) {10 10 0.50} scripting::load_myParam scripting::display on atomic-labels scripting::display on crystal-cells scripting::buildCrystal 2 2 2 scripting::zoom 15 scripting::printToFile ${i%\.xsf}.eps
! done
- Feel free to modify resize, buildcrystal and zoom parametens
- set myParam(FRAMECOL) {0.00 0.00 0.50}
- you can add those parameters before line 38 (scripting::zoom) :
- scripting::rotate x 45
- scripting::rotate y 45
- scripting::rotate x 45
- xc_translparam set 13 6 2
- xc_translparam set 7 2 5
- etc, see http://www.xcrysden.org/doc/prog/plot_all_MO.sh.html
- EPS Printing
echo "The TCL script 'epsprinting.tcl' is now ready for use with XCrysDen... " echo "" echo "Please wait while XCrysDen generate your figures" sleep 1 xcrysden -s epsprinting.tcl
- Clean up and Exit
- mv *.pos pos/ # old fragment. The original one moves CONTCAR files
mv *.xsf xsf/ mv *.eps eps/ mv epsprinting.tcl xsf/
echo "Finished! Good luck