72#include "./base/base_uses.f90"
79 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'optimize_basis'
95 CHARACTER(len=*),
PARAMETER :: routinen =
'run_optimize_basis'
100 CALL timeset(routinen, handle)
104 CALL driver_para_opt_basis(opt_bas, input_declaration, para_env)
107 CALL timestop(handle)
119 SUBROUTINE driver_para_opt_basis(opt_bas, input_declaration, para_env)
124 CHARACTER(len=*),
PARAMETER :: routinen =
'driver_para_opt_basis'
126 INTEGER :: handle, n_groups_created
128 INTEGER,
DIMENSION(:),
POINTER :: group_distribution_p
129 INTEGER,
DIMENSION(0:para_env%num_pe-1),
TARGET :: group_distribution
131 CALL timeset(routinen, handle)
132 group_distribution_p => group_distribution
133 CALL opt_group%from_split(para_env, n_groups_created, group_distribution_p, &
134 n_subgroups=
SIZE(opt_bas%group_partition), group_partition=opt_bas%group_partition)
135 opt_bas%opt_id = group_distribution(para_env%mepos) + 1
136 opt_bas%n_groups_created = n_groups_created
137 ALLOCATE (opt_bas%sub_sources(0:para_env%num_pe - 1))
139 CALL driver_optimization_para_low(opt_bas, input_declaration, para_env, opt_group)
141 CALL opt_group%free()
142 CALL timestop(handle)
144 END SUBROUTINE driver_para_opt_basis
156 SUBROUTINE driver_optimization_para_low(opt_bas, input_declaration, para_env_top, mpi_comm_opt)
162 CHARACTER(len=*),
PARAMETER :: routinen =
'driver_optimization_para_low'
164 INTEGER :: handle, icalc, iopt, is, mp_id, stat
165 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: f_env_id
166 LOGICAL :: write_basis
167 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:) :: tot_time
168 TYPE(
cp_fm_type),
ALLOCATABLE,
DIMENSION(:) :: matrix_s_inv
174 CALL timeset(routinen, handle)
177 mp_id = opt_bas%opt_id
178 NULLIFY (para_env, f_env)
179 ALLOCATE (f_env_id(
SIZE(opt_bas%comp_group(mp_id)%member_list)))
180 ALLOCATE (tot_time(opt_bas%ncombinations*opt_bas%ntraining_sets))
181 ALLOCATE (matrix_s_inv(
SIZE(opt_bas%comp_group(mp_id)%member_list)))
184 para_env = mpi_comm_opt
187 IF (para_env%is_source()) is = para_env_top%mepos
188 CALL para_env_top%allgather(is, opt_bas%sub_sources)
190 CALL init_training_force_envs(opt_bas, f_env_id, input_declaration, matrix_s_inv, para_env, mpi_comm_opt)
192 CALL init_free_vars(opt_bas)
196 DO iopt = 0, opt_bas%powell_param%maxfun
197 CALL compute_residuum_vectors(opt_bas, f_env_id, matrix_s_inv, tot_time, &
198 para_env_top, para_env, iopt)
199 IF (para_env_top%is_source())
THEN
200 CALL powell_optimize(opt_bas%powell_param%nvar, opt_bas%x_opt, opt_bas%powell_param)
202 CALL para_env_top%bcast(opt_bas%powell_param%state)
203 CALL para_env_top%bcast(opt_bas%x_opt)
204 CALL update_free_vars(opt_bas)
205 write_basis = mod(iopt, opt_bas%write_frequency) == 0
208 IF (opt_bas%powell_param%state == -1)
EXIT
212 IF (para_env_top%is_source())
THEN
213 opt_bas%powell_param%state = 8
214 CALL powell_optimize(opt_bas%powell_param%nvar, opt_bas%x_opt, opt_bas%powell_param)
217 CALL para_env_top%bcast(opt_bas%x_opt)
218 CALL update_free_vars(opt_bas)
224 DO icalc =
SIZE(opt_bas%comp_group(mp_id)%member_list), 1, -1
228 DEALLOCATE (f_env_id);
DEALLOCATE (tot_time)
231 CALL timestop(handle)
233 END SUBROUTINE driver_optimization_para_low
248 SUBROUTINE compute_residuum_vectors(opt_bas, f_env_id, matrix_S_inv, tot_time, &
249 para_env_top, para_env, iopt)
251 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: f_env_id
252 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(IN) :: matrix_s_inv
253 REAL(kind=
dp),
DIMENSION(:) :: tot_time
257 CHARACTER(len=*),
PARAMETER :: routinen =
'compute_residuum_vectors'
259 CHARACTER(len=8) :: basis_type
260 INTEGER :: bas_id, handle, icalc, icomb, ispin, &
261 mp_id, my_id, nao, ncalc, nelectron, &
263 REAL(kind=
dp) :: flexible_electron_count, maxocc, n_el_f
264 REAL(kind=
dp),
DIMENSION(:),
POINTER :: cond_vec, energy, f_vec, my_time, &
266 REAL(kind=
dp),
DIMENSION(:, :),
POINTER :: gdata
269 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks, matrix_s_aux, matrix_s_aux_orb
272 TYPE(
mo_set_type),
ALLOCATABLE,
DIMENSION(:) :: mos_aux
275 POINTER :: sab_aux, sab_aux_orb
277 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
280 CALL timeset(routinen, handle)
282 basis_type =
"AUX_OPT"
284 ncalc = opt_bas%ncombinations*opt_bas%ntraining_sets
285 ALLOCATE (gdata(ncalc, 4))
287 my_time => gdata(:, 2)
288 cond_vec => gdata(:, 3)
289 energy => gdata(:, 4)
291 f_vec = 0.0_dp; cond_vec = 0.0_dp; my_time = 0.0_dp; energy = 0.0_dp
292 mp_id = opt_bas%opt_id
293 ALLOCATE (start_time(
SIZE(opt_bas%comp_group(mp_id)%member_list)))
295 DO icalc = 1,
SIZE(opt_bas%comp_group(mp_id)%member_list)
296 my_id = opt_bas%comp_group(mp_id)%member_list(icalc) + 1
300 NULLIFY (matrix_s_aux_orb, matrix_s_aux)
301 CALL get_set_and_basis_id(opt_bas%comp_group(mp_id)%member_list(icalc), opt_bas, set_id, bas_id)
303 force_env => f_env%force_env
307 NULLIFY (sab_aux, sab_aux_orb)
310 basis_type_a=basis_type, &
311 basis_type_b=basis_type, &
314 basis_type_a=basis_type, &
315 basis_type_b=
"ORB", &
319 CALL get_qs_env(qs_env, mos=mos, matrix_ks=matrix_ks)
322 ALLOCATE (mos_aux(nspins))
323 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set)
326 CALL get_mo_set(mo_set=mos(ispin), mo_coeff=mo_coeff, maxocc=maxocc, nelectron=nelectron, &
327 n_el_f=n_el_f, nmo=nmo, flexible_electron_count=flexible_electron_count)
329 context=mo_coeff%matrix_struct%context, &
330 para_env=mo_coeff%matrix_struct%para_env)
332 n_el_f, maxocc, flexible_electron_count)
333 CALL init_mo_set(mo_set=mos_aux(ispin), fm_struct=fm_struct, name=
"MO_AUX")
337 CALL fit_mo_coeffs(matrix_s_aux, matrix_s_aux_orb, mos, mos_aux)
338 CALL evaluate_optvals(mos, mos_aux, matrix_ks, matrix_s_aux_orb(1)%matrix, &
339 matrix_s_aux(1)%matrix, matrix_s_inv(icalc), &
340 f_vec(my_id), energy(my_id), cond_vec(my_id))
349 my_time(my_id) =
m_walltime() - start_time(icalc)
352 DEALLOCATE (start_time)
354 IF (.NOT. para_env%is_source())
THEN
355 f_vec = 0.0_dp; cond_vec = 0.0_dp; my_time = 0.0_dp; energy = 0.0_dp
358 CALL para_env_top%sum(gdata)
360 opt_bas%powell_param%f = 0.0_dp
361 IF (para_env_top%is_source())
THEN
362 DO icalc = 1,
SIZE(f_vec)
363 icomb = mod(icalc - 1, opt_bas%ncombinations)
364 opt_bas%powell_param%f = opt_bas%powell_param%f + &
365 (f_vec(icalc) + energy(icalc))*opt_bas%fval_weight(icomb)
366 IF (opt_bas%use_condition_number)
THEN
367 opt_bas%powell_param%f = opt_bas%powell_param%f + &
368 log(cond_vec(icalc))*opt_bas%condition_weight(icomb)
372 f_vec = 0.0_dp; cond_vec = 0.0_dp; my_time = 0.0_dp; energy = 0.0_dp
374 CALL para_env_top%bcast(opt_bas%powell_param%f)
377 CALL output_opt_info(f_vec, cond_vec, my_time, tot_time, opt_bas, iopt, para_env_top)
380 CALL para_env_top%sync()
382 CALL timestop(handle)
384 END SUBROUTINE compute_residuum_vectors
396 SUBROUTINE init_training_force_envs(opt_bas, f_env_id, input_declaration, matrix_s_inv, para_env, mpi_comm_opt)
399 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: f_env_id
401 TYPE(
cp_fm_type),
DIMENSION(:),
INTENT(OUT) :: matrix_s_inv
405 CHARACTER(len=*),
PARAMETER :: routinen =
'init_training_force_envs'
407 CHARACTER(len=default_path_length) :: main_dir
408 INTEGER :: bas_id, handle, icalc, ierr, mp_id, &
420 CALL timeset(routinen, handle)
422 NULLIFY (matrix_s, blacs_env, ks_env)
424 mp_id = opt_bas%opt_id
428 DO icalc = 1,
SIZE(opt_bas%comp_group(mp_id)%member_list)
431 CALL get_set_and_basis_id(opt_bas%comp_group(mp_id)%member_list(icalc), opt_bas, set_id, bas_id)
432 CALL m_chdir(trim(opt_bas%training_dir(set_id)), ierr)
434 CALL cp_abort(__location__, &
435 "Could not change to directory <"//trim(opt_bas%training_dir(set_id))//
">")
438 opt_bas%training_input(set_id), &
439 initial_variables=empty_initial_variables, &
444 input_declaration=input_declaration, &
445 input_path=opt_bas%training_input(set_id), &
447 output_path=
"scrap_information", &
448 mpi_comm=mpi_comm_opt, &
454 force_env => f_env%force_env
460 force_env_section=qs_env%input)
465 matrix_name=
"OVERLAP", &
466 basis_type_a=
"ORB", &
467 basis_type_b=
"ORB", &
470 CALL get_qs_env(qs_env, matrix_s=matrix_s, blacs_env=blacs_env)
479 CALL m_chdir(trim(adjustl(main_dir)), ierr)
482 CALL timestop(handle)
484 END SUBROUTINE init_training_force_envs
492 SUBROUTINE update_free_vars(opt_bas)
495 CHARACTER(len=*),
PARAMETER :: routinen =
'update_free_vars'
497 INTEGER :: handle, ikind, iset, ix
499 CALL timeset(routinen, handle)
501 DO ikind = 1, opt_bas%nkind
502 DO iset = 1, opt_bas%kind_basis(ikind)%flex_basis(0)%nsets
503 CALL update_subset_freevars(opt_bas%kind_basis(ikind)%flex_basis(0)%subset(iset), ix, opt_bas%x_opt)
506 CALL timestop(handle)
508 END SUBROUTINE update_free_vars
518 SUBROUTINE update_subset_freevars(subset, ix, x)
521 REAL(kind=
dp),
DIMENSION(:) :: x
523 CHARACTER(len=*),
PARAMETER :: routinen =
'update_subset_freevars'
525 INTEGER :: handle, icon1, icon2, icont, iexp, il, &
527 REAL(kind=
dp) :: fermi_f, gs_scale
529 CALL timeset(routinen, handle)
530 DO iexp = 1, subset%nexp
531 IF (subset%opt_exps(iexp))
THEN
533 subset%exps(iexp) = abs(x(ix))
534 IF (subset%exp_has_const(iexp))
THEN
536 fermi_f = 1.0_dp/(exp((x(ix) - 1.0_dp)/0.5_dp) + 1.0_dp)
537 subset%exps(iexp) = (2.0_dp*fermi_f - 1.0_dp)*subset%exp_const(iexp)%var_fac*subset%exp_const(iexp)%init + &
538 subset%exp_const(iexp)%init
543 DO icont = 1, subset%ncon_tot
544 IF (subset%opt_coeff(iexp, icont))
THEN
546 subset%coeff(iexp, icont) = x(ix)
554 DO icon1 = istart, istart + subset%l(il) - 2
555 DO icon2 = icon1 + 1, istart + subset%l(il) - 1
556 gs_scale = dot_product(subset%coeff(:, icon2), subset%coeff(:, icon1))/ &
557 dot_product(subset%coeff(:, icon1), subset%coeff(:, icon1))
558 subset%coeff(:, icon2) = subset%coeff(:, icon2) - gs_scale*subset%coeff(:, icon1)
561 istart = istart + subset%l(il)
564 DO icon1 = 1, subset%ncon_tot
565 subset%coeff(:, icon1) = subset%coeff(:, icon1)/norm2(subset%coeff(:, icon1))
567 CALL timestop(handle)
569 END SUBROUTINE update_subset_freevars
577 SUBROUTINE init_free_vars(opt_bas)
580 CHARACTER(len=*),
PARAMETER :: routinen =
'init_free_vars'
582 INTEGER :: handle, ikind, iset, ix
584 CALL timeset(routinen, handle)
586 DO ikind = 1, opt_bas%nkind
587 DO iset = 1, opt_bas%kind_basis(ikind)%flex_basis(0)%nsets
588 CALL init_subset_freevars(opt_bas%kind_basis(ikind)%flex_basis(0)%subset(iset), ix, opt_bas%x_opt)
591 CALL timestop(handle)
593 END SUBROUTINE init_free_vars
604 SUBROUTINE init_subset_freevars(subset, ix, x)
607 REAL(kind=
dp),
DIMENSION(:) :: x
609 CHARACTER(len=*),
PARAMETER :: routinen =
'init_subset_freevars'
611 INTEGER :: handle, icont, iexp
612 REAL(kind=
dp) :: fract
614 CALL timeset(routinen, handle)
616 DO iexp = 1, subset%nexp
617 IF (subset%opt_exps(iexp))
THEN
619 x(ix) = subset%exps(iexp)
620 IF (subset%exp_has_const(iexp))
THEN
621 IF (subset%exp_const(iexp)%const_type == 0)
THEN
622 fract = 1.0_dp + (subset%exps(iexp) - subset%exp_const(iexp)%init)/ &
623 (subset%exp_const(iexp)%init*subset%exp_const(iexp)%var_fac)
624 x(ix) = 0.5_dp*log((2.0_dp/fract - 1.0_dp)) + 1.0_dp
626 IF (subset%exp_const(iexp)%const_type == 1)
THEN
631 DO icont = 1, subset%ncon_tot
632 IF (subset%opt_coeff(iexp, icont))
THEN
634 x(ix) = subset%coeff(iexp, icont)
638 CALL timestop(handle)
640 END SUBROUTINE init_subset_freevars
654 SUBROUTINE output_opt_info(f_vec, cond_vec, my_time, tot_time, opt_bas, iopt, para_env_top)
655 REAL(kind=
dp),
DIMENSION(:) :: f_vec, cond_vec, my_time, tot_time
660 CHARACTER(len=*),
PARAMETER :: routinen =
'output_opt_info'
662 INTEGER :: handle, ibasis, icalc, iset, unit_nr
665 CALL timeset(routinen, handle)
668 tot_time = tot_time + my_time
671 IF (para_env_top%is_source() .AND. (mod(iopt, opt_bas%write_frequency) == 0 .OR. iopt == opt_bas%powell_param%maxfun))
THEN
675 IF (unit_nr > 0)
THEN
676 WRITE (unit_nr,
'(1X,A,I8)')
"BASOPT| Information at iteration number:", iopt
677 WRITE (unit_nr,
'(1X,A)')
"BASOPT| Training set | Combination | Rho difference | Condition num. | Time"
678 WRITE (unit_nr,
'(1X,A)')
"BASOPT| -----------------------------------------------------------------------"
680 DO iset = 1, opt_bas%ntraining_sets
681 DO ibasis = 1, opt_bas%ncombinations
683 WRITE (unit_nr,
'(1X,A,2(5X,I3,5X,A),2(1X,E14.8,1X,A),1X,F8.1)') &
684 'BASOPT| ', iset,
"|", ibasis,
"|", f_vec(icalc),
"|", cond_vec(icalc),
"|", tot_time(icalc)
687 WRITE (unit_nr,
'(1X,A)')
"BASOPT| -----------------------------------------------------------------------"
688 WRITE (unit_nr,
'(1X,A,E14.8)')
"BASOPT| Total residuum value: ", opt_bas%powell_param%f
689 WRITE (unit_nr,
'(A)')
""
691 CALL timestop(handle)
692 END SUBROUTINE output_opt_info
void update_basis_set(const int nkinds, const grid_basis_set **const basis_sets, grid_context *data)
methods related to the blacs parallel environment
DBCSR operations in CP2K.
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
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
interface to use cp2k as library
recursive subroutine, public destroy_force_env(env_id, ierr, q_finalize)
deallocates the force_env with the given id
subroutine, public f_env_get_from_id(f_env_id, f_env)
...
subroutine, public f_env_add_defaults(f_env_id, f_env, handle)
adds the default environments of the f_env to the stack of the defaults, and returns a new error and ...
recursive subroutine, public create_force_env(new_env_id, input_declaration, input_path, output_path, mpi_comm, output_unit, owns_out_unit, input, ierr, work_dir, initial_variables)
creates a new force environment using the given input, and writing the output to the given output uni...
subroutine, public f_env_rm_defaults(f_env, ierr, handle)
removes the default environments of the f_env to the stack of the defaults, and sets ierr accordingly...
Interface for the force calculations.
recursive subroutine, public force_env_get(force_env, in_use, fist_env, qs_env, meta_env, fp_env, subsys, para_env, potential_energy, additional_potential, kinetic_energy, harmonic_shell, kinetic_shell, cell, sub_force_env, qmmm_env, qmmmx_env, eip_env, pwdft_env, globenv, input, force_env_section, method_name_id, root_section, mixed_env, nnp_env, embed_env, ipi_env)
returns various attributes about the force environment
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
subroutine, public m_getcwd(curdir)
...
subroutine, public m_chdir(dir, ierror)
...
real(kind=dp) function, public m_walltime()
returns time from a real-time clock, protected against rolling early/easily
Interface to the message passing library MPI.
subroutine, public mp_para_env_release(para_env)
releases the para object (to be called when you don't want anymore the shared copy of this object)
subroutine, public modify_input_settings(basis_optimization, bas_id, input_file)
change settings in the training input files to initialize all needed structures and adjust settings t...
subroutine, public calculate_ks_matrix(qs_env)
...
subroutine, public calculate_overlap_inverse(matrix_s, matrix_s_inv, para_env, context)
...
subroutine, public allocate_mo_sets(qs_env)
...
subroutine, public optbas_build_neighborlist(qs_env, sab_aux, sab_aux_orb, basis_type)
rebuilds neighborlist for absis sets
subroutine, public evaluate_optvals(mos, mos_aux_fit, matrix_ks, q, snew, s_inv_orb, fval, energy, s_cond_number)
...
subroutine, public fit_mo_coeffs(saux, sauxorb, mos, mosaux)
...
subroutine, public deallocate_basis_optimization_type(opt_bas)
Deallocate everything which was allocated before. Note not all arrays are used depending on the type ...
subroutine, public get_set_and_basis_id(calc_id, opt_bas, set_id, bas_id)
returns a mapping from the calculation id to the trainings set id and basis combination id
subroutine, public optimize_basis_init_read_input(opt_bas, root_section, para_env)
initialize all parts of the optimization type and read input settings
subroutine, public update_derived_basis_sets(opt_bas, write_it, output_file, para_env)
Regenerate the basis sets from reference 0 after an update from the optimizer to reference was perfor...
subroutine, public run_optimize_basis(input_declaration, root_section, para_env)
main entry point for methods aimed at optimizing basis sets
subroutine, public powell_optimize(n, x, optstate)
...
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, 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_part_release(qs_env)
releases part of the given qs_env in order to save memory
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind_set(qs_kind_set, all_potential_present, tnadd_potential_present, gth_potential_present, sgp_potential_present, paw_atom_present, dft_plus_u_atom_present, maxcgf, maxsgf, maxco, maxco_proj, maxgtops, maxlgto, maxlprj, maxnset, maxsgf_set, ncgf, npgf, nset, nsgf, nshell, maxpol, maxlppl, maxlppnl, maxppnl, nelectron, maxder, max_ngrid_rad, max_sph_harm, maxg_iso_not0, lmax_rho0, basis_rcut, basis_type, total_zeff_corr, npgf_seg, cneo_potential_present, nkind_q, natom_q)
Get attributes of an atomic kind set.
subroutine, public set_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, exc_accint, 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, xcint_weights, 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_pp, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, 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, exc_accint, 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, xcint_weights, 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_pp, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, 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)
...
Definition and initialisation of the mo data type.
subroutine, public init_mo_set(mo_set, fm_pool, fm_ref, fm_struct, name, counter)
initializes an allocated mo_set. eigenvalues, mo_coeff, occupation_numbers are valid only after this ...
subroutine, public allocate_mo_set(mo_set, nao, nmo, nelectron, n_el_f, maxocc, flexible_electron_count)
Allocates a mo set and partially initializes it (nao,nmo,nelectron, and flexible_electron_count are v...
subroutine, public deallocate_mo_set(mo_set)
Deallocate a wavefunction data structure.
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.
Define the neighbor list data types and the corresponding functionality.
subroutine, public release_neighbor_list_sets(nlists)
releases an array of neighbor_list_sets
Generate the atomic neighbor lists.
subroutine, public build_qs_neighbor_lists(qs_env, para_env, molecular, force_env_section)
Build all the required neighbor lists for Quickstep.
Calculation of overlap matrix, its derivatives and forces.
subroutine, public build_overlap_matrix(ks_env, matrix_s, matrixkp_s, matrix_name, nderivative, basis_type_a, basis_type_b, sab_nl, calculate_forces, matrix_p, matrixkp_p, ext_kpoints)
Calculation of the overlap matrix over Cartesian Gaussian functions.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
type of a logger, at the moment it contains just a print level starting at which level it should be l...
wrapper to abstract the force evaluation of the various methods
stores all the informations relevant to an mpi environment
type containing all information needed for basis matching
Provides all information about a quickstep kind.
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...