#!/bin/csh -f
#
# disco3
#    Script for running Discover 3.x background jobs.
#
# Command line input:
#
#    [args for image] job_to_run
#
# Environment: 
#    Will only run on current platform using discover in Cerius2 release area
# 
# Product: discover
#
# Molecular Simulation, Inc. 1992
#-----------------------------------------------------------------------------
#
# Setup environment variables
#
setenv BIOSYM  %MSIInstallRoot%/cdiscover
setenv BIOSYM_LIBRARY  %MSIInstallRoot%/cdiscover/res/
source %MSIInstallRoot%/install/lic_setup
#
#  Check argument list
#
if ($#argv == 0) then
    set job = ''
else
    # Permit user to specify e.g. acenm.inp
    set job = $argv[$#argv]:r
endif
#
# Set up the FORCEFIELD
#
if ($?FORCEFIELD) then
  set ffield = $FORCEFIELD
  setenv FORCEFIELD $ffield:r
endif
#
# Run the discover executable and save it's exit status.
#
$BIOSYM/exec/discovery $argv
set e_status = $status
#
# Exit with the appropriate status
#
done:
 exit($e_status)

