#! /bin/bash # This is a shell script which is supposed to install hotbit automatically. Excecute this script as a user, not as SU. # 1. Go to the home directory of the user, e.g., $HOME=/home/tlyoon # Download this script from www2.fizik.usm.my/configrepo/howto/ase_hotbit/inst_hotbit, and place this script there. # Make this script executable by issuing # chmod +x inst_hotbit # Execute this script by issuing # .inst_hotbit #2. The following command liens will download the latest isntallation file from the download page into $HOME. A directory hotbit_install will appear in $HOME. ##################################################### cd $HOME svn checkout https://svn.cc.jyu.fi/srv/svn/hotbit/trunk hotbit_install ##################################################### #3. ##################################################### cd $HOME/hotbit_install python setup.py install --home=$HOME/hotbit ##################################################### #4. If successful, you will see a folder $HOME/hotbit in which the hotbit is installed. # The following PATH will be written to ~/.bashrc for the user by the following commands: ##################################################### echo ' ' >> ~/.bashrc echo 'export HOTBIT_DIR=$HOME/hotbit/lib64/python export PATH=$HOME/hotbit:$PATH export HOTBIT_PARAMETERS=$HOME/hotbit/param export PYTHONPATH=$PYTHONPATH:$HOTBIT_DIR' >> ~/.bashrc echo ' ' >> ~/.bashrc ##################################################### #5. After that invoke the change by ##################################################### sh $HOME/.bashrc . $HOME/.bashrc ##################################################### #6. Run tests by doing the following (be reminded that $HOTBIT_DIR refers to /home/tlyoon/hotbit/lib64/python): mkdir $HOME/testhotbit cd $HOME/testhotbit python $HOTBIT_DIR/hotbit/test/test.py # One may run selective tests as appeared in in $HOTBIT_DIR/hotbit/test/ by issuing, e.g., # python $HOTBIT_DIR/hotbit/test/polyethene_twisted.py # In case it fails to run the test, that may be due to the failure to invoke the change in $HOME/.bashrc. Log out and log in again, and then run the test again, by reissuing #cd $HOME/testhotbit #python $HOTBIT_DIR/hotbit/test/test.py