#! /bin/bash # Run this script anywhere to install dftp+ automatically in /share/apps/dftb+. Need to run this script as su. # Proven to work on Rocks Linux 5.4 #Prerequisite: #Intel ifort and mkl library has to be installed first. They are assumed to be installed in /share/apps/intel/Compiler/11.1/072/ #To install intel ifort and mkl library 11.1.072, run the script http://www2.fizik.usm.my/configrepo/howto/instalintel.sh, http://www2.fizik.usm.my/configrepo/howto/instalintel.sh2. # While installation, it may complain of not finding libstdc++.so.5. It can be solved by yum install compat-libstdc++-33.x86_64. Reference: http://stackoverflow.com/questions/3731384/libstdc-so-5-cannot-open-shared-object-file-but-library-is-installed-and-up mkdir /share/apps/dftb+ cd /share/apps/dftb+ wget http://www2.fizik.usm.my/configrepo/howto/dftb+/dftbp_snapshot-081217_autotest.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/dftbp_snapshot-081217_src.tar.gz tar -xzvf dftbp_snapshot-081217_autotest.tar.gz tar -xzvf dftbp_snapshot-081217_src.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/manual.pdf wget http://www2.fizik.usm.my/configrepo/howto/dftb+/band_struct.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/first_calc.tar.gz tar xvfz band_struct.tar.gz tar xvfz first_calc.tar.gz # Rename autotest folder and move all SK files into /autotest/slako. Unzip these SK files here. mv dftb+_snapshot-081217_autotest autotest cd autotest/slako wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/hyb-0-1.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/mio-0-1.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/pbc-0-1.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/rare-0-1.tgz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/matsci-0-1.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/trans3d-0-1.tar.gz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/pbc-0-2.tgz wget http://www2.fizik.usm.my/configrepo/howto/dftb+/SKFiles/znorg-0-1.tar.gz rm index.* tar xvfz hyb-0-1.tar.gz tar xvfz mio-0-1.tar.gz tar xvfz pbc-0-1.tar.gz tar xvfz rare-0-1.tgz tar xvfz matsci-0-1.tar.gz tar xvfz trans3d-0-1.tar.gz tar xvfz pbc-0-2.tgz tar xvfz znorg-0-1.tar.gz rm *.tar.gz *tgz *.tar.gz.* *tgz.* cd /share/apps/dftb+/dftb+_snapshot-081217_src wget http://www2.fizik.usm.my/configrepo/howto/dftb+/Makefile.user.worked.sa cp Makefile.user.worked.sa Makefile.user cd /share/apps/dftb+/dftb+_snapshot-081217_src/prg_dftb make distclean make mkdir /share/apps/local/bin cd /share/apps/local/bin ln -s /share/apps/dftb+/dftb+_snapshot-081217_src/prg_dftb/_obj_i686-linux-ifort/dftb+ . echo 'export PATH=/share/apps/local/bin:$PATH' >> /root/.bashrc cd /share/apps/dftb+/dftb+_snapshot-081217_src/prg_dftb make test # remember to add the /share/apps/local/bin path in .bashrc of any user who wishes to use the executable dftb+ # export PATH=/share/apps/local/bin:$PATH # make test may not work if the path to executable dftb+ is not linked. If this happens, try to link dfbt+ by properly defining the PATH, then cd /share/apps/dftb+/dftb+_snapshot-081217_src/prg_dftb and make test again.