34 USE dbcsr_api,
ONLY: dbcsr_distribution_type,&
161#include "./base/base_uses.f90"
167 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_environment_types'
216 LOGICAL :: qmmm, qmmm_periodic
217 LOGICAL :: requires_mo_derivs
218 LOGICAL :: requires_matrix_vxc
219 LOGICAL :: has_unit_metric
221 LOGICAL :: linres_run
222 LOGICAL :: calc_image_preconditioner
223 LOGICAL :: do_transport
224 LOGICAL :: single_point_run
225 LOGICAL :: given_embed_pot
226 LOGICAL :: energy_correction
227 REAL(kind=
dp) :: sim_time
228 REAL(kind=
dp) :: start_time, target_time
229 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: image_matrix
230 REAL(kind=
dp),
DIMENSION(:),
POINTER :: image_coeff
231 INTEGER,
DIMENSION(:),
POINTER :: ipiv
239 TYPE(dbcsr_p_type),
DIMENSION(:),
POINTER :: mo_derivs
261 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: outer_scf_history
262 INTEGER :: outer_scf_ihistory
263 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: gradient_history, &
276 LOGICAL :: excited_state
293 REAL(kind=
dp) :: broyden_adaptive_sigma
307 REAL(kind=
dp),
DIMENSION(:),
POINTER :: rhs => null()
308 REAL(kind=
dp) :: total_zeff_corr, surface_dipole_moment
309 LOGICAL :: surface_dipole_switch_off
476 SUBROUTINE get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, &
477 dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, sac_ae, sac_ppl, sac_lri, &
478 sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, &
479 sab_xb, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, particle_set, energy, force, &
480 matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, &
481 matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, &
482 matrix_w_kp, matrix_s_RI_aux_kp, matrix_s, matrix_s_RI_aux, matrix_w, &
483 matrix_p_mp2, matrix_p_mp2_admm, rho, &
484 rho_xc, pw_env, ewald_env, ewald_pw, active_space, &
485 mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, &
486 vppl, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, &
487 local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, &
488 molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, &
491 rho0_atom_set, rho0_mpole, rhoz_set, ecoul_1c, &
492 rho0_s_rs, rho0_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, &
493 mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, &
494 neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, &
495 outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, &
496 se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, &
497 lri_env, lri_density, exstate_env, ec_env, dispersion_env, gcp_env, vee, &
498 rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, &
499 WannierCentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, &
500 s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, &
501 gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, rhs)
504 POINTER :: atomic_kind_set
506 POINTER :: qs_kind_set
507 TYPE(
cell_type),
OPTIONAL,
POINTER :: cell, super_cell, cell_ref
508 LOGICAL,
OPTIONAL :: use_ref_cell
511 TYPE(
mo_set_type),
DIMENSION(:),
OPTIONAL,
POINTER :: mos
513 OPTIONAL,
POINTER :: sab_orb, sab_all
514 LOGICAL,
OPTIONAL :: qmmm, qmmm_periodic
516 sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, &
517 sab_xb, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym
519 POINTER :: particle_set
523 TYPE(dbcsr_p_type),
DIMENSION(:),
OPTIONAL, &
524 POINTER :: matrix_h, matrix_h_im, matrix_ks, &
525 matrix_ks_im, matrix_vxc
526 LOGICAL,
OPTIONAL :: run_rtp
528 TYPE(dbcsr_p_type),
DIMENSION(:, :),
OPTIONAL,
POINTER :: matrix_h_kp, matrix_h_im_kp, &
529 matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, &
531 TYPE(dbcsr_p_type),
DIMENSION(:),
OPTIONAL, &
532 POINTER :: matrix_s, matrix_s_ri_aux, matrix_w, &
533 matrix_p_mp2, matrix_p_mp2_admm
534 TYPE(
qs_rho_type),
OPTIONAL,
POINTER :: rho, rho_xc
545 TYPE(dbcsr_p_type),
DIMENSION(:),
OPTIONAL, &
558 TYPE(dbcsr_distribution_type),
OPTIONAL,
POINTER :: dbcsr_dist
560 POINTER :: molecule_kind_set
562 POINTER :: molecule_set
568 POINTER :: rho_atom_set
569 TYPE(
task_list_type),
OPTIONAL,
POINTER :: task_list, task_list_soft
571 POINTER :: rho0_atom_set
573 TYPE(
rhoz_type),
DIMENSION(:),
OPTIONAL,
POINTER :: rhoz_set
578 LOGICAL,
OPTIONAL :: do_kpoints, has_unit_metric, &
580 TYPE(dbcsr_p_type),
DIMENSION(:),
OPTIONAL, &
582 TYPE(
cp_fm_type),
DIMENSION(:),
OPTIONAL,
POINTER :: mo_loc_history
583 INTEGER,
OPTIONAL :: nkind, natom, nelectron_total
584 INTEGER,
DIMENSION(2),
OPTIONAL :: nelectron_spin
586 INTEGER,
OPTIONAL :: neighbor_list_id
592 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: outer_scf_history
593 INTEGER,
INTENT(out),
OPTIONAL :: outer_scf_ihistory
594 TYPE(
hfx_type),
DIMENSION(:, :),
OPTIONAL,
POINTER :: x_data
597 OPTIONAL,
POINTER :: dftb_potential
603 TYPE(
admm_type),
OPTIONAL,
POINTER :: admm_env
611 TYPE(
qs_rho_type),
OPTIONAL,
POINTER :: rho_external
613 TYPE(
mp2_type),
OPTIONAL,
POINTER :: mp2_env
618 OPTIONAL,
POINTER :: wanniercentres
621 LOGICAL,
OPTIONAL :: do_transport
624 LOGICAL,
OPTIONAL :: s_mstruct_changed, rho_changed, &
625 potential_changed, forces_up_to_date
629 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: gradient_history, variable_history
630 TYPE(
pw_r3d_rs_type),
OPTIONAL,
POINTER :: embed_pot, spin_embed_pot
632 TYPE(
mo_set_type),
DIMENSION(:),
OPTIONAL,
POINTER :: mos_last_converged
633 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: rhs
638 cpassert(
ASSOCIATED(qs_env%ks_env))
640 IF (
PRESENT(outer_scf_history)) outer_scf_history => qs_env%outer_scf_history
641 IF (
PRESENT(outer_scf_ihistory)) outer_scf_ihistory = qs_env%outer_scf_ihistory
642 IF (
PRESENT(gradient_history)) gradient_history => qs_env%gradient_history
643 IF (
PRESENT(variable_history)) variable_history => qs_env%variable_history
644 IF (
PRESENT(mp2_env)) mp2_env => qs_env%mp2_env
645 IF (
PRESENT(bs_env)) bs_env => qs_env%bs_env
646 IF (
PRESENT(kg_env)) kg_env => qs_env%kg_env
647 IF (
PRESENT(super_cell)) super_cell => qs_env%super_cell
648 IF (
PRESENT(qmmm)) qmmm = qs_env%qmmm
649 IF (
PRESENT(qmmm_periodic)) qmmm_periodic = qs_env%qmmm_periodic
650 IF (
PRESENT(mos)) mos => qs_env%mos
651 IF (
PRESENT(mos_last_converged)) mos_last_converged => qs_env%mos_last_converged
652 IF (
PRESENT(ewald_env)) ewald_env => qs_env%ewald_env
653 IF (
PRESENT(ewald_pw)) ewald_pw => qs_env%ewald_pw
654 IF (
PRESENT(mpools)) mpools => qs_env%mpools
655 IF (
PRESENT(scf_control)) scf_control => qs_env%scf_control
656 IF (
PRESENT(rel_control)) rel_control => qs_env%rel_control
658 IF (
PRESENT(rho_external)) rho_external => qs_env%rho_external
659 IF (
PRESENT(external_vxc)) external_vxc => qs_env%external_vxc
660 IF (
PRESENT(mask)) mask => qs_env%mask
661 IF (
PRESENT(qs_charges)) qs_charges => qs_env%qs_charges
662 IF (
PRESENT(ks_env)) ks_env => qs_env%ks_env
663 IF (
PRESENT(ks_qmmm_env)) ks_qmmm_env => qs_env%ks_qmmm_env
664 IF (
PRESENT(wf_history)) wf_history => qs_env%wf_history
665 IF (
PRESENT(scf_env)) scf_env => qs_env%scf_env
666 IF (
PRESENT(oce)) oce => qs_env%oce
667 IF (
PRESENT(requires_mo_derivs)) requires_mo_derivs = qs_env%requires_mo_derivs
668 IF (
PRESENT(has_unit_metric)) has_unit_metric = qs_env%has_unit_metric
669 IF (
PRESENT(mo_derivs)) mo_derivs => qs_env%mo_derivs
670 IF (
PRESENT(mo_loc_history)) mo_loc_history => qs_env%mo_loc_history
671 IF (
PRESENT(linres_control)) linres_control => qs_env%linres_control
672 IF (
PRESENT(se_taper)) se_taper => qs_env%se_taper
673 IF (
PRESENT(se_store_int_env)) se_store_int_env => qs_env%se_store_int_env
674 IF (
PRESENT(se_nddo_mpole)) se_nddo_mpole => qs_env%se_nddo_mpole
675 IF (
PRESENT(se_nonbond_env)) se_nonbond_env => qs_env%se_nonbond_env
676 IF (
PRESENT(lri_env)) lri_env => qs_env%lri_env
677 IF (
PRESENT(lri_density)) lri_density => qs_env%lri_density
678 IF (
PRESENT(ec_env)) ec_env => qs_env%ec_env
679 IF (
PRESENT(exstate_env)) exstate_env => qs_env%exstate_env
680 IF (
PRESENT(dispersion_env)) dispersion_env => qs_env%dispersion_env
681 IF (
PRESENT(gcp_env)) gcp_env => qs_env%gcp_env
682 IF (
PRESENT(run_rtp)) run_rtp = qs_env%run_rtp
683 IF (
PRESENT(rtp)) rtp => qs_env%rtp
684 IF (
PRESENT(ls_scf_env)) ls_scf_env => qs_env%ls_scf_env
685 IF (
PRESENT(almo_scf_env)) almo_scf_env => qs_env%almo_scf_env
686 IF (
PRESENT(do_transport)) do_transport = qs_env%do_transport
687 IF (
PRESENT(transport_env)) transport_env => qs_env%transport_env
688 IF (
PRESENT(mscfg_env)) mscfg_env => qs_env%molecular_scf_guess_env
689 IF (
PRESENT(active_space)) active_space => qs_env%active_space
690 IF (
PRESENT(admm_env)) admm_env => qs_env%admm_env
693 IF (
PRESENT(embed_pot)) embed_pot => qs_env%embed_pot
694 IF (
PRESENT(spin_embed_pot)) spin_embed_pot => qs_env%spin_embed_pot
697 IF (
PRESENT(polar_env)) polar_env => qs_env%polar_env
700 IF (
PRESENT(rhs)) rhs => qs_env%rhs
702 IF (
PRESENT(local_rho_set)) &
703 local_rho_set => qs_env%local_rho_set
704 IF (
PRESENT(rho_atom_set)) &
705 CALL get_local_rho(qs_env%local_rho_set, rho_atom_set=rho_atom_set)
706 IF (
PRESENT(rho0_atom_set)) &
707 CALL get_local_rho(qs_env%local_rho_set, rho0_atom_set=rho0_atom_set)
708 IF (
PRESENT(rho0_mpole)) &
709 CALL get_local_rho(qs_env%local_rho_set, rho0_mpole=rho0_mpole)
710 IF (
PRESENT(rhoz_set)) &
712 IF (
PRESENT(ecoul_1c)) &
714 IF (
PRESENT(rho0_s_rs))
THEN
716 IF (
ASSOCIATED(rho0_m))
THEN
717 rho0_s_rs => rho0_m%rho0_s_rs
720 IF (
PRESENT(rho0_s_gs))
THEN
722 IF (
ASSOCIATED(rho0_m))
THEN
723 rho0_s_gs => rho0_m%rho0_s_gs
727 IF (
PRESENT(xas_env)) xas_env => qs_env%xas_env
728 IF (
PRESENT(input)) input => qs_env%input
729 IF (
PRESENT(cp_ddapc_env)) cp_ddapc_env => qs_env%cp_ddapc_env
730 IF (
PRESENT(cp_ddapc_ewald)) cp_ddapc_ewald => qs_env%cp_ddapc_ewald
731 IF (
PRESENT(x_data)) x_data => qs_env%x_data
733 IF (
PRESENT(dftb_potential)) dftb_potential => qs_env%dftb_potential
734 IF (
PRESENT(efield)) efield => qs_env%efield
735 IF (
PRESENT(wanniercentres)) wanniercentres => qs_env%WannierCentres
738 v_hartree_rspace=v_hartree_rspace, &
739 s_mstruct_changed=s_mstruct_changed, &
740 rho_changed=rho_changed, &
741 potential_changed=potential_changed, &
742 forces_up_to_date=forces_up_to_date, &
744 matrix_h_im=matrix_h_im, &
745 matrix_ks=matrix_ks, &
746 matrix_ks_im=matrix_ks_im, &
747 matrix_vxc=matrix_vxc, &
750 matrix_s_ri_aux=matrix_s_ri_aux, &
751 matrix_ks_im_kp=matrix_ks_im_kp, &
753 matrix_p_mp2=matrix_p_mp2, &
754 matrix_p_mp2_admm=matrix_p_mp2_admm, &
755 matrix_h_kp=matrix_h_kp, &
756 matrix_h_im_kp=matrix_h_im_kp, &
757 matrix_ks_kp=matrix_ks_kp, &
758 matrix_vxc_kp=matrix_vxc_kp, &
759 kinetic_kp=kinetic_kp, &
760 matrix_s_kp=matrix_s_kp, &
761 matrix_w_kp=matrix_w_kp, &
762 matrix_s_ri_aux_kp=matrix_s_ri_aux_kp, &
767 rho_nlcc_g=rho_nlcc_g, &
770 neighbor_list_id=neighbor_list_id, &
786 sab_xtb_nonbond=sab_xtb_nonbond, &
789 sab_kp_nosym=sab_kp_nosym, &
790 task_list=task_list, &
791 task_list_soft=task_list_soft, &
793 do_kpoints=do_kpoints, &
794 local_molecules=local_molecules, &
795 local_particles=local_particles, &
801 use_ref_cell=use_ref_cell, &
804 qs_kind_set=qs_kind_set, &
806 cp_subsys=cp_subsys, &
807 atomic_kind_set=atomic_kind_set, &
808 particle_set=particle_set, &
809 molecule_kind_set=molecule_kind_set, &
810 molecule_set=molecule_set, &
813 dft_control=dft_control, &
814 dbcsr_dist=dbcsr_dist, &
815 distribution_2d=distribution_2d, &
818 blacs_env=blacs_env, &
819 nelectron_total=nelectron_total, &
820 nelectron_spin=nelectron_spin)
832 SUBROUTINE init_qs_env(qs_env, globenv)
837 NULLIFY (qs_env%ls_scf_env)
838 NULLIFY (qs_env%almo_scf_env)
839 NULLIFY (qs_env%transport_env)
840 NULLIFY (qs_env%image_matrix)
841 NULLIFY (qs_env%ipiv)
842 NULLIFY (qs_env%image_coeff)
843 NULLIFY (qs_env%super_cell)
845 NULLIFY (qs_env%mos_last_converged)
846 NULLIFY (qs_env%mpools)
847 NULLIFY (qs_env%ewald_env)
848 NULLIFY (qs_env%ewald_pw)
849 NULLIFY (qs_env%scf_control)
850 NULLIFY (qs_env%rel_control)
851 NULLIFY (qs_env%qs_charges)
853 NULLIFY (qs_env%rho_external)
854 NULLIFY (qs_env%external_vxc)
855 NULLIFY (qs_env%mask)
857 NULLIFY (qs_env%embed_pot)
858 NULLIFY (qs_env%spin_embed_pot)
861 NULLIFY (qs_env%polar_env)
863 NULLIFY (qs_env%ks_env)
864 NULLIFY (qs_env%ks_qmmm_env)
865 NULLIFY (qs_env%wf_history)
866 NULLIFY (qs_env%scf_env)
868 NULLIFY (qs_env%local_rho_set)
869 NULLIFY (qs_env%hartree_local)
870 NULLIFY (qs_env%input)
871 NULLIFY (qs_env%linres_control)
872 NULLIFY (qs_env%xas_env)
873 NULLIFY (qs_env%cp_ddapc_env)
874 NULLIFY (qs_env%cp_ddapc_ewald)
875 NULLIFY (qs_env%outer_scf_history)
876 NULLIFY (qs_env%gradient_history)
877 NULLIFY (qs_env%variable_history)
878 NULLIFY (qs_env%x_data)
879 NULLIFY (qs_env%et_coupling)
880 NULLIFY (qs_env%dftb_potential)
881 NULLIFY (qs_env%active_space)
883 NULLIFY (qs_env%se_taper)
884 NULLIFY (qs_env%se_store_int_env)
885 NULLIFY (qs_env%se_nddo_mpole)
886 NULLIFY (qs_env%se_nonbond_env)
887 NULLIFY (qs_env%admm_env)
888 NULLIFY (qs_env%efield)
889 NULLIFY (qs_env%lri_env)
890 NULLIFY (qs_env%ec_env)
891 NULLIFY (qs_env%exstate_env)
892 NULLIFY (qs_env%lri_density)
893 NULLIFY (qs_env%gcp_env)
895 NULLIFY (qs_env%mp2_env)
896 NULLIFY (qs_env%bs_env)
897 NULLIFY (qs_env%kg_env)
898 NULLIFY (qs_env%ec_env)
899 NULLIFY (qs_env%WannierCentres)
901 qs_env%outer_scf_ihistory = 0
902 qs_env%broyden_adaptive_sigma = -1.0_dp
906 qs_env%run_rtp = .false.
907 qs_env%linres_run = .false.
908 qs_env%single_point_run = .false.
909 qs_env%qmmm = .false.
910 qs_env%qmmm_periodic = .false.
911 qs_env%requires_mo_derivs = .false.
912 qs_env%requires_matrix_vxc = .false.
913 qs_env%has_unit_metric = .false.
914 qs_env%calc_image_preconditioner = .true.
915 qs_env%do_transport = .false.
916 qs_env%given_embed_pot = .false.
917 IF (
PRESENT(globenv))
THEN
918 qs_env%target_time = globenv%cp2k_target_time
919 qs_env%start_time = globenv%cp2k_start_time
920 qs_env%single_point_run = (globenv%run_type_id ==
energy_run .OR. &
923 qs_env%target_time = 0.0_dp
924 qs_env%start_time = 0.0_dp
927 qs_env%sim_time = 0._dp
930 qs_env%total_zeff_corr = 0.0_dp
931 qs_env%surface_dipole_moment = 0.0_dp
932 qs_env%surface_dipole_switch_off = .false.
935 NULLIFY (qs_env%mo_derivs)
936 NULLIFY (qs_env%mo_loc_history)
938 IF (.NOT.
ASSOCIATED(qs_env%molecular_scf_guess_env))
ALLOCATE (qs_env%molecular_scf_guess_env)
940 END SUBROUTINE init_qs_env
1020 mos, qmmm, qmmm_periodic, &
1021 ewald_env, ewald_pw, mpools, &
1022 rho_external, external_vxc, mask, &
1023 scf_control, rel_control, qs_charges, ks_env, &
1024 ks_qmmm_env, wf_history, scf_env, active_space, &
1025 input, oce, rho_atom_set, rho0_atom_set, rho0_mpole, run_rtp, rtp, &
1026 rhoz_set, rhoz_tot, ecoul_1c, has_unit_metric, requires_mo_derivs, mo_derivs, &
1027 mo_loc_history, efield, &
1028 linres_control, xas_env, cp_ddapc_env, cp_ddapc_ewald, &
1029 outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, &
1030 se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, ls_scf_env, &
1031 do_transport, transport_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, &
1032 gcp_env, mp2_env, bs_env, kg_env, force, &
1033 kpoints, WannierCentres, almo_scf_env, gradient_history, variable_history, embed_pot, &
1034 spin_embed_pot, polar_env, mos_last_converged, rhs)
1037 TYPE(
cell_type),
OPTIONAL,
POINTER :: super_cell
1038 TYPE(
mo_set_type),
DIMENSION(:),
OPTIONAL,
POINTER :: mos
1039 LOGICAL,
OPTIONAL :: qmmm, qmmm_periodic
1043 TYPE(
qs_rho_type),
OPTIONAL,
POINTER :: rho_external
1056 POINTER :: rho_atom_set
1058 POINTER :: rho0_atom_set
1060 LOGICAL,
OPTIONAL :: run_rtp
1062 TYPE(
rhoz_type),
DIMENSION(:),
OPTIONAL,
POINTER :: rhoz_set
1063 REAL(
dp),
OPTIONAL :: rhoz_tot
1066 LOGICAL,
OPTIONAL :: has_unit_metric, requires_mo_derivs
1067 TYPE(dbcsr_p_type),
DIMENSION(:),
OPTIONAL, &
1068 POINTER :: mo_derivs
1069 TYPE(
cp_fm_type),
DIMENSION(:),
OPTIONAL,
POINTER :: mo_loc_history
1075 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: outer_scf_history
1076 INTEGER,
INTENT(IN),
OPTIONAL :: outer_scf_ihistory
1077 TYPE(
hfx_type),
DIMENSION(:, :),
OPTIONAL,
POINTER :: x_data
1080 OPTIONAL,
POINTER :: dftb_potential
1085 TYPE(
admm_type),
OPTIONAL,
POINTER :: admm_env
1087 LOGICAL,
OPTIONAL :: do_transport
1095 TYPE(
mp2_type),
OPTIONAL,
POINTER :: mp2_env
1103 OPTIONAL,
POINTER :: wanniercentres
1105 REAL(kind=
dp),
DIMENSION(:, :),
OPTIONAL,
POINTER :: gradient_history, variable_history
1106 TYPE(
pw_r3d_rs_type),
OPTIONAL,
POINTER :: embed_pot, spin_embed_pot
1108 TYPE(
mo_set_type),
DIMENSION(:),
OPTIONAL,
POINTER :: mos_last_converged
1109 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: rhs
1113 IF (
PRESENT(mp2_env)) qs_env%mp2_env => mp2_env
1114 IF (
PRESENT(bs_env)) qs_env%bs_env => bs_env
1115 IF (
PRESENT(kg_env)) qs_env%kg_env => kg_env
1116 IF (
PRESENT(super_cell))
THEN
1119 qs_env%super_cell => super_cell
1122 IF (
PRESENT(qmmm)) qs_env%qmmm = qmmm
1123 IF (
PRESENT(qmmm_periodic)) qs_env%qmmm_periodic = qmmm_periodic
1124 IF (
PRESENT(mos)) qs_env%mos => mos
1125 IF (
PRESENT(mos_last_converged)) qs_env%mos_last_converged => mos_last_converged
1126 IF (
PRESENT(ls_scf_env)) qs_env%ls_scf_env => ls_scf_env
1127 IF (
PRESENT(almo_scf_env)) qs_env%almo_scf_env => almo_scf_env
1128 IF (
PRESENT(do_transport)) qs_env%do_transport = do_transport
1129 IF (
PRESENT(transport_env)) qs_env%transport_env => transport_env
1132 IF (
PRESENT(oce)) qs_env%oce => oce
1133 IF (
PRESENT(outer_scf_history)) qs_env%outer_scf_history => outer_scf_history
1134 IF (
PRESENT(gradient_history)) qs_env%gradient_history => gradient_history
1135 IF (
PRESENT(variable_history)) qs_env%variable_history => variable_history
1136 IF (
PRESENT(outer_scf_ihistory)) qs_env%outer_scf_ihistory = outer_scf_ihistory
1137 IF (
PRESENT(requires_mo_derivs)) qs_env%requires_mo_derivs = requires_mo_derivs
1138 IF (
PRESENT(has_unit_metric)) qs_env%has_unit_metric = has_unit_metric
1139 IF (
PRESENT(mo_derivs)) qs_env%mo_derivs => mo_derivs
1140 IF (
PRESENT(mo_loc_history)) qs_env%mo_loc_history => mo_loc_history
1141 IF (
PRESENT(run_rtp)) qs_env%run_rtp = run_rtp
1142 IF (
PRESENT(rtp)) qs_env%rtp => rtp
1143 IF (
PRESENT(efield)) qs_env%efield => efield
1144 IF (
PRESENT(active_space)) qs_env%active_space => active_space
1146 IF (
PRESENT(ewald_env))
THEN
1147 IF (
ASSOCIATED(qs_env%ewald_env))
THEN
1148 IF (.NOT.
ASSOCIATED(qs_env%ewald_env, ewald_env))
THEN
1150 DEALLOCATE (qs_env%ewald_env)
1153 qs_env%ewald_env => ewald_env
1155 IF (
PRESENT(ewald_pw))
THEN
1156 IF (
ASSOCIATED(qs_env%ewald_pw))
THEN
1157 IF (.NOT.
ASSOCIATED(ewald_pw, qs_env%ewald_pw))
THEN
1159 DEALLOCATE (qs_env%ewald_pw)
1162 qs_env%ewald_pw => ewald_pw
1164 IF (
PRESENT(scf_control))
THEN
1165 IF (
ASSOCIATED(qs_env%scf_control))
THEN
1166 IF (.NOT.
ASSOCIATED(qs_env%scf_control, scf_control))
THEN
1168 DEALLOCATE (qs_env%scf_control)
1171 qs_env%scf_control => scf_control
1173 IF (
PRESENT(rel_control))
THEN
1174 IF (
ASSOCIATED(qs_env%rel_control))
THEN
1175 IF (.NOT.
ASSOCIATED(qs_env%rel_control, rel_control))
THEN
1177 DEALLOCATE (qs_env%rel_control)
1180 qs_env%rel_control => rel_control
1182 IF (
PRESENT(linres_control))
THEN
1183 IF (
ASSOCIATED(qs_env%linres_control))
THEN
1184 IF (.NOT.
ASSOCIATED(qs_env%linres_control, linres_control))
THEN
1186 DEALLOCATE (qs_env%linres_control)
1189 qs_env%linres_control => linres_control
1192 IF (
PRESENT(rho_external))
THEN
1193 IF (
ASSOCIATED(qs_env%rho_external))
THEN
1194 IF (.NOT.
ASSOCIATED(qs_env%rho_external, rho_external))
THEN
1196 DEALLOCATE (qs_env%rho_external)
1199 qs_env%rho_external => rho_external
1201 IF (
PRESENT(external_vxc)) qs_env%external_vxc => external_vxc
1202 IF (
PRESENT(mask)) qs_env%mask => mask
1204 IF (
PRESENT(embed_pot)) qs_env%embed_pot => embed_pot
1205 IF (
PRESENT(spin_embed_pot)) qs_env%spin_embed_pot => spin_embed_pot
1208 IF (
PRESENT(polar_env)) qs_env%polar_env => polar_env
1210 IF (
PRESENT(qs_charges))
THEN
1211 IF (
ASSOCIATED(qs_env%qs_charges))
THEN
1212 IF (.NOT.
ASSOCIATED(qs_env%qs_charges, qs_charges))
THEN
1214 DEALLOCATE (qs_env%qs_charges)
1217 qs_env%qs_charges => qs_charges
1219 IF (
PRESENT(ks_qmmm_env))
THEN
1220 IF (
ASSOCIATED(qs_env%ks_qmmm_env))
THEN
1221 IF (.NOT.
ASSOCIATED(qs_env%ks_qmmm_env, ks_qmmm_env))
THEN
1223 DEALLOCATE (qs_env%ks_qmmm_env)
1226 qs_env%ks_qmmm_env => ks_qmmm_env
1228 IF (
PRESENT(ks_env))
THEN
1229 IF (
ASSOCIATED(qs_env%ks_env))
THEN
1230 IF (.NOT.
ASSOCIATED(qs_env%ks_env, ks_env))
THEN
1232 DEALLOCATE (qs_env%ks_env)
1235 qs_env%ks_env => ks_env
1237 IF (
PRESENT(wf_history))
THEN
1240 qs_env%wf_history => wf_history
1242 IF (
PRESENT(scf_env))
THEN
1243 IF (
ASSOCIATED(qs_env%scf_env))
THEN
1244 IF (.NOT.
ASSOCIATED(qs_env%scf_env, scf_env))
THEN
1246 DEALLOCATE (qs_env%scf_env)
1249 qs_env%scf_env => scf_env
1251 IF (
PRESENT(xas_env))
THEN
1252 IF (
ASSOCIATED(qs_env%xas_env))
THEN
1253 IF (.NOT.
ASSOCIATED(qs_env%xas_env, xas_env))
THEN
1255 DEALLOCATE (qs_env%xas_env)
1258 qs_env%xas_env => xas_env
1260 IF (
PRESENT(mpools))
THEN
1263 qs_env%mpools => mpools
1265 IF (
PRESENT(rho_atom_set))
THEN
1266 CALL set_local_rho(qs_env%local_rho_set, rho_atom_set=rho_atom_set)
1268 IF (
PRESENT(rho0_atom_set))
THEN
1269 CALL set_local_rho(qs_env%local_rho_set, rho0_atom_set=rho0_atom_set)
1271 IF (
PRESENT(rho0_mpole))
THEN
1272 CALL set_local_rho(qs_env%local_rho_set, rho0_mpole=rho0_mpole)
1274 IF (
PRESENT(rhoz_set))
THEN
1277 IF (
PRESENT(rhoz_tot)) qs_env%local_rho_set%rhoz_tot = rhoz_tot
1278 IF (
PRESENT(ecoul_1c))
THEN
1281 IF (
PRESENT(input))
THEN
1284 qs_env%input => input
1286 IF (
PRESENT(cp_ddapc_env))
THEN
1287 IF (
ASSOCIATED(qs_env%cp_ddapc_env))
THEN
1288 IF (.NOT.
ASSOCIATED(qs_env%cp_ddapc_env, cp_ddapc_env))
THEN
1290 DEALLOCATE (qs_env%cp_ddapc_env)
1293 qs_env%cp_ddapc_env => cp_ddapc_env
1295 IF (
PRESENT(cp_ddapc_ewald))
THEN
1296 qs_env%cp_ddapc_ewald => cp_ddapc_ewald
1298 IF (
PRESENT(x_data)) qs_env%x_data => x_data
1300 IF (
PRESENT(dftb_potential)) qs_env%dftb_potential => dftb_potential
1301 IF (
PRESENT(se_taper))
THEN
1303 qs_env%se_taper => se_taper
1305 IF (
PRESENT(se_store_int_env))
THEN
1307 qs_env%se_store_int_env => se_store_int_env
1309 IF (
PRESENT(se_nddo_mpole))
THEN
1311 qs_env%se_nddo_mpole => se_nddo_mpole
1313 IF (
PRESENT(se_nonbond_env))
THEN
1314 IF (
ASSOCIATED(qs_env%se_nonbond_env))
THEN
1315 IF (.NOT.
ASSOCIATED(qs_env%se_nonbond_env, se_nonbond_env))
THEN
1317 DEALLOCATE (qs_env%se_nonbond_env)
1320 qs_env%se_nonbond_env => se_nonbond_env
1322 IF (
PRESENT(admm_env)) qs_env%admm_env => admm_env
1323 IF (
PRESENT(lri_env)) qs_env%lri_env => lri_env
1324 IF (
PRESENT(lri_density)) qs_env%lri_density => lri_density
1325 IF (
PRESENT(ec_env)) qs_env%ec_env => ec_env
1326 IF (
PRESENT(exstate_env)) qs_env%exstate_env => exstate_env
1327 IF (
PRESENT(dispersion_env)) qs_env%dispersion_env => dispersion_env
1328 IF (
PRESENT(gcp_env)) qs_env%gcp_env => gcp_env
1329 IF (
PRESENT(wanniercentres)) qs_env%WannierCentres => wanniercentres
1330 IF (
PRESENT(kpoints))
CALL set_ks_env(qs_env%ks_env, kpoints=kpoints)
1333 IF (
PRESENT(rhs)) qs_env%rhs => rhs
1335 IF (
PRESENT(force))
THEN
1354 CALL init_qs_env(qs_env, globenv=globenv)
1371 IF (
ASSOCIATED(qs_env%mos))
THEN
1372 DO i = 1,
SIZE(qs_env%mos)
1375 DEALLOCATE (qs_env%mos)
1377 IF (
ASSOCIATED(qs_env%mos_last_converged))
THEN
1378 DO i = 1,
SIZE(qs_env%mos_last_converged)
1381 DEALLOCATE (qs_env%mos_last_converged)
1384 IF (
ASSOCIATED(qs_env%mo_derivs))
THEN
1385 DO i = 1,
SIZE(qs_env%mo_derivs)
1386 CALL dbcsr_release_p(qs_env%mo_derivs(i)%matrix)
1388 DEALLOCATE (qs_env%mo_derivs)
1393 IF (
ASSOCIATED(qs_env%rtp))
THEN
1395 DEALLOCATE (qs_env%rtp)
1397 IF (
ASSOCIATED(qs_env%outer_scf_history))
THEN
1398 DEALLOCATE (qs_env%outer_scf_history)
1399 qs_env%outer_scf_ihistory = 0
1401 IF (
ASSOCIATED(qs_env%gradient_history)) &
1402 DEALLOCATE (qs_env%gradient_history)
1403 IF (
ASSOCIATED(qs_env%variable_history)) &
1404 DEALLOCATE (qs_env%variable_history)
1406 IF (
ASSOCIATED(qs_env%local_rho_set))
THEN
1409 IF (
ASSOCIATED(qs_env%hartree_local))
THEN
1412 IF (
ASSOCIATED(qs_env%scf_control))
THEN
1414 DEALLOCATE (qs_env%scf_control)
1416 IF (
ASSOCIATED(qs_env%rel_control))
THEN
1418 DEALLOCATE (qs_env%rel_control)
1421 IF (
ASSOCIATED(qs_env%linres_control))
THEN
1423 DEALLOCATE (qs_env%linres_control)
1426 IF (
ASSOCIATED(qs_env%almo_scf_env))
THEN
1430 IF (
ASSOCIATED(qs_env%ls_scf_env))
THEN
1433 IF (
ASSOCIATED(qs_env%molecular_scf_guess_env))
THEN
1435 DEALLOCATE (qs_env%molecular_scf_guess_env)
1438 IF (
ASSOCIATED(qs_env%transport_env))
THEN
1443 IF (
ASSOCIATED(qs_env%xas_env))
THEN
1445 DEALLOCATE (qs_env%xas_env)
1447 IF (
ASSOCIATED(qs_env%ewald_env))
THEN
1449 DEALLOCATE (qs_env%ewald_env)
1451 IF (
ASSOCIATED(qs_env%ewald_pw))
THEN
1453 DEALLOCATE (qs_env%ewald_pw)
1455 IF (
ASSOCIATED(qs_env%image_matrix))
THEN
1456 DEALLOCATE (qs_env%image_matrix)
1458 IF (
ASSOCIATED(qs_env%ipiv))
THEN
1459 DEALLOCATE (qs_env%ipiv)
1461 IF (
ASSOCIATED(qs_env%image_coeff))
THEN
1462 DEALLOCATE (qs_env%image_coeff)
1465 IF (
ASSOCIATED(qs_env%rho_external))
THEN
1467 DEALLOCATE (qs_env%rho_external)
1469 IF (
ASSOCIATED(qs_env%external_vxc))
THEN
1470 CALL qs_env%external_vxc%release()
1471 DEALLOCATE (qs_env%external_vxc)
1473 IF (
ASSOCIATED(qs_env%mask))
THEN
1474 CALL qs_env%mask%release()
1475 DEALLOCATE (qs_env%mask)
1477 IF (
ASSOCIATED(qs_env%active_space))
THEN
1481 IF (qs_env%given_embed_pot)
THEN
1482 CALL qs_env%embed_pot%release()
1483 DEALLOCATE (qs_env%embed_pot)
1484 IF (
ASSOCIATED(qs_env%spin_embed_pot))
THEN
1485 CALL qs_env%spin_embed_pot%release()
1486 DEALLOCATE (qs_env%spin_embed_pot)
1493 IF (
ASSOCIATED(qs_env%qs_charges))
THEN
1495 DEALLOCATE (qs_env%qs_charges)
1497 IF (
ASSOCIATED(qs_env%ks_env))
THEN
1499 DEALLOCATE (qs_env%ks_env)
1501 IF (
ASSOCIATED(qs_env%ks_qmmm_env))
THEN
1503 DEALLOCATE (qs_env%ks_qmmm_env)
1506 IF (
ASSOCIATED(qs_env%scf_env))
THEN
1508 DEALLOCATE (qs_env%scf_env)
1512 IF (
ASSOCIATED(qs_env%cp_ddapc_env))
THEN
1514 DEALLOCATE (qs_env%cp_ddapc_env)
1518 IF (
ASSOCIATED(qs_env%x_data))
THEN
1521 IF (
ASSOCIATED(qs_env%et_coupling))
THEN
1524 IF (
ASSOCIATED(qs_env%dftb_potential))
THEN
1527 IF (
ASSOCIATED(qs_env%se_taper))
THEN
1530 IF (
ASSOCIATED(qs_env%se_store_int_env))
THEN
1533 IF (
ASSOCIATED(qs_env%se_nddo_mpole))
THEN
1536 IF (
ASSOCIATED(qs_env%se_nonbond_env))
THEN
1538 DEALLOCATE (qs_env%se_nonbond_env)
1540 IF (
ASSOCIATED(qs_env%admm_env))
THEN
1543 IF (
ASSOCIATED(qs_env%lri_env))
THEN
1545 DEALLOCATE (qs_env%lri_env)
1547 IF (
ASSOCIATED(qs_env%lri_density))
THEN
1549 DEALLOCATE (qs_env%lri_density)
1551 IF (
ASSOCIATED(qs_env%ec_env))
THEN
1554 IF (
ASSOCIATED(qs_env%exstate_env))
THEN
1557 IF (
ASSOCIATED(qs_env%mp2_env))
THEN
1559 DEALLOCATE (qs_env%mp2_env)
1560 NULLIFY (qs_env%mp2_env)
1562 IF (
ASSOCIATED(qs_env%bs_env))
THEN
1565 IF (
ASSOCIATED(qs_env%kg_env))
THEN
1572 IF (
ASSOCIATED(qs_env%gcp_env))
THEN
1576 IF (
ASSOCIATED(qs_env%WannierCentres))
THEN
1577 DO i = 1,
SIZE(qs_env%WannierCentres)
1578 DEALLOCATE (qs_env%WannierCentres(i)%WannierHamDiag)
1579 DEALLOCATE (qs_env%WannierCentres(i)%centres)
1581 DEALLOCATE (qs_env%WannierCentres)
1584 IF (
ASSOCIATED(qs_env%rhs))
DEALLOCATE (qs_env%rhs)
1599 IF (
ASSOCIATED(qs_env%mos_last_converged))
THEN
1600 DO i = 1,
SIZE(qs_env%mos_last_converged)
1603 DEALLOCATE (qs_env%mos_last_converged)
1606 IF (
ASSOCIATED(qs_env%mo_derivs))
THEN
1607 DO i = 1,
SIZE(qs_env%mo_derivs)
1608 CALL dbcsr_release_p(qs_env%mo_derivs(i)%matrix)
1610 DEALLOCATE (qs_env%mo_derivs)
1615 IF (
ASSOCIATED(qs_env%rtp))
THEN
1617 DEALLOCATE (qs_env%rtp)
1619 IF (
ASSOCIATED(qs_env%outer_scf_history))
THEN
1620 DEALLOCATE (qs_env%outer_scf_history)
1621 qs_env%outer_scf_ihistory = 0
1623 IF (
ASSOCIATED(qs_env%gradient_history)) &
1624 DEALLOCATE (qs_env%gradient_history)
1625 IF (
ASSOCIATED(qs_env%variable_history)) &
1626 DEALLOCATE (qs_env%variable_history)
1628 IF (
ASSOCIATED(qs_env%local_rho_set))
THEN
1631 IF (
ASSOCIATED(qs_env%hartree_local))
THEN
1634 IF (
ASSOCIATED(qs_env%scf_control))
THEN
1636 DEALLOCATE (qs_env%scf_control)
1638 IF (
ASSOCIATED(qs_env%rel_control))
THEN
1640 DEALLOCATE (qs_env%rel_control)
1643 IF (
ASSOCIATED(qs_env%linres_control))
THEN
1645 DEALLOCATE (qs_env%linres_control)
1648 IF (
ASSOCIATED(qs_env%almo_scf_env))
THEN
1652 IF (
ASSOCIATED(qs_env%ls_scf_env))
THEN
1655 IF (
ASSOCIATED(qs_env%molecular_scf_guess_env))
THEN
1657 DEALLOCATE (qs_env%molecular_scf_guess_env)
1660 IF (
ASSOCIATED(qs_env%transport_env))
THEN
1665 IF (
ASSOCIATED(qs_env%xas_env))
THEN
1667 DEALLOCATE (qs_env%xas_env)
1669 IF (
ASSOCIATED(qs_env%ewald_env))
THEN
1671 DEALLOCATE (qs_env%ewald_env)
1673 IF (
ASSOCIATED(qs_env%ewald_pw))
THEN
1675 DEALLOCATE (qs_env%ewald_pw)
1677 IF (
ASSOCIATED(qs_env%image_matrix))
THEN
1678 DEALLOCATE (qs_env%image_matrix)
1680 IF (
ASSOCIATED(qs_env%ipiv))
THEN
1681 DEALLOCATE (qs_env%ipiv)
1683 IF (
ASSOCIATED(qs_env%image_coeff))
THEN
1684 DEALLOCATE (qs_env%image_coeff)
1687 IF (
ASSOCIATED(qs_env%rho_external))
THEN
1689 DEALLOCATE (qs_env%rho_external)
1691 IF (
ASSOCIATED(qs_env%external_vxc))
THEN
1692 CALL qs_env%external_vxc%release()
1693 DEALLOCATE (qs_env%external_vxc)
1695 IF (
ASSOCIATED(qs_env%mask))
THEN
1696 CALL qs_env%mask%release()
1697 DEALLOCATE (qs_env%mask)
1699 IF (
ASSOCIATED(qs_env%active_space))
THEN
1703 IF (qs_env%given_embed_pot)
THEN
1704 CALL qs_env%embed_pot%release()
1705 DEALLOCATE (qs_env%embed_pot)
1706 IF (
ASSOCIATED(qs_env%spin_embed_pot))
THEN
1707 CALL qs_env%spin_embed_pot%release()
1708 DEALLOCATE (qs_env%spin_embed_pot)
1715 IF (
ASSOCIATED(qs_env%qs_charges))
THEN
1717 DEALLOCATE (qs_env%qs_charges)
1720 IF (
ASSOCIATED(qs_env%ks_qmmm_env))
THEN
1722 DEALLOCATE (qs_env%ks_qmmm_env)
1725 IF (
ASSOCIATED(qs_env%scf_env))
THEN
1727 DEALLOCATE (qs_env%scf_env)
1729 IF (
ASSOCIATED(qs_env%cp_ddapc_env))
THEN
1731 DEALLOCATE (qs_env%cp_ddapc_env)
1735 IF (
ASSOCIATED(qs_env%x_data))
THEN
1738 IF (
ASSOCIATED(qs_env%et_coupling))
THEN
1741 IF (
ASSOCIATED(qs_env%dftb_potential))
THEN
1744 IF (
ASSOCIATED(qs_env%se_taper))
THEN
1747 IF (
ASSOCIATED(qs_env%se_store_int_env))
THEN
1750 IF (
ASSOCIATED(qs_env%se_nddo_mpole))
THEN
1753 IF (
ASSOCIATED(qs_env%se_nonbond_env))
THEN
1755 DEALLOCATE (qs_env%se_nonbond_env)
1757 IF (
ASSOCIATED(qs_env%admm_env))
THEN
1760 IF (
ASSOCIATED(qs_env%lri_env))
THEN
1762 DEALLOCATE (qs_env%lri_env)
1764 IF (
ASSOCIATED(qs_env%lri_density))
THEN
1766 DEALLOCATE (qs_env%lri_density)
1768 IF (
ASSOCIATED(qs_env%ec_env))
THEN
1771 IF (
ASSOCIATED(qs_env%exstate_env))
THEN
1774 IF (
ASSOCIATED(qs_env%mp2_env))
THEN
1776 DEALLOCATE (qs_env%mp2_env)
1777 NULLIFY (qs_env%mp2_env)
1779 IF (
ASSOCIATED(qs_env%kg_env))
THEN
1786 IF (
ASSOCIATED(qs_env%gcp_env))
THEN
1790 IF (
ASSOCIATED(qs_env%WannierCentres))
THEN
1791 DO i = 1,
SIZE(qs_env%WannierCentres)
1792 DEALLOCATE (qs_env%WannierCentres(i)%WannierHamDiag)
1793 DEALLOCATE (qs_env%WannierCentres(i)%centres)
1795 DEALLOCATE (qs_env%WannierCentres)
1798 IF (
ASSOCIATED(qs_env%rhs))
DEALLOCATE (qs_env%rhs)
Types and set/get functions for auxiliary density matrix methods.
subroutine, public admm_env_release(admm_env)
releases the ADMM environment, cleans up all types
Types for all ALMO-based methods.
subroutine, public almo_scf_env_release(almo_scf_env)
release the almo scf envirnoment
Define the atomic kind types and their sub types.
Holds information on atomic properties.
Handles all functions related to the CELL.
subroutine, public cell_release(cell)
releases the given cell (see doc/ReferenceCounting.html)
subroutine, public cell_retain(cell)
retains the given cell (see doc/ReferenceCounting.html)
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
contains information regarding the decoupling/recoupling method of Bloechl
subroutine, public cp_ddapc_release(cp_ddapc_env)
...
subroutine, public cp_ddapc_ewald_release(cp_ddapc_ewald)
...
represent a full matrix distributed on many processors
set of type/routines to handle the storage of results in force_envs
types that represent a subsys, i.e. a part of the system
stores a lists of integer that are local to a processor. The idea is that these integers represent ob...
stores a mapping of 2D info (e.g. matrix) on a 2D processor distribution (i.e. blacs grid) where cpus...
Types needed for a linear scaling quickstep SCF run based on the density matrix.
subroutine, public ls_scf_release(ls_scf_env)
release the LS type.
Types needed for a for a Energy Correction.
subroutine, public ec_env_release(ec_env)
...
Definition and initialisation of the et_coupling data type.
subroutine, public et_coupling_release(et_coupling)
...
calculates the electron transfer coupling elements Wu, Van Voorhis, JCP 125, 164105 (2006)
subroutine, public ewald_env_release(ewald_env)
releases the given ewald_env (see doc/ReferenceCounting.html)
subroutine, public ewald_pw_release(ewald_pw)
releases the memory used by the ewald_pw
Types for excited states potential energies.
subroutine, public exstate_release(ex_env)
...
subroutine, public fist_nonbond_env_release(fist_nonbond_env)
releases the given fist_nonbond_env (see doc/ReferenceCounting.html)
Define type storing the global information of a run. Keep the amount of stored data small....
subroutine, public get_hartree_local(hartree_local, ecoul_1c)
...
subroutine, public set_hartree_local(hartree_local, ecoul_1c)
...
subroutine, public hartree_local_release(hartree_local)
...
subroutine, public hartree_local_create(hartree_local)
...
Types and set/get functions for HFX.
subroutine, public hfx_release(x_data)
This routine deallocates all data structures
Types needed for a Kim-Gordon-like partitioning into molecular subunits.
subroutine, public kg_env_release(kg_env)
...
Defines the basic variable types.
integer, parameter, public dp
Types and basic routines needed for a kpoint calculation.
contains the types and subroutines for dealing with the lri_env lri : local resolution of the identit...
subroutine, public lri_density_release(lri_density)
releases the given lri_density
subroutine, public lri_env_release(lri_env)
releases the given lri_env
Interface to the message passing library MPI.
Define the molecule kind structure types and the corresponding functionality.
Define the data structure for the molecule information.
Types needed for MP2 calculations.
subroutine, public mp2_env_release(mp2_env)
...
Types used to generate the molecular SCF guess.
subroutine, public molecular_scf_guess_env_destroy(env)
Destroyes both data and environment.
Define the data structure for the particle information.
subroutine, public bs_env_release(bs_env)
...
container for various plainwaves related things
The types needed for the calculation of active space Hamiltonians.
subroutine, public release_active_space_type(active_space_env)
Releases all quantities in the active space environment.
container for information about total charges on the grids
subroutine, public qs_charges_release(qs_charges)
releases the charges object (see cp2k/doc/ReferenceCounting.html)
Definition of the DFTB parameter types.
subroutine, public qs_dftb_pairpot_release(pairpot)
...
Definition of disperson types for DFT calculations.
subroutine, public qs_dispersion_release(dispersion_env)
...
subroutine, public qs_env_release(qs_env)
releases the given qs_env (see doc/ReferenceCounting.html)
subroutine, public set_qs_env(qs_env, super_cell, mos, qmmm, qmmm_periodic, ewald_env, ewald_pw, mpools, rho_external, external_vxc, mask, scf_control, rel_control, qs_charges, ks_env, ks_qmmm_env, wf_history, scf_env, active_space, input, oce, rho_atom_set, rho0_atom_set, rho0_mpole, run_rtp, rtp, rhoz_set, rhoz_tot, ecoul_1c, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, efield, linres_control, xas_env, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, ls_scf_env, do_transport, transport_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, gcp_env, mp2_env, bs_env, kg_env, force, kpoints, wanniercentres, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, rhs)
Set the QUICKSTEP environment.
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, ecoul_1c, rho0_s_rs, rho0_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, rhs)
Get the QUICKSTEP environment.
subroutine, public qs_env_part_release(qs_env)
releases part of the given qs_env in order to save memory
subroutine, public qs_env_create(qs_env, globenv)
allocates and intitializes a qs_env
Definition of gCP types for DFT calculations.
subroutine, public qs_gcp_release(gcp_env)
...
Define the quickstep kind type and their sub types.
subroutine, public qs_ks_qmmm_release(ks_qmmm_env)
releases the ks_qmmm_env (see doc/ReferenceCounting.html)
subroutine, public qs_ks_release(ks_env)
releases the ks_env (see doc/ReferenceCounting.html)
subroutine, public set_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_ks_im_kp, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, kpoints, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, task_list, task_list_soft, subsys, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env)
...
subroutine, public get_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_ks_im_kp, rho, rho_xc, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, task_list, task_list_soft, kpoints, do_kpoints, atomic_kind_set, qs_kind_set, cell, cell_ref, use_ref_cell, particle_set, energy, force, local_particles, local_molecules, molecule_kind_set, molecule_set, subsys, cp_subsys, virial, results, atprop, nkind, natom, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env, nelectron_total, nelectron_spin)
...
subroutine, public qs_ks_part_release(ks_env)
releases part of the ks_env
Type definitiona for linear response calculations.
subroutine, public polar_env_release(polar_env)
Deallocate the polar environment.
subroutine, public linres_control_release(linres_control)
...
subroutine, public local_rho_set_create(local_rho_set)
...
subroutine, public local_rho_set_release(local_rho_set)
...
subroutine, public set_local_rho(local_rho_set, rho_atom_set, rho0_atom_set, rho0_mpole, rhoz_set)
...
subroutine, public get_local_rho(local_rho_set, rho_atom_set, rho0_atom_set, rho0_mpole, rhoz_set)
...
wrapper for the pools of matrixes
subroutine, public mpools_release(mpools)
releases the given mpools
subroutine, public mpools_retain(mpools)
retains the given qs_matrix_pools_type
Definition and initialisation of the mo data type.
subroutine, public deallocate_mo_set(mo_set)
Deallocate a wavefunction data structure.
Define the neighbor list data types and the corresponding functionality.
subroutine, public deallocate_oce_set(oce_set)
Deallocate the matrix set of oce coefficients.
type for berry phase efield matrices. At the moment only used for cosmat and sinmat
subroutine, public efield_berry_release(efield)
...
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_release(rho_struct)
releases a rho_struct by decreasing the reference count by one and deallocating if it reaches 0 (to b...
module that contains the definitions of the scf types
subroutine, public scf_env_release(scf_env)
releases an scf_env (see doc/ReferenceCounting.html)
types that represent a quickstep subsys
subroutine, public qs_subsys_set(subsys, cp_subsys, local_particles, local_molecules, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, nelectron_total, nelectron_spin)
...
interpolate the wavefunctions to speed up the convergence when doing MD
subroutine, public wfi_retain(wf_history)
retains a wf history (see doc/ReferenceCounting.html)
subroutine, public wfi_release(wf_history)
releases a wf_history of a wavefunction (see doc/ReferenceCounting.html)
parameters that control a relativistic calculation
subroutine, public rel_c_release(rel_control)
releases the given rel_control (see cp2k/doc/ReferenceCounting.html)
Types and set_get for real time propagation depending on runtype and diagonalization method different...
subroutine, public rt_prop_release(rtp)
...
parameters that control an scf iteration
subroutine, public scf_c_release(scf_control)
releases the given scf_control (see cp2k/doc/ReferenceCounting.html)
Definition of the semi empirical multipole integral expansions types.
subroutine, public nddo_mpole_release(nddo_mpole)
Deallocate NDDO multipole type.
Type to store integrals for semi-empirical calculations.
subroutine, public semi_empirical_si_release(store_int_env)
Deallocate the semi-empirical store integrals type.
Definition of the semi empirical parameter types.
subroutine, public se_taper_release(se_taper)
Releases the taper type used in SE calculations.
CP2K transport environment and related C-interoperable types.
subroutine, public transport_env_release(transport_env)
releases the transport_env
defines the type needed for computing wannier states expectations
define create destroy get and put information in xas_env to calculate the x-ray absorption spectra
subroutine, public xas_env_release(xas_env)
...
stores some data used in wavefunction fitting
Provides all information about an atomic kind.
type for the atomic properties
Type defining parameters related to the simulation cell.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
contains arbitrary information which need to be stored
represents a system: atoms, molecules, their pos,vel,...
structure to store local (to a processor) ordered lists of integers.
distributes pairs on a 2d grid of processors
Contains information on the energy correction functional for KG.
to build arrays of pointers
Contains information on the excited states energy.
contains the initially parsed file and the initial parallel environment
stores some data used in construction of Kohn-Sham matrix
Contains all the info needed for KG runs...
Contains information about kpoints.
stores all the informations relevant to an mpi environment
contained for different pw related things
Container for information about total charges on the grids.
Provides all information about a quickstep kind.
calculation environment to calculate the ks_qmmm matrix, holds the QM/MM potential and all the needed...
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
General settings for linear response calculations.
container for the pools of matrixes used by qs
keeps the density in various representations, keeping track of which ones are valid.
keeps track of the previous wavefunctions and can extrapolate them for the next step of md
contains the parameters needed by a relativistic calculation
Global Multipolar NDDO information type.
Semi-empirical store integrals type.
Taper type use in semi-empirical calculations.