mirror of
https://github.com/LCPQ/quantum_package
synced 2024-12-23 04:43:50 +01:00
Workaround for IRP bug
This commit is contained in:
parent
82d74710bd
commit
ac37c2dab8
@ -711,7 +711,7 @@ def create_build_ninja_module(path_module):
|
|||||||
f.write("\n".join(l_string))
|
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",
|
l_string = ["rule update_build_ninja_root",
|
||||||
" command = {0} update".format(__file__),
|
" command = {0} update".format(__file__),
|
||||||
@ -723,7 +723,7 @@ def create_build_ninja_global():
|
|||||||
""]
|
""]
|
||||||
|
|
||||||
l_string += ["rule make_clean",
|
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", ""]
|
" description = Cleaning all modules", ""]
|
||||||
|
|
||||||
l_string += ["build dummy_target: update_build_ninja_root",
|
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")
|
d_binaries = get_dict_binaries(l_module, mode="development")
|
||||||
l_module = d_binaries.keys()
|
l_module = d_binaries.keys()
|
||||||
|
|
||||||
create_build_ninja_global()
|
create_build_ninja_global(l_module)
|
||||||
|
|
||||||
for module_to_compile in l_module:
|
for module_to_compile in l_module:
|
||||||
|
|
||||||
|
@ -230,6 +230,8 @@ def get_dict_config_file(module_obj):
|
|||||||
# pvd = provider
|
# pvd = provider
|
||||||
pvd = section.lower()
|
pvd = section.lower()
|
||||||
|
|
||||||
|
d[pvd]["module"] = module_obj
|
||||||
|
|
||||||
# Create the dictionary who containt the value per default
|
# Create the dictionary who containt the value per default
|
||||||
d_default = {"ezfio_name": pvd,
|
d_default = {"ezfio_name": pvd,
|
||||||
"ezfio_dir": module_obj.lower,
|
"ezfio_dir": module_obj.lower,
|
||||||
@ -319,7 +321,7 @@ def create_ezfio_provider(dict_ezfio_cfg):
|
|||||||
ez_p.set_doc(dict_info['doc'])
|
ez_p.set_doc(dict_info['doc'])
|
||||||
ez_p.set_ezfio_dir(dict_info['ezfio_dir'])
|
ez_p.set_ezfio_dir(dict_info['ezfio_dir'])
|
||||||
ez_p.set_ezfio_name(dict_info['ezfio_name'])
|
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)
|
# (nuclei.nucl_num,pseudo.klocmax) => (nucl_num,klocmax)
|
||||||
ez_p.set_size(re.sub(r'\w+\.', "", dict_info['size']))
|
ez_p.set_size(re.sub(r'\w+\.', "", dict_info['size']))
|
||||||
|
@ -213,14 +213,10 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
for module in l_module:
|
for module in l_module:
|
||||||
if not is_module(module):
|
if not is_module(module):
|
||||||
print "{0} is not a module. Abort".format(module)
|
print "{0} is not a volide module. Abort".format(module)
|
||||||
|
print "No NEEDED_CHILDREN_MODULES in it"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
# else:
|
|
||||||
# path_file = os.path.abspath(arguments['<module_name>'])
|
|
||||||
# dir_ = os.path.dirname(path_file)
|
|
||||||
#
|
|
||||||
|
|
||||||
m = ModuleHandler()
|
m = ModuleHandler()
|
||||||
|
|
||||||
if arguments['print_descendant']:
|
if arguments['print_descendant']:
|
||||||
@ -232,5 +228,25 @@ if __name__ == '__main__':
|
|||||||
m.create_png(l_module)
|
m.create_png(l_module)
|
||||||
|
|
||||||
if arguments["clean"]:
|
if arguments["clean"]:
|
||||||
for i in arguments['<module_name>']:
|
for module in l_module:
|
||||||
print i.is_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
|
||||||
|
@ -205,10 +205,22 @@ Documentation
|
|||||||
degree : Degree of excitation
|
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>`_
|
`det_connections <http://github.com/LCPQ/quantum_package/tree/master/src/Determinants/slater_rules.irp.f#L1139>`_
|
||||||
Build connection proxy between determinants
|
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>`_
|
`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
|
Return an integer*8 corresponding to a determinant index for searching
|
||||||
|
|
||||||
@ -480,6 +492,10 @@ Documentation
|
|||||||
Maximum degree of excitation in the wf
|
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>`_
|
`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
|
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.
|
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
|
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
|
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
|
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
|
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
|
Number of states to consider
|
||||||
|
|
||||||
|
|
||||||
@ -585,7 +601,7 @@ Documentation
|
|||||||
rho(alpha) - rho(beta)
|
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
|
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
|
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
|
If true, read the wave function from the EZFIO file
|
||||||
|
|
||||||
|
|
||||||
@ -787,7 +803,7 @@ Documentation
|
|||||||
Undocumented
|
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
|
Force the wave function to be an eigenfunction of S^2
|
||||||
|
|
||||||
|
|
||||||
@ -862,7 +878,7 @@ Documentation
|
|||||||
convergence of the correlation energy of SC2 iterations
|
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)
|
Thresholds on generators (fraction of the norm)
|
||||||
|
|
||||||
|
|
||||||
|
31
src/MOs/EZFIO.cfg
Normal file
31
src/MOs/EZFIO.cfg
Normal 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
|
@ -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)
|
|
||||||
|
|
@ -26,7 +26,6 @@ END_PROVIDER
|
|||||||
|
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, mo_coef, (ao_num_align,mo_tot_num) ]
|
BEGIN_PROVIDER [ double precision, mo_coef, (ao_num_align,mo_tot_num) ]
|
||||||
&BEGIN_PROVIDER [ character*(64), mo_label ]
|
|
||||||
implicit none
|
implicit none
|
||||||
BEGIN_DOC
|
BEGIN_DOC
|
||||||
! Molecular orbital coefficients on AO basis set
|
! Molecular orbital coefficients on AO basis set
|
||||||
@ -55,17 +54,28 @@ END_PROVIDER
|
|||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
deallocate(buffer)
|
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
|
else
|
||||||
! Orthonormalized AO basis
|
! Orthonormalized AO basis
|
||||||
mo_coef = 0.
|
mo_coef = 0.
|
||||||
endif
|
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
|
END_PROVIDER
|
||||||
|
|
||||||
BEGIN_PROVIDER [ double precision, mo_coef_transp, (mo_tot_num_align,ao_num) ]
|
BEGIN_PROVIDER [ double precision, mo_coef_transp, (mo_tot_num_align,ao_num) ]
|
||||||
|
Loading…
Reference in New Issue
Block a user