mirror of
https://github.com/LCPQ/quantum_package
synced 2025-01-08 20:33:26 +01:00
Archive and unarchive EZFIO input files works
This commit is contained in:
parent
f0cba523df
commit
99b4de3939
@ -2,5 +2,8 @@ all: $(wildcard *.ezfio)
|
||||
|
||||
FORCE:
|
||||
|
||||
%.ezfio.md5: FORCE
|
||||
archive_ezfio.sh $*.ezfio
|
||||
|
||||
%.ezfio: FORCE
|
||||
archive_ezfio.sh $*
|
||||
unarchive_ezfio.sh $@.md5
|
||||
|
@ -1,4 +1,3 @@
|
||||
765e1f05dd3fbab8c7ebefaf2f1813e4 Ne_dz.ezfio/nuclei/nucl_num
|
||||
3a99bcfcbfc32219791e6980c927b900 Ne_dz.ezfio/ao_basis/ao_coef.gz
|
||||
54485b685f849c6f24a9c08a926daaf9 Ne_dz.ezfio/ao_basis/ao_expo.gz
|
||||
2cf8c46d0cf91710e14856c92bcd0aae Ne_dz.ezfio/ao_basis/ao_nucl.gz
|
||||
|
@ -59,6 +59,7 @@ EOF
|
||||
))
|
||||
cd $OLDPWD
|
||||
|
||||
rm -f ${EZFIO_FILE}.md5
|
||||
for FILE in ${FILES[@]}
|
||||
do
|
||||
FILE=${EZFIO_FILE}/${FILE}
|
||||
|
36
scripts/unarchive_ezfio.sh
Executable file
36
scripts/unarchive_ezfio.sh
Executable file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Reads a *.ezfio.md5 file, then fetches the proper data in the
|
||||
# cache and re-creates the EZFIO database.
|
||||
# Fri Apr 4 01:02:53 CEST 2014
|
||||
|
||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
||||
then
|
||||
print "The QPACKAGE_ROOT environment variable is not set."
|
||||
print "Please reload the quantum_package.rc file."
|
||||
fi
|
||||
|
||||
EZFIO_FILE=$(basename $(basename ${1} .md5))
|
||||
|
||||
if [[ -z $1 ]]
|
||||
then
|
||||
echo "Usage: $(basename $0) <EZFIO_FILE.md5>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -f ${EZFIO_FILE}.md5 ]]
|
||||
then
|
||||
echo "Error: ${EZFIO_FILE}.md5 does not exist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
key=($(cut -d ' ' -f 1 Ne_dz.ezfio.md5 ))
|
||||
filename=($(cut -d ' ' -f 2 Ne_dz.ezfio.md5 ))
|
||||
|
||||
for i in ${!key[@]}
|
||||
do
|
||||
MD5=${key[$i]}
|
||||
file=${filename[$i]}
|
||||
mkdir -p $(dirname $file)
|
||||
cp ${QPACKAGE_ROOT}/data/cache/${MD5} ${file}
|
||||
done
|
Loading…
Reference in New Issue
Block a user