Commit 12b8adb2 authored by Francois Gygi's avatar Francois Gygi
Browse files

Update qbox_reduce.sh to replace orig xml file

parent a8525138
#!/bin/bash
# Reduce a qbox restart file to an atomset file
# The original file is removed
# qbox_reduce.sh: Remove wave functions from a restart file
# The original file is modified and contains the <atomset> element only
# use: qbox_reduce.sh file.xml [file.xml ..]
for f in ${*}
do
name=${f%.xml}
atomset_name=${name}_atomset
echo $name.xml "->" $atomset_name.xml
tmpfile=qbox_reduce$$
nlines=$(grep /atomset -m 1 -n $f | cut -f1 -d: - )
head -$nlines $f > $atomset_name.xml
echo "</fpmd:sample>" >> $atomset_name.xml
rm $f
head -$nlines $f > $tmpfile
echo "</fpmd:sample>" >> $tmpfile
mv $tmpfile $f
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment