TLUSTY/RSynspec
2026-07-21 22:25:14 +08:00

67 lines
1.2 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#
# shell script to run Synspec
#
# print syntax if no parameters specified
#
date
if [ $# -lt 1 ]
then
echo Usage:
echo RSynspec model_core_name add_input line_list
exit
fi
#
# check that the input model exists
#
if [ -e $1.7 ] ; then
echo ;
else
echo FILE $1.7 does not exist, therefore quitting ;
exit;
fi
#
rm -f fort.8
cp $1.7 fort.8
#
# link the "data" directory
#
ln -s -f $TLUSTY/data data
#
# files fort.55 and fort.19
#
if [ -e $2 ] ; then
ln -s -f $2 fort.55
else
echo ;
fi
#
if [ -e $3 ] ; then
ln -s -f $3 fort.19
else
echo ;
fi
#
# 创建results目录如果不存在
#
mkdir -p results
#
# run synspec
#
MOD=$1
$TLUSTY/synspec/synspec.exe < $MOD.5 > results/$MOD.log
#
# save important output files to results directory
#
cp fort.7 results/$MOD.spec
cp fort.17 results/$MOD.cont
cp fort.12 results/$MOD.iden
# cp fort.16 results/$MOD.eqws
rm -f fort.55
rm -f fort.19
#
echo "COMPUTED SPECTRUM FOR $MOD FINISHED!"
echo "Results saved in results directory"
date
#