mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 05:51:46 +02:00
QPACKAGE_ROOT => QP_ROOT =D
This commit is contained in:
parent
f26f761b0b
commit
e0f360084e
@ -10,7 +10,7 @@ before_script:
|
|||||||
- sudo apt-get install graphviz
|
- sudo apt-get install graphviz
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- ./setup_environment.sh --robot
|
- ./setup_environment.py
|
||||||
- source ./quantum_package.rc
|
- source ./quantum_package.rc
|
||||||
- qp_create_ninja.py --production ./config/gfortran_example.cfg
|
- qp_create_ninja.py --production ./config/gfortran_example.cfg
|
||||||
- ninja
|
- ninja
|
||||||
|
@ -4,10 +4,10 @@ TARGET=curl
|
|||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
cd ${BUILD} || return 1
|
cd ${BUILD} || return 1
|
||||||
mv curl.ermine ${QPACKAGE_ROOT}/bin/curl || return 1
|
mv curl.ermine ${QP_ROOT}/bin/curl || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
BUILD=_build/${TARGET}
|
BUILD=_build/${TARGET}
|
||||||
|
@ -5,12 +5,12 @@ TARGET=ezfio
|
|||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
rm -rf ${QPACKAGE_ROOT}/EZFIO
|
rm -rf ${QP_ROOT}/EZFIO
|
||||||
cd ${BUILD}/config || return 1
|
cd ${BUILD}/config || return 1
|
||||||
cd -
|
cd -
|
||||||
mv ${BUILD} ${QPACKAGE_ROOT}/install/EZFIO || return 1
|
mv ${BUILD} ${QP_ROOT}/install/EZFIO || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
source scripts/build.sh
|
source scripts/build.sh
|
||||||
|
@ -4,7 +4,7 @@ TARGET=irpf90
|
|||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
make -C ${BUILD} || return 1
|
make -C ${BUILD} || return 1
|
||||||
@ -13,8 +13,8 @@ function _install()
|
|||||||
[[ -x ./irpf90/bin/irpf90 ]] || return 1
|
[[ -x ./irpf90/bin/irpf90 ]] || return 1
|
||||||
[[ -x ./irpf90/bin/irpman ]] || return 1
|
[[ -x ./irpf90/bin/irpman ]] || return 1
|
||||||
rm -rf -- ../bin/irpf90 ../bin/irpman
|
rm -rf -- ../bin/irpf90 ../bin/irpman
|
||||||
echo 'exec ${QPACKAGE_ROOT}/install/irpf90/bin/irpf90 $@' > ../bin/irpf90 || return 1
|
echo 'exec ${QP_ROOT}/install/irpf90/bin/irpf90 $@' > ../bin/irpf90 || return 1
|
||||||
echo 'exec ${QPACKAGE_ROOT}/install/irpf90/bin/irpman $@' > ../bin/irpman || return 1
|
echo 'exec ${QP_ROOT}/install/irpf90/bin/irpman $@' > ../bin/irpman || return 1
|
||||||
chmod +x ../bin/irpf90 ../bin/irpman || return 1
|
chmod +x ../bin/irpf90 ../bin/irpman || return 1
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -5,11 +5,11 @@ TARGET=m4
|
|||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
cd ${BUILD}
|
cd ${BUILD}
|
||||||
./configure && make || exit 1
|
./configure && make || exit 1
|
||||||
ln -sf ${PWD}/src/m4 ${QPACKAGE_ROOT}/bin || exit 1
|
ln -sf ${PWD}/src/m4 ${QP_ROOT}/bin || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
source scripts/build.sh
|
source scripts/build.sh
|
||||||
|
@ -11,7 +11,7 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
cd Downloads || exit 1
|
cd Downloads || exit 1
|
||||||
@ -22,18 +22,18 @@ then
|
|||||||
source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
|
source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo N | ./ocaml.sh ${QPACKAGE_ROOT}/bin/ || exit 1
|
echo N | ./ocaml.sh ${QP_ROOT}/bin/ || exit 1
|
||||||
if [[ ! -f ${QPACKAGE_ROOT}/bin/opam ]]
|
if [[ ! -f ${QP_ROOT}/bin/opam ]]
|
||||||
then
|
then
|
||||||
echo "Installation of OPAM failed"
|
echo "Installation of OPAM failed"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
${QPACKAGE_ROOT}/bin/opam config setup -a --dot-profile ${QPACKAGE_ROOT}/qmcchemrc || exit 1
|
${QP_ROOT}/bin/opam config setup -a --dot-profile ${QP_ROOT}/qmcchemrc || exit 1
|
||||||
touch ${QPACKAGE_ROOT}/bin/opam
|
touch ${QP_ROOT}/bin/opam
|
||||||
|
|
||||||
export LD_LIBRARY_PATH=${QPACKAGE_ROOT}/lib:${LD_LIBRARY_PATH}
|
export LD_LIBRARY_PATH=${QP_ROOT}/lib:${LD_LIBRARY_PATH}
|
||||||
export LIBRARY_PATH=${QPACKAGE_ROOT}/lib:${LIBRARY_PATH}
|
export LIBRARY_PATH=${QP_ROOT}/lib:${LIBRARY_PATH}
|
||||||
export C_INCLUDE_PATH=${QPACKAGE_ROOT}/lib:${C_INCLUDE_PATH}
|
export C_INCLUDE_PATH=${QP_ROOT}/lib:${C_INCLUDE_PATH}
|
||||||
opam install ${PACKAGES} || exit 1
|
opam install ${PACKAGES} || exit 1
|
||||||
rm -f ../_build/ocaml.log
|
rm -f ../_build/ocaml.log
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -6,13 +6,13 @@ function _install()
|
|||||||
{
|
{
|
||||||
mkdir ${TARGET}
|
mkdir ${TARGET}
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
cd ${BUILD}
|
cd ${BUILD}
|
||||||
./configure --prefix=${QPACKAGE_ROOT}/install/${TARGET} && make || exit 1
|
./configure --prefix=${QP_ROOT}/install/${TARGET} && make || exit 1
|
||||||
make install || exit 1
|
make install || exit 1
|
||||||
cd -
|
cd -
|
||||||
cp ${TARGET}/bin/${TARGET} ${QPACKAGE_ROOT}/bin || exit 1
|
cp ${TARGET}/bin/${TARGET} ${QP_ROOT}/bin || exit 1
|
||||||
rm -R -- ${TARGET} || exit 1
|
rm -R -- ${TARGET} || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,13 +4,15 @@ TARGET=zlib
|
|||||||
|
|
||||||
function _install()
|
function _install()
|
||||||
{
|
{
|
||||||
|
rm -rf -- ${TARGET}
|
||||||
mkdir ${TARGET} || exit 1
|
mkdir ${TARGET} || exit 1
|
||||||
cd ..
|
cd ..
|
||||||
QPACKAGE_ROOT=$PWD
|
QP_ROOT=$PWD
|
||||||
cd -
|
cd -
|
||||||
cd ${BUILD}
|
cd ${BUILD}
|
||||||
./configure && make || exit 1
|
./configure && make || exit 1
|
||||||
make install prefix=$QPACKAGE_ROOT/install/${TARGET} || exit 1
|
make install prefix=$QP_ROOT/install/${TARGET} || exit 1
|
||||||
|
ln -f $QP_ROOT/install/${TARGET}/lib/libz.so $QP_ROOT/lib || exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
source scripts/build.sh
|
source scripts/build.sh
|
@ -104,5 +104,5 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
cache_utility(command)
|
cache_utility(command)
|
||||||
except:
|
except OSError:
|
||||||
process = subprocess.Popen(command, shell=True)
|
process = subprocess.Popen(command, shell=True)
|
||||||
|
@ -24,11 +24,11 @@ except ImportError:
|
|||||||
# \_| | (_) |_) (_| | \/ (_| | | (_| |_) | (/_ _>
|
# \_| | (_) |_) (_| | \/ (_| | | (_| |_) | (/_ _>
|
||||||
#
|
#
|
||||||
|
|
||||||
QPACKAGE_ROOT = os.environ['QPACKAGE_ROOT']
|
QP_ROOT = os.environ['QP_ROOT']
|
||||||
QPACKAGE_ROOT_SRC = join(QPACKAGE_ROOT, 'src')
|
QP_ROOT_SRC = join(QP_ROOT, 'src')
|
||||||
QPACKAGE_ROOT_EZFIO = join(QPACKAGE_ROOT, 'install', 'EZFIO')
|
QP_ROOT_EZFIO = join(QP_ROOT, 'install', 'EZFIO')
|
||||||
|
|
||||||
EZFIO_LIB = join(QPACKAGE_ROOT_EZFIO, "lib", "libezfio.a")
|
EZFIO_LIB = join(QP_ROOT, "lib", "libezfio.a")
|
||||||
|
|
||||||
#
|
#
|
||||||
# |\ | _. ._ _ _ _| _|_ ._ | _
|
# |\ | _. ._ _ _ _| _|_ ._ | _
|
||||||
@ -75,14 +75,14 @@ def dict_module_genelogy_path(d_module_genelogy):
|
|||||||
"""
|
"""
|
||||||
d = dict()
|
d = dict()
|
||||||
for module_rel, l_children_rel in d_module_genelogy.iteritems():
|
for module_rel, l_children_rel in d_module_genelogy.iteritems():
|
||||||
module_abs = join(QPACKAGE_ROOT_SRC, module_rel)
|
module_abs = join(QP_ROOT_SRC, module_rel)
|
||||||
|
|
||||||
p = Path(module_abs, module_rel)
|
p = Path(module_abs, module_rel)
|
||||||
try:
|
try:
|
||||||
d[p] = Path(join(QPACKAGE_ROOT_SRC, l_children_rel),
|
d[p] = Path(join(QP_ROOT_SRC, l_children_rel),
|
||||||
l_children_rel)
|
l_children_rel)
|
||||||
except:
|
except:
|
||||||
d[p] = [Path(join(QPACKAGE_ROOT_SRC, children), children)
|
d[p] = [Path(join(QP_ROOT_SRC, children), children)
|
||||||
for children in l_children_rel]
|
for children in l_children_rel]
|
||||||
|
|
||||||
return d
|
return d
|
||||||
@ -99,7 +99,7 @@ def get_l_module_with_ezfio_cfg():
|
|||||||
"""
|
"""
|
||||||
from os import listdir
|
from os import listdir
|
||||||
from os.path import isfile, join
|
from os.path import isfile, join
|
||||||
qp_src = QPACKAGE_ROOT_SRC
|
qp_src = QP_ROOT_SRC
|
||||||
|
|
||||||
return [join(qp_src, m) for m in listdir(qp_src)
|
return [join(qp_src, m) for m in listdir(qp_src)
|
||||||
if isfile(join(qp_src, m, "EZFIO.cfg"))]
|
if isfile(join(qp_src, m, "EZFIO.cfg"))]
|
||||||
@ -112,10 +112,10 @@ def get_l_ezfio_config():
|
|||||||
|
|
||||||
l = []
|
l = []
|
||||||
|
|
||||||
cmd = "{0}/*/*.ezfio_config".format(QPACKAGE_ROOT_SRC)
|
cmd = "{0}/*/*.ezfio_config".format(QP_ROOT_SRC)
|
||||||
for path_in_module in glob.glob(cmd):
|
for path_in_module in glob.glob(cmd):
|
||||||
name_lower = os.path.split(path_in_module)[1].lower()
|
name_lower = os.path.split(path_in_module)[1].lower()
|
||||||
path_in_ezfio = join(QPACKAGE_ROOT_EZFIO, "config", name_lower)
|
path_in_ezfio = join(QP_ROOT_EZFIO, "config", name_lower)
|
||||||
l.append(EZ_config_path(path_in_module, path_in_ezfio))
|
l.append(EZ_config_path(path_in_module, path_in_ezfio))
|
||||||
|
|
||||||
return l
|
return l
|
||||||
@ -146,7 +146,7 @@ def get_children_of_ezfio_cfg(l_module_with_ezfio_cfg):
|
|||||||
"""
|
"""
|
||||||
From a module list of ezfio_cfg return all the stuff create by him
|
From a module list of ezfio_cfg return all the stuff create by him
|
||||||
"""
|
"""
|
||||||
config_folder = join(QPACKAGE_ROOT_EZFIO, "config")
|
config_folder = join(QP_ROOT_EZFIO, "config")
|
||||||
|
|
||||||
l_util = dict()
|
l_util = dict()
|
||||||
|
|
||||||
@ -222,8 +222,9 @@ def ninja_ezfio_rule():
|
|||||||
l_flag = ["export {0}='${0}'".format(flag)
|
l_flag = ["export {0}='${0}'".format(flag)
|
||||||
for flag in ["FC", "FCFLAGS", "IRPF90"]]
|
for flag in ["FC", "FCFLAGS", "IRPF90"]]
|
||||||
|
|
||||||
l_cmd = ["cd {0}".format(QPACKAGE_ROOT_EZFIO)
|
l_cmd = ["cd {0}".format(QP_ROOT_EZFIO)
|
||||||
] + l_flag + ["ninja"]
|
] + l_flag + ["make && ln -f {0} {1}".format(join(QP_ROOT, 'install', 'EZFIO',"lib","libezfio.a"),
|
||||||
|
EZFIO_LIB)]
|
||||||
|
|
||||||
l_string = ["rule build_ezfio",
|
l_string = ["rule build_ezfio",
|
||||||
" command = {0}".format(" ; ".join(l_cmd)),
|
" command = {0}".format(" ; ".join(l_cmd)),
|
||||||
@ -244,7 +245,7 @@ def ninja_ezfio_build(l_ezfio_config, l_util):
|
|||||||
|
|
||||||
str_ = " ".join(l_ezfio_config + l_ezfio_from_cfg)
|
str_ = " ".join(l_ezfio_config + l_ezfio_from_cfg)
|
||||||
|
|
||||||
ezfio_make_config = join(QPACKAGE_ROOT_EZFIO,"make.config")
|
ezfio_make_config = join(QP_ROOT_EZFIO, "make.config")
|
||||||
l_string = ["build {0} {1}: build_ezfio {2}".format(EZFIO_LIB,
|
l_string = ["build {0} {1}: build_ezfio {2}".format(EZFIO_LIB,
|
||||||
ezfio_make_config,
|
ezfio_make_config,
|
||||||
str_), ""]
|
str_), ""]
|
||||||
@ -261,7 +262,7 @@ def get_source_destination(path_module, l_needed_molule):
|
|||||||
Return a list of Sym_link = namedtuple('Sym_link', ['source', 'destination'])
|
Return a list of Sym_link = namedtuple('Sym_link', ['source', 'destination'])
|
||||||
for a module
|
for a module
|
||||||
"""
|
"""
|
||||||
return [Sym_link(m.abs, join(QPACKAGE_ROOT_SRC, path_module.rel, m.rel))
|
return [Sym_link(m.abs, join(QP_ROOT_SRC, path_module.rel, m.rel))
|
||||||
for m in l_needed_molule]
|
for m in l_needed_molule]
|
||||||
|
|
||||||
|
|
||||||
@ -704,5 +705,5 @@ if __name__ == "__main__":
|
|||||||
l_string += ninja_binaries_build(module_to_compile, l_children,
|
l_string += ninja_binaries_build(module_to_compile, l_children,
|
||||||
d_binaries_production)
|
d_binaries_production)
|
||||||
|
|
||||||
with open(join(QPACKAGE_ROOT, "build.ninja"), "w+") as f:
|
with open(join(QP_ROOT, "build.ninja"), "w+") as f:
|
||||||
f.write("\n".join(l_string))
|
f.write("\n".join(l_string))
|
||||||
|
@ -36,7 +36,7 @@ def get_compilation_option(pwd_cfg, flag_name):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qpackage_root = os.environ['QP_ROOT']
|
||||||
pwd_cfg = os.path.join(qpackage_root, "config/gfortran_example.cfg")
|
pwd_cfg = os.path.join(qpackage_root, "config/gfortran_example.cfg")
|
||||||
|
|
||||||
print get_compilation_option(pwd_cfg, "FC")
|
print get_compilation_option(pwd_cfg, "FC")
|
||||||
|
@ -21,11 +21,11 @@ Options:
|
|||||||
(aka all with the `interface: input` parameter)
|
(aka all with the `interface: input` parameter)
|
||||||
in `${pwd}`
|
in `${pwd}`
|
||||||
--ezfio_config Create the `${module_lower}_ezfio_interface_config` in
|
--ezfio_config Create the `${module_lower}_ezfio_interface_config` in
|
||||||
`${QPACKAGE_ROOT}/EZFIO/config/`
|
`${QP_ROOT}/EZFIO/config/`
|
||||||
This file is needed by *EZFIO* to create the `libezfio.so`
|
This file is needed by *EZFIO* to create the `libezfio.so`
|
||||||
--ocaml Create the `Input_module.lower.ml` for the *qp_edit*
|
--ocaml Create the `Input_module.lower.ml` for the *qp_edit*
|
||||||
--ezfio_default Create the `${module_lower}_ezfio_interface_default` in
|
--ezfio_default Create the `${module_lower}_ezfio_interface_default` in
|
||||||
`${QPACKAGE_ROOT}/data/ezfio_defaults` needed by
|
`${QP_ROOT}/data/ezfio_defaults` needed by
|
||||||
the ocaml
|
the ocaml
|
||||||
ocaml_global Create the qp_edit
|
ocaml_global Create the qp_edit
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ def get_type_dict():
|
|||||||
# ~#~#~#~#~ #
|
# ~#~#~#~#~ #
|
||||||
# P i c l e #
|
# P i c l e #
|
||||||
# ~#~#~#~#~ #
|
# ~#~#~#~#~ #
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qpackage_root = os.environ['QP_ROOT']
|
||||||
|
|
||||||
# ~#~#~#~ #
|
# ~#~#~#~ #
|
||||||
# I n i t #
|
# I n i t #
|
||||||
@ -325,7 +325,7 @@ def save_ezfio_provider(path_head, dict_code_provider):
|
|||||||
path = "{0}/ezfio_interface.irp.f".format(path_head)
|
path = "{0}/ezfio_interface.irp.f".format(path_head)
|
||||||
|
|
||||||
l_output = ["! DO NOT MODIFY BY HAND",
|
l_output = ["! DO NOT MODIFY BY HAND",
|
||||||
"! Created by $QPACKAGE_ROOT/scripts/ezfio_interface.py",
|
"! Created by $QP_ROOT/scripts/ezfio_interface.py",
|
||||||
"! from file {0}/EZFIO.cfg".format(path_head),
|
"! from file {0}/EZFIO.cfg".format(path_head),
|
||||||
"\n"]
|
"\n"]
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ def create_ezfio_config(dict_ezfio_cfg):
|
|||||||
def save_ezfio_config(module_lower, str_ezfio_config):
|
def save_ezfio_config(module_lower, str_ezfio_config):
|
||||||
"""
|
"""
|
||||||
Write the str_ezfio_config in
|
Write the str_ezfio_config in
|
||||||
"$QPACKAGE_ROOT/EZFIO/{0}.ezfio_interface_config".format(module_lower)
|
"$QP_ROOT/EZFIO/{0}.ezfio_interface_config".format(module_lower)
|
||||||
"""
|
"""
|
||||||
name = "{0}.ezfio_interface_config".format(module_lower)
|
name = "{0}.ezfio_interface_config".format(module_lower)
|
||||||
path = os.path.join(os.environ['QP_EZFIO'], "config", name)
|
path = os.path.join(os.environ['QP_EZFIO'], "config", name)
|
||||||
@ -469,11 +469,11 @@ def create_ezfio_default(dict_ezfio_cfg):
|
|||||||
def save_ezfio_default(module_lower, str_ezfio_default):
|
def save_ezfio_default(module_lower, str_ezfio_default):
|
||||||
"""
|
"""
|
||||||
Write the str_ezfio_config in
|
Write the str_ezfio_config in
|
||||||
"$QPACKAGE_ROOT/data/ezfio_defaults/{0}.ezfio_interface_default".format(module_lower)
|
"$QP_ROOT/data/ezfio_defaults/{0}.ezfio_interface_default".format(module_lower)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
root_ezfio_default = "{0}/data/ezfio_defaults/".format(
|
root_ezfio_default = "{0}/data/ezfio_defaults/".format(
|
||||||
os.environ['QPACKAGE_ROOT'])
|
os.environ['QP_ROOT'])
|
||||||
path = "{0}/{1}.ezfio_interface_default".format(root_ezfio_default,
|
path = "{0}/{1}.ezfio_interface_default".format(root_ezfio_default,
|
||||||
module_lower)
|
module_lower)
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
@ -578,10 +578,10 @@ def create_ocaml_input(dict_ezfio_cfg, module_lower):
|
|||||||
def save_ocaml_input(module_lower, str_ocaml_input):
|
def save_ocaml_input(module_lower, str_ocaml_input):
|
||||||
"""
|
"""
|
||||||
Write the str_ocaml_input in
|
Write the str_ocaml_input in
|
||||||
$QPACKAGE_ROOT/ocaml/Input_{0}.ml".format(module_lower)
|
$QP_ROOT/ocaml/Input_{0}.ml".format(module_lower)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
path = "{0}/ocaml/Input_{1}.ml".format(os.environ['QPACKAGE_ROOT'],
|
path = "{0}/ocaml/Input_{1}.ml".format(os.environ['QP_ROOT'],
|
||||||
module_lower)
|
module_lower)
|
||||||
|
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
@ -598,7 +598,7 @@ def get_l_module_with_auto_generate_ocaml_lower():
|
|||||||
# I n i t #
|
# I n i t #
|
||||||
# ~#~#~#~ #
|
# ~#~#~#~ #
|
||||||
|
|
||||||
mypath = "{0}/src".format(os.environ['QPACKAGE_ROOT'])
|
mypath = "{0}/src".format(os.environ['QP_ROOT'])
|
||||||
|
|
||||||
# ~#~#~#~#~#~#~#~ #
|
# ~#~#~#~#~#~#~#~ #
|
||||||
# L _ f o l d e r #
|
# L _ f o l d e r #
|
||||||
@ -639,7 +639,7 @@ def create_ocaml_input_global(l_module_with_auto_generate_ocaml_lower):
|
|||||||
|
|
||||||
from ezfio_generate_ocaml import EZFIO_ocaml
|
from ezfio_generate_ocaml import EZFIO_ocaml
|
||||||
|
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qpackage_root = os.environ['QP_ROOT']
|
||||||
path = qpackage_root + "/scripts/ezfio_interface/qp_edit_template"
|
path = qpackage_root + "/scripts/ezfio_interface/qp_edit_template"
|
||||||
|
|
||||||
with open(path, "r") as f:
|
with open(path, "r") as f:
|
||||||
@ -661,10 +661,10 @@ def create_ocaml_input_global(l_module_with_auto_generate_ocaml_lower):
|
|||||||
def save_ocaml_input_auto(str_ocaml_input_global):
|
def save_ocaml_input_auto(str_ocaml_input_global):
|
||||||
"""
|
"""
|
||||||
Write the str_ocaml_input in
|
Write the str_ocaml_input in
|
||||||
$QPACKAGE_ROOT/ocaml/Input_auto_generated.ml
|
$QP_ROOT/ocaml/Input_auto_generated.ml
|
||||||
"""
|
"""
|
||||||
|
|
||||||
path = "{0}/ocaml/Input_auto_generated.ml".format(os.environ['QPACKAGE_ROOT'])
|
path = "{0}/ocaml/Input_auto_generated.ml".format(os.environ['QP_ROOT'])
|
||||||
|
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
f.write(str_ocaml_input_global)
|
f.write(str_ocaml_input_global)
|
||||||
@ -673,10 +673,10 @@ def save_ocaml_input_auto(str_ocaml_input_global):
|
|||||||
def save_ocaml_qp_edit(str_ocaml_qp_edit):
|
def save_ocaml_qp_edit(str_ocaml_qp_edit):
|
||||||
"""
|
"""
|
||||||
Write the str_ocaml_qp_edit in
|
Write the str_ocaml_qp_edit in
|
||||||
$QPACKAGE_ROOT/ocaml/qp_edit.ml
|
$QP_ROOT/ocaml/qp_edit.ml
|
||||||
"""
|
"""
|
||||||
|
|
||||||
path = "{0}/ocaml/qp_edit.ml".format(os.environ['QPACKAGE_ROOT'])
|
path = "{0}/ocaml/qp_edit.ml".format(os.environ['QP_ROOT'])
|
||||||
|
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
f.write(str_ocaml_qp_edit)
|
f.write(str_ocaml_qp_edit)
|
||||||
@ -771,7 +771,7 @@ if __name__ == "__main__":
|
|||||||
# G e t _ l _ d i c t _ e z f i o _ c f g #
|
# G e t _ l _ d i c t _ e z f i o _ c f g #
|
||||||
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# #
|
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~# #
|
||||||
|
|
||||||
qpackage_root_src = join(os.environ['QPACKAGE_ROOT'], "src")
|
qpackage_root_src = join(os.environ['QP_ROOT'], "src")
|
||||||
|
|
||||||
l_module_with_ezfio = []
|
l_module_with_ezfio = []
|
||||||
|
|
||||||
|
@ -24,14 +24,14 @@ from functools import reduce
|
|||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
QPACKAGE_ROOT = os.environ["QPACKAGE_ROOT"]
|
QP_ROOT = os.environ["QP_ROOT"]
|
||||||
except:
|
except:
|
||||||
print "Error: QPACKAGE_ROOT environment variable not found."
|
print "Error: QP_ROOT environment variable not found."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
sys.path = [QPACKAGE_ROOT + "/EZFIO/Python",
|
sys.path = [QP_ROOT + "/EZFIO/Python",
|
||||||
QPACKAGE_ROOT + "/resultsFile",
|
QP_ROOT + "/resultsFile",
|
||||||
QPACKAGE_ROOT + "/scripts"] + sys.path
|
QP_ROOT + "/scripts"] + sys.path
|
||||||
|
|
||||||
# ~#~#~#~#~#~ #
|
# ~#~#~#~#~#~ #
|
||||||
# I m p o r t #
|
# I m p o r t #
|
||||||
|
@ -260,7 +260,7 @@ Edit input data
|
|||||||
| Assert_failure (file, line, ch) as e ->
|
| Assert_failure (file, line, ch) as e ->
|
||||||
begin
|
begin
|
||||||
Printf.eprintf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n";
|
Printf.eprintf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n";
|
||||||
Printf.eprintf "Assert error in file $QPACKAGE_ROOT/ocaml/%s, line %d, character %d\n\n" file line ch;
|
Printf.eprintf "Assert error in file $QP_ROOT/ocaml/%s, line %d, character %d\n\n" file line ch;
|
||||||
Printf.eprintf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n";
|
Printf.eprintf "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n";
|
||||||
(* restore_backup ezfio_file; *)
|
(* restore_backup ezfio_file; *)
|
||||||
raise e
|
raise e
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import os
|
import os
|
||||||
file = open(os.environ["QPACKAGE_ROOT"]+'/src/Determinants/H_apply.template.f','r')
|
file = open(os.environ["QP_ROOT"]+'/src/Determinants/H_apply.template.f','r')
|
||||||
template = file.read()
|
template = file.read()
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
|
@ -8,14 +8,14 @@
|
|||||||
# Prints in stdout the name of a temporary file containing the basis set.
|
# Prints in stdout the name of a temporary file containing the basis set.
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export EMSL_API_ROOT="${QPACKAGE_ROOT}"/EMSL_Basis/
|
export EMSL_API_ROOT="${QP_ROOT}"/install/EMSL_Basis/
|
||||||
export PYTHONPATH="${EMSL_API_ROOT}":${PYTHONPATH}
|
export PYTHONPATH="${EMSL_API_ROOT}":${PYTHONPATH}
|
||||||
|
|
||||||
tmpfile="$1"
|
tmpfile="$1"
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Check the QPACKAGE_ROOT directory
|
# Check the QP_ROOT directory
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
echo "The QPACKAGE_ROOT environment variable is not set."
|
echo "The QP_ROOT environment variable is not set."
|
||||||
echo "Please reload the quantum_package.rc file."
|
echo "Please reload the quantum_package.rc file."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${QPACKAGE_ROOT}
|
cd ${QP_ROOT}
|
||||||
if [[ -f quantum_package.rc \
|
if [[ -f quantum_package.rc \
|
||||||
&& -f README.md \
|
&& -f README.md \
|
||||||
&& -d src \
|
&& -d src \
|
||||||
@ -35,7 +35,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Build all sources
|
# Build all sources
|
||||||
for dir in ${QPACKAGE_ROOT}/{src,ocaml}
|
for dir in ${QP_ROOT}/{src,ocaml}
|
||||||
do
|
do
|
||||||
make -C ${dir}
|
make -C ${dir}
|
||||||
if [[ $? -ne 0 ]]
|
if [[ $? -ne 0 ]]
|
||||||
@ -46,7 +46,7 @@ done
|
|||||||
|
|
||||||
|
|
||||||
# Copy the files in the static directory
|
# Copy the files in the static directory
|
||||||
QPACKAGE_STATIC=${QPACKAGE_ROOT}/quantum_package_static
|
QPACKAGE_STATIC=${QP_ROOT}/quantum_package_static
|
||||||
|
|
||||||
function find_libs ()
|
function find_libs ()
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ function find_libs ()
|
|||||||
|
|
||||||
function find_exec ()
|
function find_exec ()
|
||||||
{
|
{
|
||||||
find ${QPACKAGE_ROOT}/$1 -perm /u+x -type f
|
find ${QP_ROOT}/$1 -perm /u+x -type f
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -111,12 +111,12 @@ cd -
|
|||||||
for i in ${FORTRAN_EXEC}
|
for i in ${FORTRAN_EXEC}
|
||||||
do
|
do
|
||||||
i=$(basename $i)
|
i=$(basename $i)
|
||||||
echo $i \$QPACKAGE_ROOT/bin/$i
|
echo $i \$QP_ROOT/bin/$i
|
||||||
done >> ${QPACKAGE_STATIC}/data/executables
|
done >> ${QPACKAGE_STATIC}/data/executables
|
||||||
|
|
||||||
cp ${QPACKAGE_ROOT}/data/ezfio_defaults ${QPACKAGE_STATIC}/data
|
cp ${QP_ROOT}/data/ezfio_defaults ${QPACKAGE_STATIC}/data
|
||||||
mkdir -p ${QPACKAGE_STATIC}/src/Bitmask
|
mkdir -p ${QPACKAGE_STATIC}/src/Bitmask
|
||||||
cp ${QPACKAGE_ROOT}/src/Bitmask/bitmasks_module.f90 ${QPACKAGE_STATIC}/src/Bitmask
|
cp ${QP_ROOT}/src/Bitmask/bitmasks_module.f90 ${QPACKAGE_STATIC}/src/Bitmask
|
||||||
|
|
||||||
#
|
#
|
||||||
echo "Copying dynamic libraries"
|
echo "Copying dynamic libraries"
|
||||||
@ -143,10 +143,10 @@ cp -- ${QPACKAGE_STATIC}/extra_lib/lib{[gi]omp*,mkl*,lapack*,blas*,z*} ${QPACKAG
|
|||||||
echo "Copying EMSL_Basis directory"
|
echo "Copying EMSL_Basis directory"
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
|
|
||||||
cp -r -- ${QPACKAGE_ROOT}/EMSL_Basis ${QPACKAGE_STATIC}/
|
cp -r -- ${QP_ROOT}/EMSL_Basis ${QPACKAGE_STATIC}/
|
||||||
if [[ $? -ne 0 ]] ;
|
if [[ $? -ne 0 ]] ;
|
||||||
then
|
then
|
||||||
echo 'cp -r -- ${QPACKAGE_ROOT}/EMSL_Basis ${QPACKAGE_STATIC}/'
|
echo 'cp -r -- ${QP_ROOT}/EMSL_Basis ${QPACKAGE_STATIC}/'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -155,10 +155,10 @@ fi
|
|||||||
echo "Copying scripts directory"
|
echo "Copying scripts directory"
|
||||||
# -------------------------
|
# -------------------------
|
||||||
|
|
||||||
cp -r -- ${QPACKAGE_ROOT}/scripts ${QPACKAGE_STATIC}/
|
cp -r -- ${QP_ROOT}/scripts ${QPACKAGE_STATIC}/
|
||||||
if [[ $? -ne 0 ]] ;
|
if [[ $? -ne 0 ]] ;
|
||||||
then
|
then
|
||||||
echo 'cp -r -- ${QPACKAGE_ROOT}/scripts ${QPACKAGE_STATIC}/'
|
echo 'cp -r -- ${QP_ROOT}/scripts ${QPACKAGE_STATIC}/'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -168,13 +168,13 @@ echo "Creating quantum_package.rc"
|
|||||||
# ---------------------------
|
# ---------------------------
|
||||||
|
|
||||||
cat << EOF > ${QPACKAGE_STATIC}/quantum_package.rc
|
cat << EOF > ${QPACKAGE_STATIC}/quantum_package.rc
|
||||||
export QPACKAGE_ROOT=\$( cd \$(dirname "\${BASH_SOURCE}") ; pwd -P )
|
export QP_ROOT=\$( cd \$(dirname "\${BASH_SOURCE}") ; pwd -P )
|
||||||
export LD_LIBRARY_PATH="\${QPACKAGE_ROOT}"/lib:\${LD_LIBRARY_PATH}
|
export LD_LIBRARY_PATH="\${QP_ROOT}"/lib:\${LD_LIBRARY_PATH}
|
||||||
export LIBRARY_PATH="\${QPACKAGE_ROOT}"/lib:\${LIBRARY_PATH}
|
export LIBRARY_PATH="\${QP_ROOT}"/lib:\${LIBRARY_PATH}
|
||||||
export PYTHONPATH="\${QPACKAGE_ROOT}"/scripts:\${PYTHONPATH}
|
export PYTHONPATH="\${QP_ROOT}"/scripts:\${PYTHONPATH}
|
||||||
export PATH="\${QPACKAGE_ROOT}"/scripts:\${PATH}
|
export PATH="\${QP_ROOT}"/scripts:\${PATH}
|
||||||
export PATH="\${QPACKAGE_ROOT}"/bin:\${PATH}
|
export PATH="\${QP_ROOT}"/bin:\${PATH}
|
||||||
export PATH="\${QPACKAGE_ROOT}"/ocaml:\${PATH}
|
export PATH="\${QP_ROOT}"/ocaml:\${PATH}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
#exit 0
|
#exit 0
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
#
|
#
|
||||||
# Cleans a module directory
|
# Cleans a module directory
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
source ${QP_ROOT}/scripts/qp_include.sh
|
||||||
|
|
||||||
function do_clean()
|
function do_clean()
|
||||||
{
|
{
|
||||||
|
@ -2,20 +2,20 @@
|
|||||||
#
|
#
|
||||||
# Thu Mar 26 01:27:14 CET 2015
|
# Thu Mar 26 01:27:14 CET 2015
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd ${QPACKAGE_ROOT}/data
|
cd ${QP_ROOT}/data
|
||||||
rm -f executables
|
rm -f executables
|
||||||
EXES=$(find ${QPACKAGE_ROOT}/src -perm /u+x -type f | grep -e "${QPACKAGE_ROOT}/src/[^/]*/[^/]*$" |sort )
|
EXES=$(find ${QP_ROOT}/src -perm /u+x -type f | grep -e "${QP_ROOT}/src/[^/]*/[^/]*$" |sort )
|
||||||
|
|
||||||
for EXE in $EXES
|
for EXE in $EXES
|
||||||
do
|
do
|
||||||
printf "%-30s %s\n" $(basename $EXE) $EXE | sed "s|${QPACKAGE_ROOT}|\$QPACKAGE_ROOT|g" >> executables
|
printf "%-30s %s\n" $(basename $EXE) $EXE | sed "s|${QP_ROOT}|\$QP_ROOT|g" >> executables
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@
|
|||||||
# Tue Jan 13 14:18:05 CET 2015
|
# Tue Jan 13 14:18:05 CET 2015
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
source ${QPACKAGE_ROOT}/scripts/qp_include.sh
|
source ${QP_ROOT}/scripts/qp_include.sh
|
||||||
|
|
||||||
|
|
||||||
function do_gitingore()
|
function do_gitingore()
|
||||||
|
@ -30,13 +30,13 @@ except ImportError:
|
|||||||
|
|
||||||
# Canot cache for namedtuple are not hashable
|
# Canot cache for namedtuple are not hashable
|
||||||
def get_dict_child():
|
def get_dict_child():
|
||||||
"""Loop over MODULE in QPACKAGE_ROOT/src, open all the NEEDED_CHILDREN_MODULES
|
"""Loop over MODULE in QP_ROOT/src, open all the NEEDED_CHILDREN_MODULES
|
||||||
and create a dict[MODULE] = [sub module needed, ...]
|
and create a dict[MODULE] = [sub module needed, ...]
|
||||||
"""
|
"""
|
||||||
d_ref = dict()
|
d_ref = dict()
|
||||||
|
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qp_root = os.environ['QP_ROOT']
|
||||||
dir_ = os.path.join(qpackage_root, 'src')
|
dir_ = os.path.join(qp_root, 'src')
|
||||||
|
|
||||||
for o in os.listdir(dir_):
|
for o in os.listdir(dir_):
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ if __name__ == '__main__':
|
|||||||
elif arguments["create"]:
|
elif arguments["create"]:
|
||||||
l_children = arguments["<children_module>"]
|
l_children = arguments["<children_module>"]
|
||||||
|
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qpackage_root = os.environ['QP_ROOT']
|
||||||
path = os.path.join(qpackage_root, "src", arguments["<name>"])
|
path = os.path.join(qpackage_root, "src", arguments["<name>"])
|
||||||
|
|
||||||
print "You will create the module:"
|
print "You will create the module:"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
Pert_dir = os.environ["QPACKAGE_ROOT"]+"/src/Perturbation/"
|
Pert_dir = os.environ["QP_ROOT"]+"/src/Perturbation/"
|
||||||
|
|
||||||
perturbations = []
|
perturbations = []
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ from docopt import docopt
|
|||||||
|
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qpackage_root = os.environ['QP_ROOT']
|
||||||
|
|
||||||
EZFIO = "{0}/EZFIO".format(qpackage_root)
|
EZFIO = "{0}/EZFIO".format(qpackage_root)
|
||||||
sys.path = [EZFIO + "/Python"] + sys.path
|
sys.path = [EZFIO + "/Python"] + sys.path
|
||||||
|
@ -13,23 +13,23 @@ function unique_list()
|
|||||||
|
|
||||||
function check_current_dir_is_src()
|
function check_current_dir_is_src()
|
||||||
{
|
{
|
||||||
if [[ "${PWD}" == "${QPACKAGE_ROOT}/src" ]]
|
if [[ "${PWD}" == "${QP_ROOT}/src" ]]
|
||||||
then
|
then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "Current directory should be \$QPACKAGE_ROOT/src"
|
echo "Current directory should be \$QP_ROOT/src"
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function check_current_dir_is_module()
|
function check_current_dir_is_module()
|
||||||
{
|
{
|
||||||
# If the prefix ${QPACKAGE_ROOT}/src/ can be removed from $PWD, it means that
|
# If the prefix ${QP_ROOT}/src/ can be removed from $PWD, it means that
|
||||||
# $PWD is somewhere below ${QPACKAGE_ROOT}/src/ so it is a module.
|
# $PWD is somewhere below ${QP_ROOT}/src/ so it is a module.
|
||||||
# If the prefix ${QPACKAGE_ROOT}/src/ can not be removed from $PWD, then
|
# If the prefix ${QP_ROOT}/src/ can not be removed from $PWD, then
|
||||||
# "${PWD##${QPACKAGE_ROOT}/src/}" == "$PWD".
|
# "${PWD##${QP_ROOT}/src/}" == "$PWD".
|
||||||
|
|
||||||
if [[ "${PWD##${QPACKAGE_ROOT}/src/}" != "$PWD" ]]
|
if [[ "${PWD##${QP_ROOT}/src/}" != "$PWD" ]]
|
||||||
then
|
then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path = [ os.environ["QPACKAGE_ROOT"]+"/EZFIO/Python" ] + sys.path
|
sys.path = [ os.environ["QP_ROOT"]+"/EZFIO/Python" ] + sys.path
|
||||||
from ezfio import ezfio
|
from ezfio import ezfio
|
||||||
|
|
||||||
ezfio.set_filename(sys.argv[1])
|
ezfio.set_filename(sys.argv[1])
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
# directory, where xxx is the corresponding mo_label.
|
# directory, where xxx is the corresponding mo_label.
|
||||||
# Wed Apr 2 14:35:15 CEST 2014
|
# Wed Apr 2 14:35:15 CEST 2014
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
@ -3,24 +3,24 @@
|
|||||||
# Upgrades the EZFIO library from the web.
|
# Upgrades the EZFIO library from the web.
|
||||||
# Tue Nov 4 00:53:13 CET 2014
|
# Tue Nov 4 00:53:13 CET 2014
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd -- ${QPACKAGE_ROOT}
|
cd -- ${QP_ROOT}
|
||||||
mv -- ${QPACKAGE_ROOT}/EZFIO ${QPACKAGE_ROOT}/EZFIO.old
|
mv -- ${QP_ROOT}/EZFIO ${QP_ROOT}/EZFIO.old
|
||||||
|
|
||||||
${QPACKAGE_ROOT}/scripts/install/install_ezfio.sh
|
${QP_ROOT}/scripts/install/install_ezfio.sh
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]
|
if [[ $? -eq 0 ]]
|
||||||
then
|
then
|
||||||
rm -rf -- ${QPACKAGE_ROOT}/EZFIO.old
|
rm -rf -- ${QP_ROOT}/EZFIO.old
|
||||||
echo "Successfully updated EZFIO"
|
echo "Successfully updated EZFIO"
|
||||||
else
|
else
|
||||||
rm -rf -- ${QPACKAGE_ROOT}/EZFIO
|
rm -rf -- ${QP_ROOT}/EZFIO
|
||||||
mv -- ${QPACKAGE_ROOT}/EZFIO.old ${QPACKAGE_ROOT}/EZFIO
|
mv -- ${QP_ROOT}/EZFIO.old ${QP_ROOT}/EZFIO
|
||||||
echo "Failed to update EZFIO"
|
echo "Failed to update EZFIO"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -3,23 +3,23 @@
|
|||||||
# Upgrades IRPF90 from the web.
|
# Upgrades IRPF90 from the web.
|
||||||
# Wed Mar 25 11:41:04 CET 2015
|
# Wed Mar 25 11:41:04 CET 2015
|
||||||
|
|
||||||
if [[ -z ${QPACKAGE_ROOT} ]]
|
if [[ -z ${QP_ROOT} ]]
|
||||||
then
|
then
|
||||||
print "The QPACKAGE_ROOT environment variable is not set."
|
print "The QP_ROOT environment variable is not set."
|
||||||
print "Please reload the quantum_package.rc file."
|
print "Please reload the quantum_package.rc file."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd -- ${QPACKAGE_ROOT}
|
cd -- ${QP_ROOT}
|
||||||
mv -f -- ${QPACKAGE_ROOT}/irpf90 ${QPACKAGE_ROOT}/irpf90.old
|
mv -f -- ${QP_ROOT}/irpf90 ${QP_ROOT}/irpf90.old
|
||||||
|
|
||||||
${QPACKAGE_ROOT}/scripts/install/install_irpf90.sh
|
${QP_ROOT}/scripts/install/install_irpf90.sh
|
||||||
|
|
||||||
if [[ $? -eq 0 ]]
|
if [[ $? -eq 0 ]]
|
||||||
then
|
then
|
||||||
rm -rf -- ${QPACKAGE_ROOT}/irpf90.old
|
rm -rf -- ${QP_ROOT}/irpf90.old
|
||||||
echo "Successfully updated IRPF90"
|
echo "Successfully updated IRPF90"
|
||||||
else
|
else
|
||||||
rm -rf -- ${QPACKAGE_ROOT}/irpf90
|
rm -rf -- ${QP_ROOT}/irpf90
|
||||||
mv -- ${QPACKAGE_ROOT}/irpf90.old ${QPACKAGE_ROOT}/irpf90
|
mv -- ${QP_ROOT}/irpf90.old ${QP_ROOT}/irpf90
|
||||||
echo "Failed to update IRPF90"
|
echo "Failed to update IRPF90"
|
||||||
fi
|
fi
|
||||||
|
@ -13,9 +13,9 @@ from os.path import join
|
|||||||
# \_| |_ (_) |_) (_| | | | | | (_)
|
# \_| |_ (_) |_) (_| | | | | | (_)
|
||||||
#
|
#
|
||||||
|
|
||||||
QPACKAGE_ROOT = os.getcwd()
|
QP_ROOT = os.getcwd()
|
||||||
QPACKAGE_ROOT_BIN = join(QPACKAGE_ROOT, "bin")
|
QP_ROOT_BIN = join(QP_ROOT, "bin")
|
||||||
QPACKAGE_ROOT_INSTALL = join(QPACKAGE_ROOT, "install")
|
QP_ROOT_INSTALL = join(QP_ROOT, "install")
|
||||||
|
|
||||||
d_dependancy = {
|
d_dependancy = {
|
||||||
"ocaml": ["m4", "curl", "zlib", "patch", "gcc"],
|
"ocaml": ["m4", "curl", "zlib", "patch", "gcc"],
|
||||||
@ -42,58 +42,58 @@ path_github = {"head": "http://github.com/", "tail": "archive/master.tar.gz"}
|
|||||||
ocaml = Info(
|
ocaml = Info(
|
||||||
url='http://raw.github.com/ocaml/opam/master/shell/opam_installer.sh',
|
url='http://raw.github.com/ocaml/opam/master/shell/opam_installer.sh',
|
||||||
description=' ocaml',
|
description=' ocaml',
|
||||||
default_path=join(QPACKAGE_ROOT_BIN, "opam"))
|
default_path=join(QP_ROOT_BIN, "opam"))
|
||||||
|
|
||||||
m4 = Info(
|
m4 = Info(
|
||||||
url="http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz",
|
url="http://ftp.gnu.org/gnu/m4/m4-latest.tar.gz",
|
||||||
description=" m4",
|
description=" m4",
|
||||||
default_path=join(QPACKAGE_ROOT_BIN, "m4"))
|
default_path=join(QP_ROOT_BIN, "m4"))
|
||||||
|
|
||||||
curl = Info(
|
curl = Info(
|
||||||
url="http://qmcchem.ups-tlse.fr/files/scemama/curl-7.30.0.ermine.tar.bz2",
|
url="http://qmcchem.ups-tlse.fr/files/scemama/curl-7.30.0.ermine.tar.bz2",
|
||||||
description=" curl",
|
description=" curl",
|
||||||
default_path=join(QPACKAGE_ROOT_BIN, "curl"))
|
default_path=join(QP_ROOT_BIN, "curl"))
|
||||||
|
|
||||||
zlib = Info(
|
zlib = Info(
|
||||||
url='http://zlib.net/zlib-1.2.8.tar.gz',
|
url='http://zlib.net/zlib-1.2.8.tar.gz',
|
||||||
description=' zlib',
|
description=' zlib',
|
||||||
default_path=join(QPACKAGE_ROOT_INSTALL, "zlib"))
|
default_path=join(QP_ROOT_INSTALL, "zlib"))
|
||||||
|
|
||||||
path = Info(
|
path = Info(
|
||||||
url='ftp://ftp.gnu.org/gnu/patch/patch-2.7.5.tar.gz',
|
url='ftp://ftp.gnu.org/gnu/patch/patch-2.7.5.tar.gz',
|
||||||
description=' path',
|
description=' path',
|
||||||
default_path=join(QPACKAGE_ROOT_BIN, "patch"))
|
default_path=join(QP_ROOT_BIN, "patch"))
|
||||||
|
|
||||||
irpf90 = Info(
|
irpf90 = Info(
|
||||||
url='{head}/scemama/irpf90/archive/v1.6.5.tar.gz'.format(**path_github),
|
url='{head}/scemama/irpf90/archive/v1.6.5.tar.gz'.format(**path_github),
|
||||||
description=' irpf90',
|
description=' irpf90',
|
||||||
default_path=join(QPACKAGE_ROOT_BIN, "irpf90"))
|
default_path=join(QP_ROOT_BIN, "irpf90"))
|
||||||
|
|
||||||
docopt = Info(
|
docopt = Info(
|
||||||
url='{head}/docopt/docopt/{tail}'.format(**path_github),
|
url='{head}/docopt/docopt/{tail}'.format(**path_github),
|
||||||
description=' docop',
|
description=' docop',
|
||||||
default_path=join(QPACKAGE_ROOT_INSTALL, "docopt"))
|
default_path=join(QP_ROOT_INSTALL, "docopt"))
|
||||||
|
|
||||||
resultsFile = Info(
|
resultsFile = Info(
|
||||||
url='{head}/LCPQ/resultsFile/{tail}'.format(**path_github),
|
url='{head}/LCPQ/resultsFile/{tail}'.format(**path_github),
|
||||||
description=' resultsFile',
|
description=' resultsFile',
|
||||||
default_path=join(QPACKAGE_ROOT_INSTALL, "resultsFile"))
|
default_path=join(QP_ROOT_INSTALL, "resultsFile"))
|
||||||
|
|
||||||
ninja = Info(
|
ninja = Info(
|
||||||
url='{head}/martine/ninja/{tail}'.format(**path_github),
|
url='{head}/martine/ninja/{tail}'.format(**path_github),
|
||||||
description=' nina',
|
description=' nina',
|
||||||
default_path=join(QPACKAGE_ROOT_BIN, "ninja"))
|
default_path=join(QP_ROOT_BIN, "ninja"))
|
||||||
|
|
||||||
emsl = Info(
|
emsl = Info(
|
||||||
url='{head}/LCPQ/EMSL_Basis_Set_Exchange_Local/{tail}'.format(**
|
url='{head}/LCPQ/EMSL_Basis_Set_Exchange_Local/{tail}'.format(**
|
||||||
path_github),
|
path_github),
|
||||||
description=' emsl',
|
description=' emsl',
|
||||||
default_path=join(QPACKAGE_ROOT_INSTALL, "emsl"))
|
default_path=join(QP_ROOT_INSTALL, "emsl"))
|
||||||
|
|
||||||
ezfio = Info(
|
ezfio = Info(
|
||||||
url='{head}/LCPQ/EZFIO/{tail}'.format(**path_github),
|
url='{head}/LCPQ/EZFIO/{tail}'.format(**path_github),
|
||||||
description=' EZFIO',
|
description=' EZFIO',
|
||||||
default_path=join(QPACKAGE_ROOT_INSTALL, "EZFIO"))
|
default_path=join(QP_ROOT_INSTALL, "EZFIO"))
|
||||||
|
|
||||||
d_info = dict()
|
d_info = dict()
|
||||||
|
|
||||||
@ -236,10 +236,10 @@ if "ninja" in l_need_genealogy:
|
|||||||
|
|
||||||
l_cmd = ["cd install;",
|
l_cmd = ["cd install;",
|
||||||
"wget {0} -O {1} -o /dev/null ;".format(url, path_archive),
|
"wget {0} -O {1} -o /dev/null ;".format(url, path_archive),
|
||||||
"./scripts/install_ninja.sh;", "cd -"]
|
"./scripts/install_ninja.sh 2>/dev/null;", "cd -"]
|
||||||
|
|
||||||
subprocess.check_call(" ".join(l_cmd), shell=True)
|
subprocess.check_call(" ".join(l_cmd), shell=True)
|
||||||
|
l_need_genealogy.remove("ninja")
|
||||||
|
|
||||||
print """
|
print """
|
||||||
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
||||||
@ -288,7 +288,7 @@ for need in l_need_genealogy:
|
|||||||
|
|
||||||
l_string += l_build
|
l_string += l_build
|
||||||
|
|
||||||
path = join(QPACKAGE_ROOT_INSTALL, "build.ninja")
|
path = join(QP_ROOT_INSTALL, "build.ninja")
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
f.write("\n".join(l_string))
|
f.write("\n".join(l_string))
|
||||||
|
|
||||||
@ -310,9 +310,9 @@ print """
|
|||||||
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
# ~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~#~ #
|
||||||
"""
|
"""
|
||||||
|
|
||||||
python_path = [join(QPACKAGE_ROOT, "scripts"), join(QPACKAGE_ROOT, "install")]
|
python_path = [join(QP_ROOT, "scripts"), join(QP_ROOT, "install")]
|
||||||
|
|
||||||
l_python = [join(QPACKAGE_ROOT, "scripts")]
|
l_python = [join(QP_ROOT, "scripts")]
|
||||||
for dir_ in python_path:
|
for dir_ in python_path:
|
||||||
for folder in os.listdir(dir_):
|
for folder in os.listdir(dir_):
|
||||||
path = join(dir_, folder)
|
path = join(dir_, folder)
|
||||||
@ -323,25 +323,27 @@ for dir_ in python_path:
|
|||||||
def find_path(bin_):
|
def find_path(bin_):
|
||||||
try:
|
try:
|
||||||
locate = l_installed[bin_]
|
locate = l_installed[bin_]
|
||||||
except:
|
except KeyError:
|
||||||
locate = d_info[bin_].default_path
|
locate = d_info[bin_].default_path
|
||||||
return locate
|
return locate
|
||||||
|
|
||||||
|
|
||||||
l_rc = [
|
l_rc = [
|
||||||
'export QPACKAGE_ROOT={0}'.format(QPACKAGE_ROOT),
|
'export QP_ROOT={0}'.format(QP_ROOT),
|
||||||
'export QP_EZFIO={0}'.format(find_path('ezfio')),
|
'export QP_EZFIO={0}'.format(find_path('ezfio')),
|
||||||
'export IRPF90={0}'.format(find_path("irpf90")),
|
'export IRPF90={0}'.format(find_path("irpf90")),
|
||||||
'export NINJA={0}'.format(find_path("ninja")),
|
'export NINJA={0}'.format(find_path("ninja")),
|
||||||
'export PYTHONPATH=${{PYTHONPATH}}:{0}'.format(":".join(l_python)), '',
|
'export QP_PYTHON={0}'.format(":".join(l_python)),
|
||||||
'export PATH=${PATH}:${PYTHONPATH}:"${QPACKAGE_ROOT}"/bin',
|
"",
|
||||||
'export LD_LIBRARY_PATH="${QPACKAGE_ROOT}"/lib:${LD_LIBRARY_PATH}',
|
'export PYTHONPATH="${PYTHONPATH}":"${QP_PYTHON}"',
|
||||||
'export LIBRARY_PATH="${QPACKAGE_ROOT}"/lib:${LIBRARY_PATH}', ""
|
'export PATH="${PATH}":"${QP_PYTHON}":"${QP_ROOT}"/bin',
|
||||||
|
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"',
|
||||||
|
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', ""
|
||||||
'source . ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
|
'source . ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
|
||||||
""
|
""
|
||||||
]
|
]
|
||||||
|
|
||||||
path = join(QPACKAGE_ROOT, "quantum_package.rc")
|
path = join(QP_ROOT, "quantum_package.rc")
|
||||||
with open(path, "w+") as f:
|
with open(path, "w+") as f:
|
||||||
f.write("\n".join(l_rc))
|
f.write("\n".join(l_rc))
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ END_PROVIDER
|
|||||||
|
|
||||||
BEGIN_SHELL [ /bin/bash ]
|
BEGIN_SHELL [ /bin/bash ]
|
||||||
|
|
||||||
for NAME in $(\ls -d ${QPACKAGE_ROOT}/src/*/)
|
for NAME in $(\ls -d ${QP_ROOT}/src/*/)
|
||||||
do
|
do
|
||||||
NAME=$(basename ${NAME})
|
NAME=$(basename ${NAME})
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
@ -3,7 +3,7 @@ subroutine save_mos
|
|||||||
double precision, allocatable :: buffer(:,:)
|
double precision, allocatable :: buffer(:,:)
|
||||||
integer :: i,j
|
integer :: i,j
|
||||||
|
|
||||||
call system('$QPACKAGE_ROOT/scripts/save_current_mos.sh '//trim(ezfio_filename))
|
call system('$QP_ROOT/scripts/save_current_mos.sh '//trim(ezfio_filename))
|
||||||
|
|
||||||
call ezfio_set_mo_basis_mo_tot_num(mo_tot_num)
|
call ezfio_set_mo_basis_mo_tot_num(mo_tot_num)
|
||||||
call ezfio_set_mo_basis_mo_label(mo_label)
|
call ezfio_set_mo_basis_mo_label(mo_label)
|
||||||
|
@ -2,7 +2,7 @@ BEGIN_SHELL [ /usr/bin/env python ]
|
|||||||
from perturbation import perturbations
|
from perturbation import perturbations
|
||||||
import os
|
import os
|
||||||
|
|
||||||
filename = os.environ["QPACKAGE_ROOT"]+"/src/Perturbation/perturbation.template.f"
|
filename = os.environ["QP_ROOT"]+"/src/Perturbation/perturbation.template.f"
|
||||||
file = open(filename,'r')
|
file = open(filename,'r')
|
||||||
template = file.read()
|
template = file.read()
|
||||||
file.close()
|
file.close()
|
||||||
|
@ -31,7 +31,7 @@ Creating a new module
|
|||||||
=====================
|
=====================
|
||||||
|
|
||||||
Every new module should be created using the interactive ``create_module.sh``
|
Every new module should be created using the interactive ``create_module.sh``
|
||||||
script located in the ``${QPACKAGE_ROOT}/scripts`` directory. This will create
|
script located in the ``${QP_ROOT}/scripts`` directory. This will create
|
||||||
all the required files with correct templates.
|
all the required files with correct templates.
|
||||||
|
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ HTML, man, etc.
|
|||||||
Creating a shell script
|
Creating a shell script
|
||||||
=======================
|
=======================
|
||||||
|
|
||||||
Shell scripts should be located in the ``${QPACKAGE_ROOT}/scripts`` directory.
|
Shell scripts should be located in the ``${QP_ROOT}/scripts`` directory.
|
||||||
Relative paths should be avoided as much as possible, and the result of commands
|
Relative paths should be avoided as much as possible, and the result of commands
|
||||||
should be always checked. For example, when creating a directory the existence
|
should be always checked. For example, when creating a directory the existence
|
||||||
of the directory has to be checked.
|
of the directory has to be checked.
|
||||||
|
@ -5,9 +5,9 @@ import subprocess
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
qpackage_root = os.environ['QPACKAGE_ROOT']
|
qpackage_root = os.environ['QP_ROOT']
|
||||||
|
|
||||||
EZFIO = "{0}/EZFIO".format(qpackage_root)
|
EZFIO = "{0}/install/EZFIO".format(qpackage_root)
|
||||||
sys.path = [EZFIO + "/Python"] + sys.path
|
sys.path = [EZFIO + "/Python"] + sys.path
|
||||||
|
|
||||||
from ezfio import ezfio
|
from ezfio import ezfio
|
||||||
|
Loading…
Reference in New Issue
Block a user