#
# here is a sample shell for running DeFT
#
# "my_directory" is the directory in which the input and output files
# are stored.  essentially, it is your current directory
#
# "DeFT_directory" is the directory containing the executable image of
# DeFT, as well as the basis set file
#
# "temp_directory" is the directory in which scratch files are to be stored
#
# the input file is defined in the first executable line of this shell
#
# as it is now, an output file and a restart file will be created in
# "my_directory" with, respectively, the output_ and restart_ prefixes
#
# as it is now, the restart file will overwrite any previous run's
# restart file for that same input filename
#
# the "hessian" file is an optional input file.  it contains an optimized
# geometry and an initial guess at the hessian (from lower levels of theory)
# that will be used as a starting point for a DeFT geometry optimization
#

setenv input_file water

setenv my_directory $HOME/jobs
setenv DeFT_directory $HOME/DeFT
setenv temp_directory /tmp/tmp$$

mkdir $temp_directory
cd $temp_directory

touch core
chmod 444 core

touch $my_directory/restart_$input_file

cp $my_directory/restart_$input_file       old_restart
cp $my_directory/$input_file               input
cp $DeFT_directory/bases                   bases
cp $HOME/hessians/$input_file/fort.47      hessian

time $DeFT_directory/DeFT < input > $my_directory/output_$input_file

cp new_restart $my_directory/restart_$input_file

chmod u+w core
rm core espot bases input hessian old_restart new_restart fort.*
cd
rmdir $temp_directory
