63#include "./base/base_uses.f90"
70 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'optbas_frontier_orbital_screening'
72 TYPE frontier_orbital_screening_candidate_type
73 REAL(KIND=
dp) :: condition_number = 0.0_dp
74 REAL(KIND=
dp) :: gap = 0.0_dp
75 REAL(KIND=
dp) :: energy = 0.0_dp
76 TYPE(basis_optimization_type) :: opt_bas
77 END TYPE frontier_orbital_screening_candidate_type
99 DIMENSION(:),
INTENT(IN),
OPTIONAL,
TARGET :: reference
115 optimize_basis_driver)
124 INTEGER,
PARAMETER :: number_parameter_sets = 5
125 REAL(kind=
dp),
DIMENSION(6, number_parameter_sets),
PARAMETER :: &
126 pre_tabulated_parameters = reshape( &
127 [10.0_dp, 10.0_dp, 10.0_dp, 10.0_dp, 0.001_dp, 0.001_dp, &
128 30.0_dp, 30.0_dp, 30.0_dp, 10.0_dp, 0.001_dp, 0.001_dp, &
129 10.0_dp, 30.0_dp, 30.0_dp, 10.0_dp, 0.001_dp, 0.001_dp, &
130 10.0_dp, 30.0_dp, 30.0_dp, 3.0_dp, 0.001_dp, 0.001_dp, &
131 10.0_dp, 30.0_dp, 30.0_dp, 10.0_dp, 0.001_dp, 0.01_dp], &
132 [6, number_parameter_sets])
134 CHARACTER(LEN=default_path_length) :: final_basis_file, main_dir
135 INTEGER :: i, n_candidates, unit_nr
136 REAL(kind=
dp) :: initial_condition_number, initial_energy, initial_gap, &
137 reference_condition_number, reference_energy, reference_gap
140 ALLOCATABLE,
DIMENSION(:),
TARGET :: reference
141 TYPE(frontier_orbital_screening_candidate_type),
ALLOCATABLE, &
142 DIMENSION(:) :: candidates
146 CALL check_frontier_orbital_screening_input(section)
147 CALL section_vals_val_get(frontier_screening_section,
"NUMBER_OF_OPTIMIZATIONS", i_val=n_candidates)
148 IF (n_candidates < 1 .OR. n_candidates > number_parameter_sets)
THEN
149 CALL cp_abort(__location__, &
150 "NUMBER_OF_OPTIMIZATIONS must be between 1 and "// &
155 ALLOCATE (candidates(n_candidates), reference(1))
160 CALL run_frontier_orbital_reference_scf(section, para_env, globenv, reference(1), &
161 reference_gap, reference_energy, &
162 reference_condition_number)
164 DO i = 1, n_candidates
166 quiet_output=.true., embedded_training=.true.)
168 cpabort(
"Internal error while initializing FRONTIER_ORBITAL_SCREENING")
170 IF (candidates(i)%opt_bas%ntraining_sets /= 1 .OR. candidates(i)%opt_bas%ncombinations /= 1)
THEN
171 CALL cp_abort(__location__, &
172 "FRONTIER_ORBITAL_SCREENING currently supports exactly one training system "// &
173 "and one candidate basis assignment")
177 final_basis_file = work_path(main_dir, candidates(i)%opt_bas%output_basis_file)
178 IF (unit_nr > 0)
THEN
179 WRITE (unit_nr,
'(A)')
""
180 WRITE (unit_nr,
'(1X,A)') repeat(
"=", 79)
181 WRITE (unit_nr,
'(1X,A)')
"Optimize basis set to improve frontier orbitals:"
182 WRITE (unit_nr,
'(1X,A)')
"Using pre-tabulated parameters in the optimization"
183 WRITE (unit_nr,
'(1X,A)') repeat(
"=", 79)
184 WRITE (unit_nr,
'(A)')
" "
189 candidates(i)%opt_bas%use_condition_number = .true.
190 candidates(i)%opt_bas%write_frequency = 5000
191 candidates(i)%opt_bas%fval_weight = 1.0_dp
192 candidates(i)%opt_bas%occupied_weight = pre_tabulated_parameters(1, i)
193 candidates(i)%opt_bas%virtual_weight = pre_tabulated_parameters(2, i)
194 candidates(i)%opt_bas%empty_overlap_weight = pre_tabulated_parameters(3, i)
195 candidates(i)%opt_bas%gap_weight = pre_tabulated_parameters(4, i)
196 candidates(i)%opt_bas%condition_weight = pre_tabulated_parameters(5, i)
197 candidates(i)%opt_bas%coefficient_weight = pre_tabulated_parameters(6, i)
198 candidates(i)%opt_bas%gap_energy_scale = 1.0_dp/
evolt
199 candidates(i)%opt_bas%virtual_energy_cutoff = 3.0_dp/
evolt
200 candidates(i)%opt_bas%virtual_energy_smoothing = 0.2_dp/
evolt
201 IF (unit_nr > 0)
THEN
202 WRITE (unit_nr,
'(1X,A,I0,A,I0,A)')
"Candidate ", i,
" of ", n_candidates, &
203 ": optimizing basis set ..."
205 CALL optimize_basis_driver(candidates(i)%opt_bas, input_declaration, para_env, globenv, &
206 training_input=section, reference=reference)
209 CALL run_frontier_orbital_scf(candidates(1)%opt_bas, section, para_env, globenv, &
210 optimized_basis=.false., &
211 gap=initial_gap, energy=initial_energy, &
212 condition_number=initial_condition_number)
214 DO i = 1, n_candidates
215 CALL run_frontier_orbital_scf(candidates(i)%opt_bas, section, para_env, globenv, &
216 optimized_basis=.true., &
217 gap=candidates(i)%gap, energy=candidates(i)%energy, &
218 condition_number=candidates(i)%condition_number)
221 CALL write_frontier_orbital_basis_file(final_basis_file, candidates, &
222 reference_gap, reference_energy, reference_condition_number, para_env)
223 CALL print_frontier_orbital_summary(unit_nr, final_basis_file, section, candidates, &
224 reference_gap, reference_energy, reference_condition_number, &
225 initial_gap, initial_energy, initial_condition_number)
227 DO i = 1, n_candidates
231 DEALLOCATE (candidates, reference)
239 SUBROUTINE check_frontier_orbital_screening_input(section)
242 INTEGER :: method, nforce_eval, ntraining
243 LOGICAL :: dft_explicit, keyword_explicit
245 optbas_section, training_section
249 CALL reject_controlled_keyword(optbas_section,
"BASIS_WORK_FILE")
250 CALL reject_controlled_keyword(optbas_section,
"WRITE_FREQUENCY")
251 CALL reject_controlled_keyword(optbas_section,
"USE_CONDITION_NUMBER")
252 CALL reject_controlled_keyword(optbas_section,
"RESIDUUM_WEIGHT")
253 CALL reject_controlled_keyword(optbas_section,
"CONDITION_WEIGHT")
254 CALL reject_controlled_keyword(optbas_section,
"BASIS_COMBINATIONS")
255 CALL reject_controlled_keyword(optbas_section,
"GROUP_PARTITION")
257 IF (.NOT. keyword_explicit)
THEN
258 cpabort(
"FRONTIER_ORBITAL_SCREENING requires BASIS_TEMPLATE_FILE")
263 IF (ntraining /= 0)
CALL controlled_parameter_error(
"TRAINING_FILES")
267 IF (nforce_eval /= 1)
THEN
268 CALL cp_abort(__location__, &
269 "FRONTIER_ORBITAL_SCREENING requires exactly one FORCE_EVAL in the same input")
272 IF (method /=
do_qs)
THEN
273 cpabort(
"FRONTIER_ORBITAL_SCREENING requires a Quickstep FORCE_EVAL")
277 IF (.NOT. dft_explicit)
THEN
278 CALL cp_abort(__location__, &
279 "FRONTIER_ORBITAL_SCREENING requires an explicit FORCE_EVAL%DFT section")
281 END SUBROUTINE check_frontier_orbital_screening_input
288 SUBROUTINE reject_controlled_keyword(section, keyword_name)
290 CHARACTER(LEN=*),
INTENT(IN) :: keyword_name
295 IF (explicit)
CALL controlled_parameter_error(
"OPTIMIZE_BASIS%"//trim(keyword_name))
297 END SUBROUTINE reject_controlled_keyword
303 SUBROUTINE controlled_parameter_error(parameter_name)
304 CHARACTER(LEN=*),
INTENT(IN) :: parameter_name
306 CALL cp_abort(__location__, &
307 trim(parameter_name)//
" is not allowed together with FRONTIER_ORBITAL_SCREENING "// &
308 "because it is overwritten automatically")
310 END SUBROUTINE controlled_parameter_error
322 SUBROUTINE run_frontier_orbital_reference_scf(section, para_env, globenv, reference, &
323 gap, energy, condition_number)
328 INTENT(OUT) :: reference
329 REAL(kind=
dp),
INTENT(OUT) :: gap, energy, condition_number
331 INTEGER :: outer_print_level
336 NULLIFY (input_file, logger, qs_env)
347 "FORCE_EVAL%DFT%SCF%PRINT%RESTART%_SECTION_PARAMETERS_", &
350 "FORCE_EVAL%DFT%SCF%PRINT%RESTART_HISTORY%_SECTION_PARAMETERS_", &
353 outer_print_level = logger%iter_info%print_level
355 CALL create_silent_qs_env(input_file, para_env, globenv, qs_env)
357 CALL get_frontier_orbital_scf_result(qs_env, gap, energy, condition_number)
361 logger%iter_info%print_level = outer_print_level
364 END SUBROUTINE run_frontier_orbital_reference_scf
377 SUBROUTINE run_frontier_orbital_scf(opt_bas, section, para_env, globenv, &
378 optimized_basis, gap, energy, condition_number)
383 LOGICAL,
INTENT(IN) :: optimized_basis
384 REAL(kind=
dp),
INTENT(OUT) :: gap, energy, condition_number
386 INTEGER :: outer_print_level
391 NULLIFY (input_file, logger, qs_env)
394 condition_number = 0.0_dp
396 CALL prepare_frontier_orbital_scf_input(input_file, opt_bas)
398 outer_print_level = logger%iter_info%print_level
400 CALL create_silent_qs_env(input_file, para_env, globenv, qs_env)
403 CALL get_frontier_orbital_scf_result(qs_env, gap, energy, condition_number)
406 logger%iter_info%print_level = outer_print_level
409 END SUBROUTINE run_frontier_orbital_scf
418 SUBROUTINE create_silent_qs_env(input_file, para_env, globenv, qs_env)
430 CALL qs_init(qs_env, para_env, input_file, globenv=globenv, &
431 force_env_section=force_env_section, subsys_section=subsys_section, &
432 use_motion_section=.true., silent=.true.)
434 END SUBROUTINE create_silent_qs_env
443 SUBROUTINE get_frontier_orbital_scf_result(qs_env, gap, energy, condition_number)
445 REAL(kind=
dp),
INTENT(OUT) :: gap, energy, condition_number
448 REAL(kind=
dp),
DIMENSION(2) :: condnum
449 REAL(kind=
dp),
DIMENSION(:),
POINTER :: eigenvalues
456 NULLIFY (blacs_env, eigenvalues, matrix_s, mos,
qs_energy, smat)
460 ALLOCATE (smat(1, 1))
461 smat(1, 1)%matrix => matrix_s(1)%matrix
462 CALL overlap_condnum(smat, condnum, -1, .false., .true., .false., blacs_env)
463 condition_number = condnum(2)
465 IF (
SIZE(mos) /= 1)
THEN
466 cpabort(
"FRONTIER_ORBITAL_SCREENING requires a restricted calculation")
468 CALL get_mo_set(mos(1), homo=homo, nmo=nmo, eigenvalues=eigenvalues)
469 IF (homo < 1 .OR. homo >= nmo)
THEN
470 cpabort(
"FRONTIER_ORBITAL_SCREENING could not determine a HOMO-LUMO gap")
472 gap = eigenvalues(homo + 1) - eigenvalues(homo)
474 END SUBROUTINE get_frontier_orbital_scf_result
481 SUBROUTINE prepare_frontier_orbital_scf_input(input_file, opt_bas)
485 CHARACTER(LEN=default_string_length) :: element
486 CHARACTER(LEN=default_string_length), &
487 DIMENSION(:),
POINTER :: basis_info
488 INTEGER :: ifit, ikind, nbasis_files, nkinds
489 LOGICAL :: element_explicit, found
495 "FORCE_EVAL%DFT%SCF%PRINT%RESTART%_SECTION_PARAMETERS_", &
498 "FORCE_EVAL%DFT%SCF%PRINT%RESTART_HISTORY%_SECTION_PARAMETERS_", &
503 IF (nbasis_files < 1)
THEN
504 cpabort(
"The screening reference input has no basis-set file")
507 dft_section,
"BASIS_SET_FILE_NAME", i_rep_val=1, &
516 IF (element_explicit)
THEN
520 c_val=element, i_rep_section=ikind)
524 DO ifit = 1, opt_bas%nkind
525 IF (trim(element) == trim(opt_bas%kind_basis(ifit)%element))
THEN
528 i_rep_val=1, i_rep_section=ikind)
529 basis_info(
SIZE(basis_info)) = opt_bas%kind_basis(ifit)%flex_basis(0)%basis_name
534 IF (.NOT. found)
THEN
535 CALL cp_abort(__location__, &
536 "Every KIND in the screening reference input must have a corresponding "// &
537 "FIT_KIND: "//trim(element))
541 END SUBROUTINE prepare_frontier_orbital_scf_input
552 SUBROUTINE write_frontier_orbital_basis_file(filename, candidates, &
553 reference_gap, reference_energy, reference_condition_number, para_env)
554 CHARACTER(LEN=*),
INTENT(IN) :: filename
555 TYPE(frontier_orbital_screening_candidate_type), &
556 DIMENSION(:) :: candidates
557 REAL(kind=
dp),
INTENT(IN) :: reference_gap, reference_energy, &
558 reference_condition_number
561 INTEGER :: candidate, ibasis, ikind, unit_nr
563 IF (para_env%is_source())
THEN
564 CALL open_file(file_name=filename, file_status=
"UNKNOWN", file_action=
"WRITE", unit_number=unit_nr)
568 DO candidate = 1,
SIZE(candidates)
569 IF (unit_nr > 0)
THEN
570 WRITE (unit_nr,
'(A)')
"#"
571 WRITE (unit_nr,
'(A,I0)')
"# Optimized basis set ", candidate
572 WRITE (unit_nr,
'(A,F12.6,A)')
"# Reference HOMO-LUMO gap: ", reference_gap*
evolt,
" eV"
573 WRITE (unit_nr,
'(A,F12.6,A)')
"# Basis HOMO-LUMO gap: ", candidates(candidate)%gap*
evolt,
" eV"
574 WRITE (unit_nr,
'(A,F12.6,A)')
"# Absolute gap error: ", &
575 abs(candidates(candidate)%gap - reference_gap)*
evolt,
" eV"
576 WRITE (unit_nr,
'(A,ES15.6)')
"# Reference condition number: ", reference_condition_number
577 WRITE (unit_nr,
'(A,ES15.6)') &
578 "# Basis condition number: ", candidates(candidate)%condition_number
579 WRITE (unit_nr,
'(A,F22.12,A)')
"# Reference total energy: ", reference_energy,
" hartree"
580 WRITE (unit_nr,
'(A,F22.12,A)')
"# Basis total energy: ", candidates(candidate)%energy,
" hartree"
581 WRITE (unit_nr,
'(A)')
"#"
583 DO ikind = 1, candidates(candidate)%opt_bas%nkind
584 DO ibasis = 0, candidates(candidate)%opt_bas%kind_basis(ikind)%nbasis_deriv
585 candidates(candidate)%opt_bas%kind_basis(ikind)%flex_basis(ibasis)%basis_name = &
586 trim(candidates(candidate)%opt_bas%kind_basis(ikind)%flex_basis(ibasis)%basis_name)// &
588 CALL write_basis(candidates(candidate)%opt_bas%kind_basis(ikind)%flex_basis(ibasis), &
589 candidates(candidate)%opt_bas%kind_basis(ikind)%element, unit_nr)
593 IF (para_env%is_source())
CALL close_file(unit_number=unit_nr)
595 END SUBROUTINE write_frontier_orbital_basis_file
601 SUBROUTINE print_frontier_orbital_table_header(unit_nr)
602 INTEGER,
INTENT(IN) :: unit_nr
604 WRITE (unit_nr,
'(1X,A,T14,A,T24,A,T46,A,T59,A)') &
605 "Basis set",
"Gap / eV",
"Abs. error to",
"Condition",
"Total energy / Ha"
606 WRITE (unit_nr,
'(T24,A,T46,A)')
"ref. basis / meV",
"number"
608 END SUBROUTINE print_frontier_orbital_table_header
618 SUBROUTINE get_frontier_orbital_basis_sets(section, opt_bas, element_symbols, &
619 reference_basis_names, initial_basis_names)
622 CHARACTER(LEN=default_string_length), &
623 ALLOCATABLE,
DIMENSION(:),
INTENT(OUT) :: element_symbols, reference_basis_names, &
626 CHARACTER(LEN=default_string_length) :: element
627 CHARACTER(LEN=default_string_length), &
628 DIMENSION(:),
POINTER :: basis_info
629 INTEGER :: ifit, ikind, nkinds
630 LOGICAL :: element_explicit, found
637 ALLOCATE (element_symbols(opt_bas%nkind), reference_basis_names(opt_bas%nkind), &
638 initial_basis_names(opt_bas%nkind))
639 DO ifit = 1, opt_bas%nkind
644 IF (element_explicit)
THEN
648 c_val=element, i_rep_section=ikind)
651 IF (trim(element) == trim(opt_bas%kind_basis(ifit)%element))
THEN
654 i_rep_val=1, i_rep_section=ikind)
655 element_symbols(ifit) = opt_bas%kind_basis(ifit)%element
656 reference_basis_names(ifit) = basis_info(
SIZE(basis_info))
657 initial_basis_names(ifit) = opt_bas%kind_basis(ifit)%basis_name
662 IF (.NOT. found)
THEN
663 CALL cp_abort(__location__, &
664 "Could not find the reference basis set for fitted atom kind "// &
665 trim(opt_bas%kind_basis(ifit)%element))
669 END SUBROUTINE get_frontier_orbital_basis_sets
684 SUBROUTINE print_frontier_orbital_summary(unit_nr, filename, section, candidates, &
685 reference_gap, reference_energy, reference_condition_number, &
686 initial_gap, initial_energy, initial_condition_number)
687 INTEGER,
INTENT(IN) :: unit_nr
688 CHARACTER(LEN=*),
INTENT(IN) :: filename
690 TYPE(frontier_orbital_screening_candidate_type), &
691 DIMENSION(:),
INTENT(IN) :: candidates
692 REAL(kind=
dp),
INTENT(IN) :: reference_gap, reference_energy, reference_condition_number, &
693 initial_gap, initial_energy, initial_condition_number
695 CHARACTER(LEN=default_string_length), &
696 ALLOCATABLE,
DIMENSION(:) :: element_symbols, initial_basis_names, &
697 reference_basis_names
698 INTEGER :: candidate, separator
700 IF (unit_nr <= 0)
RETURN
701 separator = scan(trim(filename),
"/", back=.true.)
702 WRITE (unit_nr,
'(A)')
""
703 WRITE (unit_nr,
'(1X,A)') repeat(
"-", 79)
704 WRITE (unit_nr,
'(1X,A)') &
705 "SCF calcs. with ref. basis set, initial small and optimized basis sets"
706 WRITE (unit_nr,
'(1X,A)') repeat(
"-", 79)
707 WRITE (unit_nr,
'(A)')
""
708 CALL get_frontier_orbital_basis_sets(section, candidates(1)%opt_bas, element_symbols, &
709 reference_basis_names, initial_basis_names)
712 DEALLOCATE (element_symbols, reference_basis_names, initial_basis_names)
713 WRITE (unit_nr,
'(A)')
""
714 CALL print_frontier_orbital_table_header(unit_nr)
715 WRITE (unit_nr,
'(A)')
""
716 WRITE (unit_nr,
'(1X,A,T14,F8.3,T24,F16.1,T46,ES11.3,T59,F17.12)') &
717 "Reference", reference_gap*
evolt, 0.0_dp, reference_condition_number, reference_energy
718 WRITE (unit_nr,
'(1X,A,T14,F8.3,T24,F16.1,T46,ES11.3,T59,F17.12)') &
719 "Initial", initial_gap*
evolt, abs(initial_gap - reference_gap)*
evolt*1000.0_dp, &
720 initial_condition_number, initial_energy
721 DO candidate = 1,
SIZE(candidates)
722 WRITE (unit_nr,
'(1X,A,I0,T14,F8.3,T24,F16.1,T46,ES11.3,T59,F17.12)') &
723 "Basis ", candidate, candidates(candidate)%gap*
evolt, &
724 abs(candidates(candidate)%gap - reference_gap)*
evolt*1000.0_dp, &
725 candidates(candidate)%condition_number, candidates(candidate)%energy
727 WRITE (unit_nr,
'(A)')
""
728 WRITE (unit_nr,
'(1X,A)') repeat(
"-", 79)
729 WRITE (unit_nr,
'(A)')
""
730 WRITE (unit_nr,
'(1X,A,A)') &
731 "Basis set file containing all optimized basis sets: ", trim(filename(separator + 1:))
732 WRITE (unit_nr,
'(A)')
""
733 WRITE (unit_nr,
'(1X,A)') repeat(
"=", 79)
734 WRITE (unit_nr,
'(A)')
""
736 END SUBROUTINE print_frontier_orbital_summary
744 PURE FUNCTION work_path(directory, filename)
RESULT(path)
745 CHARACTER(LEN=*),
INTENT(IN) :: directory, filename
746 CHARACTER(LEN=default_path_length) :: path
750 n = len_trim(directory)
751 IF (filename(1:1) ==
"/")
THEN
753 ELSE IF (n == 0 .OR. directory(n:n) ==
"/")
THEN
754 path = trim(directory)//filename
756 path = trim(directory)//
"/"//filename
759 END FUNCTION work_path
methods related to the blacs parallel environment
Utility routines to open and close files. Tracking of preconnections.
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
character(len=default_path_length) function, public discover_file(file_name)
Checks various locations for a file name.
subroutine, public close_file(unit_number, file_status, keep_preconnection)
Close an open file given by its logical unit number. Optionally, keep the file and unit preconnected.
various routines to log and control the output. The idea is that decisions about where to log should ...
recursive integer function, public cp_logger_get_default_unit_nr(logger, local, skip_not_ionode)
asks the default unit number of the given logger. try to use cp_logger_get_unit_nr
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer, parameter, public debug_print_level
integer, parameter, public silent_print_level
Define type storing the global information of a run. Keep the amount of stored data small....
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_getcwd(curdir)
...
Interface to the message passing library MPI.
subroutine, public update_basis_set(opt_bas, bas_id, basis_type, qs_env)
...
Automatic screening of frontier-orbital basis optimizations.
subroutine, public run_frontier_orbital_screening(input_declaration, section, para_env, globenv, frontier_screening_section, optimize_basis_driver)
Run serial frontier-orbital optimizations and evaluate their HOMO-LUMO gaps with new SCFs.
Utilities for frontier-orbital basis optimization.
subroutine, public frontier_orbitals_reference_init(qs_env, reference)
Diagonalize and store the frozen reference Hamiltonian.
subroutine, public frontier_orbitals_reference_release(reference)
Release the stored reference eigenvalues and eigenvectors.
subroutine, public print_frontier_orbital_basis_sets(unit_nr, element_symbols, reference_basis_names, initial_basis_names)
Print reference and initial basis-set names for every fitted atom kind.
subroutine, public deallocate_basis_optimization_type(opt_bas)
Deallocate everything which was allocated before. Note not all arrays are used depending on the type ...
integer, parameter, public method_mo_fit_occ_virtual
subroutine, public optimize_basis_init_read_input(opt_bas, root_section, para_env, quiet_output, embedded_training)
initialize all parts of the optimization type and read input settings
subroutine, public write_basis(basis, element, unit_nr)
Write a basis set file which can be used from CP2K.
Definition of physical constants:
real(kind=dp), parameter, public evolt
Calculation of overlap matrix condition numbers.
subroutine, public overlap_condnum(matrixkp_s, condnum, iunit, norml1, norml2, use_arnoldi, blacs_env)
Calculation of the overlap matrix Condition Number.
Perform a QUICKSTEP wavefunction optimization (single point).
subroutine, public qs_energies(qs_env, consistent_energies, calc_forces)
Driver routine for QUICKSTEP single point wavefunction optimization.
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, mimic, 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_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, 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, matrix_vhxc, 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, xcint_weights, 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, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_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, harris_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, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
subroutine, public qs_env_release(qs_env)
releases the given qs_env (see doc/ReferenceCounting.html)
subroutine, public qs_env_create(qs_env, globenv)
allocates and intitializes a qs_env
subroutine, public qs_init(qs_env, para_env, root_section, globenv, cp_subsys, kpoint_env, qmmm, qmmm_env_qm, force_env_section, subsys_section, use_motion_section, silent, multip, charge)
Read the input and the database files for the setup of the QUICKSTEP environment.
Definition and initialisation of the mo data type.
subroutine, public get_mo_set(mo_set, maxocc, homo, lfomo, nao, nelectron, n_el_f, nmo, eigenvalues, occupation_numbers, mo_coeff, mo_coeff_b, uniform_occupation, kts, mu, flexible_electron_count)
Get the components of a MO set data structure.
Utilities for string manipulations.
elemental subroutine, public uppercase(string)
Convert all lower case characters in a string to upper case.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
type of a logger, at the moment it contains just a print level starting at which level it should be l...
contains the initially parsed file and the initial parallel environment
stores all the informations relevant to an mpi environment
type containing all information needed for basis matching