10
0
mirror of https://github.com/LCPQ/quantum_package synced 2025-01-09 04:43:18 +01:00

Merge pull request #80 from TApplencourt/master

Can install on sv7
This commit is contained in:
Thomas Applencourt 2015-06-24 09:38:39 +02:00
commit 2c5773dcf2
17 changed files with 249 additions and 137 deletions

View File

@ -138,6 +138,8 @@ Optional:
size: <str> The size information.
(by default is one)
Example : 1, =sum(ao_num); (ao_num,3)
ATTENTION : The module and the value are separed by a "." not a "_".
For exemple (determinants.n_det)
ezfio_name: <str> The name for the EZFIO lib
(by default is <provider_name>)
ezfio_dir: <str> Will be the folder of EZFIO.

26
configure vendored
View File

@ -158,7 +158,7 @@ def check_output(*popenargs, **kwargs):
>>> check_output(['/usr/bin/python', '--version'])
Python 2.6.2
"""
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
process = subprocess.Popen(stdout=subprocess.PIPE,stderr=subprocess.PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
@ -190,7 +190,7 @@ def checking(d_dependency):
def check_availability(binary):
"""
If avalabie return the path who can can't find the
If avalable return the path who can find the
binary else return 0
"""
@ -198,7 +198,19 @@ def checking(d_dependency):
check_python()
try:
return check_output(["which", binary])
a = check_output(["which", binary])
if binary == "irpf90":
version = check_output("bash irpf90 -v".split())
from distutils.version import LooseVersion
if LooseVersion(version) < LooseVersion("1.6.7"):
return 0
else:
return a
return a
except subprocess.CalledProcessError:
default_path = d_info[binary].default_path
if os.path.exists(default_path):
@ -208,7 +220,7 @@ def checking(d_dependency):
def get_list_descendant(d_dependency, l_installed, l_needed):
"""
Descendant a node reachable by repeated proceeding from parent to child.
Descendant : a node reachable by repeated proceeding from parent to child.
"""
d_need_genealogy = dict()
@ -265,7 +277,7 @@ def installation(l_install_descendant):
def create_rule_ninja():
l_rules = [
"rule download", " command = wget ${url} -O ${out} -o /dev/null",
"rule download", " command = wget --no-check-certificate ${url} -O ${out} -o /dev/null",
" description = Downloading ${descr}", ""
]
@ -423,8 +435,8 @@ def create_ninja_and_rc(l_installed):
'export IRPF90={0}'.format(find_path("irpf90", l_installed)),
'export NINJA={0}'.format(find_path("ninja", l_installed)),
'export QP_PYTHON={0}'.format(":".join(l_python)), "",
'export PYTHONPATH="${PYTHONPATH}":"${QP_PYTHON}"',
'export PATH="${PATH}":"${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml',
'export PYTHONPATH="${QP_PYTHON}":"${PYTHONPATH}"',
'export PATH="${QP_PYTHON}":"${QP_ROOT}"/bin:"${QP_ROOT}"/ocaml:"${PATH}"',
'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',

View File

@ -0,0 +1,25 @@
#!/bin/bash
# This script should be included
# pro:
#
# solid way to compare fancy version strings:
# support any length of sub-parts (ie: 1.3alpha.2.dev2 > 1.1 ?)
# support alpha-betical sort (ie: 1.alpha < 1.beta2)
# support big size version (ie: 1.10003939209329320932 > 1.2039209378273789273 ?)
# can easily be modified to support n arguments. (leaved as an exercise ;) )
# usually very usefull with 3 arguments: (ie: 1.2 < my_version < 2.7 )
# cons:
#
# uses a lot of various calls to different programs. So it's not that efficient.
# uses a pretty recent version of sort and it might not be available on your system. (check with man sort)
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | tail -n 1)" == "$1"; }
irp_cur_version=`irpf90 -v`
irp_need_version=1.6.7
if version_gt $irp_cur_version $irp_need_version; then
echo "OK"
fi
echo "FAIL"

View File

@ -18,9 +18,8 @@ p = re.compile(ur'-I IRPF90_temp/\S*\s+')
mod = re.compile(ur'module\s+(?P<mod>\S+).+end\s?module\s+(?P=mod)?',
re.MULTILINE | re.IGNORECASE)
tmpdir_root = os.environ.get("TMPDIR",failobj="/dev/shm")
TMPDIR = os.path.join(tmpdir_root,os.environ["USER"],"qp_compiler")
tmpdir_root = os.environ.get("TMPDIR", failobj="/dev/shm")
TMPDIR = os.path.join(tmpdir_root, os.environ["USER"], "qp_compiler")
def return_filename_to_cache(command):

View File

@ -711,7 +711,7 @@ def create_build_ninja_module(path_module):
f.write("\n".join(l_string))
def create_build_ninja_global():
def create_build_ninja_global(l_module):
l_string = ["rule update_build_ninja_root",
" command = {0} update".format(__file__),
@ -723,7 +723,7 @@ def create_build_ninja_global():
""]
l_string += ["rule make_clean",
" command = cd {0} ; clean_modules.sh *".format(QP_SRC),
" command = module_handler.py clean {0}".format(" ".join([m.rel for m in l_module])),
" description = Cleaning all modules", ""]
l_string += ["build dummy_target: update_build_ninja_root",
@ -832,7 +832,7 @@ if __name__ == "__main__":
d_binaries = get_dict_binaries(l_module, mode="development")
l_module = d_binaries.keys()
create_build_ninja_global()
create_build_ninja_global(l_module)
for module_to_compile in l_module:

View File

@ -44,6 +44,8 @@ Optional:
size: <str> The size information.
(by default is one)
Example : 1, =sum(ao_num); (ao_num,3)
ATTENTION : The module and the value are separed by a "." not a "_".
For exemple (determinants.n_det)
ezfio_name: <str> The name for the EZFIO lib
(by default is <provider_name>)
ezfio_dir: <str> Will be the folder of EZFIO.
@ -228,6 +230,8 @@ def get_dict_config_file(module_obj):
# pvd = provider
pvd = section.lower()
d[pvd]["module"] = module_obj
# Create the dictionary who containt the value per default
d_default = {"ezfio_name": pvd,
"ezfio_dir": module_obj.lower,
@ -255,7 +259,7 @@ def get_dict_config_file(module_obj):
sys.exit(1)
try:
interface = map(str.lower, config_file.get(section, "interface").split(","))
interface = [i.lower().strip() for i in config_file.get(section, "interface").split(",")]
except ConfigParser.NoOptionError:
error("doc", pvd, module_obj.path)
sys.exit(1)
@ -317,7 +321,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
ez_p.set_doc(dict_info['doc'])
ez_p.set_ezfio_dir(dict_info['ezfio_dir'])
ez_p.set_ezfio_name(dict_info['ezfio_name'])
ez_p.set_output("output_%s" % dict_info['ezfio_dir'])
ez_p.set_output("output_%s" % dict_info['module'].lower)
# (nuclei.nucl_num,pseudo.klocmax) => (nucl_num,klocmax)
ez_p.set_size(re.sub(r'\w+\.', "", dict_info['size']))

View File

@ -1,13 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Create the NEEDED_MODULE
aka the genealogy (children module, subchildren module and so on),
of a NEEDED_CHILDREN_MODULES file
Module utilitary
Usage:
module_handler.py print_descendant [<NEEDED_CHILDREN_MODULES>]
module_handler.py create_png [<NEEDED_CHILDREN_MODULES>]
module_handler.py print_descendant [<module_name>...]
module_handler.py create_png [<module_name>...]
module_handler.py clean [<module_name>...]
Options:
print_descendant Print the genealogy of the NEEDED_CHILDREN_MODULES
@ -19,16 +18,22 @@ Options:
import os
import sys
import os.path
from collections import namedtuple
try:
from docopt import docopt
from qp_path import QP_SRC
except ImportError:
print "source .quantum_package.rc"
raise
# Canot cache for namedtuple are not hashable
def is_module(path_module):
return os.path.isfile(os.path.join(QP_SRC,
path_module,
"NEEDED_CHILDREN_MODULES"))
def get_dict_child(l_root_abs=None):
"""Loop over MODULE in QP_ROOT/src, open all the NEEDED_CHILDREN_MODULES
and create a dict[MODULE] = [sub module needed, ...]
@ -36,8 +41,7 @@ def get_dict_child(l_root_abs=None):
d_ref = dict()
if not l_root_abs:
qp_root = os.environ['QP_ROOT']
l_root_abs = [os.path.join(qp_root, 'src')]
l_root_abs = [QP_SRC]
for root_abs in l_root_abs:
for module_rel in os.listdir(root_abs):
@ -201,19 +205,48 @@ if __name__ == '__main__':
arguments = docopt(__doc__)
if not arguments['<NEEDED_CHILDREN_MODULES>']:
if not arguments['<module_name>']:
dir_ = os.getcwd()
l_module = [os.path.basename(dir_)]
else:
path_file = os.path.abspath(arguments['<NEEDED_CHILDREN_MODULES>'])
path_file = os.path.expanduser(path_file)
path_file = os.path.expandvars(path_file)
dir_ = os.path.dirname(path_file)
l_module = arguments['<module_name>']
for module in l_module:
if not is_module(module):
print "{0} is not a volide module. Abort".format(module)
print "No NEEDED_CHILDREN_MODULES in it"
sys.exit(1)
path_file = os.path.basename(dir_)
m = ModuleHandler()
if arguments['print_descendant']:
print " ".join(sorted(m.l_module))
for module in l_module:
print " ".join(sorted(m.l_descendant_unique([module])))
if arguments["create_png"]:
m.create_png([path_file])
m.create_png(l_module)
if arguments["clean"]:
for module in l_module:
module_abs = os.path.realpath(os.path.join(QP_SRC, module))
import shutil
for f in ['IRPF90_temp', 'IRPF90_man']:
try:
shutil.rmtree(os.path.join(module_abs, f))
except:
pass
for symlink in m.l_descendant_unique([module]):
try:
os.unlink(os.path.join(module_abs,symlink))
except:
pass
for f in ["irpf90_entities", "tags", "irpf90.make", "Makefile"]:
try:
os.remove(os.path.join(module_abs,f))
except:
pass

View File

@ -5,8 +5,8 @@ Usage:
qp_install_module.py create -n <name> [<children_module>...]
qp_install_module.py download -n <name> [<path_folder>...]
qp_install_module.py install <name>...
qp_install_module.py list (--installed|--avalaible-local|--avalaible-remote)
qp_install_module.py uninstall <name>...
qp_install_module.py list (--installed|--avalaible-local)
qp_install_module.py uninstall <name>... [--and_ancestor]
Options:
@ -22,6 +22,8 @@ try:
from module_handler import ModuleHandler, get_dict_child
from module_handler import get_l_module_descendant
from update_README import Doc_key, Needed_key
from qp_path import QP_ROOT, QP_SRC, QP_PLUGINS
except ImportError:
print "source .quantum_package.rc"
raise
@ -59,15 +61,13 @@ def save_new_module(path, l_child):
if __name__ == '__main__':
arguments = docopt(__doc__)
qp_root_src = os.path.join(os.environ['QP_ROOT'], "src")
qp_root_plugin = os.path.join(os.environ['QP_ROOT'], "plugins")
if arguments["list"]:
if arguments["--installed"]:
l_repository = [qp_root_src]
if arguments["--avalaible-local"]:
l_repository = [qp_root_plugin]
l_repository = [QP_SRC]
elif arguments["--avalaible-local"]:
l_repository = [QP_PLUGINS]
m_instance = ModuleHandler(l_repository)
@ -75,11 +75,11 @@ if __name__ == '__main__':
print "* {0}".format(module)
elif arguments["create"]:
m_instance = ModuleHandler([qp_root_src])
m_instance = ModuleHandler([QP_SRC])
l_children = arguments["<children_module>"]
path = os.path.join(qp_root_src, arguments["<name>"])
path = os.path.join(QP_SRC, arguments["<name>"])
print "You will create the module:"
print path
@ -88,6 +88,7 @@ if __name__ == '__main__':
if children not in m_instance.dict_descendant:
print "This module ({0}) is not a valide module.".format(children)
print "Run `list` flag for the list of module avalaible"
print "Maybe you need to install some module first"
print "Aborting..."
sys.exit(1)
@ -104,7 +105,7 @@ if __name__ == '__main__':
elif arguments["download"]:
pass
# d_local = get_dict_child([qp_root_src])
# d_local = get_dict_child([QP_SRC])
# d_remote = get_dict_child(arguments["<path_folder>"])
#
# d_child = d_local.copy()
@ -119,8 +120,8 @@ if __name__ == '__main__':
elif arguments["install"]:
d_local = get_dict_child([qp_root_src])
d_plugin = get_dict_child([qp_root_plugin])
d_local = get_dict_child([QP_SRC])
d_plugin = get_dict_child([QP_PLUGINS])
d_child = d_local.copy()
d_child.update(d_plugin)
@ -143,31 +144,43 @@ if __name__ == '__main__':
print "Installation...",
for module_to_cp in l_module_to_cp:
src = os.path.join(qp_root_plugin, module_to_cp)
des = os.path.join(qp_root_src, module_to_cp)
src = os.path.join(QP_PLUGINS, module_to_cp)
des = os.path.join(QP_SRC, module_to_cp)
try:
os.symlink(src, des)
except OSError:
print "Your src directory is broken. Please remove %s"%des
print "Your src directory is broken. Please remove %s" % des
raise
print "Done"
print "You can now compile as usual"
elif arguments["uninstall"]:
d_local = get_dict_child([qp_root_src])
m_instance = ModuleHandler([QP_SRC])
d_descendant = m_instance.dict_descendant
d_local = get_dict_child([QP_SRC])
l_name = arguments["<name>"]
l_failed = [ name for name in l_name if name not in d_local ]
l_failed = [name for name in l_name if name not in d_local]
if l_failed:
print "Modules not installed:"
for name in sorted(l_failed):
print "* %s"%name
print "* %s" % name
sys.exit(1)
else:
if arguments["--and_ancestor"]:
l_name_to_remove = l_name + [module for module in m_instance.l_module for name in l_name if name in d_descendant[module]]
print "You will remove all of:"
print l_name_to_remove
else:
l_name_to_remove = l_name
def unlink(x):
try:
os.unlink(os.path.join(qp_root_src,x))
os.unlink(os.path.join(QP_SRC, x))
except OSError:
print "%s is a core module which can not be renmoved"%x
map(unlink,l_name)
print "%s is a core module which can not be renmoved" % x
map(unlink, l_name_to_remove)

View File

@ -11,5 +11,6 @@ except:
sys.exit(1)
else:
QP_SRC = os.path.join(QP_ROOT, "src")
QP_PLUGINS = os.path.join(QP_ROOT, "plugins")
QP_EZFIO = os.path.join(QP_ROOT, "install", "EZFIO")
QP_OCAML = os.path.join(QP_ROOT, "ocaml")

View File

@ -55,58 +55,58 @@ default: 0.999
[n_states_diag]
type: integer
doc: n_states_diag
interface: ezfio, provider
interface: ezfio,provider
[n_int]
interface: ezfio, provider
interface: ezfio
doc: n_int
type: N_int_number
[bit_kind]
interface: ezfio, provider
interface: ezfio
doc: bit_kind
type: Bit_kind
[mo_label]
interface: ezfio, provider
interface: ezfio,provider
doc: o_label
type: character*(64)
[n_det]
interface: ezfio, provider
interface: ezfio
doc: n_det
type: integer
[psi_coef]
interface: ezfio, provider
interface: ezfio
doc: psi_coef
type: double precision
size: (determinants.n_det,determinants.n_states)
[psi_det]
interface: ezfio, provider
interface: ezfio
doc: psi_det
type: integer*8
size: (determinants.n_int*determinants.bit_kind/8,2,determinants.n_det)
[det_num]
interface: ezfio, provider
interface: ezfio,provider
doc: det_num
type: integer
[det_occ]
interface: ezfio, provider
interface: ezfio,provider
doc: det_occ
type: integer
size: (electrons.elec_alpha_num,determinants.det_num,2)
[det_coef]
interface: ezfio, provider
interface: ezfio,provider
doc: det_coef
type: double precision
size: (determinants.det_num)
[expected_s2]
interface: ezfio, provider
interface: ezfio,provider
doc: expcted_s2
type: double precision

View File

@ -205,10 +205,22 @@ Documentation
degree : Degree of excitation
`det_coef <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L138>`_
det_coef
`det_connections <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1139>`_
Build connection proxy between determinants
`det_num <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L266>`_
det_num
`det_occ <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L244>`_
det_occ
`det_search_key <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/connected_to_ref.irp.f#L1>`_
Return an integer*8 corresponding to a determinant index for searching
@ -480,6 +492,10 @@ Documentation
Maximum degree of excitation in the wf
`mo_label <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L204>`_
o_label
`mono_elec_ref_bitmask_energy <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ref_bitmask.irp.f#L2>`_
Energy of the reference bitmask used in Slater rules
@ -505,15 +521,15 @@ Documentation
determinants. idx_cas gives the indice of the CAS determinant in psi_det.
`n_det_max <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L28>`_
`n_det_max <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L50>`_
Max number of determinants in the wave function
`n_det_max_jacobi <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L72>`_
`n_det_max_jacobi <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L94>`_
Maximum number of determinants diagonalized by Jacobi
`n_det_max_property <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L182>`_
`n_det_max_property <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L310>`_
Max number of determinants in the wave function when you select for a given property
@ -537,7 +553,7 @@ Documentation
Number of single excitation bitmasks
`n_states <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L50>`_
`n_states <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L72>`_
Number of states to consider
@ -585,7 +601,7 @@ Documentation
rho(alpha) - rho(beta)
`only_single_double_dm <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L116>`_
`only_single_double_dm <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L182>`_
If true, The One body DM is calculated with ignoring the Double<->Doubles extra diag elements
@ -762,7 +778,7 @@ Documentation
Reads the determinants from the EZFIO file
`read_wf <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L94>`_
`read_wf <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L160>`_
If true, read the wave function from the EZFIO file
@ -787,7 +803,7 @@ Documentation
Undocumented
`s2_eig <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L138>`_
`s2_eig <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L116>`_
Force the wave function to be an eigenfunction of S^2
@ -862,7 +878,7 @@ Documentation
convergence of the correlation energy of SC2 iterations
`threshold_generators <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L160>`_
`threshold_generators <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/ezfio_interface.irp.f#L288>`_
Thresholds on generators (fraction of the norm)

31
src/MOs/EZFIO.cfg Normal file
View File

@ -0,0 +1,31 @@
[mo_tot_num]
type: integer
doc: Total number of molecular orbitals and the size of the keys corresponding
interface: ezfio
ezfio_dir: mo_basis
[mo_coef]
type: double precision
doc: coefficient of the ith ao on the jth mo
interface: ezfio
size: (ao_basis.ao_num,mo_basis.mo_tot_num)
ezfio_dir: mo_basis
[mo_label]
type: character*(64)
doc: Label characterizing the MOS (local, canonical, natural, etc)
interface: ezfio
ezfio_dir: mo_basis
[mo_occ]
type: double precision
doc: MO occupation numbers
interface: ezfio
size: (mo_basis.mo_tot_num)
ezfio_dir: mo_basis
[ao_md5]
type: character*(32)
doc: Ao_md5
interface: ezfio
ezfio_dir: mo_basis

View File

@ -1,7 +0,0 @@
mo_basis
mo_tot_num integer
mo_coef double precision (ao_basis_ao_num,mo_basis_mo_tot_num)
mo_label character*(64)
mo_occ double precision (mo_basis_mo_tot_num)
ao_md5 character*(32)

View File

@ -26,7 +26,6 @@ END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_coef, (ao_num_align,mo_tot_num) ]
&BEGIN_PROVIDER [ character*(64), mo_label ]
implicit none
BEGIN_DOC
! Molecular orbital coefficients on AO basis set
@ -55,17 +54,28 @@ END_PROVIDER
enddo
enddo
deallocate(buffer)
call ezfio_has_mo_basis_mo_label(exists)
if (exists) then
call ezfio_get_mo_basis_mo_label(mo_label)
else
mo_label = 'no_label'
endif
else
! Orthonormalized AO basis
mo_coef = 0.
endif
END_PROVIDER
BEGIN_PROVIDER [ character*(64), mo_label ]
implicit none
BEGIN_DOC
! Molecular orbital coefficients on AO basis set
! mo_coef(i,j) = coefficient of the ith ao on the jth mo
! mo_label : Label characterizing the MOS (local, canonical, natural, etc)
END_DOC
logical :: exists
PROVIDE ezfio_filename
call ezfio_has_mo_basis_mo_label(exists)
if (exists) then
call ezfio_get_mo_basis_mo_label(mo_label)
else
mo_label = 'no_label'
endif
END_PROVIDER
BEGIN_PROVIDER [ double precision, mo_coef_transp, (mo_tot_num_align,ao_num) ]

22
src/Nuclei/EZFIO.cfg Normal file
View File

@ -0,0 +1,22 @@
[nucl_num]
doc: Number of nuclei
type: integer
interface: ezfio, provider
[nucl_label]
doc: Nuclear labels
type: character*(32)
size: (nuclei.nucl_num)
interface: ezfio, provider
[nucl_charge]
doc: Nuclear charges
type:double precision
size: (nuclei.nucl_num)
interface: ezfio, provider
[nucl_coord]
doc: Nuclear coordinates in the format (:, {x,y,z})
type: double precision
size: (nuclei.nucl_num,3)
interface: ezfio

View File

@ -1,6 +0,0 @@
nuclei
nucl_num integer
nucl_label character*(32) (nuclei_nucl_num)
nucl_charge double precision (nuclei_nucl_num)
nucl_coord double precision (nuclei_nucl_num,3)

View File

@ -1,57 +1,14 @@
BEGIN_PROVIDER [ integer, nucl_num ]
&BEGIN_PROVIDER [ integer, nucl_num_aligned ]
BEGIN_PROVIDER [ integer, nucl_num_aligned ]
implicit none
BEGIN_DOC
! Number of nuclei
! Number of nuclei algined
END_DOC
PROVIDE ezfio_filename
nucl_num = 0
logical :: has
call ezfio_has_nuclei_nucl_num(has)
if (has) then
call ezfio_get_nuclei_nucl_num(nucl_num)
else
print *, irp_here
stop 1
endif
ASSERT (nucl_num > 0)
integer :: align_double
nucl_num_aligned = align_double(nucl_num)
END_PROVIDER
BEGIN_PROVIDER [ double precision, nucl_charge, (nucl_num) ]
implicit none
BEGIN_DOC
! Nuclear charges
END_DOC
PROVIDE ezfio_filename
nucl_charge = -1.d0
logical :: has
call ezfio_has_nuclei_nucl_charge(has)
if (has) then
call ezfio_get_nuclei_nucl_charge(nucl_charge)
else
print *, irp_here
stop 1
endif
ASSERT (minval(nucl_charge) >= 0.d0)
END_PROVIDER
BEGIN_PROVIDER [ character*(32), nucl_label, (nucl_num) ]
implicit none
BEGIN_DOC
! Nuclear labels
END_DOC
PROVIDE ezfio_filename
nucl_label = ""
logical :: has
call ezfio_has_nuclei_nucl_label(has)
if (has) then
call ezfio_get_nuclei_nucl_label(nucl_label)
endif
END_PROVIDER
BEGIN_PROVIDER [ double precision, nucl_coord, (nucl_num_aligned,3) ]
implicit none