10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-12-23 04:43:45 +01:00

Merge develop-toto and manus (#12)

* Fixed energies of non-expected s2

* Moved diag_algorithm in Davdison

* Fixed travis

* Added print_ci_vector

* Documentation

* Cleaned qp_set_mo_class.ml

* Removed Core in taskserver

* Frozen core for heavy atoms

* Improved molden module

* In sync with manus

* Fixed some of the documentation errors
This commit is contained in:
Anthony Scemama 2019-03-06 14:12:55 +01:00 committed by GitHub
parent 347e918a4a
commit 81bc60eb58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
86 changed files with 2704 additions and 1620 deletions

View File

@ -5,9 +5,16 @@ master
The current up-to-date working branch, that users download It should
only contain the latest release and bug fixes.
develop-toto
Toulouse development branch
develop-manus
Parise development branch
develop
It is a fork of the *master* branch with new developments that will be
merged in the *master* branch for the next release.
merged in the *master* branch for the next release. Other development
branches should be merged on this one.
gh-pages
This is an independent branch, containing only the web site of QP2.

637
REPLACE Normal file → Executable file
View File

@ -197,3 +197,640 @@ qp_name get_excitation_degree_vector_single_or_exchange_or_exchange -r get_excit
qp_name get_excitation_degree_vector_mono_or_exchange_verbose -r get_excitation_degree_vector_single_or_exchange_verbose
qp_name i_h_j_mono_spin -r i_h_j_single_spin
qp_name i_Wee_j_mono -r i_Wee_j_single
qp_name potential_sr_x_alpha_ao_lda --rename=potential_x_alpha_ao_sr_lda
qp_name potential_sr_x_beta_ao_lda --rename=potential_x_beta_ao_sr_lda
qp_name potential_sr_c_alpha_ao_lda --rename=potential_c_alpha_ao_sr_lda
qp_name potential_sr_c_beta_ao_lda --rename=potential_c_beta_ao_sr_lda
qp_name potential_sr_xc_alpha_ao_lda --rename=potential_xc_alpha_ao_sr_lda
qp_name potential_sr_xc_beta_ao_lda --rename=potential_xc_beta_ao_sr_lda
qp_name potential_sr_x_alpha_ao_pbe --rename=potential_x_alpha_ao_sr_pbe
qp_name potential_sr_x_beta_ao_pbe --rename=potential_x_beta_ao_sr_pbe
qp_name potential_sr_c_alpha_ao_pbe --rename=potential_c_alpha_ao_sr_pbe
qp_name potential_sr_c_beta_ao_pbe --rename=potential_c_beta_ao_sr_pbe
qp_name potential_sr_xc_alpha_ao_pbe --rename=potential_xc_alpha_ao_sr_pbe
qp_name potential_sr_xc_beta_ao_pbe --rename=potential_xc_beta_ao_sr_pbe
qp_name mo_mono_elec_integral --rename=mo_mono_elec_integrals
qp_name mo_mono_elec_integral --rename=mo_mono_elec_integrals
qp_name mo_nucl_elec_integral --rename=mo_nucl_elec_integrals
qp_name mo_kinetic_integral --rename=mo_kinetic_integrals
qp_name disk_access_mo_one_integrals --rename=io_mo_one_e_integrals
qp_name disk_access_ao_one_integrals --rename=io_ao_one_e_integrals
qp_name ao_mono_elec_integral --rename=ao_one_e_integrals
qp_name disk_access_ao_integrals --rename=io_ao_two_e_integrals
qp_name disk_access_mo_integrals --rename=io_mo_two_e_integrals
qp_name io_mo_integrals --rename=io_mo_two_e_integrals
qp_name io_ao_integrals --rename=io_ao_two_e_integrals
qp_name read_ao_integrals --rename=read_ao_two_e_integrals
qp_name read_mo_integrals --rename=read_mo_two_e_integrals
qp_name write_mo_integrals --rename=write_mo_two_e_integrals
qp_name write_ao_integrals --rename=write_ao_two_e_integrals
qp_name ao_two_e_integrals --rename=ao_two_e_ints
qp_name mo_two_e_integrals --rename=mo_two_e_ints
qp_name mo_two_e_erf_integrals --rename=mo_two_e_erf_ints
qp_name ao_two_e_erf_integrals --rename=ao_two_e_erf_ints
qp_name ezfio_set_mo_two_e_ints_io_mo_integrals -r ezfio_set_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_set_ao_two_e_ints_io_ao_integrals -r ezfio_set_ao_two_e_ints_io_ao_two_e_integrals
qp_name mo_tot_num -r mo_num
qp_name ezfio_set_mo_basis_mo_tot_num -r ezfio_set_mo_basis_mo_num
qp_name ezfio_get_mo_basis_mo_tot_num -r ezfio_get_mo_basis_mo_num
qp_name ezfio_set_ao_two_e_integrals_disk_access_ao_integrals -r ezfio_set_ao_two_e_integrals_io_ao_two_e_integrals
qp_name ezfio_set_mo_two_e_integrals_disk_access_mo_integrals -r ezfio_set_mo_two_e_integrals_io_mo_two_e_integrals
qp_name ezfio_set_mo_two_e_integrals_io_mo_two_e_integrals -r ezfio_set_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_get_mo_two_e_integrals_io_mo_two_e_integrals -r ezfio_get_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_set_ao_two_e_integrals_io_ao_two_e_integrals -r ezfio_set_ao_two_e_ints_io_ao_two_e_integrals
qp_name ezfio_get_ao_two_e_integrals_io_ao_two_e_integrals -r ezfio_get_ao_two_e_ints_io_ao_two_e_integrals
qp_name ezfio_set_ao_two_e_erf_integrals_disk_access_ao_integrals_erf -r ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf
qp_name ezfio_set_mo_two_e_erf_integrals_disk_access_mo_integrals_erf -r ezfio_set_mo_two_e_erf_ints_io_mo_two_e_integrals_erf
qp_name disk_access_ao_integrals_erf -r io_ao_integrals_erf
qp_name disk_access_mo_integrals_erf -r io_mo_integrals_erf
qp_name write_mo_integrals_erf -r write_mo_two_e_integrals_erf
qp_name read_mo_integrals_erf -r read_mo_two_e_integrals_erf
qp_name ao_integrals_n_e
qp_name ao_nucl_elec_interals -r ao_integrals_n_e
qp_name ao_nucl_elec_integrals -r ao_integrals_n_e
qp_name ao_nucl_elec_integrals_per_atom -r ao_integrals_n_e_per_atom
qp_name bi_elec_ref_bitmask_energy -r ref_bitmask_two_e_energy
qp_name mono_elec_ref_bitmask_energy -r ref_bitmask_one_e_energy
qp_name kinetic_ref_bitmask_energy -r ref_bitmask_kinetic_energy
qp_name nucl_elec_ref_bitmask_energy -r ref_bitmask_e_n_energy
qp_name disk_access_ao_integrals_erf
qp_name mo_bielec_integral_jj
qp_name mo_bielec_integral_jj -r mo_two_e_integrals_jj
qp_name mo_bielec_integral_jj_anti -r mo_two_e_integrals_jj_anti
qp_name mo_bielec_integral_jj_anti_from_ao -r mo_two_e_integrals_jj_anti_from_ao
qp_name mo_bielec_integral_jj_anti_exchange -r mo_two_e_integrals_jj_exchange
qp_name mo_bielec_integral_jj_exchange -r mo_two_e_integrals_jj_exchange
qp_name mo_bielec_integral_jj_exchange_from_ao -r mo_two_e_integrals_jj_exchange_from_ao
qp_name mo_bielec_integral_vv_anti_from_ao -r mo_two_e_integrals_vv_anti_from_ao
qp_name mo_bielec_integral_vv_exchange_from_ao -r mo_two_e_integrals_vv_exchange_from_ao
qp_name mo_bielec_integral_vv_from_ao -r mo_two_e_integrals_vv_from_ao
qp_name mo_bielec_integrals_erf_in_map -r mo_two_e_integrals_erf_in_map
qp_name mo_bielec_integrals_in_map -r mo_two_e_integrals_in_map
qp_name ao_bielec_integrals_in_map -r ao_two_e_integrals_in_map
qp_name ao_bielec_integrals_erf_in_map -r ao_two_e_integrals_erf_in_map
qp_name mo_mono_elec_integrals -r mo_one_e_integrals
qp_name mo_nucl_elec_integrals -r mo_integrals_n_e
qp_name mo_nucl_elec_integrals_per_atom -r mo_integrals_n_e_per_atom
qp_name I_x1_pol_mult_mono_elec -r I_x1_pol_mult_one_e
qp_name I_x2_pol_mult_mono_elec -r I_x2_pol_mult_one_e
qp_name give_polynom_mult_center_mono_elec -r give_polynomial_mult_center_one_e
qp_name give_polynom_mult_center_mono_elec_erf -r give_polynomial_mult_center_one_e_erf
qp_name give_polynom_mult_center_mono_elec_erf_opt -r give_polynomial_mult_center_one_e_erf_opt
qp_name i_H_j_mono_spin_monoelec -r i_H_j_mono_spin_one_e
qp_name diag_H_mat_elem_monoelec -r diag_H_mat_elem_one_e
qp_name i_H_j_monoelec -r i_H_j_one_e
qp_name get_mo_bielec_integral -r get_two_e_integral
qp_name ao_bielec_integrals_in_map_slave_tcp -r ao_two_e_integrals_in_map_slave_tcp
qp_name get_ao_bielec_integrals_non_zero -r get_ao_two_e_integrals_non_zero
qp_name bielec
qp_name bielec -r two-electron
qp_name ao_bielec_integral -r ao_two_e_integral
qp_name compute_ao_bielec_integrals -r compute_ao_two_e_integrals
qp_name mo_bielec_integral_jj_from_ao -r mo_two_e_integral_jj_from_ao
qp_name bielec_tmp_1 -r two_e_tmp_1
qp_name bielec_tmp_2 -r two_e_tmp_2
qp_name bielec_tmp_3 -r two_e_tmp_3
qp_name mo_bielec_integrals_index -r mo_two_e_integrals_index
qp_name bielec_tmp_0_idx -r two_e_tmp_0_idx
qp_name bielec_tmp_0 -r two_e_tmp_0
qp_name get_ao_bielec_integrals -r get_ao_two_e_integrals
qp_name bielectronic -r two-electron
qp_name bielec_integrals_index -r two_e_integrals_index
qp_name mo_bielec_integral -r mo_two_e_integral
qp_name mo_bielec_integrals_ij -r mo_two_e_integrals_ij
qp_name get_mo_bielec_integrals_ij -r get_mo_two_e_integrals_ij
qp_name get_mo_bielec_integrals_i1j1 -r get_mo_two_e_integrals_i1j1
qp_name get_mo_bielec_integrals_coulomb -r get_mo_two_e_integrals_coulomb
qp_name get_mo_bielec_integrals_coulomb_ii -r get_mo_two_e_integrals_coulomb_ii
qp_name get_mo_bielec_integrals_exch_ii -r get_mo_two_e_integrals_exch_ii
qp_name get_mo_bielec_integrals -r get_mo_two_e_integrals
qp_name get_ao_bielec_integrals_erf -r get_ao_two_e_integrals_erf
qp_name save_erf_bielec_ints_mo_into_ints_mo -r save_erf_two_e_ints_mo_into_ints_mo
qp_name get_mo_bielec_integral_erf -r get_mo_two_e_integral_erf
qp_name get_ao_bielec_integral_erf -r get_ao_two_e_integral_erf
qp_name bielec_integrals_index_reverse -r two_e_integrals_index_reverse
qp_name get_mo_bielec_integrals_erf -r get_mo_two_e_integrals_erf
qp_name ao_bielec_integral_schwartz -r ao_two_e_integral_schwartz
qp_name get_mo_bielec_integrals_erf_ij -r get_mo_two_e_integrals_erf_ij
qp_name get_mo_bielec_integrals_erf_i1j1 -r get_mo_two_e_integrals_erf_i1j1
qp_name get_mo_bielec_integral_schwartz -r get_mo_two_e_integral_schwartz
qp_name get_ao_bielec_integrals_erf_non_zero -r get_ao_two_e_integrals_erf_non_zero
qp_name compute_ao_bielec_integrals_erf -r compute_ao_two_e_integrals_erf
qp_name mo_bielec_integrals_erf_index -r mo_two_e_integrals_erf_index
qp_name get_mo_bielec_integrals_erf_exch_ii -r get_mo_two_e_integrals_erf_exch_ii
qp_name get_mo_bielec_integrals_erf_coulomb_ii -r get_mo_two_e_integrals_erf_coulomb_ii
qp_name mo_bielec_integral_erf -r mo_two_e_integral_erf
qp_name i_H_j_bielec -r i_H_j_two_e
qp_name H_S2_u_0_bielec_nstates_openmp_work -r H_S2_u_0_two_e_nstates_openmp_work
qp_name H_S2_u_0_bielec_nstates_openmp_work_1 -r H_S2_u_0_two_e_nstates_openmp_work_1
qp_name H_S2_u_0_bielec_nstates_openmp_work_2 -r H_S2_u_0_two_e_nstates_openmp_work_2
qp_name H_S2_u_0_bielec_nstates_openmp_work_3 -r H_S2_u_0_two_e_nstates_openmp_work_3
qp_name H_S2_u_0_bielec_nstates_openmp_work_4 -r H_S2_u_0_two_e_nstates_openmp_work_4
qp_name H_S2_u_0_bielec_nstates_openmp -r H_S2_u_0_two_e_nstates_openmp
qp_name ac_operator_bielec -r ac_operator_two_e
qp_name aa_operator_bielec -r aa_operator_two_e
qp_name a_operator_bielec -r a_operator_two_e
qp_name u_0_H_u_0_bielec -r u_0_H_u_0_two_e
qp_name H_S2_u_0_bielec_nstates_openmp_work_
qp_name H_S2_u_0_bielec_nstates_openmp_work_
qp_name H_S2_u_0_bielec_nstates_openmp_work_ -r H_S2_u_0_two_e_nstates_openmp_work_
qp_name ao_bielec_integral_erf -r ao_two_e_integral_erf
qp_name psi_energy_bielec -r psi_energy_two_e
qp_name ao_bielec_integrals_in_map_slave_inproc -r ao_two_e_integrals_in_map_slave_inproc
qp_name ao_bielec_integrals_in_map_collector -r ao_two_e_integrals_in_map_collector
qp_name ao_bielec_integral_schwartz_accel -r ao_two_e_integral_schwartz_accel
qp_name get_ao_bielec_integral -r get_ao_two_e_integral
qp_name ao_bielec_integrals_in_map_slave -r ao_two_e_integrals_in_map_slave
qp_name ao_bielec_integral_erf_schwartz -r ao_two_e_integral_erf_schwartz
qp_name ao_bielec_integral_schwartz_accel_erf -r ao_two_e_integral_schwartz_accel_erf
qp_name ao_bielec_integrals_erf_in_map_slave_tcp -r ao_two_e_integrals_erf_in_map_slave_tcp
qp_name ao_bielec_integrals_erf_in_map_slave -r ao_two_e_integrals_erf_in_map_slave
qp_name ao_bielec_integrals_erf_in_map_slave_inproc -r ao_two_e_integrals_erf_in_map_slave_inproc
qp_name ao_bielec_integrals_erf_in_map_collector -r ao_two_e_integrals_erf_in_map_collector
qp_name save_erf_bielec_ints_ao_into_ints_ao -r save_erf_two_e_ints_ao_into_ints_ao
qp_name save_erf_bi_elec_integrals_mo -r save_erf_two_e_integrals_mo
qp_name ao_bi_elec_integral_beta -r ao_two_e_integral_beta
qp_name ao_bi_elec_integral_alpha -r ao_two_e_integral_alpha
qp_name ao_bi_elec_integral_alpha_tmp -r ao_two_e_integral_alpha_tmp
qp_name ao_bi_elec_integral_beta_tmp -r ao_two_e_integral_beta_tmp
qp_name data_one_body_alpha_dm_mo -r data_one_body_dm_alpha_mo
qp_name data_one_body_beta_dm_mo -r data_one_body_dm_beta_mo
qp_name one_body_dm_alpha_ao_for_dft -r one_e_dm_alpha_ao_for_dft
qp_name one_body_dm_alpha_at_r -r one_e_dm_alpha_at_r
qp_name one_body_dm_ao_alpha -r one_e_dm_ao_alpha
qp_name one_body_dm_ao_beta -r one_e_dm_ao_beta
qp_name one_body_dm_average_mo_for_dft -r one_e_dm_average_mo_for_dft
qp_name one_body_dm_beta_ao_for_dft -r one_e_dm_beta_ao_for_dft
qp_name one_body_dm_beta_at_r -r one_e_dm_beta_at_r
qp_name one_body_dm_dagger_mo_spin_index -r one_e_dm_dagger_mo_spin_index
qp_name one_body_dm_mo -r one_e_dm_mo
qp_name one_body_dm_mo_alpha -r one_e_dm_mo_alpha
qp_name one_body_dm_mo_alpha_average -r one_e_dm_mo_alpha_average
qp_name one_body_dm_mo_alpha_for_dft -r one_e_dm_mo_alpha_for_dft
qp_name one_body_dm_mo_beta -r one_e_dm_mo_beta
qp_name one_body_dm_mo_beta_average -r one_e_dm_mo_beta_average
qp_name one_body_dm_mo_beta_for_dft -r one_e_dm_mo_beta_for_dft
qp_name one_body_dm_mo_diff -r one_e_dm_mo_diff
qp_name one_body_dm_mo_for_dft -r one_e_dm_mo_for_dft
qp_name one_body_dm_mo_spin_index -r one_e_dm_mo_spin_index
qp_name one_body_grad_2_dm_alpha_at_r -r one_e_grad_2_dm_alpha_at_r
qp_name one_body_grad_2_dm_beta_at_r -r one_e_grad_2_dm_beta_at_r
qp_name one_body_spin_density_ao -r one_e_spin_density_ao
qp_name one_body_spin_density_mo -r one_e_spin_density_mo
qp_name one_electron_energy -r one_e_energy
qp_name one_dm_alpha_in_r -r one_e_dm_alpha_in_r
qp_name one_dm_and_grad_alpha_in_r -r one_e_dm_and_grad_alpha_in_r
qp_name one_dm_and_grad_beta_in_r -r one_e_dm_and_grad_beta_in_r
qp_name one_dm_beta_in_r -r one_e_dm_beta_in_r
qp_name ezfio_set_aux_quantities_data_one_body_alpha_dm_mo -r ezfio_set_aux_quantities_data_one_e_alpha_dm_mo
qp_name ezfio_set_aux_quantities_data_one_body_beta_dm_mo -r ezfio_set_aux_quantities_data_one_e_beta_dm_mo
qp_name data_one_body_dm_alpha_mo -r data_one_e_dm_alpha_mo
qp_name data_one_body_dm_beta_mo -r data_one_e_dm_beta_mo
qp_name save_one_body_dm -r save_one_e_dm
qp_name ezfio_set_aux_quantities_data_one_e_alpha_dm_mo -r ezfio_set_aux_quantities_data_one_e_dm_alpha_mo
qp_name ezfio_set_aux_quantities_data_one_e_beta_dm_mo -r ezfio_set_aux_quantities_data_one_e_dm_beta_mo
qp_name two_electron_energy -r two_e_energy
qp_name do_mono_excitation -r do_single_excitation
qp_name get_mono_excitation -r get_single_excitation
qp_name get_mono_excitation_from_fock -r get_single_excitation_from_fock
qp_name is_connected_to_by_mono -r is_connected_to_by_single
qp_name connected_to_ref_by_mono -r connected_to_ref_by_single
qp_name mono_excitation_wee -r single_excitation_wee
qp_name get_mono_excitation_spin
qp_name get_mono_excitation_spin -r get_single_excitation_spin
qp_name get_excitation_degree_vector_mono -r get_excitation_degree_vector_single
qp_name get_excitation_degree_vector_mono_or_exchange -r get_excitation_degree_vector_single_or_exchange_or_exchange
qp_name get_excitation_degree_vector_single_or_exchange_or_exchange -r get_excitation_degree_vector_single_or_exchange
qp_name get_excitation_degree_vector_mono_or_exchange_verbose -r get_excitation_degree_vector_single_or_exchange_verbose
qp_name i_h_j_mono_spin -r i_h_j_single_spin
qp_name i_Wee_j_mono -r i_Wee_j_single
qp_name potential_sr_x_alpha_ao_lda --rename=potential_x_alpha_ao_sr_lda
qp_name potential_sr_x_beta_ao_lda --rename=potential_x_beta_ao_sr_lda
qp_name potential_sr_c_alpha_ao_lda --rename=potential_c_alpha_ao_sr_lda
qp_name potential_sr_c_beta_ao_lda --rename=potential_c_beta_ao_sr_lda
qp_name potential_sr_xc_alpha_ao_lda --rename=potential_xc_alpha_ao_sr_lda
qp_name potential_sr_xc_beta_ao_lda --rename=potential_xc_beta_ao_sr_lda
qp_name potential_sr_x_alpha_ao_pbe --rename=potential_x_alpha_ao_sr_pbe
qp_name potential_sr_x_beta_ao_pbe --rename=potential_x_beta_ao_sr_pbe
qp_name potential_sr_c_alpha_ao_pbe --rename=potential_c_alpha_ao_sr_pbe
qp_name potential_sr_c_beta_ao_pbe --rename=potential_c_beta_ao_sr_pbe
qp_name potential_sr_xc_alpha_ao_pbe --rename=potential_xc_alpha_ao_sr_pbe
qp_name potential_sr_xc_beta_ao_pbe --rename=potential_xc_beta_ao_sr_pbe
qp_name mo_mono_elec_integral --rename=mo_mono_elec_integrals
qp_name mo_mono_elec_integral --rename=mo_mono_elec_integrals
qp_name mo_nucl_elec_integral --rename=mo_nucl_elec_integrals
qp_name mo_kinetic_integral --rename=mo_kinetic_integrals
qp_name disk_access_mo_one_integrals --rename=io_mo_one_e_integrals
qp_name disk_access_ao_one_integrals --rename=io_ao_one_e_integrals
qp_name ao_mono_elec_integral --rename=ao_one_e_integrals
qp_name disk_access_ao_integrals --rename=io_ao_two_e_integrals
qp_name disk_access_mo_integrals --rename=io_mo_two_e_integrals
qp_name io_mo_integrals --rename=io_mo_two_e_integrals
qp_name io_ao_integrals --rename=io_ao_two_e_integrals
qp_name read_ao_integrals --rename=read_ao_two_e_integrals
qp_name read_mo_integrals --rename=read_mo_two_e_integrals
qp_name write_mo_integrals --rename=write_mo_two_e_integrals
qp_name write_ao_integrals --rename=write_ao_two_e_integrals
qp_name ao_two_e_integrals --rename=ao_two_e_ints
qp_name mo_two_e_integrals --rename=mo_two_e_ints
qp_name mo_two_e_erf_integrals --rename=mo_two_e_erf_ints
qp_name ao_two_e_erf_integrals --rename=ao_two_e_erf_ints
qp_name ezfio_set_mo_two_e_ints_io_mo_integrals -r ezfio_set_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_set_ao_two_e_ints_io_ao_integrals -r ezfio_set_ao_two_e_ints_io_ao_two_e_integrals
qp_name mo_tot_num -r mo_num
qp_name ezfio_set_mo_basis_mo_tot_num -r ezfio_set_mo_basis_mo_num
qp_name ezfio_get_mo_basis_mo_tot_num -r ezfio_get_mo_basis_mo_num
qp_name ezfio_set_ao_two_e_integrals_disk_access_ao_integrals -r ezfio_set_ao_two_e_integrals_io_ao_two_e_integrals
qp_name ezfio_set_mo_two_e_integrals_disk_access_mo_integrals -r ezfio_set_mo_two_e_integrals_io_mo_two_e_integrals
qp_name ezfio_set_mo_two_e_integrals_io_mo_two_e_integrals -r ezfio_set_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_get_mo_two_e_integrals_io_mo_two_e_integrals -r ezfio_get_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_set_ao_two_e_integrals_io_ao_two_e_integrals -r ezfio_set_ao_two_e_ints_io_ao_two_e_integrals
qp_name ezfio_get_ao_two_e_integrals_io_ao_two_e_integrals -r ezfio_get_ao_two_e_ints_io_ao_two_e_integrals
qp_name ezfio_set_ao_two_e_erf_integrals_disk_access_ao_integrals_erf -r ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf
qp_name ezfio_set_mo_two_e_erf_integrals_disk_access_mo_integrals_erf -r ezfio_set_mo_two_e_erf_ints_io_mo_two_e_integrals_erf
qp_name disk_access_ao_integrals_erf -r io_ao_integrals_erf
qp_name disk_access_mo_integrals_erf -r io_mo_integrals_erf
qp_name write_mo_integrals_erf -r write_mo_two_e_integrals_erf
qp_name read_mo_integrals_erf -r read_mo_two_e_integrals_erf
qp_name ao_integrals_n_e
qp_name ao_nucl_elec_interals -r ao_integrals_n_e
qp_name ao_nucl_elec_integrals -r ao_integrals_n_e
qp_name ao_nucl_elec_integrals_per_atom -r ao_integrals_n_e_per_atom
qp_name bi_elec_ref_bitmask_energy -r ref_bitmask_two_e_energy
qp_name mono_elec_ref_bitmask_energy -r ref_bitmask_one_e_energy
qp_name kinetic_ref_bitmask_energy -r ref_bitmask_kinetic_energy
qp_name nucl_elec_ref_bitmask_energy -r ref_bitmask_e_n_energy
qp_name disk_access_ao_integrals_erf
qp_name mo_bielec_integral_jj
qp_name mo_bielec_integral_jj -r mo_two_e_integrals_jj
qp_name mo_bielec_integral_jj_anti -r mo_two_e_integrals_jj_anti
qp_name mo_bielec_integral_jj_anti_from_ao -r mo_two_e_integrals_jj_anti_from_ao
qp_name mo_bielec_integral_jj_anti_exchange -r mo_two_e_integrals_jj_exchange
qp_name mo_bielec_integral_jj_exchange -r mo_two_e_integrals_jj_exchange
qp_name mo_bielec_integral_jj_exchange_from_ao -r mo_two_e_integrals_jj_exchange_from_ao
qp_name mo_bielec_integral_vv_anti_from_ao -r mo_two_e_integrals_vv_anti_from_ao
qp_name mo_bielec_integral_vv_exchange_from_ao -r mo_two_e_integrals_vv_exchange_from_ao
qp_name mo_bielec_integral_vv_from_ao -r mo_two_e_integrals_vv_from_ao
qp_name mo_bielec_integrals_erf_in_map -r mo_two_e_integrals_erf_in_map
qp_name mo_bielec_integrals_in_map -r mo_two_e_integrals_in_map
qp_name ao_bielec_integrals_in_map -r ao_two_e_integrals_in_map
qp_name ao_bielec_integrals_erf_in_map -r ao_two_e_integrals_erf_in_map
qp_name mo_mono_elec_integrals -r mo_one_e_integrals
qp_name mo_nucl_elec_integrals -r mo_integrals_n_e
qp_name mo_nucl_elec_integrals_per_atom -r mo_integrals_n_e_per_atom
qp_name I_x1_pol_mult_mono_elec -r I_x1_pol_mult_one_e
qp_name I_x2_pol_mult_mono_elec -r I_x2_pol_mult_one_e
qp_name give_polynom_mult_center_mono_elec -r give_polynomial_mult_center_one_e
qp_name give_polynom_mult_center_mono_elec_erf -r give_polynomial_mult_center_one_e_erf
qp_name give_polynom_mult_center_mono_elec_erf_opt -r give_polynomial_mult_center_one_e_erf_opt
qp_name i_H_j_mono_spin_monoelec -r i_H_j_mono_spin_one_e
qp_name diag_H_mat_elem_monoelec -r diag_H_mat_elem_one_e
qp_name i_H_j_monoelec -r i_H_j_one_e
qp_name get_mo_bielec_integral -r get_two_e_integral
qp_name ao_bielec_integrals_in_map_slave_tcp -r ao_two_e_integrals_in_map_slave_tcp
qp_name get_ao_bielec_integrals_non_zero -r get_ao_two_e_integrals_non_zero
qp_name bielec
qp_name bielec -r two-electron
qp_name ao_bielec_integral -r ao_two_e_integral
qp_name compute_ao_bielec_integrals -r compute_ao_two_e_integrals
qp_name mo_bielec_integral_jj_from_ao -r mo_two_e_integral_jj_from_ao
qp_name bielec_tmp_1 -r two_e_tmp_1
qp_name bielec_tmp_2 -r two_e_tmp_2
qp_name bielec_tmp_3 -r two_e_tmp_3
qp_name mo_bielec_integrals_index -r mo_two_e_integrals_index
qp_name bielec_tmp_0_idx -r two_e_tmp_0_idx
qp_name bielec_tmp_0 -r two_e_tmp_0
qp_name get_ao_bielec_integrals -r get_ao_two_e_integrals
qp_name bielectronic -r two-electron
qp_name bielec_integrals_index -r two_e_integrals_index
qp_name mo_bielec_integral -r mo_two_e_integral
qp_name mo_bielec_integrals_ij -r mo_two_e_integrals_ij
qp_name get_mo_bielec_integrals_ij -r get_mo_two_e_integrals_ij
qp_name get_mo_bielec_integrals_i1j1 -r get_mo_two_e_integrals_i1j1
qp_name get_mo_bielec_integrals_coulomb -r get_mo_two_e_integrals_coulomb
qp_name get_mo_bielec_integrals_coulomb_ii -r get_mo_two_e_integrals_coulomb_ii
qp_name get_mo_bielec_integrals_exch_ii -r get_mo_two_e_integrals_exch_ii
qp_name get_mo_bielec_integrals -r get_mo_two_e_integrals
qp_name get_ao_bielec_integrals_erf -r get_ao_two_e_integrals_erf
qp_name save_erf_bielec_ints_mo_into_ints_mo -r save_erf_two_e_ints_mo_into_ints_mo
qp_name get_mo_bielec_integral_erf -r get_mo_two_e_integral_erf
qp_name get_ao_bielec_integral_erf -r get_ao_two_e_integral_erf
qp_name bielec_integrals_index_reverse -r two_e_integrals_index_reverse
qp_name get_mo_bielec_integrals_erf -r get_mo_two_e_integrals_erf
qp_name ao_bielec_integral_schwartz -r ao_two_e_integral_schwartz
qp_name get_mo_bielec_integrals_erf_ij -r get_mo_two_e_integrals_erf_ij
qp_name get_mo_bielec_integrals_erf_i1j1 -r get_mo_two_e_integrals_erf_i1j1
qp_name get_mo_bielec_integral_schwartz -r get_mo_two_e_integral_schwartz
qp_name get_ao_bielec_integrals_erf_non_zero -r get_ao_two_e_integrals_erf_non_zero
qp_name compute_ao_bielec_integrals_erf -r compute_ao_two_e_integrals_erf
qp_name mo_bielec_integrals_erf_index -r mo_two_e_integrals_erf_index
qp_name get_mo_bielec_integrals_erf_exch_ii -r get_mo_two_e_integrals_erf_exch_ii
qp_name get_mo_bielec_integrals_erf_coulomb_ii -r get_mo_two_e_integrals_erf_coulomb_ii
qp_name mo_bielec_integral_erf -r mo_two_e_integral_erf
qp_name i_H_j_bielec -r i_H_j_two_e
qp_name H_S2_u_0_bielec_nstates_openmp_work -r H_S2_u_0_two_e_nstates_openmp_work
qp_name H_S2_u_0_bielec_nstates_openmp_work_1 -r H_S2_u_0_two_e_nstates_openmp_work_1
qp_name H_S2_u_0_bielec_nstates_openmp_work_2 -r H_S2_u_0_two_e_nstates_openmp_work_2
qp_name H_S2_u_0_bielec_nstates_openmp_work_3 -r H_S2_u_0_two_e_nstates_openmp_work_3
qp_name H_S2_u_0_bielec_nstates_openmp_work_4 -r H_S2_u_0_two_e_nstates_openmp_work_4
qp_name H_S2_u_0_bielec_nstates_openmp -r H_S2_u_0_two_e_nstates_openmp
qp_name ac_operator_bielec -r ac_operator_two_e
qp_name aa_operator_bielec -r aa_operator_two_e
qp_name a_operator_bielec -r a_operator_two_e
qp_name u_0_H_u_0_bielec -r u_0_H_u_0_two_e
qp_name H_S2_u_0_bielec_nstates_openmp_work_
qp_name H_S2_u_0_bielec_nstates_openmp_work_
qp_name H_S2_u_0_bielec_nstates_openmp_work_ -r H_S2_u_0_two_e_nstates_openmp_work_
qp_name ao_bielec_integral_erf -r ao_two_e_integral_erf
qp_name psi_energy_bielec -r psi_energy_two_e
qp_name ao_bielec_integrals_in_map_slave_inproc -r ao_two_e_integrals_in_map_slave_inproc
qp_name ao_bielec_integrals_in_map_collector -r ao_two_e_integrals_in_map_collector
qp_name ao_bielec_integral_schwartz_accel -r ao_two_e_integral_schwartz_accel
qp_name get_ao_bielec_integral -r get_ao_two_e_integral
qp_name ao_bielec_integrals_in_map_slave -r ao_two_e_integrals_in_map_slave
qp_name ao_bielec_integral_erf_schwartz -r ao_two_e_integral_erf_schwartz
qp_name ao_bielec_integral_schwartz_accel_erf -r ao_two_e_integral_schwartz_accel_erf
qp_name ao_bielec_integrals_erf_in_map_slave_tcp -r ao_two_e_integrals_erf_in_map_slave_tcp
qp_name ao_bielec_integrals_erf_in_map_slave -r ao_two_e_integrals_erf_in_map_slave
qp_name ao_bielec_integrals_erf_in_map_slave_inproc -r ao_two_e_integrals_erf_in_map_slave_inproc
qp_name ao_bielec_integrals_erf_in_map_collector -r ao_two_e_integrals_erf_in_map_collector
qp_name save_erf_bielec_ints_ao_into_ints_ao -r save_erf_two_e_ints_ao_into_ints_ao
qp_name save_erf_bi_elec_integrals_mo -r save_erf_two_e_integrals_mo
qp_name ao_bi_elec_integral_beta -r ao_two_e_integral_beta
qp_name ao_bi_elec_integral_alpha -r ao_two_e_integral_alpha
qp_name ao_bi_elec_integral_alpha_tmp -r ao_two_e_integral_alpha_tmp
qp_name ao_bi_elec_integral_beta_tmp -r ao_two_e_integral_beta_tmp
qp_name data_one_body_alpha_dm_mo -r data_one_body_dm_alpha_mo
qp_name data_one_body_beta_dm_mo -r data_one_body_dm_beta_mo
qp_name one_body_dm_alpha_ao_for_dft -r one_e_dm_alpha_ao_for_dft
qp_name one_body_dm_alpha_at_r -r one_e_dm_alpha_at_r
qp_name one_body_dm_ao_alpha -r one_e_dm_ao_alpha
qp_name one_body_dm_ao_beta -r one_e_dm_ao_beta
qp_name one_body_dm_average_mo_for_dft -r one_e_dm_average_mo_for_dft
qp_name one_body_dm_beta_ao_for_dft -r one_e_dm_beta_ao_for_dft
qp_name one_body_dm_beta_at_r -r one_e_dm_beta_at_r
qp_name one_body_dm_dagger_mo_spin_index -r one_e_dm_dagger_mo_spin_index
qp_name one_body_dm_mo -r one_e_dm_mo
qp_name one_body_dm_mo_alpha -r one_e_dm_mo_alpha
qp_name one_body_dm_mo_alpha_average -r one_e_dm_mo_alpha_average
qp_name one_body_dm_mo_alpha_for_dft -r one_e_dm_mo_alpha_for_dft
qp_name one_body_dm_mo_beta -r one_e_dm_mo_beta
qp_name one_body_dm_mo_beta_average -r one_e_dm_mo_beta_average
qp_name one_body_dm_mo_beta_for_dft -r one_e_dm_mo_beta_for_dft
qp_name one_body_dm_mo_diff -r one_e_dm_mo_diff
qp_name one_body_dm_mo_for_dft -r one_e_dm_mo_for_dft
qp_name one_body_dm_mo_spin_index -r one_e_dm_mo_spin_index
qp_name one_body_grad_2_dm_alpha_at_r -r one_e_grad_2_dm_alpha_at_r
qp_name one_body_grad_2_dm_beta_at_r -r one_e_grad_2_dm_beta_at_r
qp_name one_body_spin_density_ao -r one_e_spin_density_ao
qp_name one_body_spin_density_mo -r one_e_spin_density_mo
qp_name one_electron_energy -r one_e_energy
qp_name one_dm_alpha_in_r -r one_e_dm_alpha_in_r
qp_name one_dm_and_grad_alpha_in_r -r one_e_dm_and_grad_alpha_in_r
qp_name one_dm_and_grad_beta_in_r -r one_e_dm_and_grad_beta_in_r
qp_name one_dm_beta_in_r -r one_e_dm_beta_in_r
qp_name ezfio_set_aux_quantities_data_one_body_alpha_dm_mo -r ezfio_set_aux_quantities_data_one_e_alpha_dm_mo
qp_name ezfio_set_aux_quantities_data_one_body_beta_dm_mo -r ezfio_set_aux_quantities_data_one_e_beta_dm_mo
qp_name data_one_body_dm_alpha_mo -r data_one_e_dm_alpha_mo
qp_name data_one_body_dm_beta_mo -r data_one_e_dm_beta_mo
qp_name save_one_body_dm -r save_one_e_dm
qp_name ezfio_set_aux_quantities_data_one_e_alpha_dm_mo -r ezfio_set_aux_quantities_data_one_e_dm_alpha_mo
qp_name ezfio_set_aux_quantities_data_one_e_beta_dm_mo -r ezfio_set_aux_quantities_data_one_e_dm_beta_mo
qp_name two_electron_energy -r two_e_energy
qp_name do_mono_excitation -r do_single_excitation
qp_name get_mono_excitation -r get_single_excitation
qp_name get_mono_excitation_from_fock -r get_single_excitation_from_fock
qp_name is_connected_to_by_mono -r is_connected_to_by_single
qp_name connected_to_ref_by_mono -r connected_to_ref_by_single
qp_name mono_excitation_wee -r single_excitation_wee
qp_name get_mono_excitation_spin
qp_name get_mono_excitation_spin -r get_single_excitation_spin
qp_name get_excitation_degree_vector_mono -r get_excitation_degree_vector_single
qp_name get_excitation_degree_vector_mono_or_exchange -r get_excitation_degree_vector_single_or_exchange_or_exchange
qp_name get_excitation_degree_vector_single_or_exchange_or_exchange -r get_excitation_degree_vector_single_or_exchange
qp_name get_excitation_degree_vector_mono_or_exchange_verbose -r get_excitation_degree_vector_single_or_exchange_verbose
qp_name i_h_j_mono_spin -r i_h_j_single_spin
qp_name i_Wee_j_mono -r i_Wee_j_single
qp_name potential_sr_x_alpha_ao_lda --rename=potential_x_alpha_ao_sr_lda
qp_name potential_sr_x_beta_ao_lda --rename=potential_x_beta_ao_sr_lda
qp_name potential_sr_c_alpha_ao_lda --rename=potential_c_alpha_ao_sr_lda
qp_name potential_sr_c_beta_ao_lda --rename=potential_c_beta_ao_sr_lda
qp_name potential_sr_xc_alpha_ao_lda --rename=potential_xc_alpha_ao_sr_lda
qp_name potential_sr_xc_beta_ao_lda --rename=potential_xc_beta_ao_sr_lda
qp_name potential_sr_x_alpha_ao_pbe --rename=potential_x_alpha_ao_sr_pbe
qp_name potential_sr_x_beta_ao_pbe --rename=potential_x_beta_ao_sr_pbe
qp_name potential_sr_c_alpha_ao_pbe --rename=potential_c_alpha_ao_sr_pbe
qp_name potential_sr_c_beta_ao_pbe --rename=potential_c_beta_ao_sr_pbe
qp_name potential_sr_xc_alpha_ao_pbe --rename=potential_xc_alpha_ao_sr_pbe
qp_name potential_sr_xc_beta_ao_pbe --rename=potential_xc_beta_ao_sr_pbe
qp_name mo_mono_elec_integral --rename=mo_mono_elec_integrals
qp_name mo_mono_elec_integral --rename=mo_mono_elec_integrals
qp_name mo_nucl_elec_integral --rename=mo_nucl_elec_integrals
qp_name mo_kinetic_integral --rename=mo_kinetic_integrals
qp_name disk_access_mo_one_integrals --rename=io_mo_one_e_integrals
qp_name disk_access_ao_one_integrals --rename=io_ao_one_e_integrals
qp_name ao_mono_elec_integral --rename=ao_one_e_integrals
qp_name disk_access_ao_integrals --rename=io_ao_two_e_integrals
qp_name disk_access_mo_integrals --rename=io_mo_two_e_integrals
qp_name io_mo_integrals --rename=io_mo_two_e_integrals
qp_name io_ao_integrals --rename=io_ao_two_e_integrals
qp_name read_ao_integrals --rename=read_ao_two_e_integrals
qp_name read_mo_integrals --rename=read_mo_two_e_integrals
qp_name write_mo_integrals --rename=write_mo_two_e_integrals
qp_name write_ao_integrals --rename=write_ao_two_e_integrals
qp_name ao_two_e_integrals --rename=ao_two_e_ints
qp_name mo_two_e_integrals --rename=mo_two_e_ints
qp_name mo_two_e_erf_integrals --rename=mo_two_e_erf_ints
qp_name ao_two_e_erf_integrals --rename=ao_two_e_erf_ints
qp_name ezfio_set_mo_two_e_ints_io_mo_integrals -r ezfio_set_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_set_ao_two_e_ints_io_ao_integrals -r ezfio_set_ao_two_e_ints_io_ao_two_e_integrals
qp_name mo_tot_num -r mo_num
qp_name ezfio_set_mo_basis_mo_tot_num -r ezfio_set_mo_basis_mo_num
qp_name ezfio_get_mo_basis_mo_tot_num -r ezfio_get_mo_basis_mo_num
qp_name ezfio_set_ao_two_e_integrals_disk_access_ao_integrals -r ezfio_set_ao_two_e_integrals_io_ao_two_e_integrals
qp_name ezfio_set_mo_two_e_integrals_disk_access_mo_integrals -r ezfio_set_mo_two_e_integrals_io_mo_two_e_integrals
qp_name ezfio_set_mo_two_e_integrals_io_mo_two_e_integrals -r ezfio_set_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_get_mo_two_e_integrals_io_mo_two_e_integrals -r ezfio_get_mo_two_e_ints_io_mo_two_e_integrals
qp_name ezfio_set_ao_two_e_integrals_io_ao_two_e_integrals -r ezfio_set_ao_two_e_ints_io_ao_two_e_integrals
qp_name ezfio_get_ao_two_e_integrals_io_ao_two_e_integrals -r ezfio_get_ao_two_e_ints_io_ao_two_e_integrals
qp_name ezfio_set_ao_two_e_erf_integrals_disk_access_ao_integrals_erf -r ezfio_set_ao_two_e_erf_ints_io_ao_two_e_integrals_erf
qp_name ezfio_set_mo_two_e_erf_integrals_disk_access_mo_integrals_erf -r ezfio_set_mo_two_e_erf_ints_io_mo_two_e_integrals_erf
qp_name disk_access_ao_integrals_erf -r io_ao_integrals_erf
qp_name disk_access_mo_integrals_erf -r io_mo_integrals_erf
qp_name write_mo_integrals_erf -r write_mo_two_e_integrals_erf
qp_name read_mo_integrals_erf -r read_mo_two_e_integrals_erf
qp_name ao_integrals_n_e
qp_name ao_nucl_elec_interals -r ao_integrals_n_e
qp_name ao_nucl_elec_integrals -r ao_integrals_n_e
qp_name ao_nucl_elec_integrals_per_atom -r ao_integrals_n_e_per_atom
qp_name bi_elec_ref_bitmask_energy -r ref_bitmask_two_e_energy
qp_name mono_elec_ref_bitmask_energy -r ref_bitmask_one_e_energy
qp_name kinetic_ref_bitmask_energy -r ref_bitmask_kinetic_energy
qp_name nucl_elec_ref_bitmask_energy -r ref_bitmask_e_n_energy
qp_name disk_access_ao_integrals_erf
qp_name mo_bielec_integral_jj
qp_name mo_bielec_integral_jj -r mo_two_e_integrals_jj
qp_name mo_bielec_integral_jj_anti -r mo_two_e_integrals_jj_anti
qp_name mo_bielec_integral_jj_anti_from_ao -r mo_two_e_integrals_jj_anti_from_ao
qp_name mo_bielec_integral_jj_anti_exchange -r mo_two_e_integrals_jj_exchange
qp_name mo_bielec_integral_jj_exchange -r mo_two_e_integrals_jj_exchange
qp_name mo_bielec_integral_jj_exchange_from_ao -r mo_two_e_integrals_jj_exchange_from_ao
qp_name mo_bielec_integral_vv_anti_from_ao -r mo_two_e_integrals_vv_anti_from_ao
qp_name mo_bielec_integral_vv_exchange_from_ao -r mo_two_e_integrals_vv_exchange_from_ao
qp_name mo_bielec_integral_vv_from_ao -r mo_two_e_integrals_vv_from_ao
qp_name mo_bielec_integrals_erf_in_map -r mo_two_e_integrals_erf_in_map
qp_name mo_bielec_integrals_in_map -r mo_two_e_integrals_in_map
qp_name ao_bielec_integrals_in_map -r ao_two_e_integrals_in_map
qp_name ao_bielec_integrals_erf_in_map -r ao_two_e_integrals_erf_in_map
qp_name mo_mono_elec_integrals -r mo_one_e_integrals
qp_name mo_nucl_elec_integrals -r mo_integrals_n_e
qp_name mo_nucl_elec_integrals_per_atom -r mo_integrals_n_e_per_atom
qp_name I_x1_pol_mult_mono_elec -r I_x1_pol_mult_one_e
qp_name I_x2_pol_mult_mono_elec -r I_x2_pol_mult_one_e
qp_name give_polynom_mult_center_mono_elec -r give_polynomial_mult_center_one_e
qp_name give_polynom_mult_center_mono_elec_erf -r give_polynomial_mult_center_one_e_erf
qp_name give_polynom_mult_center_mono_elec_erf_opt -r give_polynomial_mult_center_one_e_erf_opt
qp_name i_H_j_mono_spin_monoelec -r i_H_j_mono_spin_one_e
qp_name diag_H_mat_elem_monoelec -r diag_H_mat_elem_one_e
qp_name i_H_j_monoelec -r i_H_j_one_e
qp_name get_mo_bielec_integral -r get_two_e_integral
qp_name ao_bielec_integrals_in_map_slave_tcp -r ao_two_e_integrals_in_map_slave_tcp
qp_name get_ao_bielec_integrals_non_zero -r get_ao_two_e_integrals_non_zero
qp_name bielec
qp_name bielec -r two-electron
qp_name ao_bielec_integral -r ao_two_e_integral
qp_name compute_ao_bielec_integrals -r compute_ao_two_e_integrals
qp_name mo_bielec_integral_jj_from_ao -r mo_two_e_integral_jj_from_ao
qp_name bielec_tmp_1 -r two_e_tmp_1
qp_name bielec_tmp_2 -r two_e_tmp_2
qp_name bielec_tmp_3 -r two_e_tmp_3
qp_name mo_bielec_integrals_index -r mo_two_e_integrals_index
qp_name bielec_tmp_0_idx -r two_e_tmp_0_idx
qp_name bielec_tmp_0 -r two_e_tmp_0
qp_name get_ao_bielec_integrals -r get_ao_two_e_integrals
qp_name bielectronic -r two-electron
qp_name bielec_integrals_index -r two_e_integrals_index
qp_name mo_bielec_integral -r mo_two_e_integral
qp_name mo_bielec_integrals_ij -r mo_two_e_integrals_ij
qp_name get_mo_bielec_integrals_ij -r get_mo_two_e_integrals_ij
qp_name get_mo_bielec_integrals_i1j1 -r get_mo_two_e_integrals_i1j1
qp_name get_mo_bielec_integrals_coulomb -r get_mo_two_e_integrals_coulomb
qp_name get_mo_bielec_integrals_coulomb_ii -r get_mo_two_e_integrals_coulomb_ii
qp_name get_mo_bielec_integrals_exch_ii -r get_mo_two_e_integrals_exch_ii
qp_name get_mo_bielec_integrals -r get_mo_two_e_integrals
qp_name get_ao_bielec_integrals_erf -r get_ao_two_e_integrals_erf
qp_name save_erf_bielec_ints_mo_into_ints_mo -r save_erf_two_e_ints_mo_into_ints_mo
qp_name get_mo_bielec_integral_erf -r get_mo_two_e_integral_erf
qp_name get_ao_bielec_integral_erf -r get_ao_two_e_integral_erf
qp_name bielec_integrals_index_reverse -r two_e_integrals_index_reverse
qp_name get_mo_bielec_integrals_erf -r get_mo_two_e_integrals_erf
qp_name ao_bielec_integral_schwartz -r ao_two_e_integral_schwartz
qp_name get_mo_bielec_integrals_erf_ij -r get_mo_two_e_integrals_erf_ij
qp_name get_mo_bielec_integrals_erf_i1j1 -r get_mo_two_e_integrals_erf_i1j1
qp_name get_mo_bielec_integral_schwartz -r get_mo_two_e_integral_schwartz
qp_name get_ao_bielec_integrals_erf_non_zero -r get_ao_two_e_integrals_erf_non_zero
qp_name compute_ao_bielec_integrals_erf -r compute_ao_two_e_integrals_erf
qp_name mo_bielec_integrals_erf_index -r mo_two_e_integrals_erf_index
qp_name get_mo_bielec_integrals_erf_exch_ii -r get_mo_two_e_integrals_erf_exch_ii
qp_name get_mo_bielec_integrals_erf_coulomb_ii -r get_mo_two_e_integrals_erf_coulomb_ii
qp_name mo_bielec_integral_erf -r mo_two_e_integral_erf
qp_name i_H_j_bielec -r i_H_j_two_e
qp_name H_S2_u_0_bielec_nstates_openmp_work -r H_S2_u_0_two_e_nstates_openmp_work
qp_name H_S2_u_0_bielec_nstates_openmp_work_1 -r H_S2_u_0_two_e_nstates_openmp_work_1
qp_name H_S2_u_0_bielec_nstates_openmp_work_2 -r H_S2_u_0_two_e_nstates_openmp_work_2
qp_name H_S2_u_0_bielec_nstates_openmp_work_3 -r H_S2_u_0_two_e_nstates_openmp_work_3
qp_name H_S2_u_0_bielec_nstates_openmp_work_4 -r H_S2_u_0_two_e_nstates_openmp_work_4
qp_name H_S2_u_0_bielec_nstates_openmp -r H_S2_u_0_two_e_nstates_openmp
qp_name ac_operator_bielec -r ac_operator_two_e
qp_name aa_operator_bielec -r aa_operator_two_e
qp_name a_operator_bielec -r a_operator_two_e
qp_name u_0_H_u_0_bielec -r u_0_H_u_0_two_e
qp_name H_S2_u_0_bielec_nstates_openmp_work_
qp_name H_S2_u_0_bielec_nstates_openmp_work_
qp_name H_S2_u_0_bielec_nstates_openmp_work_ -r H_S2_u_0_two_e_nstates_openmp_work_
qp_name ao_bielec_integral_erf -r ao_two_e_integral_erf
qp_name psi_energy_bielec -r psi_energy_two_e
qp_name ao_bielec_integrals_in_map_slave_inproc -r ao_two_e_integrals_in_map_slave_inproc
qp_name ao_bielec_integrals_in_map_collector -r ao_two_e_integrals_in_map_collector
qp_name ao_bielec_integral_schwartz_accel -r ao_two_e_integral_schwartz_accel
qp_name get_ao_bielec_integral -r get_ao_two_e_integral
qp_name ao_bielec_integrals_in_map_slave -r ao_two_e_integrals_in_map_slave
qp_name ao_bielec_integral_erf_schwartz -r ao_two_e_integral_erf_schwartz
qp_name ao_bielec_integral_schwartz_accel_erf -r ao_two_e_integral_schwartz_accel_erf
qp_name ao_bielec_integrals_erf_in_map_slave_tcp -r ao_two_e_integrals_erf_in_map_slave_tcp
qp_name ao_bielec_integrals_erf_in_map_slave -r ao_two_e_integrals_erf_in_map_slave
qp_name ao_bielec_integrals_erf_in_map_slave_inproc -r ao_two_e_integrals_erf_in_map_slave_inproc
qp_name ao_bielec_integrals_erf_in_map_collector -r ao_two_e_integrals_erf_in_map_collector
qp_name save_erf_bielec_ints_ao_into_ints_ao -r save_erf_two_e_ints_ao_into_ints_ao
qp_name save_erf_bi_elec_integrals_mo -r save_erf_two_e_integrals_mo
qp_name ao_bi_elec_integral_beta -r ao_two_e_integral_beta
qp_name ao_bi_elec_integral_alpha -r ao_two_e_integral_alpha
qp_name ao_bi_elec_integral_alpha_tmp -r ao_two_e_integral_alpha_tmp
qp_name ao_bi_elec_integral_beta_tmp -r ao_two_e_integral_beta_tmp
qp_name data_one_body_alpha_dm_mo -r data_one_body_dm_alpha_mo
qp_name data_one_body_beta_dm_mo -r data_one_body_dm_beta_mo
qp_name one_body_dm_alpha_ao_for_dft -r one_e_dm_alpha_ao_for_dft
qp_name one_body_dm_alpha_at_r -r one_e_dm_alpha_at_r
qp_name one_body_dm_ao_alpha -r one_e_dm_ao_alpha
qp_name one_body_dm_ao_beta -r one_e_dm_ao_beta
qp_name one_body_dm_average_mo_for_dft -r one_e_dm_average_mo_for_dft
qp_name one_body_dm_beta_ao_for_dft -r one_e_dm_beta_ao_for_dft
qp_name one_body_dm_beta_at_r -r one_e_dm_beta_at_r
qp_name one_body_dm_dagger_mo_spin_index -r one_e_dm_dagger_mo_spin_index
qp_name one_body_dm_mo -r one_e_dm_mo
qp_name one_body_dm_mo_alpha -r one_e_dm_mo_alpha
qp_name one_body_dm_mo_alpha_average -r one_e_dm_mo_alpha_average
qp_name one_body_dm_mo_alpha_for_dft -r one_e_dm_mo_alpha_for_dft
qp_name one_body_dm_mo_beta -r one_e_dm_mo_beta
qp_name one_body_dm_mo_beta_average -r one_e_dm_mo_beta_average
qp_name one_body_dm_mo_beta_for_dft -r one_e_dm_mo_beta_for_dft
qp_name one_body_dm_mo_diff -r one_e_dm_mo_diff
qp_name one_body_dm_mo_for_dft -r one_e_dm_mo_for_dft
qp_name one_body_dm_mo_spin_index -r one_e_dm_mo_spin_index
qp_name one_body_grad_2_dm_alpha_at_r -r one_e_grad_2_dm_alpha_at_r
qp_name one_body_grad_2_dm_beta_at_r -r one_e_grad_2_dm_beta_at_r
qp_name one_body_spin_density_ao -r one_e_spin_density_ao
qp_name one_body_spin_density_mo -r one_e_spin_density_mo
qp_name one_electron_energy -r one_e_energy
qp_name one_dm_alpha_in_r -r one_e_dm_alpha_in_r
qp_name one_dm_and_grad_alpha_in_r -r one_e_dm_and_grad_alpha_in_r
qp_name one_dm_and_grad_beta_in_r -r one_e_dm_and_grad_beta_in_r
qp_name one_dm_beta_in_r -r one_e_dm_beta_in_r
qp_name ezfio_set_aux_quantities_data_one_body_alpha_dm_mo -r ezfio_set_aux_quantities_data_one_e_alpha_dm_mo
qp_name ezfio_set_aux_quantities_data_one_body_beta_dm_mo -r ezfio_set_aux_quantities_data_one_e_beta_dm_mo
qp_name data_one_body_dm_alpha_mo -r data_one_e_dm_alpha_mo
qp_name data_one_body_dm_beta_mo -r data_one_e_dm_beta_mo
qp_name save_one_body_dm -r save_one_e_dm
qp_name ezfio_set_aux_quantities_data_one_e_alpha_dm_mo -r ezfio_set_aux_quantities_data_one_e_dm_alpha_mo
qp_name ezfio_set_aux_quantities_data_one_e_beta_dm_mo -r ezfio_set_aux_quantities_data_one_e_dm_beta_mo
qp_name two_electron_energy -r two_e_energy
qp_name do_mono_excitation -r do_single_excitation
qp_name get_mono_excitation -r get_single_excitation
qp_name get_mono_excitation_from_fock -r get_single_excitation_from_fock
qp_name is_connected_to_by_mono -r is_connected_to_by_single
qp_name connected_to_ref_by_mono -r connected_to_ref_by_single
qp_name mono_excitation_wee -r single_excitation_wee
qp_name get_mono_excitation_spin
qp_name get_mono_excitation_spin -r get_single_excitation_spin
qp_name get_excitation_degree_vector_mono -r get_excitation_degree_vector_single
qp_name get_excitation_degree_vector_mono_or_exchange -r get_excitation_degree_vector_single_or_exchange_or_exchange
qp_name get_excitation_degree_vector_single_or_exchange_or_exchange -r get_excitation_degree_vector_single_or_exchange
qp_name get_excitation_degree_vector_mono_or_exchange_verbose -r get_excitation_degree_vector_single_or_exchange_verbose
qp_name i_h_j_mono_spin -r i_h_j_single_spin
qp_name i_Wee_j_mono -r i_Wee_j_single
qp_name potential_sr_x_alpha_ao_lda --rename=potential_x_alpha_ao_sr_lda
qp_name potential_sr_x_beta_ao_lda --rename=potential_x_beta_ao_sr_lda
qp_name potential_sr_c_alpha_ao_lda --rename=potential_c_alpha_ao_sr_lda
qp_name potential_sr_c_beta_ao_lda --rename=potential_c_beta_ao_sr_lda
qp_name potential_sr_xc_alpha_ao_lda --rename=potential_xc_alpha_ao_sr_lda
qp_name potential_sr_xc_beta_ao_lda --rename=potential_xc_beta_ao_sr_lda
qp_name potential_sr_x_alpha_ao_pbe --rename=potential_x_alpha_ao_sr_pbe
qp_name potential_sr_x_beta_ao_pbe --rename=potential_x_beta_ao_sr_pbe
qp_name potential_sr_c_alpha_ao_pbe --rename=potential_c_alpha_ao_sr_pbe
qp_name potential_sr_c_beta_ao_pbe --rename=potential_c_beta_ao_sr_pbe
qp_name potential_sr_xc_alpha_ao_pbe --rename=potential_xc_alpha_ao_sr_pbe
qp_name potential_sr_xc_beta_ao_pbe --rename=potential_xc_beta_ao_sr_pbe

9
TODO
View File

@ -57,13 +57,22 @@ Doc: plugins et qp_plugins
Ajouter les symetries dans devel
<<<<<<< HEAD
Compiler ezfio avec openmp
# Parallelize i_H_psi
=======
# Parallelize i_H_psi
<<<<<<< HEAD
=======
>>>>>>> minor_modifs
IMPORTANT:
Davidson Diagonalization
------------------------
Not enough memory: aborting in davidson_diag_hjj_sjj
>>>>>>> 94bacff2d093aa9b32c653ab59bcdb79d13f3264

View File

@ -116,6 +116,9 @@ def main(arguments):
d_tmp[x] = y
repo_of_plugin[y] = x.replace(QP_PLUGINS+'/','')
l_repository = d_tmp.keys()
if l_repository == []:
l_result = []
else:
m_instance = ModuleHandler(l_repository)
l_plugins = [module for module in m_instance.l_module]
l_result = l_plugins

View File

@ -52,8 +52,10 @@ def main(arguments):
pass
elif charge < 13:
n_frozen += 1
else:
elif charge < 31:
n_frozen += 5
else:
n_frozen += 9
mo_num = ezfio.mo_basis_mo_num

View File

@ -51,7 +51,7 @@ FCFLAGS : -Ofast
# -g : Extra debugging information
#
[DEBUG]
FCFLAGS : -g -msse4.2 -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant
FCFLAGS : -g -msse4.2 -fcheck=all -Waliasing -Wampersand -Wconversion -Wsurprising -Wintrinsics-std -Wno-tabs -Wintrinsic-shadow -Wline-truncation -Wreal-q-constant -Wuninitialized
# OpenMP flags
#################

6
configure vendored
View File

@ -9,12 +9,6 @@ eval set -- "$TEMP"
export QP_ROOT="$( cd "$(dirname "$0")" ; pwd -P )"
echo "QP_ROOT="$QP_ROOT
# Check if the module to create new DFT functionals exists or not
if [[ ! -d ${QP_ROOT}/src/new_functionals ]] ; then
cp -r ${QP_ROOT}/scripts/functionals/do_not_touch_func ${QP_ROOT}/src/new_functionals
fi
function help()
{

View File

@ -38,7 +38,7 @@
.. |OPAM| replace:: `OPAM`_
.. |Python| replace:: `Python`_
.. |qp| replace:: *Quantum Package*
.. |QP| replace:: |qp|
.. |QP| replace:: *Quantum Package*
.. |qpsh| replace:: *Quantum Package Shell*
.. |QPSH| replace:: |qpsh|
.. |resultsFile| replace:: `resultsFile`_

View File

@ -89,10 +89,14 @@ Index of Providers
* :c:data:`aos_dsr_vc_beta_pbe_w`
* :c:data:`aos_dsr_vx_alpha_pbe_w`
* :c:data:`aos_dsr_vx_beta_pbe_w`
* :c:data:`aos_dsr_vxc_alpha_pbe_w`
* :c:data:`aos_dsr_vxc_beta_pbe_w`
* :c:data:`aos_dvc_alpha_pbe_w`
* :c:data:`aos_dvc_beta_pbe_w`
* :c:data:`aos_dvx_alpha_pbe_w`
* :c:data:`aos_dvx_beta_pbe_w`
* :c:data:`aos_dvxc_alpha_pbe_w`
* :c:data:`aos_dvxc_beta_pbe_w`
* :c:data:`aos_grad_in_r_array`
* :c:data:`aos_grad_in_r_array_transp`
* :c:data:`aos_grad_in_r_array_transp_xyz`
@ -108,6 +112,10 @@ Index of Providers
* :c:data:`aos_sr_vx_alpha_pbe_w`
* :c:data:`aos_sr_vx_beta_lda_w`
* :c:data:`aos_sr_vx_beta_pbe_w`
* :c:data:`aos_sr_vxc_alpha_lda_w`
* :c:data:`aos_sr_vxc_alpha_pbe_w`
* :c:data:`aos_sr_vxc_beta_lda_w`
* :c:data:`aos_sr_vxc_beta_pbe_w`
* :c:data:`aos_vc_alpha_lda_w`
* :c:data:`aos_vc_alpha_pbe_w`
* :c:data:`aos_vc_beta_lda_w`
@ -116,6 +124,10 @@ Index of Providers
* :c:data:`aos_vx_alpha_pbe_w`
* :c:data:`aos_vx_beta_lda_w`
* :c:data:`aos_vx_beta_pbe_w`
* :c:data:`aos_vxc_alpha_lda_w`
* :c:data:`aos_vxc_alpha_pbe_w`
* :c:data:`aos_vxc_beta_lda_w`
* :c:data:`aos_vxc_beta_pbe_w`
* :c:data:`barycentric_electronic_energy`
* :c:data:`big_array_coulomb_integrals`
* :c:data:`big_array_exchange_integrals`
@ -207,8 +219,10 @@ Index of Providers
* :c:data:`element_name`
* :c:data:`energy_c`
* :c:data:`energy_c_lda`
* :c:data:`energy_c_new_functional`
* :c:data:`energy_c_none`
* :c:data:`energy_c_pbe`
* :c:data:`energy_c_sr_lda`
* :c:data:`energy_c_sr_pbe`
* :c:data:`energy_iterations`
* :c:data:`energy_sr_c_lda`
* :c:data:`energy_sr_c_pbe`
@ -216,8 +230,10 @@ Index of Providers
* :c:data:`energy_sr_x_pbe`
* :c:data:`energy_x`
* :c:data:`energy_x_lda`
* :c:data:`energy_x_new_functional`
* :c:data:`energy_x_none`
* :c:data:`energy_x_pbe`
* :c:data:`energy_x_sr_lda`
* :c:data:`energy_x_sr_pbe`
* :c:data:`exc_degree_per_selectors`
* :c:data:`exchange_functional`
* :c:data:`expected_s2`
@ -260,14 +276,6 @@ Index of Providers
* :c:data:`give_polynomial_mult_center_one_e_erf_opt`
* :c:data:`global_selection_buffer`
* :c:data:`global_selection_buffer_lock`
* :c:data:`grad_aos_dsr_vc_alpha_pbe_w`
* :c:data:`grad_aos_dsr_vc_beta_pbe_w`
* :c:data:`grad_aos_dsr_vx_alpha_pbe_w`
* :c:data:`grad_aos_dsr_vx_beta_pbe_w`
* :c:data:`grad_aos_dvc_alpha_pbe_w`
* :c:data:`grad_aos_dvc_beta_pbe_w`
* :c:data:`grad_aos_dvx_alpha_pbe_w`
* :c:data:`grad_aos_dvx_beta_pbe_w`
* :c:data:`grid_points_per_atom`
* :c:data:`grid_points_radial`
* :c:data:`grid_type_sgn`
@ -330,7 +338,7 @@ Index of Providers
* :c:data:`iradix_sort_big`
* :c:data:`is_zmq_slave`
* :c:data:`ks_energy`
* :c:data:`l_to_charater`
* :c:data:`l_to_character`
* :c:data:`level_shift`
* :c:data:`list_act`
* :c:data:`list_act_reverse`
@ -449,6 +457,7 @@ Index of Providers
* :c:data:`n_states_diag`
* :c:data:`n_virt_orb`
* :c:data:`n_virt_orb_allocate`
* :c:data:`no_core_density`
* :c:data:`no_ivvv_integrals`
* :c:data:`no_vvv_integrals`
* :c:data:`no_vvvv_integrals`
@ -507,34 +516,72 @@ Index of Providers
* :c:data:`output_wall_time_0`
* :c:data:`overlap_gaussian_xyz`
* :c:data:`phi_angular_integration_lebedev`
* :c:data:`pot_grad_c_alpha_ao_pbe`
* :c:data:`pot_grad_c_beta_ao_pbe`
* :c:data:`pot_grad_x_alpha_ao_pbe`
* :c:data:`pot_grad_x_beta_ao_pbe`
* :c:data:`pot_grad_xc_alpha_ao_pbe`
* :c:data:`pot_grad_xc_beta_ao_pbe`
* :c:data:`pot_scal_c_alpha_ao_pbe`
* :c:data:`pot_scal_c_beta_ao_pbe`
* :c:data:`pot_scal_x_alpha_ao_pbe`
* :c:data:`pot_scal_x_beta_ao_pbe`
* :c:data:`pot_scal_xc_alpha_ao_pbe`
* :c:data:`pot_scal_xc_beta_ao_pbe`
* :c:data:`pot_sr_grad_c_alpha_ao_pbe`
* :c:data:`pot_sr_grad_c_beta_ao_pbe`
* :c:data:`pot_sr_grad_x_alpha_ao_pbe`
* :c:data:`pot_sr_grad_x_beta_ao_pbe`
* :c:data:`pot_sr_grad_xc_alpha_ao_pbe`
* :c:data:`pot_sr_grad_xc_beta_ao_pbe`
* :c:data:`pot_sr_scal_c_alpha_ao_pbe`
* :c:data:`pot_sr_scal_c_beta_ao_pbe`
* :c:data:`pot_sr_scal_x_alpha_ao_pbe`
* :c:data:`pot_sr_scal_x_beta_ao_pbe`
* :c:data:`pot_sr_scal_xc_alpha_ao_pbe`
* :c:data:`pot_sr_scal_xc_beta_ao_pbe`
* :c:data:`potential_c_alpha_ao`
* :c:data:`potential_c_alpha_ao_lda`
* :c:data:`potential_c_alpha_ao_none`
* :c:data:`potential_c_alpha_ao_pbe`
* :c:data:`potential_c_alpha_ao_sr_lda`
* :c:data:`potential_c_alpha_ao_sr_pbe`
* :c:data:`potential_c_alpha_mo`
* :c:data:`potential_c_beta_ao`
* :c:data:`potential_c_beta_ao_lda`
* :c:data:`potential_c_beta_ao_none`
* :c:data:`potential_c_beta_ao_pbe`
* :c:data:`potential_c_beta_ao_sr_lda`
* :c:data:`potential_c_beta_ao_sr_pbe`
* :c:data:`potential_c_beta_mo`
* :c:data:`potential_new_functional_c_alpha_ao`
* :c:data:`potential_new_functional_c_beta_ao`
* :c:data:`potential_new_functional_x_alpha_ao`
* :c:data:`potential_new_functional_x_beta_ao`
* :c:data:`potential_sr_c_alpha_ao_lda`
* :c:data:`potential_sr_c_alpha_ao_pbe`
* :c:data:`potential_sr_c_beta_ao_lda`
* :c:data:`potential_sr_c_beta_ao_pbe`
* :c:data:`potential_sr_x_alpha_ao_lda`
* :c:data:`potential_sr_x_alpha_ao_pbe`
* :c:data:`potential_sr_x_beta_ao_lda`
* :c:data:`potential_sr_x_beta_ao_pbe`
* :c:data:`potential_x_alpha_ao`
* :c:data:`potential_x_alpha_ao_lda`
* :c:data:`potential_x_alpha_ao_none`
* :c:data:`potential_x_alpha_ao_pbe`
* :c:data:`potential_x_alpha_ao_sr_lda`
* :c:data:`potential_x_alpha_ao_sr_pbe`
* :c:data:`potential_x_alpha_mo`
* :c:data:`potential_x_beta_ao`
* :c:data:`potential_x_beta_ao_lda`
* :c:data:`potential_x_beta_ao_none`
* :c:data:`potential_x_beta_ao_pbe`
* :c:data:`potential_x_beta_ao_sr_lda`
* :c:data:`potential_x_beta_ao_sr_pbe`
* :c:data:`potential_x_beta_mo`
* :c:data:`potential_xc_alpha_ao`
* :c:data:`potential_xc_alpha_ao_lda`
* :c:data:`potential_xc_alpha_ao_none`
* :c:data:`potential_xc_alpha_ao_pbe`
* :c:data:`potential_xc_alpha_ao_sr_lda`
* :c:data:`potential_xc_alpha_ao_sr_pbe`
* :c:data:`potential_xc_alpha_mo`
* :c:data:`potential_xc_beta_ao`
* :c:data:`potential_xc_beta_ao_lda`
* :c:data:`potential_xc_beta_ao_none`
* :c:data:`potential_xc_beta_ao_pbe`
* :c:data:`potential_xc_beta_ao_sr_lda`
* :c:data:`potential_xc_beta_ao_sr_pbe`
* :c:data:`potential_xc_beta_mo`
* :c:data:`pseudo_dz_k`
* :c:data:`pseudo_dz_k_transp`
* :c:data:`pseudo_dz_kl`
@ -659,6 +706,9 @@ Index of Providers
* :c:data:`ref_bitmask`
* :c:data:`ref_bitmask_e_n_energy`
* :c:data:`ref_bitmask_energy`
* :c:data:`ref_bitmask_energy_aa`
* :c:data:`ref_bitmask_energy_ab`
* :c:data:`ref_bitmask_energy_bb`
* :c:data:`ref_bitmask_kinetic_energy`
* :c:data:`ref_bitmask_one_e_energy`
* :c:data:`ref_bitmask_two_e_energy`
@ -677,6 +727,7 @@ Index of Providers
* :c:data:`s_mo_coef`
* :c:data:`s_z`
* :c:data:`s_z2_sz`
* :c:data:`same_xc_func`
* :c:data:`scf_algorithm`
* :c:data:`scf_density_matrix_ao`
* :c:data:`scf_density_matrix_ao_alpha`
@ -687,7 +738,6 @@ Index of Providers
* :c:data:`selection_criterion_factor`
* :c:data:`selection_criterion_min`
* :c:data:`selection_weight`
* :c:data:`shifting_constant`
* :c:data:`short_range_hartree`
* :c:data:`short_range_hartree_operator`
* :c:data:`single_exc_bitmask`
@ -718,11 +768,13 @@ Index of Providers
* :c:data:`trace_v_h`
* :c:data:`trace_v_hxc`
* :c:data:`trace_v_xc`
* :c:data:`trace_v_xc_new`
* :c:data:`transpose`
* :c:data:`two_e_energy`
* :c:data:`unpaired_alpha_electrons`
* :c:data:`used_weight`
* :c:data:`var_pt2_ratio`
* :c:data:`variance_max`
* :c:data:`virt_bitmask`
* :c:data:`virt_bitmask_4`
* :c:data:`weight_at_r`
@ -1191,6 +1243,7 @@ Index of Subroutines/Functions
* :c:func:`perturb_buffer_moller_plesset`
* :c:func:`perturb_buffer_qdpt`
* :c:func:`primitive_value`
* :c:func:`print_ci_vectors`
* :c:func:`print_det`
* :c:func:`print_e_conv`
* :c:func:`print_extrapolated_energy`
@ -1341,15 +1394,11 @@ Index of Subroutines/Functions
* :c:func:`wall_time`
* :c:func:`wallis`
* :c:func:`wf_of_psi_bilinear_matrix`
* :c:func:`write_ao_basis`
* :c:func:`write_bool`
* :c:func:`write_double`
* :c:func:`write_geometry`
* :c:func:`write_git_log`
* :c:func:`write_int`
* :c:func:`write_integrals_erf`
* :c:func:`write_intro_gamess`
* :c:func:`write_mo_basis`
* :c:func:`write_spindeterminants`
* :c:func:`write_time`
* :c:func:`zmq_abort`

View File

@ -72,11 +72,40 @@ file by hand. Running :command:`ninja` inside a module will compile only the
module, and running :command:`ninja` at the root of the |qp| will build all the
modules, as well as the tools.
.. cache compile
.. interface AOs / MOs => resultsFile
.. interface integrals => AO / MO
.. interface integrals MO => FCIDUMP
.. TODO : molden module in resultsFile
.. include:: /work.rst
Algorithms
==========
The `PhD thesis of Yann Garniron <https://doi.org/10.5281/zenodo.2558127>`_
gives all the details about the implementation of:
* The data structure for the two-electron integrals (:file:`utils/map_module.f`)
* The Davdison diagonalization (module :ref:`module_davidson`)
* The CIPSI selection (module :ref:`module_cipsi`)
* The hybrid stochastic/deterministic PT2 correction (module :ref:`module_cipsi`)
* The hybrid stochastic/deterministic matrix dressing (module :ref:`module_dressing`)
Extracting results for use with other codes
===========================================
The |AOs| and |MOs| can be seen with :ref:`qp_edit`. We also provide a utility
to create a file which can be read by `molden` for visualizing the |MOs| (see
:ref:`molden`). For using external |CI| solvers, we provide a utility that
generates a file containing the two-electron integrals in the |MO| basis set
in the `FCIDUMP` format (see :ref:`fcidump`).
All the results are stored in the |EZFIO| directory, so users willing to fetch
data such as the |MOs| or the |CI| coefficients should use the |EZFIO| API.
There multiple major ways to do this:
* Write a script in Python or OCaml and use the Python |EZFIO| API. The script
:file:`$QP_ROOT/bin/qp_convert_output_to_ezfio` is a good example to understand
how to use the |EZFIO| API in Python,
* Write an independent program in Fortran or C, link it with the |EZFIO| library
located at :file:`$QP_ROOT/external/ezfio/lib/libezfio.a` and call directly
the |EZFIO| routines,
* Write a new module for the |qp| printing the desired quantities in a suitable
text format. The program :ref:`fcidump` is an example of such a program.

View File

@ -60,7 +60,6 @@ fci
:columns: 3
* :c:func:`run_cipsi`
* :c:func:`run_slave_cipsi`
* :c:func:`run_stochastic_cipsi`
Touches:
@ -73,9 +72,9 @@ fci
* :c:data:`ci_energy`
* :c:data:`ci_electronic_energy`
* :c:data:`n_det`
* :c:data:`n_iter`
* :c:data:`psi_occ_pattern`
* :c:data:`c0_weight`
* :c:data:`distributed_davidson`
* :c:data:`psi_coef`
* :c:data:`psi_det_sorted_bit`
* :c:data:`psi_det`
@ -84,8 +83,6 @@ fci
* :c:data:`psi_energy`
* :c:data:`psi_occ_pattern`
* :c:data:`psi_energy`
* :c:data:`pt2_e0_denominator`
* :c:data:`pt2_stoch_istate`
* :c:data:`read_wf`
* :c:data:`state_average_weight`
* :c:data:`threshold_generators`

View File

@ -16,14 +16,26 @@ molden
.. hlist::
:columns: 3
* :c:data:`nucl_list_shell_aos`
* :c:data:`mo_occ`
* :c:data:`ezfio_filename`
* :c:data:`mo_coef`
* :c:data:`ao_coef`
* :c:data:`ao_power`
* :c:data:`fock_matrix_mo`
* :c:data:`ao_num`
* :c:data:`ao_prim_num`
* :c:data:`mo_num`
* :c:data:`nucl_coord`
* :c:data:`ao_l`
* :c:data:`nucl_charge`
* :c:data:`ao_expo`
* :c:data:`element_name`
* :c:data:`nucl_num`
Calls:
.. hlist::
:columns: 3
* :c:func:`write_ao_basis`
* :c:func:`write_geometry`
* :c:func:`write_intro_gamess`
* :c:func:`write_mo_basis`
* :c:func:`isort`

View File

@ -1,3 +0,0 @@
.. image:: http://craniointernational.com/wp-content/uploads/2018/01/work-in-progress.jpg

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "CIS" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "CIS" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
cis \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "CISD" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "CISD" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
cisd \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "CONFIGURE" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "CONFIGURE" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
configure \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "DIAGONALIZE_H" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "DIAGONALIZE_H" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
diagonalize_h \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "EXCITED_STATES" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "EXCITED_STATES" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
excited_states \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "FCI" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "FCI" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
fci \- | Quantum Package >
.
@ -98,11 +98,9 @@ Calls:
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBrun_slave_cipsi()\fP
\fBrun_stochastic_cipsi()\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBrun_stochastic_cipsi()\fP
.UNINDENT
.UNINDENT
.sp
@ -120,13 +118,13 @@ Touches:
.IP \(bu 2
\fBn_det\fP
.IP \(bu 2
\fBpsi_occ_pattern\fP
\fBn_iter\fP
.IP \(bu 2
\fBc0_weight\fP
\fBpsi_occ_pattern\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBdistributed_davidson\fP
\fBc0_weight\fP
.IP \(bu 2
\fBpsi_coef\fP
.IP \(bu 2
@ -137,21 +135,17 @@ Touches:
\fBpsi_det_size\fP
.IP \(bu 2
\fBpsi_det_sorted_bit\fP
.IP \(bu 2
\fBpsi_energy\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBpsi_energy\fP
.IP \(bu 2
\fBpsi_occ_pattern\fP
.IP \(bu 2
\fBpsi_energy\fP
.IP \(bu 2
\fBpt2_e0_denominator\fP
.IP \(bu 2
\fBpt2_stoch_istate\fP
.IP \(bu 2
\fBread_wf\fP
.IP \(bu 2
\fBstate_average_weight\fP
.IP \(bu 2
\fBthreshold_generators\fP

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "FCIDUMP" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "FCIDUMP" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
fcidump \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "FOUR_IDX_TRANSFORM" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "FOUR_IDX_TRANSFORM" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
four_idx_transform \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "INTERFACES" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "INTERFACES" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
interfaces \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "KS_SCF" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "KS_SCF" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
ks_scf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "MOLDEN" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "MOLDEN" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
molden \- | Quantum Package >
.
@ -38,11 +38,41 @@ Needs:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBnucl_list_shell_aos\fP
.IP \(bu 2
\fBmo_occ\fP
.IP \(bu 2
\fBezfio_filename\fP
.IP \(bu 2
\fBmo_coef\fP
.IP \(bu 2
\fBao_coef\fP
.IP \(bu 2
\fBao_power\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBfock_matrix_mo\fP
.IP \(bu 2
\fBao_num\fP
.IP \(bu 2
\fBao_prim_num\fP
.IP \(bu 2
\fBmo_num\fP
.IP \(bu 2
\fBnucl_coord\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBao_l\fP
.IP \(bu 2
\fBnucl_charge\fP
.IP \(bu 2
\fBao_expo\fP
.IP \(bu 2
\fBelement_name\fP
.IP \(bu 2
\fBnucl_num\fP
.UNINDENT
.UNINDENT
.sp
@ -50,17 +80,11 @@ Calls:
.INDENT 0.0
.INDENT 2.0
.IP \(bu 2
\fBwrite_ao_basis()\fP
.IP \(bu 2
\fBwrite_geometry()\fP
\fBisort()\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBwrite_intro_gamess()\fP
.UNINDENT
.INDENT 2.0
.IP \(bu 2
\fBwrite_mo_basis()\fP
.UNINDENT
.UNINDENT
.UNINDENT

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "NATURAL_ORBITALS" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "NATURAL_ORBITALS" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
natural_orbitals \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PLUGINS" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "PLUGINS" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
plugins \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINT_E_CONV" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "PRINT_E_CONV" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
print_e_conv \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINT_WF" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "PRINT_WF" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
print_wf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PRINTING" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "PRINTING" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
printing \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "PT2" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "PT2" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
pt2 \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_CONVERT_OUTPUT_TO_EZFIO" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_CONVERT_OUTPUT_TO_EZFIO" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_convert_output_to_ezfio \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_CREATE_EZFIO_FROM_XYZ" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_CREATE_EZFIO_FROM_XYZ" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_create_ezfio_from_xyz \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_EDIT" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_EDIT" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_edit \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_EXPORT_AS_TGZ" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_EXPORT_AS_TGZ" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_export_as_tgz \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_PLUGINS" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_PLUGINS" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_plugins \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_RESET" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_RESET" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_reset \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_RUN" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_RUN" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_run \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_SET_FROZEN_CORE" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_SET_FROZEN_CORE" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_set_frozen_core \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_SET_MO_CLASS" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_SET_MO_CLASS" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_set_mo_class \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_STOP" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_STOP" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_stop \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QP_UPDATE" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QP_UPDATE" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qp_update \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "QPSH" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "QPSH" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
qpsh \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "RS_KS_SCF" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "RS_KS_SCF" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
rs_ks_scf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SAVE_NATORB" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "SAVE_NATORB" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
save_natorb \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SAVE_ONE_E_DM" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "SAVE_ONE_E_DM" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
save_one_e_dm \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SAVE_ORTHO_MOS" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "SAVE_ORTHO_MOS" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
save_ortho_mos \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "SCF" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "SCF" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
scf \- | Quantum Package >
.

View File

@ -1,6 +1,6 @@
.\" Man page generated from reStructuredText.
.
.TH "WRITE_INTEGRALS_ERF" "1" "Feb 06, 2019" "2.0" "Quantum Package"
.TH "WRITE_INTEGRALS_ERF" "1" "Mar 06, 2019" "2.0" "Quantum Package"
.SH NAME
write_integrals_erf \- | Quantum Package >
.

0
plugins/local/.gitignore vendored Normal file
View File

View File

@ -140,7 +140,7 @@ END_PROVIDER
integer :: i
do i=1,ao_num
ao_l(i) = ao_power(i,1) + ao_power(i,2) + ao_power(i,3)
ao_l_char(i) = l_to_charater(ao_l(i))
ao_l_char(i) = l_to_character(ao_l(i))
enddo
ao_l_max = maxval(ao_l)
END_PROVIDER
@ -159,19 +159,19 @@ integer function ao_power_index(nx,ny,nz)
end
BEGIN_PROVIDER [ character*(128), l_to_charater, (0:7)]
BEGIN_PROVIDER [ character*(128), l_to_character, (0:7)]
BEGIN_DOC
! Character corresponding to the "l" value of an |AO|
END_DOC
implicit none
l_to_charater(0)='S'
l_to_charater(1)='P'
l_to_charater(2)='D'
l_to_charater(3)='F'
l_to_charater(4)='G'
l_to_charater(5)='H'
l_to_charater(6)='I'
l_to_charater(7)='J'
l_to_character(0)='s'
l_to_character(1)='p'
l_to_character(2)='d'
l_to_character(3)='f'
l_to_character(4)='g'
l_to_character(5)='h'
l_to_character(6)='i'
l_to_character(7)='j'
END_PROVIDER

View File

@ -3,3 +3,8 @@ type: integer
doc: Type of grid used for the Becke's numerical grid. Can be, by increasing accuracy: [ 0 | 1 | 2 | 3 ]
interface: ezfio,provider,ocaml
default: 2
[n_points_final_grid]
type: integer
doc: Total number of grid points
interface: ezfio

View File

@ -8,9 +8,9 @@ BEGIN_PROVIDER [integer, n_points_final_grid]
do j = 1, nucl_num
do i = 1, n_points_radial_grid -1
do k = 1, n_points_integration_angular
if(dabs(final_weight_at_r(k,i,j)) < 1.d-30)then
cycle
endif
! if(dabs(final_weight_at_r(k,i,j)) < 1.d-30)then
! cycle
! endif
n_points_final_grid += 1
enddo
enddo
@ -39,9 +39,9 @@ END_PROVIDER
do j = 1, nucl_num
do i = 1, n_points_radial_grid -1
do k = 1, n_points_integration_angular
if(dabs(final_weight_at_r(k,i,j)) < 1.d-30)then
cycle
endif
!if(dabs(final_weight_at_r(k,i,j)) < 1.d-30)then
! cycle
!endif
i_count += 1
final_grid_points(1,i_count) = grid_points_per_atom(1,k,i,j)
final_grid_points(2,i_count) = grid_points_per_atom(2,k,i,j)

View File

@ -150,6 +150,7 @@ subroutine run_cipsi
do k=1,N_states
rpt2(:) = pt2(:)/(1.d0 + norm(k))
enddo
call save_energy(psi_energy_with_nucl_rep, rpt2)
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
call save_energy(psi_energy_with_nucl_rep, pt2)

View File

@ -1,17 +1,17 @@
subroutine create_selection_buffer(N, siz_, res)
subroutine create_selection_buffer(N, size_in, res)
use selection_types
implicit none
BEGIN_DOC
! Allocates the memory for a selection buffer.
! The arrays have dimension siz_ and the maximum number of elements is N
! The arrays have dimension size_in and the maximum number of elements is N
END_DOC
integer, intent(in) :: N, siz_
integer, intent(in) :: N, size_in
type(selection_buffer), intent(out) :: res
integer :: siz
siz = max(siz_,1)
siz = max(size_in,1)
double precision :: rss
double precision, external :: memory_of_double

View File

@ -83,6 +83,7 @@ subroutine run_stochastic_cipsi
(psi_energy_with_nucl_rep(1) + pt2(1) - hf_energy_ref)
correlation_energy_ratio = min(1.d0,correlation_energy_ratio)
call save_energy(psi_energy_with_nucl_rep, rpt2)
call write_double(6,correlation_energy_ratio, 'Correlation ratio')
call print_summary(psi_energy_with_nucl_rep,pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
@ -131,6 +132,7 @@ subroutine run_stochastic_cipsi
enddo
call save_energy(psi_energy_with_nucl_rep, rpt2)
call save_energy(psi_energy_with_nucl_rep, rpt2)
call print_summary(psi_energy_with_nucl_rep(1:N_states),pt2,error,variance,norm,N_det,N_occ_pattern,N_states,psi_s2)
call save_iterations(psi_energy_with_nucl_rep(1:N_states),rpt2,N_det)
call print_extrapolated_energy()

View File

@ -9,3 +9,10 @@ type: double precision
doc: damping factor for the density used in RSFT.
interface: ezfio,provider,ocaml
default: 0.5
[no_core_density]
type: character*(32)
doc: Type of density
doc: if [no_core_dm] then all elements of the density matrix involving at least one orbital set as core are set to zero
interface: ezfio, provider, ocaml
default: full_density

View File

@ -15,6 +15,19 @@ BEGIN_PROVIDER [double precision, one_e_dm_mo_alpha_for_dft, (mo_num,mo_num, N_s
else if (density_for_dft .EQ. "KS")then
provide mo_coef
one_e_dm_mo_alpha_for_dft = one_body_dm_mo_alpha_one_det
else if (density_for_dft .EQ. "state_average_dens")then
one_e_dm_mo_alpha_for_dft = 0.d0
one_e_dm_mo_alpha_for_dft(:,:,1) = one_e_dm_mo_alpha_average(:,:)
endif
if(no_core_density .EQ. "no_core_dm")then
integer :: i,j
do i = 1, n_core_orb
do j = 1, mo_num
one_e_dm_mo_alpha_for_dft(j,i,:) = 0.d0
one_e_dm_mo_alpha_for_dft(i,j,:) = 0.d0
enddo
enddo
endif
END_PROVIDER
@ -36,6 +49,19 @@ BEGIN_PROVIDER [double precision, one_e_dm_mo_beta_for_dft, (mo_num,mo_num, N_st
else if (density_for_dft .EQ. "KS")then
provide mo_coef
one_e_dm_mo_beta_for_dft = one_body_dm_mo_beta_one_det
else if (density_for_dft .EQ. "state_average_dens")then
one_e_dm_mo_beta_for_dft = 0.d0
one_e_dm_mo_beta_for_dft(:,:,1) = one_e_dm_mo_beta_average(:,:)
endif
if(no_core_density .EQ. "no_core_dm")then
integer :: i,j
do i = 1, n_core_orb
do j = 1, mo_num
one_e_dm_mo_beta_for_dft(j,i,:) = 0.d0
one_e_dm_mo_beta_for_dft(i,j,:) = 0.d0
enddo
enddo
endif
END_PROVIDER

View File

@ -3,6 +3,10 @@
&BEGIN_PROVIDER [ double precision, ref_bitmask_kinetic_energy ]
&BEGIN_PROVIDER [ double precision, ref_bitmask_e_n_energy ]
&BEGIN_PROVIDER [ double precision, ref_bitmask_two_e_energy ]
&BEGIN_PROVIDER [ double precision, ref_bitmask_energy_ab ]
&BEGIN_PROVIDER [ double precision, ref_bitmask_energy_bb ]
&BEGIN_PROVIDER [ double precision, ref_bitmask_energy_aa ]
use bitmasks
implicit none
BEGIN_DOC
@ -53,5 +57,30 @@
enddo
ref_bitmask_one_e_energy = ref_bitmask_kinetic_energy + ref_bitmask_e_n_energy
ref_bitmask_energy_ab = 0.d0
do i = 1, elec_alpha_num
do j = 1, elec_beta_num
ref_bitmask_energy_ab += mo_two_e_integrals_jj(occ(i,1),occ(j,2))
enddo
enddo
ref_bitmask_energy_aa = 0.d0
do i = 1, elec_alpha_num
do j = 1, elec_alpha_num
ref_bitmask_energy_aa += mo_two_e_integrals_jj_anti(occ(i,1),occ(j,1))
enddo
enddo
ref_bitmask_energy_aa = ref_bitmask_energy_aa * 0.5d0
ref_bitmask_energy_bb = 0.d0
do i = 1, elec_beta_num
do j = 1, elec_beta_num
ref_bitmask_energy_bb += mo_two_e_integrals_jj_anti(occ(i,2),occ(j,2))
enddo
enddo
ref_bitmask_energy_bb = ref_bitmask_energy_bb * 0.5d0
END_PROVIDER

View File

@ -1,2 +1,2 @@
dft_utils_one_e
new_functionals
functionals

View File

@ -1,54 +1,67 @@
BEGIN_PROVIDER [double precision, energy_x, (N_states)]
&BEGIN_PROVIDER [double precision, energy_c, (N_states)]
implicit none
BEGIN_DOC
! correlation energies general providers.
END_DOC
BEGIN_SHELL [ /usr/bin/env python ]
import os
import glob
import sys
qproot=os.environ['QP_ROOT']
funcdir='../functionals/'
os.chdir(funcdir)
functionals = map(lambda x : x.replace(".irp.f",""), glob.glob("*.irp.f"))
prefix = ""
for f in functionals:
print """
%sif (trim(exchange_functional) == '%s') then
energy_x = energy_x_%s"""%(prefix, f, f)
prefix = "else "
print """
else
print*, 'exchange functional required does not exist ...'
print*,'exchange_functional ',exchange_functional
stop"""
print "endif"
END_SHELL
END_PROVIDER
BEGIN_PROVIDER [double precision, energy_c, (N_states)]
implicit none
BEGIN_DOC
! correlation and exchange energies general providers.
END_DOC
if(trim(exchange_functional)=="short_range_LDA")then
energy_x = energy_sr_x_LDA
energy_x = energy_sr_x_LDA
else if(exchange_functional.EQ."short_range_PBE")then
energy_x = energy_sr_x_PBE
energy_x = energy_sr_x_PBE
else if(exchange_functional.EQ."PBE")then
energy_x = energy_sr_x_PBE
energy_x = energy_sr_x_PBE
else if(exchange_functional.EQ."LDA")then
energy_x = energy_sr_x_LDA
energy_x = energy_sr_x_LDA
else if(exchange_functional.EQ."None")then
energy_x = 0.d0
energy_x = 0.d0
else if(exchange_functional.EQ."my_functional")then
energy_x = energy_x_new_functional
else
print*, 'Exchange functional required does not exist ...'
print*,'exchange_functional',exchange_functional
stop
endif
if(trim(correlation_functional)=="short_range_LDA")then
energy_c = energy_sr_c_LDA
energy_c = energy_sr_c_LDA
else if(correlation_functional.EQ."short_range_PBE")then
energy_c = energy_sr_c_PBE
energy_c = energy_sr_c_PBE
else if(correlation_functional.EQ."PBE")then
energy_c = energy_sr_c_PBE
energy_c = energy_sr_c_PBE
else if(correlation_functional.EQ."LDA")then
energy_c = energy_sr_c_LDA
energy_c = energy_sr_c_LDA
else if(correlation_functional.EQ."None")then
energy_c = 0.d0
energy_c = 0.d0
else if(correlation_functional.EQ."my_functional")then
energy_c = energy_c_new_functional
BEGIN_SHELL [ /usr/bin/env python ]
import os
import glob
import sys
qproot=os.environ['QP_ROOT']
funcdir='../functionals/'
os.chdir(funcdir)
functionals = map(lambda x : x.replace(".irp.f",""), glob.glob("*.irp.f"))
prefix = ""
for f in functionals:
print """
%sif (trim(correlation_functional) == '%s') then
energy_c = energy_c_%s"""%(prefix, f, f)
prefix = "else "
print """
else
print*, 'Correlation functional required does not ecist ...'
print*, 'Correlation functional required does not exist ...'
print*,'correlation_functional ',correlation_functional
stop
endif
stop"""
print "endif"
END_SHELL
END_PROVIDER

View File

@ -1,61 +1,72 @@
BEGIN_PROVIDER [double precision, potential_x_alpha_ao,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao ,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_alpha_ao,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! general providers for the alpha/beta exchange potentials on the AO basis
END_DOC
BEGIN_SHELL [ /usr/bin/env python ]
import os
import glob
import sys
qproot=os.environ['QP_ROOT']
funcdir='../functionals/'
os.chdir(funcdir)
functionals = map(lambda x : x.replace(".irp.f",""), glob.glob("*.irp.f"))
prefix = ""
for f in functionals:
print """
%sif (trim(exchange_functional) == '%s') then
potential_x_alpha_ao = potential_x_alpha_ao_%s
potential_x_beta_ao = potential_x_beta_ao_%s"""%(prefix, f, f, f)
prefix = "else "
print """
else
print*, 'exchange functional required does not exist ...'
print*,'exchange_functional ',exchange_functional
stop"""
print "endif"
END_SHELL
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_alpha_ao,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! general providers for the alpha/beta exchange/correlation potentials on the AO basis
! general providers for the alpha/beta correlation potentials on the AO basis
END_DOC
if(trim(exchange_functional)=="short_range_LDA")then
potential_x_alpha_ao = potential_sr_x_alpha_ao_LDA
potential_x_beta_ao = potential_sr_x_beta_ao_LDA
else if(exchange_functional.EQ."short_range_PBE")then
potential_x_alpha_ao = potential_sr_x_alpha_ao_PBE
potential_x_beta_ao = potential_sr_x_beta_ao_PBE
else if(trim(exchange_functional)=="LDA")then
potential_x_alpha_ao = potential_x_alpha_ao_LDA
potential_x_beta_ao = potential_x_beta_ao_LDA
else if(exchange_functional.EQ."PBE")then
potential_x_alpha_ao = potential_x_alpha_ao_PBE
potential_x_beta_ao = potential_x_beta_ao_PBE
else if(exchange_functional.EQ."my_functional")then
potential_x_alpha_ao = potential_new_functional_x_alpha_ao
potential_x_beta_ao = potential_new_functional_x_beta_ao
else if(exchange_functional.EQ."None")then
potential_x_alpha_ao = 0.d0
potential_x_beta_ao = 0.d0
else
print*, 'Exchange functional required does not exist ...'
print*,'exchange_functional',exchange_functional
stop
endif
BEGIN_SHELL [ /usr/bin/env python ]
import os
import glob
import sys
qproot=os.environ['QP_ROOT']
funcdir='../functionals/'
os.chdir(funcdir)
functionals = map(lambda x : x.replace(".irp.f",""), glob.glob("*.irp.f"))
if(trim(correlation_functional)=="short_range_LDA")then
potential_c_alpha_ao = potential_sr_c_alpha_ao_LDA
potential_c_beta_ao = potential_sr_c_beta_ao_LDA
else if(trim(correlation_functional)=="LDA")then
potential_c_alpha_ao = potential_c_alpha_ao_LDA
potential_c_beta_ao = potential_c_beta_ao_LDA
else if(correlation_functional.EQ."short_range_PBE")then
potential_c_alpha_ao = potential_sr_c_alpha_ao_PBE
potential_c_beta_ao = potential_sr_c_beta_ao_PBE
else if(correlation_functional.EQ."PBE")then
potential_c_alpha_ao = potential_c_alpha_ao_PBE
potential_c_beta_ao = potential_c_beta_ao_PBE
else if(correlation_functional.EQ."my_functional")then
potential_c_alpha_ao = potential_new_functional_c_alpha_ao
potential_c_beta_ao = potential_new_functional_c_beta_ao
else if(correlation_functional.EQ."None")then
potential_c_alpha_ao = 0.d0
potential_c_beta_ao = 0.d0
prefix = ""
for f in functionals:
print """
%sif (trim(correlation_functional) == '%s') then
potential_c_alpha_ao = potential_c_alpha_ao_%s
potential_c_beta_ao = potential_c_beta_ao_%s"""%(prefix, f, f, f)
prefix = "else "
print """
else
print*, 'Correlation functional required does not ecist ...'
print*, 'Correlation functional required does not exist ...'
print*,'correlation_functional ',correlation_functional
stop
endif
stop"""
print "endif"
END_SHELL
END_PROVIDER
@ -65,11 +76,9 @@ END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_mo,(mo_num,mo_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_mo ,(mo_num,mo_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_alpha_mo,(mo_num,mo_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_mo,(mo_num,mo_num,N_states)]
implicit none
BEGIN_DOC
! general providers for the alpha/beta exchange/correlation potentials on the MO basis
! general providers for the alpha/beta exchange potentials on the MO basis
END_DOC
integer :: istate
do istate = 1, N_states
@ -86,8 +95,18 @@ END_PROVIDER
potential_x_beta_mo(1,1,istate), &
size(potential_x_beta_mo,1) &
)
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_alpha_mo,(mo_num,mo_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_mo, (mo_num,mo_num,N_states)]
implicit none
BEGIN_DOC
! general providers for the alpha/beta correlation potentials on the MO basis
END_DOC
integer :: istate
do istate = 1, N_states
call ao_to_mo( &
potential_c_alpha_ao(1,1,istate), &
size(potential_c_alpha_ao,1), &
@ -101,11 +120,11 @@ END_PROVIDER
potential_c_beta_mo(1,1,istate), &
size(potential_c_beta_mo,1) &
)
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, Trace_v_xc, (N_states)]
&BEGIN_PROVIDER [double precision, Trace_v_H, (N_states)]
&BEGIN_PROVIDER [double precision, Trace_v_Hxc, (N_states)]
@ -183,29 +202,30 @@ END_PROVIDER
! general providers for the alpha/beta exchange/correlation potentials on the AO basis
END_DOC
if(trim(exchange_functional)=="short_range_LDA")then
potential_xc_alpha_ao = potential_sr_xc_alpha_ao_LDA
potential_xc_beta_ao = potential_sr_xc_beta_ao_LDA
else if(trim(exchange_functional)=="LDA")then
potential_xc_alpha_ao = potential_xc_alpha_ao_LDA
potential_xc_beta_ao = potential_xc_beta_ao_LDA
else if(exchange_functional.EQ."None")then
potential_xc_alpha_ao = 0.d0
potential_xc_beta_ao = 0.d0
else if(trim(exchange_functional)=="short_range_PBE")then
potential_xc_alpha_ao = potential_sr_xc_alpha_ao_PBE
potential_xc_beta_ao = potential_sr_xc_beta_ao_PBE
else if(trim(exchange_functional)=="PBE")then
potential_xc_alpha_ao = potential_xc_alpha_ao_PBE
potential_xc_beta_ao = potential_xc_beta_ao_PBE
else if(exchange_functional.EQ."None")then
potential_xc_alpha_ao = 0.d0
potential_xc_beta_ao = 0.d0
BEGIN_SHELL [ /usr/bin/env python ]
import os
import glob
import sys
qproot=os.environ['QP_ROOT']
funcdir='../functionals/'
os.chdir(funcdir)
functionals = map(lambda x : x.replace(".irp.f",""), glob.glob("*.irp.f"))
prefix = ""
for f in functionals:
print """
%sif (trim(exchange_functional) == '%s') then
potential_xc_alpha_ao = potential_xc_alpha_ao_%s
potential_xc_beta_ao = potential_xc_beta_ao_%s"""%(prefix, f, f, f)
prefix = "else "
print """
else
print*, 'Exchange functional required does not exist ...'
print*, 'exchange functional required does not exist ...'
print*,'exchange_functional ',exchange_functional
stop
endif
stop"""
print "endif"
END_SHELL
END_PROVIDER

View File

@ -1,86 +0,0 @@
BEGIN_PROVIDER[double precision, energy_x_LDA, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_c_LDA, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range LDA functional
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b,e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
energy_x_LDA = 0.d0
energy_c_LDA = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_LDA(rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_LDA(rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
energy_x_LDA(istate) += weight * e_x
energy_c_LDA(istate) += weight * e_c
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, energy_x_PBE, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_c_PBE, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range PBE functional
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
energy_x_PBE = 0.d0
energy_c_PBE = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
energy_x_PBE += ex * weight
energy_c_PBE += ec * weight
enddo
enddo
END_PROVIDER

View File

@ -1,6 +1,6 @@
subroutine ec_pbe_sr(mu,rhoc,rhoo,sigmacc,sigmaco,sigmaoo,ec,vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo)
BEGIN_DOC
! Short-range PBE correlation energy functional for erf interaction
! Short-range pbe correlation energy functional for erf interaction
!
! input : ==========
!
@ -101,7 +101,7 @@ include 'constants.include.F'
zeta = (rhoa-rhob)/(rhoa+rhob)
! LDA energy density
! lda energy density
double precision :: vc_a_lda,vc_b_lda
call ec_lda(rhoa,rhob,ecclda,vc_a_lda,vc_b_lda)
eclda = ecclda
@ -133,7 +133,7 @@ include 'constants.include.F'
! Derive
! LDA energy density derivative
! lda energy density derivative
decerfldadrho = vrhoccerflda
decldadrho = 0.5d0 * (vc_a_lda+vc_b_lda)
@ -160,7 +160,7 @@ include 'constants.include.F'
decerfpbeddrho2=rho*gamma*phi3*arglogss/arglog
end if
! LDA energy density derivative
! lda energy density derivative
decerfldadrho = vrhoocerflda
decldadrho = 0.5d0 * (vc_a_lda-vc_b_lda)
@ -251,7 +251,7 @@ END_DOC
! test on density
if (rho >= tol) then
! call srLDA Ex[2*rho_a,2*rho_a]
! call srlda Ex[2*rho_a,2*rho_a]
call ex_lda_sr(mu,rho_a,rho_a,exerflda,vxerflda_a,vxerflda_b)
dexerfldadrho = (vxerflda_a + vxerflda_b)*0.5d0
@ -279,7 +279,7 @@ END_DOC
! test on density
if (rho >= tol) then
! call srLDA Ex[2*rho_b,2*rho_b]
! call srlda Ex[2*rho_b,2*rho_b]
call ex_lda_sr(mu,rho_b,rho_b,exerflda,vxerflda_a,vxerflda_b)
dexerfldadrho = (vxerflda_a + vxerflda_b)*0.5d0
@ -355,7 +355,7 @@ END_DOC
! test on density
if (rho >= tol) then
! call srLDA Ex[2*rho_a,2*rho_a]
! call srlda Ex[2*rho_a,2*rho_a]
call ex_lda_sr(mu,rho_a,rho_a,exerflda,vxerflda_a,vxerflda_b)
! square of two times spin alpha density gradient
@ -375,7 +375,7 @@ END_DOC
! test on density
if (rho >= tol) then
! call srLDA Ex[2*rho_b,2*rho_b]
! call srlda Ex[2*rho_b,2*rho_b]
call ex_lda_sr(mu,rho_b,rho_b,exerflda,vxerflda_a,vxerflda_b)
! square of two times spin beta density gradient
@ -396,7 +396,7 @@ END_DOC
subroutine ec_pbe_only(mu,rhoc,rhoo,sigmacc,sigmaco,sigmaoo,ec)
BEGIN_DOC
! Short-range PBE correlation energy functional for erf interaction
! Short-range pbe correlation energy functional for erf interaction
!
! input : ==========
!
@ -479,7 +479,7 @@ include 'constants.include.F'
zeta = (rhoa-rhob)/(rhoa+rhob)
zeta = max(zeta,1.d-10)
! LDA energy density
! lda energy density
double precision :: vc_a_lda,vc_b_lda
call ec_lda(rhoa,rhob,ecclda,vc_a_lda,vc_b_lda)
eclda = ecclda

View File

@ -1,83 +0,0 @@
BEGIN_PROVIDER[double precision, aos_vc_alpha_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vc_beta_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_alpha_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_beta_LDA_w, (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_LDA_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b,e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
double precision :: mu_local
mu_local = 1.d-9
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_LDA_sr(mu_local,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_LDA_sr(mu_local,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
do j =1, ao_num
aos_vc_alpha_LDA_w(j,i,istate) = vc_a * aos_in_r_array(j,i)*weight
aos_vc_beta_LDA_w(j,i,istate) = vc_b * aos_in_r_array(j,i)*weight
aos_vx_alpha_LDA_w(j,i,istate) = vx_a * aos_in_r_array(j,i)*weight
aos_vx_beta_LDA_w(j,i,istate) = vx_b * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_LDA,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao_LDA,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange alpha/beta potentials with LDA functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vx_alpha_LDA_w(1,1,istate),size(aos_vx_alpha_LDA_w,1),0.d0,&
potential_x_alpha_ao_LDA(1,1,istate),size(potential_x_alpha_ao_LDA,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vx_beta_LDA_w(1,1,istate),size(aos_vx_beta_LDA_w,1),0.d0,&
potential_x_beta_ao_LDA(1,1,istate),size(potential_x_beta_ao_LDA,1))
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_alpha_ao_LDA,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao_LDA,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range correlation alpha/beta potentials with LDA functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vc_alpha_LDA_w(1,1,istate),size(aos_vc_alpha_LDA_w,1),0.d0,&
potential_c_alpha_ao_LDA(1,1,istate),size(potential_c_alpha_ao_LDA,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vc_beta_LDA_w(1,1,istate),size(aos_vc_beta_LDA_w,1),0.d0,&
potential_c_beta_ao_LDA(1,1,istate),size(potential_c_beta_ao_LDA,1))
enddo
END_PROVIDER

View File

@ -1,53 +0,0 @@
BEGIN_PROVIDER[double precision, aos_vxc_alpha_LDA_w, (n_points_final_grid,ao_num,N_states)]
&BEGIN_PROVIDER[double precision, aos_vxc_beta_LDA_w, (n_points_final_grid,ao_num,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_LDA_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b,e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
double precision :: mu_local
mu_local = 1.d-9
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_LDA_sr(mu_local,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_LDA_sr(mu_local,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
do j =1, ao_num
aos_vxc_alpha_LDA_w(i,j,istate) = (vc_a + vx_a) * aos_in_r_array(j,i)*weight
aos_vxc_beta_LDA_w(i,j,istate) = (vc_b + vx_b) * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_LDA,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_xc_beta_ao_LDA ,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange/correlation alpha/beta potentials with LDA functional on the AO basis
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
print*,'providing the XC potentials LDA '
do istate = 1, N_states
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0,aos_in_r_array,ao_num,aos_vxc_alpha_LDA_w(1,1,istate),n_points_final_grid,0.d0,potential_xc_alpha_ao_LDA(1,1,istate),ao_num)
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0,aos_in_r_array,ao_num,aos_vxc_beta_LDA_w(1,1,istate) ,n_points_final_grid,0.d0,potential_xc_beta_ao_LDA(1,1,istate),ao_num)
enddo
call wall_time(wall_2)
END_PROVIDER

View File

@ -1,191 +0,0 @@
BEGIN_PROVIDER[double precision, aos_vc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvx_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvx_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_PBE_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dvc_alpha_PBE_w = 0.d0
aos_dvc_beta_PBE_w = 0.d0
aos_dvx_alpha_PBE_w = 0.d0
aos_dvx_beta_PBE_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_vc_alpha_PBE_w(j,i,istate) = vc_rho_a(istate) * aos_in_r_array(j,i)
aos_vc_beta_PBE_w (j,i,istate) = vc_rho_b(istate) * aos_in_r_array(j,i)
aos_vx_alpha_PBE_w(j,i,istate) = vx_rho_a(istate) * aos_in_r_array(j,i)
aos_vx_beta_PBE_w (j,i,istate) = vx_rho_b(istate) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dvc_alpha_PBE_w(j,i,istate) += contrib_grad_ca(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvc_beta_PBE_w (j,i,istate) += contrib_grad_cb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvx_alpha_PBE_w(j,i,istate) += contrib_grad_xa(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvx_beta_PBE_w (j,i,istate) += contrib_grad_xb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_scal_x_alpha_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_c_alpha_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_x_beta_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_c_beta_ao_PBE, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_scal_c_alpha_ao_PBE = 0.d0
pot_scal_x_alpha_ao_PBE = 0.d0
pot_scal_c_beta_ao_PBE = 0.d0
pot_scal_x_beta_ao_PBE = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vc_alpha_PBE_w(1,1,istate),size(aos_vc_alpha_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_c_alpha_ao_PBE(1,1,istate),size(pot_scal_c_alpha_ao_PBE,1))
! correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vc_beta_PBE_w(1,1,istate),size(aos_vc_beta_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_c_beta_ao_PBE(1,1,istate),size(pot_scal_c_beta_ao_PBE,1))
! exchange alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vx_alpha_PBE_w(1,1,istate),size(aos_vx_alpha_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_x_alpha_ao_PBE(1,1,istate),size(pot_scal_x_alpha_ao_PBE,1))
! exchange beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vx_beta_PBE_w(1,1,istate),size(aos_vx_beta_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_x_beta_ao_PBE(1,1,istate), size(pot_scal_x_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_grad_x_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_x_beta_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_c_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_c_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_grad_c_alpha_ao_PBE = 0.d0
pot_grad_x_alpha_ao_PBE = 0.d0
pot_grad_c_beta_ao_PBE = 0.d0
pot_grad_x_beta_ao_PBE = 0.d0
do istate = 1, N_states
! correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvc_alpha_PBE_w(1,1,istate),size(aos_dvc_alpha_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_c_alpha_ao_PBE(1,1,istate),size(pot_grad_c_alpha_ao_PBE,1))
! correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvc_beta_PBE_w(1,1,istate),size(aos_dvc_beta_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_c_beta_ao_PBE(1,1,istate),size(pot_grad_c_beta_ao_PBE,1))
! exchange alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvx_alpha_PBE_w(1,1,istate),size(aos_dvx_alpha_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_x_alpha_ao_PBE(1,1,istate),size(pot_grad_x_alpha_ao_PBE,1))
! exchange beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvx_beta_PBE_w(1,1,istate),size(aos_dvx_beta_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_x_beta_ao_PBE(1,1,istate),size(pot_grad_x_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_x_alpha_ao_PBE(j,i,istate) = pot_scal_x_alpha_ao_PBE(j,i,istate) + pot_grad_x_alpha_ao_PBE(j,i,istate) + pot_grad_x_alpha_ao_PBE(i,j,istate)
potential_x_beta_ao_PBE(j,i,istate) = pot_scal_x_beta_ao_PBE(j,i,istate) + pot_grad_x_beta_ao_PBE(j,i,istate) + pot_grad_x_beta_ao_PBE(i,j,istate)
potential_c_alpha_ao_PBE(j,i,istate) = pot_scal_c_alpha_ao_PBE(j,i,istate) + pot_grad_c_alpha_ao_PBE(j,i,istate) + pot_grad_c_alpha_ao_PBE(i,j,istate)
potential_c_beta_ao_PBE(j,i,istate) = pot_scal_c_beta_ao_PBE(j,i,istate) + pot_grad_c_beta_ao_PBE(j,i,istate) + pot_grad_c_beta_ao_PBE(i,j,istate)
enddo
enddo
enddo
END_PROVIDER

View File

@ -1,147 +0,0 @@
BEGIN_PROVIDER[double precision, aos_vxc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vxc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvxc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvxc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_PBE_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dvxc_alpha_PBE_w = 0.d0
aos_dvxc_beta_PBE_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_vxc_alpha_PBE_w(j,i,istate) = ( vc_rho_a(istate) + vx_rho_a(istate) ) * aos_in_r_array(j,i)
aos_vxc_beta_PBE_w (j,i,istate) = ( vc_rho_b(istate) + vx_rho_b(istate) ) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dvxc_alpha_PBE_w(j,i,istate) += ( contrib_grad_ca(m,istate) + contrib_grad_xa(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvxc_beta_PBE_w (j,i,istate) += ( contrib_grad_cb(m,istate) + contrib_grad_xb(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_scal_xc_alpha_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_xc_beta_ao_PBE, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_scal_xc_alpha_ao_PBE = 0.d0
pot_scal_xc_beta_ao_PBE = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! exchange - correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vxc_alpha_PBE_w(1,1,istate),size(aos_vxc_alpha_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_xc_alpha_ao_PBE(1,1,istate),size(pot_scal_xc_alpha_ao_PBE,1))
! exchange - correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vxc_beta_PBE_w(1,1,istate),size(aos_vxc_beta_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_xc_beta_ao_PBE(1,1,istate),size(pot_scal_xc_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_grad_xc_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_xc_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_grad_xc_alpha_ao_PBE = 0.d0
pot_grad_xc_beta_ao_PBE = 0.d0
do istate = 1, N_states
! correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvxc_alpha_PBE_w(1,1,istate),size(aos_dvxc_alpha_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_xc_alpha_ao_PBE(1,1,istate),size(pot_grad_xc_alpha_ao_PBE,1))
! correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvxc_beta_PBE_w(1,1,istate),size(aos_dvxc_beta_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_xc_beta_ao_PBE(1,1,istate),size(pot_grad_xc_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_xc_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_xc_alpha_ao_PBE(j,i,istate) = pot_scal_xc_alpha_ao_PBE(j,i,istate) + pot_grad_xc_alpha_ao_PBE(j,i,istate) + pot_grad_xc_alpha_ao_PBE(i,j,istate)
potential_xc_beta_ao_PBE(j,i,istate) = pot_scal_xc_beta_ao_PBE(j,i,istate) + pot_grad_xc_beta_ao_PBE(j,i,istate) + pot_grad_xc_beta_ao_PBE(i,j,istate)
enddo
enddo
enddo
END_PROVIDER

View File

@ -1,10 +1,10 @@
BEGIN_PROVIDER[double precision, energy_sr_x_LDA, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_sr_c_LDA, (N_states) ]
BEGIN_PROVIDER[double precision, energy_sr_x_lda, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_sr_c_lda, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range LDA functional
! exchange/correlation energy with the short range lda functional
END_DOC
integer :: istate,i,j
double precision :: r(3)
@ -12,8 +12,8 @@
double precision :: e_c,vc_a,vc_b,e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
energy_sr_x_LDA = 0.d0
energy_sr_c_LDA = 0.d0
energy_sr_x_lda = 0.d0
energy_sr_c_lda = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
@ -22,20 +22,20 @@
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_LDA_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_LDA_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
energy_sr_x_LDA(istate) += weight * e_x
energy_sr_c_LDA(istate) += weight * e_c
call ec_lda_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_lda_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
energy_sr_x_lda(istate) += weight * e_x
energy_sr_c_lda(istate) += weight * e_c
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, energy_sr_x_PBE, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_sr_c_PBE, (N_states) ]
BEGIN_PROVIDER[double precision, energy_sr_x_pbe, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_sr_c_pbe, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range PBE functional
! exchange/correlation energy with the short range pbe functional
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
@ -51,8 +51,8 @@
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
energy_sr_x_PBE = 0.d0
energy_sr_c_PBE = 0.d0
energy_sr_x_pbe = 0.d0
energy_sr_c_pbe = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
@ -76,8 +76,8 @@
call GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
energy_sr_x_PBE += ex * weight
energy_sr_c_PBE += ec * weight
energy_sr_x_pbe += ex * weight
energy_sr_c_pbe += ec * weight
enddo
enddo

View File

@ -1,79 +0,0 @@
BEGIN_PROVIDER[double precision, aos_sr_vc_alpha_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vc_beta_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_alpha_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_beta_LDA_w, (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_LDA_w(j,i) = ao_i(r_j) * (sr_v^x_alpha(r_j) + sr_v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,sr_vc_a,sr_vc_b,e_x,sr_vx_a,sr_vx_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_LDA_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_c,sr_vc_a,sr_vc_b)
call ex_LDA_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_x,sr_vx_a,sr_vx_b)
do j =1, ao_num
aos_sr_vc_alpha_LDA_w(j,i,istate) = sr_vc_a * aos_in_r_array(j,i)*weight
aos_sr_vc_beta_LDA_w(j,i,istate) = sr_vc_b * aos_in_r_array(j,i)*weight
aos_sr_vx_alpha_LDA_w(j,i,istate) = sr_vx_a * aos_in_r_array(j,i)*weight
aos_sr_vx_beta_LDA_w(j,i,istate) = sr_vx_b * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_sr_x_alpha_ao_LDA,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_x_beta_ao_LDA,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange alpha/beta potentials with LDA functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vx_alpha_LDA_w,size(aos_sr_vx_alpha_LDA_w,1),0.d0,&
potential_sr_x_alpha_ao_LDA,size(potential_sr_x_alpha_ao_LDA,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vx_beta_LDA_w(1,1,istate),size(aos_sr_vx_beta_LDA_w,1),0.d0,&
potential_sr_x_beta_ao_LDA(1,1,istate),size(potential_sr_x_beta_ao_LDA,1))
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_sr_c_alpha_ao_LDA,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_c_beta_ao_LDA,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range correlation alpha/beta potentials with LDA functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vc_alpha_LDA_w(1,1,istate),size(aos_sr_vc_alpha_LDA_w,1),0.d0,&
potential_sr_c_alpha_ao_LDA(1,1,istate),size(potential_sr_c_alpha_ao_LDA,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vc_beta_LDA_w(1,1,istate),size(aos_sr_vc_beta_LDA_w,1),0.d0,&
potential_sr_c_beta_ao_LDA(1,1,istate),size(potential_sr_c_beta_ao_LDA,1))
enddo
END_PROVIDER

View File

@ -1,58 +0,0 @@
BEGIN_PROVIDER[double precision, aos_sr_vxc_alpha_LDA_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vxc_beta_LDA_w, (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_LDA_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,sr_vc_a,sr_vc_b,e_x,sr_vx_a,sr_vx_b
double precision, allocatable :: rhoa(:),rhob(:)
double precision :: mu_local
mu_local = mu_erf_dft
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_LDA_sr(mu_local,rhoa(istate),rhob(istate),e_c,sr_vc_a,sr_vc_b)
call ex_LDA_sr(mu_local,rhoa(istate),rhob(istate),e_x,sr_vx_a,sr_vx_b)
do j =1, ao_num
aos_sr_vxc_alpha_LDA_w(j,i,istate) = (sr_vc_a + sr_vx_a) * aos_in_r_array(j,i)*weight
aos_sr_vxc_beta_LDA_w(j,i,istate) = (sr_vc_b + sr_vx_b) * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_sr_xc_alpha_ao_LDA,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_xc_beta_ao_LDA ,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange/correlation alpha/beta potentials with LDA functional on the AO basis
END_DOC
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vxc_alpha_LDA_w(1,1,istate),size(aos_sr_vxc_alpha_LDA_w,1),0.d0,&
potential_sr_xc_alpha_ao_LDA(1,1,istate),size(potential_sr_xc_alpha_ao_LDA,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vxc_beta_LDA_w(1,1,istate),size(aos_sr_vxc_beta_LDA_w,1),0.d0,&
potential_sr_xc_beta_ao_LDA(1,1,istate),size(potential_sr_xc_beta_ao_LDA,1))
enddo
END_PROVIDER

View File

@ -1,191 +0,0 @@
BEGIN_PROVIDER[double precision, aos_sr_vc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vx_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vx_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_PBE_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dsr_vc_alpha_PBE_w= 0.d0
aos_dsr_vc_beta_PBE_w = 0.d0
aos_dsr_vx_alpha_PBE_w= 0.d0
aos_dsr_vx_beta_PBE_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_sr_vc_alpha_PBE_w(j,i,istate) = vc_rho_a(istate) * aos_in_r_array(j,i)
aos_sr_vc_beta_PBE_w (j,i,istate) = vc_rho_b(istate) * aos_in_r_array(j,i)
aos_sr_vx_alpha_PBE_w(j,i,istate) = vx_rho_a(istate) * aos_in_r_array(j,i)
aos_sr_vx_beta_PBE_w (j,i,istate) = vx_rho_b(istate) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dsr_vc_alpha_PBE_w(j,i,istate) += contrib_grad_ca(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vc_beta_PBE_w (j,i,istate) += contrib_grad_cb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vx_alpha_PBE_w(j,i,istate) += contrib_grad_xa(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vx_beta_PBE_w (j,i,istate) += contrib_grad_xb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_scal_x_alpha_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_c_alpha_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_x_beta_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_c_beta_ao_PBE, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_sr_scal_c_alpha_ao_PBE = 0.d0
pot_sr_scal_x_alpha_ao_PBE = 0.d0
pot_sr_scal_c_beta_ao_PBE = 0.d0
pot_sr_scal_x_beta_ao_PBE = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vc_alpha_PBE_w(1,1,istate),size(aos_sr_vc_alpha_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_c_alpha_ao_PBE(1,1,istate),size(pot_sr_scal_c_alpha_ao_PBE,1))
! correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vc_beta_PBE_w(1,1,istate),size(aos_sr_vc_beta_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_c_beta_ao_PBE(1,1,istate),size(pot_sr_scal_c_beta_ao_PBE,1))
! exchange alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vx_alpha_PBE_w(1,1,istate),size(aos_sr_vx_alpha_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_x_alpha_ao_PBE(1,1,istate),size(pot_sr_scal_x_alpha_ao_PBE,1))
! exchange beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vx_beta_PBE_w(1,1,istate),size(aos_sr_vx_beta_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_x_beta_ao_PBE(1,1,istate), size(pot_sr_scal_x_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_grad_x_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_x_beta_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_c_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_c_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_sr_grad_c_alpha_ao_PBE = 0.d0
pot_sr_grad_x_alpha_ao_PBE = 0.d0
pot_sr_grad_c_beta_ao_PBE = 0.d0
pot_sr_grad_x_beta_ao_PBE = 0.d0
do istate = 1, N_states
! correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vc_alpha_PBE_w(1,1,istate),size(aos_dsr_vc_alpha_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_c_alpha_ao_PBE(1,1,istate),size(pot_sr_grad_c_alpha_ao_PBE,1))
! correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vc_beta_PBE_w(1,1,istate),size(aos_dsr_vc_beta_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_c_beta_ao_PBE(1,1,istate),size(pot_sr_grad_c_beta_ao_PBE,1))
! exchange alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vx_alpha_PBE_w(1,1,istate),size(aos_dsr_vx_alpha_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_x_alpha_ao_PBE(1,1,istate),size(pot_sr_grad_x_alpha_ao_PBE,1))
! exchange beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vx_beta_PBE_w(1,1,istate),size(aos_dsr_vx_beta_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_x_beta_ao_PBE(1,1,istate),size(pot_sr_grad_x_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_sr_x_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_x_beta_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_c_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_c_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_sr_x_alpha_ao_PBE(j,i,istate) = pot_sr_scal_x_alpha_ao_PBE(j,i,istate) + pot_sr_grad_x_alpha_ao_PBE(j,i,istate) + pot_sr_grad_x_alpha_ao_PBE(i,j,istate)
potential_sr_x_beta_ao_PBE(j,i,istate) = pot_sr_scal_x_beta_ao_PBE(j,i,istate) + pot_sr_grad_x_beta_ao_PBE(j,i,istate) + pot_sr_grad_x_beta_ao_PBE(i,j,istate)
potential_sr_c_alpha_ao_PBE(j,i,istate) = pot_sr_scal_c_alpha_ao_PBE(j,i,istate) + pot_sr_grad_c_alpha_ao_PBE(j,i,istate) + pot_sr_grad_c_alpha_ao_PBE(i,j,istate)
potential_sr_c_beta_ao_PBE(j,i,istate) = pot_sr_scal_c_beta_ao_PBE(j,i,istate) + pot_sr_grad_c_beta_ao_PBE(j,i,istate) + pot_sr_grad_c_beta_ao_PBE(i,j,istate)
enddo
enddo
enddo
END_PROVIDER

View File

@ -1,149 +0,0 @@
BEGIN_PROVIDER[double precision, aos_sr_vxc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vxc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vxc_alpha_PBE_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vxc_beta_PBE_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_PBE_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dsr_vxc_alpha_PBE_w = 0.d0
aos_dsr_vxc_beta_PBE_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_sr_vxc_alpha_PBE_w(j,i,istate) = ( vc_rho_a(istate) + vx_rho_a(istate) ) * aos_in_r_array(j,i)
aos_sr_vxc_beta_PBE_w (j,i,istate) = ( vc_rho_b(istate) + vx_rho_b(istate) ) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dsr_vxc_alpha_PBE_w(j,i,istate) += ( contrib_grad_ca(m,istate) + contrib_grad_xa(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vxc_beta_PBE_w (j,i,istate) += ( contrib_grad_cb(m,istate) + contrib_grad_xb(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_scal_xc_alpha_ao_PBE, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_xc_beta_ao_PBE, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_sr_scal_xc_alpha_ao_PBE = 0.d0
pot_sr_scal_xc_beta_ao_PBE = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! exchange - correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vxc_alpha_PBE_w(1,1,istate),size(aos_sr_vxc_alpha_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_xc_alpha_ao_PBE(1,1,istate),size(pot_sr_scal_xc_alpha_ao_PBE,1))
! exchange - correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vxc_beta_PBE_w(1,1,istate),size(aos_sr_vxc_beta_PBE_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_xc_beta_ao_PBE(1,1,istate),size(pot_sr_scal_xc_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_grad_xc_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_xc_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_sr_grad_xc_alpha_ao_PBE = 0.d0
pot_sr_grad_xc_beta_ao_PBE = 0.d0
do istate = 1, N_states
! exchange - correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vxc_alpha_PBE_w(1,1,istate),size(aos_dsr_vxc_alpha_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_xc_alpha_ao_PBE(1,1,istate),size(pot_sr_grad_xc_alpha_ao_PBE,1))
! exchange - correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vxc_beta_PBE_w(1,1,istate),size(aos_dsr_vxc_beta_PBE_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_xc_beta_ao_PBE(1,1,istate),size(pot_sr_grad_xc_beta_ao_PBE,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_sr_xc_alpha_ao_PBE,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_sr_xc_beta_ao_PBE,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_sr_xc_alpha_ao_PBE(j,i,istate) = pot_sr_scal_xc_alpha_ao_PBE(j,i,istate) + pot_sr_grad_xc_alpha_ao_PBE(j,i,istate) + pot_sr_grad_xc_alpha_ao_PBE(i,j,istate)
potential_sr_xc_beta_ao_PBE(j,i,istate) = pot_sr_scal_xc_beta_ao_PBE(j,i,istate) + pot_sr_grad_xc_beta_ao_PBE(j,i,istate) + pot_sr_grad_xc_beta_ao_PBE(i,j,istate)
enddo
enddo
enddo
END_PROVIDER

View File

@ -12,23 +12,9 @@ subroutine GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_
integer :: istate
double precision :: r2(3),dr2(3), local_potential,r12,dx2,mu
do istate = 1, N_states
if(exchange_functional.EQ."short_range_PBE")then
call ex_pbe_sr(mu_erf_dft,rho_a(istate),rho_b(istate),grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),ex(istate),vx_rho_a(istate),vx_rho_b(istate),vx_grad_rho_a_2(istate),vx_grad_rho_b_2(istate),vx_grad_rho_a_b(istate))
else if(exchange_functional.EQ."None")then
ex = 0.d0
vx_rho_a = 0.d0
vx_rho_b = 0.d0
vx_grad_rho_a_2 = 0.d0
vx_grad_rho_a_b = 0.d0
vx_grad_rho_b_2 = 0.d0
else
print*, 'Exchange functional required does not exist ...'
print*,'exchange_functional',exchange_functional
stop
endif
double precision :: rhoc,rhoo,sigmacc,sigmaco,sigmaoo,vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo
if(correlation_functional.EQ."short_range_PBE")then
! convertion from (alpha,beta) formalism to (closed, open) formalism
call rho_ab_to_rho_oc(rho_a(istate),rho_b(istate),rhoo,rhoc)
call grad_rho_ab_to_grad_rho_oc(grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),sigmaoo,sigmacc,sigmaco)
@ -37,18 +23,6 @@ subroutine GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_
call v_rho_oc_to_v_rho_ab(vrhoo,vrhoc,vc_rho_a(istate),vc_rho_b(istate))
call v_grad_rho_oc_to_v_grad_rho_ab(vsigmaoo,vsigmacc,vsigmaco,vc_grad_rho_a_2(istate),vc_grad_rho_b_2(istate),vc_grad_rho_a_b(istate))
else if(correlation_functional.EQ."None")then
ec = 0.d0
vc_rho_a = 0.d0
vc_rho_b = 0.d0
vc_grad_rho_a_2 = 0.d0
vc_grad_rho_a_b = 0.d0
vc_grad_rho_b_2 = 0.d0
else
print*, 'Correlation functional required does not exist ...'
print*, 'correlation_functional',correlation_functional
stop
endif
enddo
end
@ -68,23 +42,9 @@ subroutine GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho
double precision :: mu_local
mu_local = 1.d-9
do istate = 1, N_states
if(exchange_functional.EQ."PBE")then
call ex_pbe_sr(mu_local,rho_a(istate),rho_b(istate),grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),ex(istate),vx_rho_a(istate),vx_rho_b(istate),vx_grad_rho_a_2(istate),vx_grad_rho_b_2(istate),vx_grad_rho_a_b(istate))
else if(exchange_functional.EQ."None")then
ex = 0.d0
vx_rho_a = 0.d0
vx_rho_b = 0.d0
vx_grad_rho_a_2 = 0.d0
vx_grad_rho_a_b = 0.d0
vx_grad_rho_b_2 = 0.d0
else
print*, 'Exchange functional required does not exist ...'
print*,'exchange_functional',exchange_functional
stop
endif
double precision :: rhoc,rhoo,sigmacc,sigmaco,sigmaoo,vrhoc,vrhoo,vsigmacc,vsigmaco,vsigmaoo
if(correlation_functional.EQ."PBE")then
! convertion from (alpha,beta) formalism to (closed, open) formalism
call rho_ab_to_rho_oc(rho_a(istate),rho_b(istate),rhoo,rhoc)
call grad_rho_ab_to_grad_rho_oc(grad_rho_a_2(istate),grad_rho_b_2(istate),grad_rho_a_b(istate),sigmaoo,sigmacc,sigmaco)
@ -93,18 +53,6 @@ subroutine GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho
call v_rho_oc_to_v_rho_ab(vrhoo,vrhoc,vc_rho_a(istate),vc_rho_b(istate))
call v_grad_rho_oc_to_v_grad_rho_ab(vsigmaoo,vsigmacc,vsigmaco,vc_grad_rho_a_2(istate),vc_grad_rho_b_2(istate),vc_grad_rho_a_b(istate))
else if(correlation_functional.EQ."None")then
ec = 0.d0
vc_rho_a = 0.d0
vc_rho_b = 0.d0
vc_grad_rho_a_2 = 0.d0
vc_grad_rho_a_b = 0.d0
vc_grad_rho_b_2 = 0.d0
else
print*, 'Correlation functional required does not exist ...'
print*, 'correlation_functional',correlation_functional
stop
endif
enddo
end

View File

@ -20,6 +20,7 @@ dressing
electrons
ezfio_files
fci
functionals
generators_cas
generators_full
hartree_fock

View File

@ -48,7 +48,7 @@ program fci
else
PROVIDE mo_two_e_integrals_in_map
call run_slave_cipsi
!call run_slave_cipsi
endif
end

1
src/functionals/NEED Normal file
View File

@ -0,0 +1 @@
dft_utils_one_e

196
src/functionals/lda.irp.f Normal file
View File

@ -0,0 +1,196 @@
BEGIN_PROVIDER[double precision, energy_x_lda, (N_states) ]
implicit none
BEGIN_DOC
! exchange energy with the lda functional
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
energy_x_lda = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ex_lda(rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
energy_x_lda(istate) += weight * e_x
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, energy_c_lda, (N_states) ]
implicit none
BEGIN_DOC
! correlation energy with the lda functional
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
energy_c_lda = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_lda(rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
energy_c_lda(istate) += weight * e_c
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_lda,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao_lda,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange alpha/beta potentials with lda functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vx_alpha_lda_w(1,1,istate),size(aos_vx_alpha_lda_w,1),0.d0,&
potential_x_alpha_ao_lda(1,1,istate),size(potential_x_alpha_ao_lda,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vx_beta_lda_w(1,1,istate),size(aos_vx_beta_lda_w,1),0.d0,&
potential_x_beta_ao_lda(1,1,istate),size(potential_x_beta_ao_lda,1))
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_alpha_ao_lda,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao_lda,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range correlation alpha/beta potentials with lda functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vc_alpha_lda_w(1,1,istate),size(aos_vc_alpha_lda_w,1),0.d0,&
potential_c_alpha_ao_lda(1,1,istate),size(potential_c_alpha_ao_lda,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_vc_beta_lda_w(1,1,istate),size(aos_vc_beta_lda_w,1),0.d0,&
potential_c_beta_ao_lda(1,1,istate),size(potential_c_beta_ao_lda,1))
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_lda,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_xc_beta_ao_lda ,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange/correlation alpha/beta potentials with lda functional on the AO basis
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
print*,'providing the XC potentials lda '
do istate = 1, N_states
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0,aos_in_r_array,ao_num,aos_vxc_alpha_lda_w(1,1,istate),n_points_final_grid,0.d0,potential_xc_alpha_ao_lda(1,1,istate),ao_num)
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0,aos_in_r_array,ao_num,aos_vxc_beta_lda_w(1,1,istate) ,n_points_final_grid,0.d0,potential_xc_beta_ao_lda(1,1,istate),ao_num)
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_vc_alpha_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vc_beta_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_alpha_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_beta_lda_w, (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_lda_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b,e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
double precision :: mu_local
mu_local = 1.d-9
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_lda_sr(mu_local,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_lda_sr(mu_local,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
do j =1, ao_num
aos_vc_alpha_lda_w(j,i,istate) = vc_a * aos_in_r_array(j,i)*weight
aos_vc_beta_lda_w(j,i,istate) = vc_b * aos_in_r_array(j,i)*weight
aos_vx_alpha_lda_w(j,i,istate) = vx_a * aos_in_r_array(j,i)*weight
aos_vx_beta_lda_w(j,i,istate) = vx_b * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_vxc_alpha_lda_w, (n_points_final_grid,ao_num,N_states)]
&BEGIN_PROVIDER[double precision, aos_vxc_beta_lda_w, (n_points_final_grid,ao_num,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_lda_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b,e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
double precision :: mu_local
mu_local = 1.d-9
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_lda_sr(mu_local,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
call ex_lda_sr(mu_local,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
do j =1, ao_num
aos_vxc_alpha_lda_w(i,j,istate) = (vc_a + vx_a) * aos_in_r_array(j,i)*weight
aos_vxc_beta_lda_w(i,j,istate) = (vc_b + vx_b) * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER

View File

@ -0,0 +1,71 @@
BEGIN_PROVIDER[double precision, energy_x_none, (N_states) ]
implicit none
BEGIN_DOC
! null exchange energy
END_DOC
energy_x_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER[double precision, energy_c_none, (N_states) ]
implicit none
BEGIN_DOC
! null correlation energy
END_DOC
energy_c_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_none,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! Potential for a null exchange-correlation functional
END_DOC
potential_x_alpha_ao_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_beta_ao_none,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! Potential for a null exchange-correlation functional
END_DOC
potential_x_beta_ao_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_alpha_ao_none,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! Potential for a null exchange-correlation functional
END_DOC
potential_c_alpha_ao_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_beta_ao_none,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! Potential for a null exchange-correlation functional
END_DOC
potential_c_beta_ao_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_none ,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! Potential for a null exchange-correlation functional
END_DOC
potential_xc_alpha_ao_none = 0.d0
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_beta_ao_none ,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! Potential for a null exchange-correlation functional
END_DOC
potential_xc_beta_ao_none = 0.d0
END_PROVIDER

447
src/functionals/pbe.irp.f Normal file
View File

@ -0,0 +1,447 @@
BEGIN_PROVIDER[double precision, energy_x_pbe, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range pbe functional
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
energy_x_pbe = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
energy_x_pbe += ex * weight
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, energy_c_pbe, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range pbe functional
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
energy_c_pbe = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
energy_c_pbe += ec * weight
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_x_alpha_ao_pbe(j,i,istate) = pot_scal_x_alpha_ao_pbe(j,i,istate) + pot_grad_x_alpha_ao_pbe(j,i,istate) + pot_grad_x_alpha_ao_pbe(i,j,istate)
potential_x_beta_ao_pbe(j,i,istate) = pot_scal_x_beta_ao_pbe(j,i,istate) + pot_grad_x_beta_ao_pbe(j,i,istate) + pot_grad_x_beta_ao_pbe(i,j,istate)
potential_c_alpha_ao_pbe(j,i,istate) = pot_scal_c_alpha_ao_pbe(j,i,istate) + pot_grad_c_alpha_ao_pbe(j,i,istate) + pot_grad_c_alpha_ao_pbe(i,j,istate)
potential_c_beta_ao_pbe(j,i,istate) = pot_scal_c_beta_ao_pbe(j,i,istate) + pot_grad_c_beta_ao_pbe(j,i,istate) + pot_grad_c_beta_ao_pbe(i,j,istate)
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_xc_beta_ao_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_xc_alpha_ao_pbe(j,i,istate) = pot_scal_xc_alpha_ao_pbe(j,i,istate) + pot_grad_xc_alpha_ao_pbe(j,i,istate) + pot_grad_xc_alpha_ao_pbe(i,j,istate)
potential_xc_beta_ao_pbe(j,i,istate) = pot_scal_xc_beta_ao_pbe(j,i,istate) + pot_grad_xc_beta_ao_pbe(j,i,istate) + pot_grad_xc_beta_ao_pbe(i,j,istate)
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dvc_alpha_pbe_w = 0.d0
aos_dvc_beta_pbe_w = 0.d0
aos_dvx_alpha_pbe_w = 0.d0
aos_dvx_beta_pbe_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_vc_alpha_pbe_w(j,i,istate) = vc_rho_a(istate) * aos_in_r_array(j,i)
aos_vc_beta_pbe_w (j,i,istate) = vc_rho_b(istate) * aos_in_r_array(j,i)
aos_vx_alpha_pbe_w(j,i,istate) = vx_rho_a(istate) * aos_in_r_array(j,i)
aos_vx_beta_pbe_w (j,i,istate) = vx_rho_b(istate) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dvc_alpha_pbe_w(j,i,istate) += contrib_grad_ca(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvc_beta_pbe_w (j,i,istate) += contrib_grad_cb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvx_alpha_pbe_w(j,i,istate) += contrib_grad_xa(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvx_beta_pbe_w (j,i,istate) += contrib_grad_xb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_scal_x_alpha_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_c_alpha_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_x_beta_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_c_beta_ao_pbe, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_scal_c_alpha_ao_pbe = 0.d0
pot_scal_x_alpha_ao_pbe = 0.d0
pot_scal_c_beta_ao_pbe = 0.d0
pot_scal_x_beta_ao_pbe = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vc_alpha_pbe_w(1,1,istate),size(aos_vc_alpha_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_c_alpha_ao_pbe(1,1,istate),size(pot_scal_c_alpha_ao_pbe,1))
! correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vc_beta_pbe_w(1,1,istate),size(aos_vc_beta_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_c_beta_ao_pbe(1,1,istate),size(pot_scal_c_beta_ao_pbe,1))
! exchange alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vx_alpha_pbe_w(1,1,istate),size(aos_vx_alpha_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_x_alpha_ao_pbe(1,1,istate),size(pot_scal_x_alpha_ao_pbe,1))
! exchange beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vx_beta_pbe_w(1,1,istate),size(aos_vx_beta_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_x_beta_ao_pbe(1,1,istate), size(pot_scal_x_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_grad_x_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_x_beta_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_c_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_c_beta_ao_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_grad_c_alpha_ao_pbe = 0.d0
pot_grad_x_alpha_ao_pbe = 0.d0
pot_grad_c_beta_ao_pbe = 0.d0
pot_grad_x_beta_ao_pbe = 0.d0
do istate = 1, N_states
! correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvc_alpha_pbe_w(1,1,istate),size(aos_dvc_alpha_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_c_alpha_ao_pbe(1,1,istate),size(pot_grad_c_alpha_ao_pbe,1))
! correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvc_beta_pbe_w(1,1,istate),size(aos_dvc_beta_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_c_beta_ao_pbe(1,1,istate),size(pot_grad_c_beta_ao_pbe,1))
! exchange alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvx_alpha_pbe_w(1,1,istate),size(aos_dvx_alpha_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_x_alpha_ao_pbe(1,1,istate),size(pot_grad_x_alpha_ao_pbe,1))
! exchange beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvx_beta_pbe_w(1,1,istate),size(aos_dvx_beta_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_x_beta_ao_pbe(1,1,istate),size(pot_grad_x_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dvxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dvxc_alpha_pbe_w = 0.d0
aos_dvxc_beta_pbe_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_vxc_alpha_pbe_w(j,i,istate) = ( vc_rho_a(istate) + vx_rho_a(istate) ) * aos_in_r_array(j,i)
aos_vxc_beta_pbe_w (j,i,istate) = ( vc_rho_b(istate) + vx_rho_b(istate) ) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dvxc_alpha_pbe_w(j,i,istate) += ( contrib_grad_ca(m,istate) + contrib_grad_xa(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dvxc_beta_pbe_w (j,i,istate) += ( contrib_grad_cb(m,istate) + contrib_grad_xb(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_scal_xc_alpha_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_scal_xc_beta_ao_pbe, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_scal_xc_alpha_ao_pbe = 0.d0
pot_scal_xc_beta_ao_pbe = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! exchange - correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vxc_alpha_pbe_w(1,1,istate),size(aos_vxc_alpha_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_xc_alpha_ao_pbe(1,1,istate),size(pot_scal_xc_alpha_ao_pbe,1))
! exchange - correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_vxc_beta_pbe_w(1,1,istate),size(aos_vxc_beta_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_scal_xc_beta_ao_pbe(1,1,istate),size(pot_scal_xc_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_grad_xc_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_grad_xc_beta_ao_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_grad_xc_alpha_ao_pbe = 0.d0
pot_grad_xc_beta_ao_pbe = 0.d0
do istate = 1, N_states
! correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvxc_alpha_pbe_w(1,1,istate),size(aos_dvxc_alpha_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_xc_alpha_ao_pbe(1,1,istate),size(pot_grad_xc_alpha_ao_pbe,1))
! correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dvxc_beta_pbe_w(1,1,istate),size(aos_dvxc_beta_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_grad_xc_beta_ao_pbe(1,1,istate),size(pot_grad_xc_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER

View File

@ -0,0 +1,195 @@
BEGIN_PROVIDER[double precision, energy_x_sr_lda, (N_states) ]
implicit none
BEGIN_DOC
! exchange energy with the short range lda functional
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_x,vx_a,vx_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
energy_x_sr_lda = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ex_lda_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_x,vx_a,vx_b)
energy_x_sr_lda(istate) += weight * e_x
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, energy_c_sr_lda, (N_states) ]
implicit none
BEGIN_DOC
! exchange energy with the short range lda functional
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,vc_a,vc_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
energy_c_sr_lda = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_lda_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_c,vc_a,vc_b)
energy_c_sr_lda(istate) += weight * e_c
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_sr_lda,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao_sr_lda,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange alpha/beta potentials with lda functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vx_alpha_lda_w,size(aos_sr_vx_alpha_lda_w,1),0.d0,&
potential_x_alpha_ao_sr_lda,size(potential_x_alpha_ao_sr_lda,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vx_beta_lda_w(1,1,istate),size(aos_sr_vx_beta_lda_w,1),0.d0,&
potential_x_beta_ao_sr_lda(1,1,istate),size(potential_x_beta_ao_sr_lda,1))
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_c_alpha_ao_sr_lda,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao_sr_lda,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range correlation alpha/beta potentials with lda functional on the |AO| basis
END_DOC
! Second dimension is given as ao_num * N_states so that Lapack does the loop over N_states.
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vc_alpha_lda_w(1,1,istate),size(aos_sr_vc_alpha_lda_w,1),0.d0,&
potential_c_alpha_ao_sr_lda(1,1,istate),size(potential_c_alpha_ao_sr_lda,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vc_beta_lda_w(1,1,istate),size(aos_sr_vc_beta_lda_w,1),0.d0,&
potential_c_beta_ao_sr_lda(1,1,istate),size(potential_c_beta_ao_sr_lda,1))
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_sr_vc_alpha_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vc_beta_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_alpha_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_beta_lda_w, (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_lda_w(j,i) = ao_i(r_j) * (sr_v^x_alpha(r_j) + sr_v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,sr_vc_a,sr_vc_b,e_x,sr_vx_a,sr_vx_b
double precision, allocatable :: rhoa(:),rhob(:)
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_lda_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_c,sr_vc_a,sr_vc_b)
call ex_lda_sr(mu_erf_dft,rhoa(istate),rhob(istate),e_x,sr_vx_a,sr_vx_b)
do j =1, ao_num
aos_sr_vc_alpha_lda_w(j,i,istate) = sr_vc_a * aos_in_r_array(j,i)*weight
aos_sr_vc_beta_lda_w(j,i,istate) = sr_vc_b * aos_in_r_array(j,i)*weight
aos_sr_vx_alpha_lda_w(j,i,istate) = sr_vx_a * aos_in_r_array(j,i)*weight
aos_sr_vx_beta_lda_w(j,i,istate) = sr_vx_b * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_sr_vxc_alpha_lda_w, (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vxc_beta_lda_w, (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_lda_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j
double precision :: r(3)
double precision :: mu,weight
double precision :: e_c,sr_vc_a,sr_vc_b,e_x,sr_vx_a,sr_vx_b
double precision, allocatable :: rhoa(:),rhob(:)
double precision :: mu_local
mu_local = mu_erf_dft
allocate(rhoa(N_states), rhob(N_states))
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rhoa(istate) = one_e_dm_alpha_at_r(i,istate)
rhob(istate) = one_e_dm_beta_at_r(i,istate)
call ec_lda_sr(mu_local,rhoa(istate),rhob(istate),e_c,sr_vc_a,sr_vc_b)
call ex_lda_sr(mu_local,rhoa(istate),rhob(istate),e_x,sr_vx_a,sr_vx_b)
do j =1, ao_num
aos_sr_vxc_alpha_lda_w(j,i,istate) = (sr_vc_a + sr_vx_a) * aos_in_r_array(j,i)*weight
aos_sr_vxc_beta_lda_w(j,i,istate) = (sr_vc_b + sr_vx_b) * aos_in_r_array(j,i)*weight
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_sr_lda,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_xc_beta_ao_sr_lda ,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! short range exchange/correlation alpha/beta potentials with lda functional on the AO basis
END_DOC
integer :: istate
do istate = 1, N_states
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vxc_alpha_lda_w(1,1,istate),size(aos_sr_vxc_alpha_lda_w,1),0.d0,&
potential_xc_alpha_ao_sr_lda(1,1,istate),size(potential_xc_alpha_ao_sr_lda,1))
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_in_r_array,size(aos_in_r_array,1), &
aos_sr_vxc_beta_lda_w(1,1,istate),size(aos_sr_vxc_beta_lda_w,1),0.d0,&
potential_xc_beta_ao_sr_lda(1,1,istate),size(potential_xc_beta_ao_sr_lda,1))
enddo
END_PROVIDER

View File

@ -0,0 +1,397 @@
BEGIN_PROVIDER[double precision, energy_x_sr_pbe, (N_states) ]
&BEGIN_PROVIDER[double precision, energy_c_sr_pbe, (N_states) ]
implicit none
BEGIN_DOC
! exchange/correlation energy with the short range pbe functional
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
energy_x_sr_pbe = 0.d0
energy_c_sr_pbe = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
energy_x_sr_pbe += ex * weight
energy_c_sr_pbe += ec * weight
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_sr_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vx_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vx_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dsr_vc_alpha_pbe_w= 0.d0
aos_dsr_vc_beta_pbe_w = 0.d0
aos_dsr_vx_alpha_pbe_w= 0.d0
aos_dsr_vx_beta_pbe_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_sr_vc_alpha_pbe_w(j,i,istate) = vc_rho_a(istate) * aos_in_r_array(j,i)
aos_sr_vc_beta_pbe_w (j,i,istate) = vc_rho_b(istate) * aos_in_r_array(j,i)
aos_sr_vx_alpha_pbe_w(j,i,istate) = vx_rho_a(istate) * aos_in_r_array(j,i)
aos_sr_vx_beta_pbe_w (j,i,istate) = vx_rho_b(istate) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dsr_vc_alpha_pbe_w(j,i,istate) += contrib_grad_ca(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vc_beta_pbe_w (j,i,istate) += contrib_grad_cb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vx_alpha_pbe_w(j,i,istate) += contrib_grad_xa(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vx_beta_pbe_w (j,i,istate) += contrib_grad_xb(m,istate) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_scal_x_alpha_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_c_alpha_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_x_beta_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_c_beta_ao_pbe, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_sr_scal_c_alpha_ao_pbe = 0.d0
pot_sr_scal_x_alpha_ao_pbe = 0.d0
pot_sr_scal_c_beta_ao_pbe = 0.d0
pot_sr_scal_x_beta_ao_pbe = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vc_alpha_pbe_w(1,1,istate),size(aos_sr_vc_alpha_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_c_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_c_alpha_ao_pbe,1))
! correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vc_beta_pbe_w(1,1,istate),size(aos_sr_vc_beta_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_c_beta_ao_pbe(1,1,istate),size(pot_sr_scal_c_beta_ao_pbe,1))
! exchange alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vx_alpha_pbe_w(1,1,istate),size(aos_sr_vx_alpha_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_x_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_x_alpha_ao_pbe,1))
! exchange beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vx_beta_pbe_w(1,1,istate),size(aos_sr_vx_beta_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_x_beta_ao_pbe(1,1,istate), size(pot_sr_scal_x_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_grad_x_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_x_beta_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_c_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_c_beta_ao_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_sr_grad_c_alpha_ao_pbe = 0.d0
pot_sr_grad_x_alpha_ao_pbe = 0.d0
pot_sr_grad_c_beta_ao_pbe = 0.d0
pot_sr_grad_x_beta_ao_pbe = 0.d0
do istate = 1, N_states
! correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vc_alpha_pbe_w(1,1,istate),size(aos_dsr_vc_alpha_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_c_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_c_alpha_ao_pbe,1))
! correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vc_beta_pbe_w(1,1,istate),size(aos_dsr_vc_beta_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_c_beta_ao_pbe(1,1,istate),size(pot_sr_grad_c_beta_ao_pbe,1))
! exchange alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vx_alpha_pbe_w(1,1,istate),size(aos_dsr_vx_alpha_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_x_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_x_alpha_ao_pbe,1))
! exchange beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vx_beta_pbe_w(1,1,istate),size(aos_dsr_vx_beta_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_x_beta_ao_pbe(1,1,istate),size(pot_sr_grad_x_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_x_alpha_ao_sr_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_x_beta_ao_sr_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_alpha_ao_sr_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_c_beta_ao_sr_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_x_alpha_ao_sr_pbe(j,i,istate) = pot_sr_scal_x_alpha_ao_pbe(j,i,istate) + pot_sr_grad_x_alpha_ao_pbe(j,i,istate) + pot_sr_grad_x_alpha_ao_pbe(i,j,istate)
potential_x_beta_ao_sr_pbe(j,i,istate) = pot_sr_scal_x_beta_ao_pbe(j,i,istate) + pot_sr_grad_x_beta_ao_pbe(j,i,istate) + pot_sr_grad_x_beta_ao_pbe(i,j,istate)
potential_c_alpha_ao_sr_pbe(j,i,istate) = pot_sr_scal_c_alpha_ao_pbe(j,i,istate) + pot_sr_grad_c_alpha_ao_pbe(j,i,istate) + pot_sr_grad_c_alpha_ao_pbe(i,j,istate)
potential_c_beta_ao_sr_pbe(j,i,istate) = pot_sr_scal_c_beta_ao_pbe(j,i,istate) + pot_sr_grad_c_beta_ao_pbe(j,i,istate) + pot_sr_grad_c_beta_ao_pbe(i,j,istate)
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER[double precision, aos_sr_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_sr_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vxc_alpha_pbe_w , (ao_num,n_points_final_grid,N_states)]
&BEGIN_PROVIDER[double precision, aos_dsr_vxc_beta_pbe_w , (ao_num,n_points_final_grid,N_states)]
implicit none
BEGIN_DOC
! aos_sr_vxc_alpha_pbe_w(j,i) = ao_i(r_j) * (v^x_alpha(r_j) + v^c_alpha(r_j)) * W(r_j)
END_DOC
integer :: istate,i,j,m
double precision :: r(3)
double precision :: mu,weight
double precision, allocatable :: ex(:), ec(:)
double precision, allocatable :: rho_a(:),rho_b(:),grad_rho_a(:,:),grad_rho_b(:,:),grad_rho_a_2(:),grad_rho_b_2(:),grad_rho_a_b(:)
double precision, allocatable :: contrib_grad_xa(:,:),contrib_grad_xb(:,:),contrib_grad_ca(:,:),contrib_grad_cb(:,:)
double precision, allocatable :: vc_rho_a(:), vc_rho_b(:), vx_rho_a(:), vx_rho_b(:)
double precision, allocatable :: vx_grad_rho_a_2(:), vx_grad_rho_b_2(:), vx_grad_rho_a_b(:), vc_grad_rho_a_2(:), vc_grad_rho_b_2(:), vc_grad_rho_a_b(:)
allocate(vc_rho_a(N_states), vc_rho_b(N_states), vx_rho_a(N_states), vx_rho_b(N_states))
allocate(vx_grad_rho_a_2(N_states), vx_grad_rho_b_2(N_states), vx_grad_rho_a_b(N_states), vc_grad_rho_a_2(N_states), vc_grad_rho_b_2(N_states), vc_grad_rho_a_b(N_states))
allocate(rho_a(N_states), rho_b(N_states),grad_rho_a(3,N_states),grad_rho_b(3,N_states))
allocate(grad_rho_a_2(N_states),grad_rho_b_2(N_states),grad_rho_a_b(N_states), ex(N_states), ec(N_states))
allocate(contrib_grad_xa(3,N_states),contrib_grad_xb(3,N_states),contrib_grad_ca(3,N_states),contrib_grad_cb(3,N_states))
aos_dsr_vxc_alpha_pbe_w = 0.d0
aos_dsr_vxc_beta_pbe_w = 0.d0
do istate = 1, N_states
do i = 1, n_points_final_grid
r(1) = final_grid_points(1,i)
r(2) = final_grid_points(2,i)
r(3) = final_grid_points(3,i)
weight = final_weight_at_r_vector(i)
rho_a(istate) = one_e_dm_and_grad_alpha_in_r(4,i,istate)
rho_b(istate) = one_e_dm_and_grad_beta_in_r(4,i,istate)
grad_rho_a(1:3,istate) = one_e_dm_and_grad_alpha_in_r(1:3,i,istate)
grad_rho_b(1:3,istate) = one_e_dm_and_grad_beta_in_r(1:3,i,istate)
grad_rho_a_2 = 0.d0
grad_rho_b_2 = 0.d0
grad_rho_a_b = 0.d0
do m = 1, 3
grad_rho_a_2(istate) += grad_rho_a(m,istate) * grad_rho_a(m,istate)
grad_rho_b_2(istate) += grad_rho_b(m,istate) * grad_rho_b(m,istate)
grad_rho_a_b(istate) += grad_rho_a(m,istate) * grad_rho_b(m,istate)
enddo
! inputs
call GGA_sr_type_functionals(r,rho_a,rho_b,grad_rho_a_2,grad_rho_b_2,grad_rho_a_b, & ! outputs exchange
ex,vx_rho_a,vx_rho_b,vx_grad_rho_a_2,vx_grad_rho_b_2,vx_grad_rho_a_b, & ! outputs correlation
ec,vc_rho_a,vc_rho_b,vc_grad_rho_a_2,vc_grad_rho_b_2,vc_grad_rho_a_b )
vx_rho_a(istate) *= weight
vc_rho_a(istate) *= weight
vx_rho_b(istate) *= weight
vc_rho_b(istate) *= weight
do m= 1,3
contrib_grad_ca(m,istate) = weight * (2.d0 * vc_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_xa(m,istate) = weight * (2.d0 * vx_grad_rho_a_2(istate) * grad_rho_a(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_b(m,istate))
contrib_grad_cb(m,istate) = weight * (2.d0 * vc_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vc_grad_rho_a_b(istate) * grad_rho_a(m,istate))
contrib_grad_xb(m,istate) = weight * (2.d0 * vx_grad_rho_b_2(istate) * grad_rho_b(m,istate) + vx_grad_rho_a_b(istate) * grad_rho_a(m,istate))
enddo
do j = 1, ao_num
aos_sr_vxc_alpha_pbe_w(j,i,istate) = ( vc_rho_a(istate) + vx_rho_a(istate) ) * aos_in_r_array(j,i)
aos_sr_vxc_beta_pbe_w (j,i,istate) = ( vc_rho_b(istate) + vx_rho_b(istate) ) * aos_in_r_array(j,i)
enddo
do j = 1, ao_num
do m = 1,3
aos_dsr_vxc_alpha_pbe_w(j,i,istate) += ( contrib_grad_ca(m,istate) + contrib_grad_xa(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
aos_dsr_vxc_beta_pbe_w (j,i,istate) += ( contrib_grad_cb(m,istate) + contrib_grad_xb(m,istate) ) * aos_grad_in_r_array_transp_xyz(m,j,i)
enddo
enddo
enddo
enddo
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_scal_xc_alpha_ao_pbe, (ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_scal_xc_beta_ao_pbe, (ao_num,ao_num,N_states)]
implicit none
integer :: istate
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the scalar part of the potential
END_DOC
pot_sr_scal_xc_alpha_ao_pbe = 0.d0
pot_sr_scal_xc_beta_ao_pbe = 0.d0
double precision :: wall_1,wall_2
call wall_time(wall_1)
do istate = 1, N_states
! exchange - correlation alpha
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vxc_alpha_pbe_w(1,1,istate),size(aos_sr_vxc_alpha_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_xc_alpha_ao_pbe(1,1,istate),size(pot_sr_scal_xc_alpha_ao_pbe,1))
! exchange - correlation beta
call dgemm('N','T',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_sr_vxc_beta_pbe_w(1,1,istate),size(aos_sr_vxc_beta_pbe_w,1), &
aos_in_r_array,size(aos_in_r_array,1),1.d0, &
pot_sr_scal_xc_beta_ao_pbe(1,1,istate),size(pot_sr_scal_xc_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, pot_sr_grad_xc_alpha_ao_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, pot_sr_grad_xc_beta_ao_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! intermediate quantity for the calculation of the vxc potentials for the GGA functionals related to the gradienst of the density and orbitals
END_DOC
integer :: istate
double precision :: wall_1,wall_2
call wall_time(wall_1)
pot_sr_grad_xc_alpha_ao_pbe = 0.d0
pot_sr_grad_xc_beta_ao_pbe = 0.d0
do istate = 1, N_states
! exchange - correlation alpha
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vxc_alpha_pbe_w(1,1,istate),size(aos_dsr_vxc_alpha_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_xc_alpha_ao_pbe(1,1,istate),size(pot_sr_grad_xc_alpha_ao_pbe,1))
! exchange - correlation beta
call dgemm('N','N',ao_num,ao_num,n_points_final_grid,1.d0, &
aos_dsr_vxc_beta_pbe_w(1,1,istate),size(aos_dsr_vxc_beta_pbe_w,1), &
aos_in_r_array_transp,size(aos_in_r_array_transp,1),1.d0, &
pot_sr_grad_xc_beta_ao_pbe(1,1,istate),size(pot_sr_grad_xc_beta_ao_pbe,1))
enddo
call wall_time(wall_2)
END_PROVIDER
BEGIN_PROVIDER [double precision, potential_xc_alpha_ao_sr_pbe,(ao_num,ao_num,N_states)]
&BEGIN_PROVIDER [double precision, potential_xc_beta_ao_sr_pbe,(ao_num,ao_num,N_states)]
implicit none
BEGIN_DOC
! exchange / correlation potential for alpha / beta electrons with the Perdew-Burke-Ernzerhof GGA functional
END_DOC
integer :: i,j,istate
do istate = 1, n_states
do i = 1, ao_num
do j = 1, ao_num
potential_xc_alpha_ao_sr_pbe(j,i,istate) = pot_sr_scal_xc_alpha_ao_pbe(j,i,istate) + pot_sr_grad_xc_alpha_ao_pbe(j,i,istate) + pot_sr_grad_xc_alpha_ao_pbe(i,j,istate)
potential_xc_beta_ao_sr_pbe(j,i,istate) = pot_sr_scal_xc_beta_ao_pbe(j,i,istate) + pot_sr_grad_xc_beta_ao_pbe(j,i,istate) + pot_sr_grad_xc_beta_ao_pbe(i,j,istate)
enddo
enddo
enddo
END_PROVIDER

View File

@ -23,19 +23,19 @@ function run() {
@test "H3COH" {
run h3coh.ezfio short_range_PBE -115.50238225208
run h3coh.ezfio sr_pbe -115.50238225208
}
@test "HCN" {
run hcn.ezfio short_range_PBE -93.26674673761752
run hcn.ezfio sr_pbe -93.26674673761752
}
@test "N2" {
run n2.ezfio short_range_PBE -109.404692225719
run n2.ezfio sr_pbe -109.404692225719
}
@test "SiH2_3B1" {
run sih2_3b1.ezfio short_range_LDA -289.4398733527755
run sih2_3b1.ezfio sr_lda -289.4398733527755
}

View File

@ -37,6 +37,7 @@ BEGIN_PROVIDER [double precision, extra_e_contrib_density]
!
! For a Kohn-Sham or Range-separated Kohn-Sham: the exchange/correlation - 1/2 trace of the V_xc potential
END_DOC
extra_e_contrib_density = e_exchange_dft + e_correlation_dft - 0.5d0 * trace_potential_xc
END_PROVIDER

View File

@ -29,13 +29,13 @@ subroutine check_coherence_functional
if(exchange_functional.eq."None")then
ifound_x = 1
else
ifound_x = index(exchange_functional,"short_range")
ifound_x = index(exchange_functional,"sr")
endif
if(correlation_functional.eq."None")then
ifound_c = 1
else
ifound_c = index(correlation_functional,"short_range")
ifound_c = index(correlation_functional,"sr")
endif
print*,ifound_x,ifound_c
if(ifound_x .eq.0 .or. ifound_c .eq. 0)then

View File

@ -5,138 +5,145 @@ program molden
END_DOC
character*(128) :: output
integer :: i_unit_output,getUnitAndOpen
provide ezfio_filename
integer :: i
print*,trim(ezfio_filename)
output=trim(ezfio_filename)//'.mol'
print*,'output = ',trim(output)
i_unit_output = getUnitAndOpen(output,'w')
print*,'i_unit_output = ',i_unit_output
call write_intro_gamess(i_unit_output)
call write_geometry(i_unit_output)
call write_Ao_basis(i_unit_output)
call write_Mo_basis(i_unit_output)
write(i_unit_output,*)''
write(i_unit_output,*)''
write(i_unit_output,*)' ------------------------'
close(i_unit_output)
end
subroutine write_intro_gamess(i_unit_output)
implicit none
integer, intent(in) :: i_unit_output
integer :: i,j,k,l
write(i_unit_output,*)' * GAMESS VERSION = 22 FEB 2006 (R5) *'
write(i_unit_output,*)' * FROM IOWA STATE UNIVERSITY *'
write(i_unit_output,*)' * M.W.SCHMIDT, K.K.BALDRIDGE, J.A.BOATZ, S.T.ELBERT, *'
write(i_unit_output,*)' * M.S.GORDON, J.H.JENSEN, S.KOSEKI, N.MATSUNAGA, *'
write(i_unit_output,*)' * K.A.NGUYEN, S.J.SU, T.L.WINDUS, *'
write(i_unit_output,*)' * TOGETHER WITH M.DUPUIS, J.A.MONTGOMERY *'
write(i_unit_output,*)' * J.COMPUT.CHEM. 14, 1347-1363(1993) *'
write(i_unit_output,*)''
PROVIDE ezfio_filename
end
output=trim(ezfio_filename)//'.mol'
print*,'output = ',trim(output)
i_unit_output = getUnitAndOpen(output,'w')
write(i_unit_output,'(A)') '[Molden Format]'
subroutine write_geometry(i_unit_output)
implicit none
integer, intent(in) :: i_unit_output
integer :: i,j,k,l, getUnitAndOpen
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
write(i_unit_output,*)'ATOM ATOMIC COORDINATES (BOHR) '
write(i_unit_output,*)' CHARGE X Y Z'
write(i_unit_output,'(A)') '[Atoms] AU'
do i = 1, nucl_num
! write(i_unit_output,'(A2 I3 X F3.1 X 3(F16.10))') trim(element_name(int(nucl_charge(i)))),i,(nucl_charge(i)), nucl_coord(i,1), nucl_coord(i,2), nucl_coord(i,3)
write(i_unit_output,'(A2,I1, 9X F5.1 X 3(F16.10 ,4X))') trim(element_name(int(nucl_charge(i)))),i,(nucl_charge(i)), nucl_coord(i,1), nucl_coord(i,2), nucl_coord(i,3)
write(i_unit_output,'(A2,2X,I4,2X,I4,3(2X,F15.10))') &
trim(element_name(int(nucl_charge(i)))), &
i, &
int(nucl_charge(i)), &
nucl_coord(i,1), nucl_coord(i,2), nucl_coord(i,3)
enddo
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
end
write(i_unit_output,'(A)') '[GTO]'
subroutine write_Ao_basis(i_unit_output)
implicit none
integer, intent(in) :: i_unit_output
integer :: i,j,k,l, getUnitAndOpen
character*(128) :: character_shell
character*(1) :: character_shell
integer :: i_shell,i_prim,i_ao
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
write(i_unit_output,*)''
write(i_unit_output,*)''
write(i_unit_output,*)' ATOMIC BASIS SET'
write(i_unit_output,*)' ----------------'
write(i_unit_output,*)'THE CONTRACTED PRIMITIVE FUNCTIONS HAVE BEEN UNNORMALIZED'
write(i_unit_output,*)'THE CONTRACTED BASIS FUNCTIONS ARE NOW NORMALIZED TO UNITY'
write(i_unit_output,*)''
write(i_unit_output,*)'SHELL TYPE PRIMITIVE EXPONENT CONTRACTION COEFFICIENT(S)'
write(i_unit_output,*)''
write(i_unit_output,*)''
integer :: iorder(ao_num)
integer :: nsort(ao_num)
i_shell = 0
i_prim = 0
do i = 1, Nucl_num
write(i_unit_output,'(A2,I1)') trim(element_name(int(nucl_charge(i)))),i
write(i_unit_output,*)' '
! write(i_unit_output,*)'Nucl_num_shell_Aos(i) = ',Nucl_num_shell_Aos(i)
do j = 1, Nucl_num_shell_Aos(i)
do i=1,nucl_num
write(i_unit_output,*) i, 0
do j=1,nucl_num_shell_aos(i)
i_shell +=1
i_ao = Nucl_list_shell_Aos(i,j)
i_ao = nucl_list_shell_aos(i,j)
character_shell = trim(ao_l_char(i_ao))
! write(i_unit_output,*),j,i_shell,i_ao!trim(character_shell)
write(i_unit_output,*) character_shell, ao_prim_num(i_ao), '1.00'
do k = 1, ao_prim_num(i_ao)
i_prim +=1
if(i_prim.lt.100)then
write(i_unit_output,'(4X,I3,3X,A1,6X,I2,6X,F16.7,2X,F16.12)')i_shell,character_shell,i_prim,ao_expo(i_ao,k),ao_coef(i_ao,k)
else
write(i_unit_output,'(4X,I3,3X,A1,5X,I3,6X,F16.7,2X,F16.12)')i_shell,character_shell,i_prim,ao_expo(i_ao,k),ao_coef(i_ao,k)
write(i_unit_output,'(E20.10,2X,E20.10)') ao_expo(i_ao,k), ao_coef(i_ao,k)
enddo
l = i_ao
do while ( ao_l(l) == ao_l(i_ao) )
nsort(l) = i*10000 + j*100
l += 1
if (l > ao_num) exit
enddo
write(i_unit_output,*)''
enddo
enddo
do i=1,ao_num
iorder(i) = i
! p
if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 1
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 2
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 3
! d
else if ((ao_power(i,1) == 2 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 1
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 2 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 2
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 2 )) then
nsort(i) += 3
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 4
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 5
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 6
! f
else if ((ao_power(i,1) == 3 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 1
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 3 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 2
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 3 )) then
nsort(i) += 3
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 2 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 4
else if ((ao_power(i,1) == 2 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 5
else if ((ao_power(i,1) == 2 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 6
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 2 )) then
nsort(i) += 7
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 2 )) then
nsort(i) += 8
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 2 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 9
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 10
! g
else if ((ao_power(i,1) == 4 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 1
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 4 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 2
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 4 )) then
nsort(i) += 3
else if ((ao_power(i,1) == 3 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 4
else if ((ao_power(i,1) == 3 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 5
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 3 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 6
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 3 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 7
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 3 )) then
nsort(i) += 8
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 3 )) then
nsort(i) += 9
else if ((ao_power(i,1) == 2 ).and.(ao_power(i,2) == 2 ).and.(ao_power(i,3) == 0 )) then
nsort(i) += 10
else if ((ao_power(i,1) == 2 ).and.(ao_power(i,2) == 0 ).and.(ao_power(i,3) == 2 )) then
nsort(i) += 11
else if ((ao_power(i,1) == 0 ).and.(ao_power(i,2) == 2 ).and.(ao_power(i,3) == 2 )) then
nsort(i) += 12
else if ((ao_power(i,1) == 2 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 13
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 2 ).and.(ao_power(i,3) == 1 )) then
nsort(i) += 14
else if ((ao_power(i,1) == 1 ).and.(ao_power(i,2) == 1 ).and.(ao_power(i,3) == 2 )) then
nsort(i) += 15
endif
enddo
write(i_unit_output,*)''
call isort(nsort,iorder,ao_num)
write(i_unit_output,'(A)') '[MO]'
do i=1,mo_num
write (i_unit_output,*) 'Sym= 1'
write (i_unit_output,*) 'Ene=', fock_matrix_diag_mo(i)
write (i_unit_output,*) 'Spin= Alpha'
write (i_unit_output,*) 'Occup=', mo_occ(i)
do j=1,ao_num
write(i_unit_output, '(I6,2X,E20.10)') j, mo_coef(iorder(j),i)
enddo
enddo
write(i_unit_output,*)''
write(i_unit_output,'(A47,2X,I3)')'TOTAL NUMBER OF BASIS SET SHELLS =', i_shell
write(i_unit_output,'(A47,2X,I3)')'NUMBER OF CARTESIAN GAUSSIAN BASIS FUNCTIONS =', ao_num
! this is for the new version of molden
write(i_unit_output,'(A12)')'PP =NONE'
write(i_unit_output,*)''
close(i_unit_output)
end
subroutine write_Mo_basis(i_unit_output)
implicit none
integer, intent(in) :: i_unit_output
integer :: i,j,k,l, getUnitAndOpen
integer :: i_5,i_mod
write(i_unit_output,*) ' ----------------------'
write(i_unit_output,*) ' MCSCF NATURAL ORBITALS'
write(i_unit_output,*) ' ----------------------'
write(i_unit_output,*) ' '
do j = 1, mo_num
write(i_unit_output,'(18X,I3)')j
write(i_unit_output,*)''
write(i_unit_output,'(18X,F8.5)')-1.d0
write(i_unit_output,*)''
do i = 1, ao_num
! write(i_unit_output,'(2X,I3, 2X A1, I3, 2X A4 , F9.6)')i,trim(element_name(int(nucl_charge(ao_nucl(i))))),ao_nucl(i),(ao_l_char_space(i)),mo_coef(i,j)
! F12.6 for larger coefficients...
write(i_unit_output,'(2X,I3, 2X A1, I3, 2X A4 , F12.6)')i,trim(element_name(int(nucl_charge(ao_nucl(i))))),ao_nucl(i),(ao_l_char_space(i)),mo_coef(i,j)
! write(i_unit_output,'(I3, X A1, X I3, X A4 X F16.8)')i,trim(element_name(int(nucl_charge(ao_nucl(i))))),ao_nucl(i),(ao_l_char_space(i))
enddo
write(i_unit_output,*)''
enddo
end

View File

@ -1,4 +1,4 @@
program print_wf
program print_ci_vectors
implicit none
BEGIN_DOC
! Print the ground state wave function stored in the |EZFIO| directory