mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-24 21:41:46 +02:00
Added MD5 archive script for test input files
This commit is contained in:
parent
01aae7bf4d
commit
c7768ba335
@ -1,27 +1,6 @@
|
||||
WWW_SERVER = http://qmcchem.ups-tlse.fr/files/scemama
|
||||
IRPF90_TGZ = irpf90-latest-noarch-src.tar.gz
|
||||
EZFIO_TGZ = EZFIO.latest.tar.gz
|
||||
all: inputs
|
||||
|
||||
.PHONY: doc src
|
||||
FORCE:
|
||||
|
||||
default: src
|
||||
|
||||
EZFIO:
|
||||
$(info ===== Fetching EZFIO from the web =====)
|
||||
@wget "$(WWW_SERVER)/$(EZFIO_TGZ)" || \
|
||||
(echo Unable to download EZFIO : $(WWW_SERVER)/$(EZFIO_TGZ) ; exit 1)
|
||||
@tar -zxf $(EZFIO_TGZ) && rm $(EZFIO_TGZ)
|
||||
|
||||
irpf90:
|
||||
$(info ===== Fetching IRPF90 from the web =====)
|
||||
@wget "$(WWW_SERVER)/$(IRPF90_TGZ)" || \
|
||||
(echo Unable to download IRPF90 : $(WWW_SERVER)/$(IRPF90_TGZ) ; exit 1)
|
||||
@tar -zxf $(IRPF90_TGZ) && rm $(IRPF90_TGZ)
|
||||
$(MAKE) -C irpf90
|
||||
|
||||
doc:
|
||||
$(MAKE) -C doc
|
||||
|
||||
src: irpf90 EZFIO
|
||||
export QPACKAGE_ROOT=$$PWD ; \
|
||||
$(MAKE) -C src
|
||||
inputs: FORCE
|
||||
$(MAKE) -C inputs
|
||||
|
6
data/inputs/Makefile
Normal file
6
data/inputs/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
all: $(wildcard *.ezfio)
|
||||
|
||||
FORCE:
|
||||
|
||||
%.ezfio: FORCE
|
||||
archive_ezfio.sh $*
|
19
data/inputs/Ne_dz.ezfio.md5
Normal file
19
data/inputs/Ne_dz.ezfio.md5
Normal file
@ -0,0 +1,19 @@
|
||||
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
|
||||
8d835c17bb93dc4b67ed4ec1d7197ffa Ne_dz.ezfio/ao_basis/ao_num
|
||||
98cbb5f685decb369b99845fd6eb5b77 Ne_dz.ezfio/ao_basis/ao_power.gz
|
||||
8fc6c40dd4f2fbdc0304f47431e028ae Ne_dz.ezfio/ao_basis/ao_prim_num.gz
|
||||
d765d41448fe246fcc034b66e2768837 Ne_dz.ezfio/electrons/elec_alpha_num
|
||||
d765d41448fe246fcc034b66e2768837 Ne_dz.ezfio/electrons/elec_beta_num
|
||||
1ee880177e361ed2bd645106ee48c8cb Ne_dz.ezfio/ezfio/creation
|
||||
70157eb5a25c5322e4ca22d63bff32cb Ne_dz.ezfio/ezfio/library
|
||||
6c31c4e78cfa4e40197145e3e3f15e2c Ne_dz.ezfio/mo_basis/mo_coef.gz
|
||||
cb9c18d6e379c6e854cdaed882d48e3e Ne_dz.ezfio/mo_basis/mo_energy.gz
|
||||
c08fa3ff955fbcef6125c84821e1ac74 Ne_dz.ezfio/mo_basis/mo_occ.gz
|
||||
d92fe2f613eefb751a11426863c90e49 Ne_dz.ezfio/mo_basis/mo_symmetry.gz
|
||||
757c9248d7ddb2778d3df1b1ba938d15 Ne_dz.ezfio/mo_basis/mo_tot_num
|
||||
223f155011993e8895a4ca2700ae19e3 Ne_dz.ezfio/nuclei/nucl_charge.gz
|
||||
26eadd8aca5305d36e279234568f0925 Ne_dz.ezfio/nuclei/nucl_coord.gz
|
||||
765e1f05dd3fbab8c7ebefaf2f1813e4 Ne_dz.ezfio/nuclei/nucl_num
|
76
scripts/archive_ezfio.sh
Executable file
76
scripts/archive_ezfio.sh
Executable file
@ -0,0 +1,76 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Computes the MD5 digest of an EZFIO file, and creates a tar.
|
||||
# Thu Apr 3 16:55:50 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
|
||||
|
||||
function archive()
|
||||
{
|
||||
FILE=$1
|
||||
MD5=$2
|
||||
ARCHIVE=${QPACKAGE_ROOT}/data/cache/$MD5
|
||||
if [[ -f $ARCHIVE ]]
|
||||
then
|
||||
if ! diff $FILE ${QPACKAGE_ROOT}/data/cache/$MD5 &> /dev/null
|
||||
then
|
||||
echo "Something went wrong. The file"
|
||||
echo ${QPACKAGE_ROOT}/data/cache/$MD5
|
||||
echo "is different from $FILE"
|
||||
echo "Aborting"
|
||||
return 1
|
||||
fi
|
||||
else
|
||||
cp $FILE ${QPACKAGE_ROOT}/data/cache/$MD5
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
EZFIO_FILE=$(basename ${1})
|
||||
|
||||
if [[ -z ${EZFIO_FILE} ]]
|
||||
then
|
||||
echo "Usage: $(basename $0) <EZFIO_FILE>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
cd ${QPACKAGE_ROOT}/EZFIO/src
|
||||
FILES=($(python << EOF | sort
|
||||
from read_config import *
|
||||
for group in groups:
|
||||
if group == "ezfio":
|
||||
continue
|
||||
for d in groups[group]:
|
||||
if d[2] == ():
|
||||
suffix = ""
|
||||
else:
|
||||
suffix = ".gz"
|
||||
print group+'/'+d[0]+suffix
|
||||
print "ezfio/creation"
|
||||
print "ezfio/library"
|
||||
EOF
|
||||
))
|
||||
cd $OLDPWD
|
||||
|
||||
for FILE in ${FILES[@]}
|
||||
do
|
||||
FILE=${EZFIO_FILE}/${FILE}
|
||||
MD5=$(md5sum ${FILE} 2>/dev/null | cut -d ' ' -f 1)
|
||||
if [[ ! -z $MD5 ]]
|
||||
then
|
||||
if ! archive $FILE $MD5
|
||||
then
|
||||
rm ${EZFIO_FILE}.md5
|
||||
exit 1
|
||||
fi
|
||||
echo $MD5 $FILE >> ${EZFIO_FILE}.md5
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user