#!/bin/tcsh
# ----------------------------------------------------------------------
#  "proc_smiles_nodel" - process smiles input and generate thermodata
#              and transport data (no removal of intermediate files)
#     This is a part of KUCRS:
#        Knowledge-basing Utilities for Complex Reaction Systems
#                     (c) 2002-2021 by A. Miyoshi, Hiroshima University
#                                last edited: Aug. 19, 2021
# ----------------------------------------------------------------------
#
# ----- smiles2mol -----------------------------------------
smiles2mol $1.inp $1_mol.dat -t > $1_s2m.log
if ($status != 0) then
  echo "error termination of smiles2mol - abort."
  exit(-1)
endif
# rm $1_mol.dat $1_s2m.log
#
# ----- thermgen -------------------------------------------
thermgen $1_thg.inp $1_thg.lst > $1_thg.log
if ($status != 0) then
  echo "error termination of thermgen - abort."
  exit(-1)
endif
# rm $1_thg.log
#
# ----- thermpac -------------------------------------------
thermpac $1_thg.lst $1_thg.i97 > $1_thp.log
if ($status != 0) then
  echo "error termination of thermpac - abort."
  exit(-1)
endif
# rm $1_thp.log
#
# ----- pac99m ---------------------------------------------
pac99m $1_thg
if ($status != 0) then
  echo "error termination of pac99 - abort."
  exit(-1)
endif
# rm $1_thg.i97 $1_thg.o97 new.groups unf.EFdata
c97to7m < $1_thg.c97 > $1_thg.dat
# rm $1_thg.c97
#
# ----- trangen --------------------------------------------
trangen $1_thg.inp --no_append > $1_trn.log
if ($status != 0) then
  echo "error termination of trangen - abort."
  exit(-1)
endif
# rm $1_thg.inp $1_trn.log
#
echo normal termination of proc_smiles_nodel
