Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
qbox
qbox-public
Commits
12b8adb2
Commit
12b8adb2
authored
Jan 17, 2022
by
Francois Gygi
Browse files
Update qbox_reduce.sh to replace orig xml file
parent
a8525138
Changes
1
Hide whitespace changes
Inline
Side-by-side
util/qbox_reduce.sh
View file @
12b8adb2
#!/bin/bash
#
Reduce a qbox restart file to an atomse
t file
# The original file is
removed
#
qbox_reduce.sh: Remove wave functions from a restar
t 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
r
m
$f
head
-
$nlines
$f
>
$
tmpfile
echo
"</fpmd:sample>"
>>
$
tmpfile
m
v
$tmpfile
$f
done
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment