41#include "./base/base_uses.f90"
46 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_subsys_methods'
64 SUBROUTINE qs_subsys_create(subsys, para_env, root_section, force_env_section, subsys_section, &
65 use_motion_section, cp_subsys, elkind, silent)
70 LOGICAL,
INTENT(IN) :: use_motion_section
72 LOGICAL,
INTENT(IN),
OPTIONAL :: elkind, silent
80 NULLIFY (atomic_kind_set, qs_kind_set, kind_section, my_cp_subsys)
83 IF (
PRESENT(silent)) be_silent = silent
85 IF (
PRESENT(cp_subsys))
THEN
86 my_cp_subsys => cp_subsys
87 ELSE IF (
PRESENT(root_section))
THEN
89 force_env_section=force_env_section, &
90 subsys_section=subsys_section, &
91 use_motion_section=use_motion_section, &
94 cpabort(
"qs_subsys_create: cp_subsys or root_section needed")
98 CALL cp_subsys_get(my_cp_subsys, atomic_kind_set=atomic_kind_set)
101 para_env, force_env_section, be_silent)
103 CALL num_ao_el_per_molecule(my_cp_subsys%molecule_kinds%els, &
107 cp_subsys=my_cp_subsys, &
108 cell_ref=my_cp_subsys%cell_ref, &
109 use_ref_cell=my_cp_subsys%use_ref_cell, &
110 qs_kind_set=qs_kind_set)
127 SUBROUTINE num_ao_el_per_molecule(molecule_kind_set, qs_kind_set)
130 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
132 INTEGER :: arbitrary_spin, iatom, ikind, imol, &
133 n_ao, natom, nmol_kind, nsgf, nspins, &
135 INTEGER,
DIMENSION(0:lmat, 10) :: ne_core, ne_elem, ne_explicit
136 INTEGER,
DIMENSION(2) :: n_occ_alpha_and_beta
137 REAL(kind=
dp) :: charge_molecule, zeff, zeff_correction
138 REAL(kind=
dp),
DIMENSION(0:lmat, 10, 2) :: edelta
147 IF (
ASSOCIATED(molecule_kind_set))
THEN
150 nmol_kind =
SIZE(molecule_kind_set, 1)
155 DO imol = 1, nmol_kind
157 molecule_kind => molecule_kind_set(imol)
162 n_occ_alpha_and_beta(1:nspins) = 0
167 atomic_kind => molecule_kind%atom_list(iatom)%atomic_kind
170 basis_set=orb_basis_set, &
171 all_potential=all_potential, &
172 gth_potential=gth_potential, &
173 sgp_potential=sgp_potential, &
174 cneo_potential=cneo_potential)
180 qs_kind=qs_kind_set(ikind), &
194 n_occ_alpha_and_beta(arbitrary_spin) = &
195 n_occ_alpha_and_beta(arbitrary_spin) + sum(ne_explicit) + &
196 sum(nint(2*edelta(:, :, arbitrary_spin)))
201 IF (
ASSOCIATED(all_potential))
THEN
203 zeff_correction=zeff_correction)
204 ELSE IF (
ASSOCIATED(gth_potential))
THEN
206 zeff_correction=zeff_correction)
207 ELSE IF (
ASSOCIATED(sgp_potential))
THEN
209 zeff_correction=zeff_correction)
210 ELSE IF (
ASSOCIATED(cneo_potential))
THEN
212 zeff_correction = 0.0_dp
215 zeff_correction = 0.0_dp
217 z_molecule = z_molecule + nint(zeff - zeff_correction)
223 IF (
ASSOCIATED(orb_basis_set))
THEN
234 charge_molecule = real(z_molecule - n_occ_alpha_and_beta(arbitrary_spin),
dp)
236 nelectron=n_occ_alpha_and_beta(arbitrary_spin), &
237 charge=charge_molecule, &
243 END SUBROUTINE num_ao_el_per_molecule
Define the atom type and its sub types.
integer, parameter, public lmat
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
subroutine, public get_gto_basis_set(gto_basis_set, name, aliases, norm_type, kind_radius, ncgf, nset, nsgf, cgf_symbol, sgf_symbol, norm_cgf, set_radius, lmax, lmin, lx, ly, lz, m, ncgf_set, npgf, nsgf_set, nshell, cphi, pgf_radius, sphi, scon, zet, first_cgf, first_sgf, l, last_cgf, last_sgf, n, gcc, maxco, maxl, maxpgf, maxsgf_set, maxshell, maxso, nco_sum, npgf_sum, nshell_sum, maxder, short_kind_radius, npgf_seg_sum)
...
Initialize a small environment for a particular calculation.
subroutine, public cp_subsys_create(subsys, para_env, root_section, force_env_section, subsys_section, use_motion_section, qmmm, qmmm_env, exclusions, elkind)
Creates allocates and fills subsys from given input.
types that represent a subsys, i.e. a part of the system
subroutine, public cp_subsys_release(subsys)
releases a subsys (see doc/ReferenceCounting.html)
subroutine, public cp_subsys_get(subsys, ref_count, atomic_kinds, atomic_kind_set, particles, particle_set, local_particles, molecules, molecule_set, molecule_kinds, molecule_kind_set, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, natom, nparticle, ncore, nshell, nkind, atprop, virial, results, cell, cell_ref, use_ref_cell)
returns information about various attributes of the given subsys
Definition of the atomic potential types.
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
Define the molecule kind structure types and the corresponding functionality.
subroutine, public get_molecule_kind(molecule_kind, atom_list, bond_list, bend_list, ub_list, impr_list, opbend_list, colv_list, fixd_list, g3x3_list, g4x6_list, vsite_list, torsion_list, shell_list, name, mass, charge, kind_number, natom, nbend, nbond, nub, nimpr, nopbend, nconstraint, nconstraint_fixd, nfixd, ncolv, ng3x3, ng4x6, nvsite, nfixd_restraint, ng3x3_restraint, ng4x6_restraint, nvsite_restraint, nrestraints, nmolecule, nsgf, nshell, ntorsion, molecule_list, nelectron, nelectron_alpha, nelectron_beta, bond_kind_set, bend_kind_set, ub_kind_set, impr_kind_set, opbend_kind_set, torsion_kind_set, molname_generated)
Get informations about a molecule kind.
subroutine, public set_molecule_kind(molecule_kind, name, mass, charge, kind_number, molecule_list, atom_list, nbond, bond_list, nbend, bend_list, nub, ub_list, nimpr, impr_list, nopbend, opbend_list, ntorsion, torsion_list, fixd_list, ncolv, colv_list, ng3x3, g3x3_list, ng4x6, nfixd, g4x6_list, nvsite, vsite_list, ng3x3_restraint, ng4x6_restraint, nfixd_restraint, nshell, shell_list, nvsite_restraint, bond_kind_set, bend_kind_set, ub_kind_set, torsion_kind_set, impr_kind_set, opbend_kind_set, nelectron, nsgf, molname_generated)
Set the components of a molecule kind.
Types used by CNEO-DFT (see J. Chem. Theory Comput. 2025, 21, 16, 7865–7877)
subroutine, public get_cneo_potential(potential, z, zeff, mass, elec_conf, nsgf, nne, npsgf, nsotot, my_gcc_h, my_gcc_s, ovlp, kin, utrans, distance, harmonics, qlm_gg, gg, vgg, n2oindex, o2nindex, rad2l, oorad2l)
...
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, cneo_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zatom, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, init_u_ramping_each_scf, reltmat, ghost, monovalent, floating, name, element_symbol, pao_basis_size, pao_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
subroutine, public init_atom_electronic_state(atomic_kind, qs_kind, ncalc, ncore, nelem, edelta)
...
subroutine, public create_qs_kind_set(qs_kind_set, atomic_kind_set, kind_section, para_env, force_env_section, silent)
Read an atomic kind set data set from the input file.
Routines that work on qs_subsys_type.
subroutine, public qs_subsys_create(subsys, para_env, root_section, force_env_section, subsys_section, use_motion_section, cp_subsys, elkind, silent)
Creates a qs_subsys. Optionally an existsing cp_subsys is used.
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)
...
Provides all information about an atomic kind.
represents a system: atoms, molecules, their pos,vel,...
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.