mirror of
https://github.com/LCPQ/quantum_package
synced 2024-11-14 01:53:55 +01:00
44 lines
740 B
Bash
Executable File
44 lines
740 B
Bash
Executable File
#!/bin/bash
|
|
# This script is used by the MOs module, and should not be used by users.
|
|
# It copies the EZFIO/mo_basis directory in the save/EZFIO/mo_basis/xxx
|
|
# directory, where xxx is the corresponding mo_label.
|
|
# Wed Apr 2 14:35:15 CEST 2014
|
|
|
|
EZFIO=$1
|
|
|
|
if [[ -z ${EZFIO} ]]
|
|
then
|
|
echo "Error in $0"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ ! -f ${EZFIO}/mo_basis/mo_label ]]
|
|
then
|
|
LABEL='no_label'
|
|
else
|
|
LABEL=$(head -1 ${EZFIO}/mo_basis/mo_label)
|
|
fi
|
|
|
|
DESTINATION="save/mo_basis/${LABEL}"
|
|
|
|
cd ${EZFIO}
|
|
|
|
if [[ ! -d save/mo_basis ]]
|
|
then
|
|
mkdir -p save/mo_basis
|
|
fi
|
|
|
|
BACKUP=${DESTINATION}.old
|
|
if [[ -d ${BACKUP} ]]
|
|
then
|
|
rm -rf ${BACKUP}
|
|
fi
|
|
|
|
if [[ -d ${DESTINATION} ]]
|
|
then
|
|
mv ${DESTINATION} ${BACKUP}
|
|
fi
|
|
|
|
cp -r mo_basis ${DESTINATION}
|
|
|