From e463b3452e2158c62dc67f03bb50319ee542bd2b Mon Sep 17 00:00:00 2001 From: Zargham Ahmad Date: Mon, 23 Oct 2023 17:07:06 +0200 Subject: [PATCH] added msp_out.sh --- tools/qcxms/msp_out.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tools/qcxms/msp_out.sh diff --git a/tools/qcxms/msp_out.sh b/tools/qcxms/msp_out.sh new file mode 100644 index 00000000..09fc9361 --- /dev/null +++ b/tools/qcxms/msp_out.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +molname=`sed -n '2{p;q}' TMPQCXMS/TMP.1/start.xyz` +kword=$(grep 'NPOINTS' result.jdx) +num_peaks=$(echo "$kword" | sed 's/^[^=]*=//') +echo `pwd` +sed -n '/PEAK/,/END/{/PEAK/!{/END/!p}}' result.jdx > temp.dat +awk '{print $1, $2}' temp.dat > tempa.dat +sed "1s/^/NAME: $molname\nNum Peaks: $num_peaks\n/" tempa.dat >> simulated_spectra.msp +sed -i '$a\ ' simulated_spectra.msp +rm temp.dat tempa.dat \ No newline at end of file