Skip to content

Commit

Permalink
added msp_out.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
zargham-ahmad committed Oct 23, 2023
1 parent bc5f153 commit e463b34
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/qcxms/msp_out.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e463b34

Please sign in to comment.