Improve k-point symmetry for Gamma-centered meshes and moving geometries (#5165)

Co-authored-by: Thomas D. Kuehne <tkuehne@cp2k.org>
This commit is contained in:
Dynamics of Condensed Matter 2026-05-10 20:40:56 +02:00 committed by GitHub
parent 95e0cafc31
commit 432ceb16cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 782 additions and 148 deletions

View file

@ -351,11 +351,6 @@ CONTAINS
CALL inversion_symm(xkp, wkp, csym%kplink(1, :))
ELSE
! use symmetry library to reduce k-points
IF (SUM(ABS(csym%wvk0)) /= 0.0_dp) THEN
CALL cp_abort(__LOCATION__, "MacDonald shifted k-point meshes are only "// &
"possible without symmetrization.")
END IF
CALL full_grid_gen(nk, xkp, wkp, shift, gamma_centered=gamma_mesh)
IF (spglib_backend) THEN
CALL kp_symmetry_spglib(csym, xkp, wkp, kpop)
@ -370,10 +365,6 @@ CONTAINS
IF (csym%istriz == 1 .AND. .NOT. fullmesh .AND. .NOT. inversion_only .AND. &
orthorhombic_cell) THEN
! fall back to the K290 atom mapping for simple cells when SPGLIB is not linked
IF (SUM(ABS(csym%wvk0)) /= 0.0_dp) THEN
CALL cp_abort(__LOCATION__, "MacDonald shifted k-point meshes are only "// &
"possible without symmetrization.")
END IF
CALL kp_symmetry(csym, xkp, wkp, kpop, use_spglib_reduction=.FALSE.)
ELSE IF (csym%istriz /= 1 .AND. fullmesh) THEN
! full kpoint mesh is used
@ -485,7 +476,9 @@ CONTAINS
iq2 = csym%mesh(2)
iq3 = csym%mesh(3)
nkpoint = 10*iq1*iq2*iq3
wvk0 = csym%wvk0
! K290 is used here to identify the atomic symmetry operations. The actual
! shifted k-point mesh is reduced afterwards by reduce_kpoint_mesh.
wvk0 = 0.0_dp
istriz = csym%istriz
IF (PRESENT(use_spglib_reduction)) THEN
spglib_reduction = use_spglib_reduction
@ -619,7 +612,7 @@ CONTAINS
INTEGER :: iop, jop, pass
INTEGER, ALLOCATABLE, DIMENSION(:) :: perm
INTEGER, DIMENSION(3, 3) :: eye, irot
INTEGER, DIMENSION(3, 3) :: eye, frot, irot
LOGICAL :: duplicate, identity, valid, &
zero_translation
REAL(KIND=dp) :: eps
@ -655,7 +648,8 @@ CONTAINS
DO pass = 1, 4
DO iop = 1, csym%n_operations
irot(1:3, 1:3) = csym%rotations(1:3, 1:3, iop)
identity = ALL(irot == eye)
frot(1:3, 1:3) = TRANSPOSE(irot(1:3, 1:3))
identity = ALL(frot == eye)
zero_translation = ALL(ABS(csym%translations(1:3, iop) - &
ANINT(csym%translations(1:3, iop))) <= eps)
IF (pass == 1 .AND. (.NOT. identity .OR. .NOT. zero_translation)) CYCLE
@ -665,7 +659,7 @@ CONTAINS
duplicate = .FALSE.
DO jop = 1, nrot
IF (ALL(irot == srot(:, :, jop)) .AND. &
IF (ALL(frot == srot(:, :, jop)) .AND. &
ALL(ABS(csym%translations(1:3, iop) - csym%vt(1:3, jop) - &
ANINT(csym%translations(1:3, iop) - csym%vt(1:3, jop))) <= eps)) THEN
duplicate = .TRUE.
@ -674,13 +668,13 @@ CONTAINS
END DO
IF (duplicate) CYCLE
CALL spglib_atom_permutation(csym, irot, csym%translations(:, iop), perm, valid)
CALL spglib_atom_permutation(csym, frot, csym%translations(:, iop), perm, valid)
IF (.NOT. valid) CYCLE
nrot = nrot + 1
srot(1:3, 1:3, nrot) = irot(1:3, 1:3)
rfrac(1:3, 1:3) = REAL(irot(1:3, 1:3), KIND=dp)
srot(1:3, 1:3, nrot) = frot(1:3, 1:3)
rfrac(1:3, 1:3) = REAL(frot(1:3, 1:3), KIND=dp)
csym%rt(1:3, 1:3, nrot) = MATMUL(csym%hmat, MATMUL(rfrac, h_inv))
csym%vt(1:3, nrot) = csym%translations(1:3, iop)
csym%ibrot(nrot) = nrot
@ -706,7 +700,7 @@ CONTAINS
INTEGER, INTENT(OUT) :: nrot
INTEGER :: iop, jop, pass
INTEGER, DIMENSION(3, 3) :: eye, irot
INTEGER, DIMENSION(3, 3) :: eye, frot, irot
LOGICAL :: duplicate, identity
CPASSERT(csym%symlib)
@ -722,13 +716,14 @@ CONTAINS
DO pass = 1, 2
DO iop = 1, csym%n_operations
irot(1:3, 1:3) = csym%rotations(1:3, 1:3, iop)
identity = ALL(irot == eye)
frot(1:3, 1:3) = TRANSPOSE(irot(1:3, 1:3))
identity = ALL(frot == eye)
IF (pass == 1 .AND. .NOT. identity) CYCLE
IF (pass == 2 .AND. identity) CYCLE
duplicate = .FALSE.
DO jop = 1, nrot
IF (ALL(irot == srot(:, :, jop))) THEN
IF (ALL(frot == srot(:, :, jop))) THEN
duplicate = .TRUE.
EXIT
END IF
@ -736,7 +731,7 @@ CONTAINS
IF (duplicate) CYCLE
nrot = nrot + 1
srot(1:3, 1:3, nrot) = irot(1:3, 1:3)
srot(1:3, 1:3, nrot) = frot(1:3, 1:3)
END DO
END DO

View file

@ -89,9 +89,10 @@ MODULE force_env_methods
globenv_retain
USE grrm_utils, ONLY: write_grrm
USE input_constants, ONLY: &
debug_run, dfet, dmfet, mix_cdft, mix_coupled, mix_generic, mix_linear_combination, &
mix_minimum, mix_restrained, mixed_cdft_serial, use_bazant_eip, use_lenosky_eip, &
use_stillinger_weber_eip, use_tersoff_eip
cell_opt_run, debug_run, dfet, dmfet, driver_run, ehrenfest, geo_opt_run, mix_cdft, &
mix_coupled, mix_generic, mix_linear_combination, mix_minimum, mix_restrained, &
mixed_cdft_serial, mol_dyn_run, use_bazant_eip, use_lenosky_eip, use_stillinger_weber_eip, &
use_tersoff_eip
USE input_section_types, ONLY: section_vals_get_subs_vals,&
section_vals_retain,&
section_vals_type,&
@ -107,6 +108,7 @@ MODULE force_env_methods
kpoint_initialize_mos
USE kpoint_types, ONLY: get_kpoint_info,&
kpoint_reset_initialization,&
kpoint_sym_type,&
kpoint_type,&
set_kpoint_info
USE machine, ONLY: m_memory
@ -277,7 +279,7 @@ CONTAINS
CASE (use_fist_force)
CALL fist_calc_energy_force(force_env%fist_env)
CASE (use_qs_force)
CALL force_env_refresh_debug_kpoints(force_env, fd_energy=.NOT. calculate_forces)
CALL force_env_refresh_kpoint_symmetry(force_env, fd_energy=.NOT. calculate_forces)
CALL qs_calc_energy_force(force_env%qs_env, calculate_forces, energy_consistency, linres_run)
CASE (use_pwdft_force)
IF (virial%pv_availability .AND. calculate_stress_tensor) THEN
@ -530,20 +532,21 @@ CONTAINS
END SUBROUTINE force_env_calc_energy_force
! **************************************************************************************************
!> \brief Rebuild k-point data for DEBUG finite-difference geometries.
!> Atomic k-point symmetry may change when a single atom or cell element is displaced.
!> \brief Rebuild k-point data for geometries whose atomic symmetry can change.
!> Atomic k-point symmetry may change when atoms or cell vectors move.
!> \param force_env ...
!> \param fd_energy ...
! **************************************************************************************************
SUBROUTINE force_env_refresh_debug_kpoints(force_env, fd_energy)
SUBROUTINE force_env_refresh_kpoint_symmetry(force_env, fd_energy)
TYPE(force_env_type), POINTER :: force_env
LOGICAL, INTENT(IN) :: fd_energy
CHARACTER(LEN=default_string_length) :: kp_scheme
LOGICAL :: debug_inversion_only, do_kpoints, full_grid, input_full_grid, &
input_inversion_symmetry_only, inversion_symmetry_only, kpoint_symmetry, use_full_grid, &
use_inversion_symmetry_only
INTEGER :: run_type_id
LOGICAL :: debug_full_kpoint_symmetry, debug_inversion_only, do_kpoints, dynamic_symmetry, &
full_grid, input_full_grid, input_inversion_symmetry_only, inversion_symmetry_only, &
kpoint_symmetry, moving_geometry, use_full_grid, use_inversion_symmetry_only
TYPE(cell_type), POINTER :: cell
TYPE(cp_blacs_env_type), POINTER :: blacs_env
TYPE(dft_control_type), POINTER :: dft_control
@ -561,7 +564,15 @@ CONTAINS
NULLIFY (globenv)
CALL force_env_get(force_env, globenv=globenv)
IF (.NOT. ASSOCIATED(globenv)) RETURN
IF (globenv%run_type_id /= debug_run) RETURN
run_type_id = globenv%run_type_id
moving_geometry = .FALSE.
SELECT CASE (run_type_id)
CASE (cell_opt_run, driver_run, ehrenfest, geo_opt_run, mol_dyn_run)
moving_geometry = .TRUE.
CASE DEFAULT
moving_geometry = .FALSE.
END SELECT
IF (run_type_id /= debug_run .AND. .NOT. moving_geometry) RETURN
NULLIFY (blacs_env, cell, dft_control, input, kpoint_section, kpoints, mos, para_env, &
particle_set, wf_history)
@ -585,19 +596,28 @@ CONTAINS
input_full_grid = full_grid
input_inversion_symmetry_only = inversion_symmetry_only
debug_full_kpoint_symmetry = .FALSE.
IF (ASSOCIATED(input)) THEN
kpoint_section => section_vals_get_subs_vals(input, "DFT%KPOINTS")
CALL section_vals_val_get(kpoint_section, "FULL_GRID", l_val=input_full_grid)
CALL section_vals_val_get(kpoint_section, "INVERSION_SYMMETRY_ONLY", &
l_val=input_inversion_symmetry_only)
CALL section_vals_val_get(kpoint_section, "DEBUG_FULL_KPOINT_SYMMETRY", &
l_val=debug_full_kpoint_symmetry)
END IF
! DEBUG finite differences must not reuse atomic symmetry from another geometry.
! Rebuild the k-point symmetry for each DEBUG point. Keep numerical finite-difference
! energies and DFTB DEBUG checks on the established inversion/time-reversal reduction.
debug_inversion_only = fd_energy .OR. dft_control%qs_control%dftb
! Moving geometries and DEBUG finite differences must not reuse atomic symmetry from
! another geometry. Rebuild the k-point symmetry from the current cell and positions.
! Keep numerical finite-difference energies and DFTB DEBUG checks on the established
! inversion/time-reversal reduction.
debug_inversion_only = run_type_id == debug_run .AND. .NOT. debug_full_kpoint_symmetry .AND. &
(fd_energy .OR. dft_control%qs_control%dftb)
use_full_grid = input_full_grid
use_inversion_symmetry_only = (input_inversion_symmetry_only .OR. debug_inversion_only) .AND. &
(.NOT. use_full_grid)
dynamic_symmetry = kpoint_symmetry .AND. .NOT. use_full_grid .AND. &
.NOT. use_inversion_symmetry_only
IF (moving_geometry .AND. .NOT. dynamic_symmetry) RETURN
IF (moving_geometry .AND. .NOT. kpoint_has_nontrivial_atomic_symmetry(kpoints)) RETURN
CALL set_kpoint_info(kpoints, full_grid=use_full_grid, &
inversion_symmetry_only=use_inversion_symmetry_only)
@ -608,7 +628,56 @@ CONTAINS
CALL wfi_clear(wf_history)
CALL qs_basis_rotation(force_env%qs_env, kpoints)
END SUBROUTINE force_env_refresh_debug_kpoints
END SUBROUTINE force_env_refresh_kpoint_symmetry
! **************************************************************************************************
!> \brief Return whether the current reduced mesh uses nontrivial atomic symmetry operations.
!> \param kpoints ...
!> \return has_symmetry
! **************************************************************************************************
FUNCTION kpoint_has_nontrivial_atomic_symmetry(kpoints) RESULT(has_symmetry)
TYPE(kpoint_type), POINTER :: kpoints
LOGICAL :: has_symmetry
INTEGER :: iatom, ik, isym, natom
REAL(KIND=dp), DIMENSION(3, 3) :: eye3
TYPE(kpoint_sym_type), POINTER :: kpsym
has_symmetry = .FALSE.
IF (.NOT. ASSOCIATED(kpoints)) RETURN
IF (.NOT. ASSOCIATED(kpoints%kp_sym)) RETURN
eye3 = 0.0_dp
eye3(1, 1) = 1.0_dp
eye3(2, 2) = 1.0_dp
eye3(3, 3) = 1.0_dp
DO ik = 1, kpoints%nkp
kpsym => kpoints%kp_sym(ik)%kpoint_sym
IF (.NOT. ASSOCIATED(kpsym)) CYCLE
IF (.NOT. kpsym%apply_symmetry) CYCLE
IF (.NOT. ASSOCIATED(kpsym%rot)) CYCLE
IF (.NOT. ASSOCIATED(kpsym%f0)) CYCLE
IF (.NOT. ASSOCIATED(kpsym%fcell)) CYCLE
natom = SIZE(kpsym%f0, 1)
DO isym = 1, SIZE(kpsym%rot, 3)
IF (MAXVAL(ABS(kpsym%rot(1:3, 1:3, isym) - eye3(1:3, 1:3))) > 1.e-12_dp .OR. &
ANY(kpsym%fcell(1:3, 1:natom, isym) /= 0)) THEN
has_symmetry = .TRUE.
RETURN
END IF
DO iatom = 1, natom
IF (kpsym%f0(iatom, isym) /= iatom) THEN
has_symmetry = .TRUE.
RETURN
END IF
END DO
END DO
END DO
END FUNCTION kpoint_has_nontrivial_atomic_symmetry
! **************************************************************************************************
!> \brief Evaluates the stress tensor and pressure numerically

View file

@ -60,6 +60,7 @@ CONTAINS
!> WAVEFUNCTION [real, complex]
!> FULL_GRID [on, off]
!> INVERSION_SYMMETRY_ONLY [on, off]
!> DEBUG_FULL_KPOINT_SYMMETRY [on, off]
!> SYMMETRY_BACKEND [K290, SPGLIB]
!> SYMMETRY_REDUCTION_METHOD [K290, SPGLIB]
!> VERBOSE [on, off]
@ -101,9 +102,10 @@ CONTAINS
CALL keyword_create(keyword, __LOCATION__, name="GAMMA_CENTERED", &
description="Generate a gamma-centered variant of the "// &
"Monkhorst-Pack mesh. This shifts the original mesh so "// &
"it can include Gamma point, and makes sense only when an "// &
"even number of subdivisions is used.", &
"Monkhorst-Pack or MacDonald mesh. This shifts the original mesh so "// &
"it can include the Gamma point, and makes sense only when an "// &
"even number of subdivisions is used. For MacDonald meshes, the "// &
"explicit shift is applied after the gamma-centering shift.", &
usage="GAMMA_CENTERED <LOGICAL>", &
default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
@ -148,6 +150,16 @@ CONTAINS
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="DEBUG_FULL_KPOINT_SYMMETRY", &
description="Use full atomic k-point symmetry also for DEBUG finite-difference "// &
"points. This is an expert option: the default keeps finite-difference energies "// &
"on inversion/time-reversal symmetry to avoid comparing slightly different "// &
"irreducible k-point sets.", &
usage="DEBUG_FULL_KPOINT_SYMMETRY <LOGICAL>", &
default_l_val=.FALSE., lone_keyword_l_val=.TRUE.)
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)
CALL keyword_create(keyword, __LOCATION__, name="SYMMETRY_BACKEND", &
description="Select the backend used to provide and apply atomic "// &
"k-point symmetry operations. K290 is the established default. "// &

View file

@ -1423,7 +1423,7 @@ CONTAINS
ispin, jr, nc, nimg, nkp, nspin
INTEGER, DIMENSION(:, :, :), POINTER :: cell_to_index
LOGICAL :: aux_fit, do_ext, do_symmetric, my_kpgrp, &
real_only
real_only, reverse_phase
REAL(KIND=dp) :: wkpx
REAL(KIND=dp), DIMENSION(:), POINTER :: wkp
REAL(KIND=dp), DIMENSION(:, :), POINTER :: xkp
@ -1486,6 +1486,8 @@ CONTAINS
nc = SIZE(kp%mos, 1)
nimg = SIZE(denmat, 2)
real_only = (nc == 1)
! Gamma-centered even grids store atom-cell shifts in the opposite Bloch-phase convention.
reverse_phase = kpoint%gamma_centered .AND. ANY(MOD(kpoint%nkp_grid(1:3), 2) == 0)
para_env => kpoint%blacs_env_all%para_env
ALLOCATE (info(nspin*nkp*nc))
@ -1568,7 +1570,7 @@ CONTAINS
CALL symtrans_phase(srpmat, scpmat, rpmat, cpmat, real_only, kind_rot, &
kpsym%rot(1:3, 1:3, is), kpsym%f0(:, is), &
kpsym%fcell(:, :, is), kpoint%atype, kpsym%xkp(1:3, is), &
kpsym%rotp(is) < 0)
kpsym%rotp(is) < 0, reverse_phase)
CALL transform_dmat(denmat, srpmat, scpmat, ispin, real_only, sab_nl, &
cell_to_index, kpsym%xkp(1:3, is), wkpx)
END DO
@ -1742,9 +1744,10 @@ CONTAINS
!> \param atype atom to kind pointer
!> \param xkp target k-point coordinates
!> \param time_reversal ...
!> \param reverse_phase ...
! **************************************************************************************************
SUBROUTINE symtrans_phase(srpmat, scpmat, rpmat, cpmat, real_only, kmat, rot, f0, fcell, atype, &
xkp, time_reversal)
xkp, time_reversal, reverse_phase)
TYPE(dbcsr_type), POINTER :: srpmat, scpmat, rpmat, cpmat
LOGICAL, INTENT(IN) :: real_only
@ -1754,7 +1757,7 @@ CONTAINS
INTEGER, DIMENSION(:, :), INTENT(IN) :: fcell
INTEGER, DIMENSION(:), INTENT(IN) :: atype
REAL(KIND=dp), DIMENSION(3), INTENT(IN) :: xkp
LOGICAL, INTENT(IN) :: time_reversal
LOGICAL, INTENT(IN) :: time_reversal, reverse_phase
CHARACTER(LEN=*), PARAMETER :: routineN = 'symtrans_phase'
@ -1826,7 +1829,11 @@ CONTAINS
kroti => kmat(ikind)%rmat
krotj => kmat(jkind)%rmat
shift = fcell(1:3, icol) - fcell(1:3, irow)
IF (reverse_phase) THEN
shift = fcell(1:3, irow) - fcell(1:3, icol)
ELSE
shift = fcell(1:3, icol) - fcell(1:3, irow)
END IF
arg = REAL(shift(1), dp)*xkp(1) + REAL(shift(2), dp)*xkp(2) + REAL(shift(3), dp)*xkp(3)
! The Bloch phase depends only on the mapped atom-cell shifts and the target k-point.
coskl = COS(twopi*arg)

View file

@ -778,9 +778,10 @@ CONTAINS
END SELECT
CALL section_vals_val_get(kpoint_section, "GAMMA_CENTERED", l_val=kpoint%gamma_centered)
IF (kpoint%gamma_centered .AND. kpoint%kp_scheme /= "MONKHORST-PACK") THEN
IF (kpoint%gamma_centered .AND. kpoint%kp_scheme /= "MONKHORST-PACK" .AND. &
kpoint%kp_scheme /= "MACDONALD") THEN
CALL cp_abort(__LOCATION__, &
"KPOINTS%GAMMA_CENTERED is only supported with SCHEME MONKHORST-PACK")
"KPOINTS%GAMMA_CENTERED is only supported with SCHEME MONKHORST-PACK or MACDONALD")
END IF
CALL section_vals_val_get(kpoint_section, "SYMMETRY", l_val=kpoint%symmetry)
@ -889,6 +890,9 @@ CONTAINS
WRITE (punit, '(A,T71,A10)') ' BRILLOUIN| K-point scheme ', ' MacDonald'
WRITE (punit, '(A,T66,3I5)') ' BRILLOUIN| K-Point grid', kpoint%nkp_grid
WRITE (punit, '(A,T51,3F10.4)') ' BRILLOUIN| K-Point shift', kpoint%kp_shift
IF (kpoint%gamma_centered) THEN
WRITE (punit, '(A,T76,A)') ' BRILLOUIN| Gamma-centered k-point mesh', ' ON'
END IF
WRITE (punit, '(A,T66,G15.6)') &
' BRILLOUIN| K-point symmetry accuracy', kpoint%eps_geo
CASE ("GENERAL")

View file

@ -297,9 +297,12 @@ CONTAINS
!> \param mp_grid ...
!> \param kpgeneral ...
!> \param group_size_ext ...
!> \param kp_shift ...
!> \param gamma_centered ...
!> \author JGH
! **************************************************************************************************
SUBROUTINE calculate_kp_orbitals(qs_env, kpoint, scheme, nadd, mp_grid, kpgeneral, group_size_ext)
SUBROUTINE calculate_kp_orbitals(qs_env, kpoint, scheme, nadd, mp_grid, kpgeneral, group_size_ext, &
kp_shift, gamma_centered)
TYPE(qs_environment_type), POINTER :: qs_env
TYPE(kpoint_type), POINTER :: kpoint
CHARACTER(LEN=*), INTENT(IN) :: scheme
@ -308,6 +311,8 @@ CONTAINS
REAL(KIND=dp), DIMENSION(:, :), INTENT(IN), &
OPTIONAL :: kpgeneral
INTEGER, INTENT(IN), OPTIONAL :: group_size_ext
REAL(KIND=dp), DIMENSION(3), INTENT(IN), OPTIONAL :: kp_shift
LOGICAL, INTENT(IN), OPTIONAL :: gamma_centered
LOGICAL :: diis_step
TYPE(cp_blacs_env_type), POINTER :: blacs_env
@ -319,7 +324,8 @@ CONTAINS
TYPE(qs_scf_env_type), POINTER :: scf_env
TYPE(scf_control_type), POINTER :: scf_control
CALL calculate_kpoints_for_bs(kpoint, scheme, group_size_ext, mp_grid, kpgeneral)
CALL calculate_kpoints_for_bs(kpoint, scheme, group_size_ext, mp_grid, kpgeneral, &
kp_shift, gamma_centered)
CALL get_qs_env(qs_env=qs_env, para_env=para_env, blacs_env=blacs_env)
CALL kpoint_env_initialize(kpoint, para_env, blacs_env)
@ -343,8 +349,11 @@ CONTAINS
!> \param group_size_ext ...
!> \param mp_grid ...
!> \param kpgeneral ...
!> \param kp_shift ...
!> \param gamma_centered ...
! **************************************************************************************************
SUBROUTINE calculate_kpoints_for_bs(kpoint, scheme, group_size_ext, mp_grid, kpgeneral)
SUBROUTINE calculate_kpoints_for_bs(kpoint, scheme, group_size_ext, mp_grid, kpgeneral, &
kp_shift, gamma_centered)
TYPE(kpoint_type), POINTER :: kpoint
CHARACTER(LEN=*), INTENT(IN) :: scheme
@ -352,18 +361,36 @@ CONTAINS
INTEGER, DIMENSION(3), INTENT(IN), OPTIONAL :: mp_grid
REAL(KIND=dp), DIMENSION(:, :), INTENT(IN), &
OPTIONAL :: kpgeneral
REAL(KIND=dp), DIMENSION(3), INTENT(IN), OPTIONAL :: kp_shift
LOGICAL, INTENT(IN), OPTIONAL :: gamma_centered
INTEGER :: i, ix, iy, iz, npoints
INTEGER :: i, idim, ix, iy, iz, npoints
INTEGER, DIMENSION(3) :: ik
LOGICAL :: gamma_mesh
REAL(KIND=dp), DIMENSION(3) :: kpt_latt, shift
CPASSERT(.NOT. ASSOCIATED(kpoint))
CALL kpoint_create(kpoint)
IF (PRESENT(kp_shift)) THEN
shift = kp_shift
ELSE
shift = 0.0_dp
END IF
IF (PRESENT(gamma_centered)) THEN
gamma_mesh = gamma_centered
ELSE
gamma_mesh = .FALSE.
END IF
kpoint%kp_scheme = scheme
kpoint%symmetry = .FALSE.
kpoint%verbose = .FALSE.
kpoint%full_grid = .FALSE.
kpoint%use_real_wfn = .FALSE.
kpoint%gamma_centered = gamma_mesh
kpoint%kp_shift = shift
kpoint%eps_geo = 1.e-6_dp
IF (PRESENT(group_size_ext)) THEN
kpoint%parallel_group_size = group_size_ext
@ -380,7 +407,7 @@ CONTAINS
ALLOCATE (kpoint%kp_sym(1))
NULLIFY (kpoint%kp_sym(1)%kpoint_sym)
CALL kpoint_sym_create(kpoint%kp_sym(1)%kpoint_sym)
CASE ("MONKHORST-PACK")
CASE ("MONKHORST-PACK", "MACDONALD")
CPASSERT(PRESENT(mp_grid))
npoints = mp_grid(1)*mp_grid(2)*mp_grid(3)
kpoint%nkp_grid(1:3) = mp_grid(1:3)
@ -393,9 +420,17 @@ CONTAINS
DO iy = 1, mp_grid(2)
DO iz = 1, mp_grid(3)
i = i + 1
kpoint%xkp(1, i) = REAL(2*ix - mp_grid(1) - 1, KIND=dp)/(2._dp*REAL(mp_grid(1), KIND=dp))
kpoint%xkp(2, i) = REAL(2*iy - mp_grid(2) - 1, KIND=dp)/(2._dp*REAL(mp_grid(2), KIND=dp))
kpoint%xkp(3, i) = REAL(2*iz - mp_grid(3) - 1, KIND=dp)/(2._dp*REAL(mp_grid(3), KIND=dp))
ik = [ix, iy, iz]
DO idim = 1, 3
IF (gamma_mesh .AND. MOD(mp_grid(idim), 2) == 0) THEN
kpt_latt(idim) = REAL(2*ik(idim) - mp_grid(idim), KIND=dp)/ &
(2._dp*REAL(mp_grid(idim), KIND=dp))
ELSE
kpt_latt(idim) = REAL(2*ik(idim) - mp_grid(idim) - 1, KIND=dp)/ &
(2._dp*REAL(mp_grid(idim), KIND=dp))
END IF
END DO
kpoint%xkp(1:3, i) = kpt_latt(1:3) + shift(1:3)
END DO
END DO
END DO
@ -405,8 +440,6 @@ CONTAINS
NULLIFY (kpoint%kp_sym(i)%kpoint_sym)
CALL kpoint_sym_create(kpoint%kp_sym(i)%kpoint_sym)
END DO
CASE ("MACDONALD")
CPABORT("MACDONALD not implemented")
CASE ("GENERAL")
CPASSERT(PRESENT(kpgeneral))
npoints = SIZE(kpgeneral, 2)

View file

@ -101,8 +101,7 @@ CONTAINS
END DO
IF (ira > 0) THEN
IF (.NOT. ASSOCIATED(kpoints%kind_rotmat(ira, 1)%rmat)) THEN
rotmat(1:3, 1:3) = MATMUL(cell%h_inv, &
MATMUL(kpsym%rot(:, :, irot), cell%hmat))
rotmat(1:3, 1:3) = kpsym%rot(1:3, 1:3, irot)
CALL calculate_rotmat(orbrot, rotmat, lval)
IF (dft_control%qs_control%method_id == do_method_dftb) THEN
DO ikind = 1, nkind

View file

@ -90,13 +90,12 @@ MODULE qs_environment
USE hfx_types, ONLY: compare_hfx_sections,&
hfx_create
USE input_constants, ONLY: &
cell_opt_run, debug_run, dispersion_d2, dispersion_d3, dispersion_d3bj, do_et_ddapc, &
do_method_am1, do_method_dftb, do_method_gapw, do_method_gapw_xc, do_method_gpw, &
do_method_lrigpw, do_method_mndo, do_method_mndod, do_method_ofgpw, do_method_pdg, &
do_method_pm3, do_method_pm6, do_method_pm6fm, do_method_pnnl, do_method_rigpw, &
do_method_rm1, do_method_xtb, do_qmmm_gauss, do_qmmm_swave, driver_run, ehrenfest, &
general_roks, geo_opt_run, hden_atomic, kg_tnadd_embed_ri, linear_response_run, &
mol_dyn_run, rel_none, rel_trans_atom, smear_fermi_dirac, tblite_scc_mixer_tblite, &
debug_run, dispersion_d2, dispersion_d3, dispersion_d3bj, do_et_ddapc, do_method_am1, &
do_method_dftb, do_method_gapw, do_method_gapw_xc, do_method_gpw, do_method_lrigpw, &
do_method_mndo, do_method_mndod, do_method_ofgpw, do_method_pdg, do_method_pm3, &
do_method_pm6, do_method_pm6fm, do_method_pnnl, do_method_rigpw, do_method_rm1, &
do_method_xtb, do_qmmm_gauss, do_qmmm_swave, general_roks, hden_atomic, kg_tnadd_embed_ri, &
linear_response_run, rel_none, rel_trans_atom, smear_fermi_dirac, tblite_scc_mixer_tblite, &
vdw_pairpot_dftd2, vdw_pairpot_dftd3, vdw_pairpot_dftd3bj, vdw_pairpot_dftd4, &
wfi_gext_proj_nr, wfi_gext_proj_qtr_nr, wfi_linear_ps_method_nr, wfi_linear_wf_method_nr, &
wfi_use_prev_wf_method_nr, xc_vdw_fun_none, xc_vdw_fun_nonloc, xc_vdw_fun_pairpot, &
@ -272,10 +271,10 @@ CONTAINS
CHARACTER(LEN=default_string_length) :: basis_type
INTEGER :: ikind, method_id, nelectron_total, &
nkind, nkp_grid(3)
LOGICAL :: dftb_kpoint_sym_restricted, do_active_space, do_admm_rpa, do_bse, do_debug_fdiff, &
do_debug_forces, do_debug_stress_tensor, do_dftb_scc, do_dftb_scc_high_l, do_ec_hfx, &
do_et, do_exx, do_gw, do_hfx, do_kpoints, do_linear_response, do_mp2, do_ri_mp2, &
do_ri_rpa, do_ri_sos_mp2, do_tddfpt, do_unpreserved_motion, do_wfc_low_scaling, &
LOGICAL :: dftb_kpoint_sym_restricted, do_active_space, do_admm, do_admm_rpa, do_bse, &
do_debug_fdiff, do_debug_forces, do_debug_stress_tensor, do_dftb_scc, do_dftb_scc_high_l, &
do_ec_hfx, do_et, do_exx, do_gw, do_hfx, do_kpoints, do_linear_response, do_mp2, &
do_ri_mp2, do_ri_rpa, do_ri_sos_mp2, do_tddfpt, do_wfc_low_scaling, &
do_wfc_low_scaling_kpoints, do_xtb_tblite, final_kpoint_reinit, is_identical, is_semi, &
kpoint_verbose, mp2_present, my_qmmm, owned_kpoints, qmmm_decoupl, same_except_frac, &
use_ref_cell
@ -297,9 +296,9 @@ CONTAINS
TYPE(qs_wf_history_type), POINTER :: wf_history
TYPE(rel_control_type), POINTER :: rel_control
TYPE(scf_control_type), POINTER :: scf_control
TYPE(section_vals_type), POINTER :: active_space_section, dft_section, ec_hfx_section, &
ec_section, et_coupling_section, gw_section, hfx_section, kpoint_section, mp2_section, &
rpa_hfx_section, tddfpt_section, transport_section
TYPE(section_vals_type), POINTER :: active_space_section, admm_section, dft_section, &
ec_hfx_section, ec_section, et_coupling_section, gw_section, hfx_section, kpoint_section, &
mp2_section, rpa_hfx_section, tddfpt_section, transport_section
NULLIFY (my_cell, my_cell_ref, atomic_kind_set, particle_set, &
qs_kind_set, kpoint_section, dft_section, ec_section, &
@ -394,6 +393,9 @@ CONTAINS
do_exx = .FALSE.
rpa_hfx_section => section_vals_get_subs_vals(qs_env%input, "DFT%XC%WF_CORRELATION%RI_RPA%HF")
CALL section_vals_get(rpa_hfx_section, explicit=do_exx)
do_admm = .FALSE.
admm_section => section_vals_get_subs_vals(qs_env%input, "DFT%AUXILIARY_DENSITY_MATRIX_METHOD")
CALL section_vals_get(admm_section, explicit=do_admm)
do_gw = .FALSE.
gw_section => section_vals_get_subs_vals(qs_env%input, "DFT%XC%WF_CORRELATION%RI_RPA%GW")
CALL section_vals_get(gw_section, explicit=do_gw)
@ -427,16 +429,6 @@ CONTAINS
END IF
do_linear_response = .FALSE.
IF (PRESENT(globenv)) do_linear_response = globenv%run_type_id == linear_response_run
do_unpreserved_motion = .FALSE.
IF (PRESENT(globenv)) THEN
IF (PRESENT(root_section)) THEN
do_unpreserved_motion = moving_geometry_without_kpoint_symmetry_revalidation( &
globenv%run_type_id, root_section)
ELSE
do_unpreserved_motion = moving_geometry_without_kpoint_symmetry_revalidation( &
globenv%run_type_id)
END IF
END IF
do_debug_fdiff = .FALSE.
IF (PRESENT(globenv)) do_debug_fdiff = globenv%run_type_id == debug_run
IF (do_debug_fdiff .AND. PRESENT(root_section)) THEN
@ -478,7 +470,7 @@ CONTAINS
do_mp2 .OR. do_ri_mp2 .OR. do_ri_sos_mp2, &
do_ri_rpa .AND. .NOT. do_gw, do_bse, &
do_wfc_low_scaling, do_wfc_low_scaling_kpoints, &
do_xtb_tblite, do_unpreserved_motion, .FALSE.)
do_xtb_tblite, do_admm, .FALSE.)
CALL kpoint_initialize(kpoints, particle_set, my_cell)
END IF
@ -497,8 +489,7 @@ CONTAINS
do_mp2 .OR. do_ri_mp2 .OR. do_ri_sos_mp2, &
do_ri_rpa .AND. .NOT. do_gw, do_bse, &
do_wfc_low_scaling, do_wfc_low_scaling_kpoints, &
do_xtb_tblite, do_unpreserved_motion, &
do_dftb_scc_high_l, &
do_xtb_tblite, do_admm, do_dftb_scc_high_l, &
restricted=dftb_kpoint_sym_restricted)
final_kpoint_reinit = dftb_kpoint_sym_restricted .OR. kpoint_verbose
IF (final_kpoint_reinit) THEN
@ -723,7 +714,7 @@ CONTAINS
!> \param do_wfc_low_scaling ...
!> \param do_wfc_low_scaling_kpoints ...
!> \param do_xtb_tblite ...
!> \param do_unpreserved_motion ...
!> \param do_admm ...
!> \param do_dftb_scc_high_l ...
!> \param restricted ...
! **************************************************************************************************
@ -732,13 +723,12 @@ CONTAINS
do_debug_fdiff, &
do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
do_wfc_low_scaling_kpoints, do_xtb_tblite, &
do_unpreserved_motion, do_dftb_scc_high_l, &
restricted)
do_admm, do_dftb_scc_high_l, restricted)
TYPE(kpoint_type), POINTER :: kpoints
INTEGER, INTENT(IN) :: method_id
LOGICAL, INTENT(IN) :: do_hfx, do_exx, do_gw, do_tddfpt, do_active_space, &
do_linear_response, do_debug_fdiff, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
do_wfc_low_scaling_kpoints, do_xtb_tblite, do_unpreserved_motion, do_dftb_scc_high_l
do_wfc_low_scaling_kpoints, do_xtb_tblite, do_admm, do_dftb_scc_high_l
LOGICAL, INTENT(OUT), OPTIONAL :: restricted
CHARACTER(LEN=default_string_length) :: kp_scheme, reason
@ -783,7 +773,7 @@ CONTAINS
do_debug_fdiff, &
do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
do_wfc_low_scaling_kpoints, do_xtb_tblite, &
do_unpreserved_motion, do_dftb_scc_high_l)
do_admm, do_dftb_scc_high_l)
IF (LEN_TRIM(reason) == 0) RETURN
CALL cp_warn(__LOCATION__, &
@ -859,7 +849,7 @@ CONTAINS
!> \param do_wfc_low_scaling ...
!> \param do_wfc_low_scaling_kpoints ...
!> \param do_xtb_tblite ...
!> \param do_unpreserved_motion ...
!> \param do_admm ...
!> \param do_dftb_scc_high_l ...
!> \return reason
! **************************************************************************************************
@ -867,11 +857,11 @@ CONTAINS
do_active_space, do_linear_response, do_debug_fdiff, &
do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
do_wfc_low_scaling_kpoints, do_xtb_tblite, &
do_unpreserved_motion, do_dftb_scc_high_l) RESULT(reason)
do_admm, do_dftb_scc_high_l) RESULT(reason)
INTEGER, INTENT(IN) :: method_id
LOGICAL, INTENT(IN) :: do_hfx, do_exx, do_gw, do_tddfpt, do_active_space, &
do_linear_response, do_debug_fdiff, do_mp2, do_rpa, do_bse, do_wfc_low_scaling, &
do_wfc_low_scaling_kpoints, do_xtb_tblite, do_unpreserved_motion, do_dftb_scc_high_l
do_wfc_low_scaling_kpoints, do_xtb_tblite, do_admm, do_dftb_scc_high_l
CHARACTER(LEN=default_string_length) :: reason
reason = ""
@ -893,14 +883,12 @@ CONTAINS
END SELECT
IF (LEN_TRIM(reason) > 0) RETURN
IF (do_unpreserved_motion) THEN
reason = "geometry-changing runs without preserved space-group symmetry"
IF ((do_hfx .OR. do_exx) .AND. do_admm) THEN
reason = "HFX/HF with ADMM"
ELSE IF (do_bse) THEN
reason = "BSE"
ELSE IF (do_gw) THEN
reason = "GW"
ELSE IF (do_hfx .OR. do_exx) THEN
reason = "HFX/HF"
ELSE IF (do_tddfpt) THEN
reason = "TDDFPT/TDDFT"
ELSE IF (do_active_space) THEN
@ -919,51 +907,6 @@ CONTAINS
END FUNCTION unsupported_atomic_kpoint_symmetry_reason
! **************************************************************************************************
!> \brief Return whether atomic k-point symmetry would have to be revalidated during motion
!> \param run_type_id ...
!> \param root_section ...
!> \return unpreserved
! **************************************************************************************************
FUNCTION moving_geometry_without_kpoint_symmetry_revalidation(run_type_id, root_section) RESULT(unpreserved)
INTEGER, INTENT(IN) :: run_type_id
TYPE(section_vals_type), OPTIONAL, POINTER :: root_section
LOGICAL :: unpreserved
LOGICAL :: keep_space_group
TYPE(section_vals_type), POINTER :: motion_section
NULLIFY (motion_section)
unpreserved = .FALSE.
keep_space_group = .FALSE.
SELECT CASE (run_type_id)
CASE (cell_opt_run)
unpreserved = .TRUE.
IF (PRESENT(root_section)) THEN
motion_section => section_vals_get_subs_vals(root_section, "MOTION%CELL_OPT")
IF (ASSOCIATED(motion_section)) THEN
CALL section_vals_val_get(motion_section, "KEEP_SPACE_GROUP", l_val=keep_space_group)
unpreserved = .NOT. keep_space_group
END IF
END IF
CASE (geo_opt_run)
unpreserved = .TRUE.
IF (PRESENT(root_section)) THEN
motion_section => section_vals_get_subs_vals(root_section, "MOTION%GEO_OPT")
IF (ASSOCIATED(motion_section)) THEN
CALL section_vals_val_get(motion_section, "KEEP_SPACE_GROUP", l_val=keep_space_group)
unpreserved = .NOT. keep_space_group
END IF
END IF
CASE (mol_dyn_run, ehrenfest, driver_run)
unpreserved = .TRUE.
CASE DEFAULT
unpreserved = .FALSE.
END SELECT
END FUNCTION moving_geometry_without_kpoint_symmetry_revalidation
! **************************************************************************************************
!> \brief Return whether the DFTB kind set contains d orbitals
!> \param qs_kind_set ...

View file

@ -1517,9 +1517,12 @@ CONTAINS
!> \param mp_grid ...
!> \param kpgeneral ...
!> \param with_xc_terms ...
!> \param kp_shift ...
!> \param gamma_centered ...
! **************************************************************************************************
SUBROUTINE create_kp_and_calc_kp_orbitals(qs_env, kpoints, scheme, &
group_size_ext, mp_grid, kpgeneral, with_xc_terms)
group_size_ext, mp_grid, kpgeneral, with_xc_terms, &
kp_shift, gamma_centered)
TYPE(qs_environment_type), POINTER :: qs_env
TYPE(kpoint_type), POINTER :: kpoints
@ -1529,6 +1532,8 @@ CONTAINS
REAL(KIND=dp), DIMENSION(:, :), INTENT(IN), &
OPTIONAL :: kpgeneral
LOGICAL, OPTIONAL :: with_xc_terms
REAL(KIND=dp), DIMENSION(3), INTENT(IN), OPTIONAL :: kp_shift
LOGICAL, INTENT(IN), OPTIONAL :: gamma_centered
CHARACTER(LEN=*), PARAMETER :: routineN = 'create_kp_and_calc_kp_orbitals'
@ -1566,7 +1571,8 @@ CONTAINS
! get kpoints
CALL calculate_kpoints_for_bs(kpoints, scheme, kpgeneral=kpgeneral, mp_grid=mp_grid, &
group_size_ext=group_size_ext)
group_size_ext=group_size_ext, kp_shift=kp_shift, &
gamma_centered=gamma_centered)
CALL kpoint_env_initialize(kpoints, para_env, blacs_env)

View file

@ -11,7 +11,10 @@
"c_6.inp" = [{matcher="E_total", tol=3e-14, ref=-46.02680478900022}]
"c_gapw.inp" = [{matcher="E_total", tol=2e-13, ref=-302.06260708591526}]
"c_gapwxc.inp" = [{matcher="E_total", tol=1e-12, ref=-45.66746891467081}]
"c_cell_opt_kpsym_guard.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=4}]
"c_cell_opt_kpsym_guard.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=1}]
"c_debug_kpsym_default.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=4}]
"c_debug_kpsym_full.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=3}]
"c_geo_opt_kpsym_spglib.inp" = [{matcher="N_special_kpoints", tol=0.0, ref=1}]
"cn_1.inp" = [{matcher="E_total", tol=5e-12, ref=-49.26750298571628}]
"c_dos.inp" = [{matcher="E_total", tol=2e-14, ref=-45.65703654036614}]
"h_sym_red.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34916646889997}]
@ -23,6 +26,15 @@
"h_inv_red.inp" = [{matcher="E_total", tol=1e-13, ref=-4.34916646889997}]
"h_ortho_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-2.73592238316042}]
"h_mono_sym_red.inp" = [{matcher="E_total", tol=1e-10, ref=-3.15139711262736}]
"h_hex_c3_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-9.17691856252346}]
"h_hex_c3_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-9.17691856252346},
{matcher="N_special_kpoints", tol=0.0, ref=9}]
"h_hex_c3_gamma_k290.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41333967352938},
{matcher="N_special_kpoints", tol=0.0, ref=8}]
"h_hex_c3_gamma_spglib.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41333967352940},
{matcher="N_special_kpoints", tol=0.0, ref=8}]
"h_hex_c3_gamma_macdonald_k290.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41375200649569},
{matcher="N_special_kpoints", tol=0.0, ref=12}]
"h_hex_c3_gamma_macdonald_spglib.inp" = [{matcher="E_total", tol=1e-7, ref=-9.41375200649571},
{matcher="N_special_kpoints", tol=0.0, ref=12}]
"h_tetra_c4_sym_red.inp" = [{matcher="E_total", tol=1e-8, ref=-3.95113501866984}]
#EOF

View file

@ -0,0 +1,72 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT DEBUG_C2_KPSYM
RUN_TYPE DEBUG
&END GLOBAL
&DEBUG
CHECK_ATOM_FORCE 1 Z
DEBUG_FORCES T
DEBUG_STRESS_TENSOR F
EPS_NO_ERROR_CHECK 1.0
STOP_ON_MISMATCH F
&END DEBUG
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
PARALLEL_GROUP_SIZE -1
SCHEME MONKHORST-PACK 2 2 2
SYMMETRY ON
SYMMETRY_BACKEND SPGLIB
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 80
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
EPS_SCF 1.0E-5
IGNORE_CONVERGENCE_FAILURE
MAX_SCF 3
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.70
METHOD DIRECT_P_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 7.5 7.5 7.5
ALPHA_BETA_GAMMA 60.0 60.0 60.0
&END CELL
&COORD
SCALED
C 0.00000000 0.00000000 0.00000000
C 0.25000000 0.25000000 0.25000000
&END COORD
&KIND C
BASIS_SET DZVP-MOLOPT-PBE-GTH-q4
POTENTIAL GTH-PBE-q4
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,73 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT DEBUG_C2_KPSYM_FULL
RUN_TYPE DEBUG
&END GLOBAL
&DEBUG
CHECK_ATOM_FORCE 1 Z
DEBUG_FORCES T
DEBUG_STRESS_TENSOR F
EPS_NO_ERROR_CHECK 1.0
STOP_ON_MISMATCH F
&END DEBUG
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
DEBUG_FULL_KPOINT_SYMMETRY T
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
PARALLEL_GROUP_SIZE -1
SCHEME MONKHORST-PACK 2 2 2
SYMMETRY ON
SYMMETRY_BACKEND SPGLIB
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 80
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
EPS_SCF 1.0E-5
IGNORE_CONVERGENCE_FAILURE
MAX_SCF 3
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.70
METHOD DIRECT_P_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 7.5 7.5 7.5
ALPHA_BETA_GAMMA 60.0 60.0 60.0
&END CELL
&COORD
SCALED
C 0.00000000 0.00000000 0.00000000
C 0.25000000 0.25000000 0.25000000
&END COORD
&KIND C
BASIS_SET DZVP-MOLOPT-PBE-GTH-q4
POTENTIAL GTH-PBE-q4
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,76 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT C_GEO_OPT_KPSYM_SPGLIB
RUN_TYPE GEO_OPT
&END GLOBAL
&MOTION
&GEO_OPT
KEEP_SPACE_GROUP T
MAX_ITER 1
&END GEO_OPT
&END MOTION
&FORCE_EVAL
METHOD Quickstep
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
PARALLEL_GROUP_SIZE -1
SCHEME MONKHORST-PACK 2 2 2
SYMMETRY ON
SYMMETRY_BACKEND SPGLIB
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 120
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
EPS_SCF 1.0E-6
IGNORE_CONVERGENCE_FAILURE
MAX_SCF 6
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.70
METHOD DIRECT_P_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
ABC 3.56683 3.56683 3.56683
&END CELL
&COORD
SCALED
C 0.000000 0.000000 0.000000
C 0.500000 0.500000 0.000000
C 0.500000 0.000000 0.500000
C 0.000000 0.500000 0.500000
C 0.250000 0.250000 0.250000
C 0.250000 0.750000 0.750000
C 0.750000 0.250000 0.750000
C 0.750000 0.750000 0.250000
&END COORD
&KIND C
BASIS_SET DZVP-MOLOPT-PBE-GTH-q4
POTENTIAL GTH-PBE-q4
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,82 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT H_HEX_C3_GAMMA_K290
RUN_TYPE ENERGY
&END GLOBAL
&FORCE_EVAL
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
GAMMA_CENTERED T
PARALLEL_GROUP_SIZE -1
SCHEME MONKHORST-PACK 4 4 2
SYMMETRY ON
SYMMETRY_BACKEND K290
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 100
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
CHOLESKY OFF
EPS_EIGVAL 1.e-8
EPS_SCF 1.0E-9
MAX_SCF 100
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.35
METHOD BROYDEN_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
A 5.4000000000 0.0000000000 0.0000000000
B -2.7000000000 4.6765371804 0.0000000000
C 0.0000000000 0.0000000000 8.2000000000
&END CELL
&COORD
SCALED
H 0.12000000 0.27000000 0.19000000
H 0.73000000 0.85000000 0.19000000
H 0.15000000 0.88000000 0.19000000
H 0.38000000 0.14000000 0.61000000
H 0.86000000 0.24000000 0.61000000
H 0.76000000 0.62000000 0.61000000
H 0.22000000 0.47000000 0.83000000
H 0.53000000 0.75000000 0.83000000
H 0.25000000 0.78000000 0.83000000
H 0.51000000 0.09000000 0.33000000
H 0.91000000 0.42000000 0.33000000
H 0.58000000 0.49000000 0.33000000
H 0.18000000 0.64000000 0.52000000
H 0.36000000 0.54000000 0.52000000
H 0.46000000 0.82000000 0.52000000
H 0.43000000 0.31000000 0.77000000
H 0.69000000 0.12000000 0.77000000
H 0.88000000 0.57000000 0.77000000
&END COORD
&KIND H
BASIS_SET ORB DZVP-MOLOPT-GGA-GTH-q1
POTENTIAL GTH-GGA-q1
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,82 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT H_HEX_C3_GAMMA_MACDONALD_K290
RUN_TYPE ENERGY
&END GLOBAL
&FORCE_EVAL
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
GAMMA_CENTERED T
PARALLEL_GROUP_SIZE -1
SCHEME MACDONALD 4 4 2 0.0 0.0 0.125
SYMMETRY ON
SYMMETRY_BACKEND K290
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 100
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
CHOLESKY OFF
EPS_EIGVAL 1.e-8
EPS_SCF 1.0E-9
MAX_SCF 100
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.35
METHOD BROYDEN_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
A 5.4000000000 0.0000000000 0.0000000000
B -2.7000000000 4.6765371804 0.0000000000
C 0.0000000000 0.0000000000 8.2000000000
&END CELL
&COORD
SCALED
H 0.12000000 0.27000000 0.19000000
H 0.73000000 0.85000000 0.19000000
H 0.15000000 0.88000000 0.19000000
H 0.38000000 0.14000000 0.61000000
H 0.86000000 0.24000000 0.61000000
H 0.76000000 0.62000000 0.61000000
H 0.22000000 0.47000000 0.83000000
H 0.53000000 0.75000000 0.83000000
H 0.25000000 0.78000000 0.83000000
H 0.51000000 0.09000000 0.33000000
H 0.91000000 0.42000000 0.33000000
H 0.58000000 0.49000000 0.33000000
H 0.18000000 0.64000000 0.52000000
H 0.36000000 0.54000000 0.52000000
H 0.46000000 0.82000000 0.52000000
H 0.43000000 0.31000000 0.77000000
H 0.69000000 0.12000000 0.77000000
H 0.88000000 0.57000000 0.77000000
&END COORD
&KIND H
BASIS_SET ORB DZVP-MOLOPT-GGA-GTH-q1
POTENTIAL GTH-GGA-q1
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,83 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT H_HEX_C3_GAMMA_MACDONALD_SPGLIB
RUN_TYPE ENERGY
&END GLOBAL
&FORCE_EVAL
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
GAMMA_CENTERED T
PARALLEL_GROUP_SIZE -1
SCHEME MACDONALD 4 4 2 0.0 0.0 0.125
SYMMETRY ON
SYMMETRY_BACKEND SPGLIB
SYMMETRY_REDUCTION_METHOD SPGLIB
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 100
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
CHOLESKY OFF
EPS_EIGVAL 1.e-8
EPS_SCF 1.0E-9
MAX_SCF 100
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.35
METHOD BROYDEN_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
A 5.4000000000 0.0000000000 0.0000000000
B -2.7000000000 4.6765371804 0.0000000000
C 0.0000000000 0.0000000000 8.2000000000
&END CELL
&COORD
SCALED
H 0.12000000 0.27000000 0.19000000
H 0.73000000 0.85000000 0.19000000
H 0.15000000 0.88000000 0.19000000
H 0.38000000 0.14000000 0.61000000
H 0.86000000 0.24000000 0.61000000
H 0.76000000 0.62000000 0.61000000
H 0.22000000 0.47000000 0.83000000
H 0.53000000 0.75000000 0.83000000
H 0.25000000 0.78000000 0.83000000
H 0.51000000 0.09000000 0.33000000
H 0.91000000 0.42000000 0.33000000
H 0.58000000 0.49000000 0.33000000
H 0.18000000 0.64000000 0.52000000
H 0.36000000 0.54000000 0.52000000
H 0.46000000 0.82000000 0.52000000
H 0.43000000 0.31000000 0.77000000
H 0.69000000 0.12000000 0.77000000
H 0.88000000 0.57000000 0.77000000
&END COORD
&KIND H
BASIS_SET ORB DZVP-MOLOPT-GGA-GTH-q1
POTENTIAL GTH-GGA-q1
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -0,0 +1,83 @@
&GLOBAL
PRINT_LEVEL LOW
PROJECT H_HEX_C3_GAMMA_SPGLIB
RUN_TYPE ENERGY
&END GLOBAL
&FORCE_EVAL
&DFT
BASIS_SET_FILE_NAME BASIS_MOLOPT_UZH
POTENTIAL_FILE_NAME POTENTIAL_UZH
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
GAMMA_CENTERED T
PARALLEL_GROUP_SIZE -1
SCHEME MONKHORST-PACK 4 4 2
SYMMETRY ON
SYMMETRY_BACKEND SPGLIB
SYMMETRY_REDUCTION_METHOD SPGLIB
VERBOSE T
WAVEFUNCTIONS COMPLEX
&END KPOINTS
&MGRID
CUTOFF 100
REL_CUTOFF 30
&END MGRID
&QS
EPS_DEFAULT 1.0E-10
METHOD GPW
&END QS
&SCF
CHOLESKY OFF
EPS_EIGVAL 1.e-8
EPS_SCF 1.0E-9
MAX_SCF 100
SCF_GUESS ATOMIC
&MIXING
ALPHA 0.35
METHOD BROYDEN_MIXING
&END MIXING
&PRINT
&RESTART OFF
&END RESTART
&END PRINT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&END DFT
&SUBSYS
&CELL
A 5.4000000000 0.0000000000 0.0000000000
B -2.7000000000 4.6765371804 0.0000000000
C 0.0000000000 0.0000000000 8.2000000000
&END CELL
&COORD
SCALED
H 0.12000000 0.27000000 0.19000000
H 0.73000000 0.85000000 0.19000000
H 0.15000000 0.88000000 0.19000000
H 0.38000000 0.14000000 0.61000000
H 0.86000000 0.24000000 0.61000000
H 0.76000000 0.62000000 0.61000000
H 0.22000000 0.47000000 0.83000000
H 0.53000000 0.75000000 0.83000000
H 0.25000000 0.78000000 0.83000000
H 0.51000000 0.09000000 0.33000000
H 0.91000000 0.42000000 0.33000000
H 0.58000000 0.49000000 0.33000000
H 0.18000000 0.64000000 0.52000000
H 0.36000000 0.54000000 0.52000000
H 0.46000000 0.82000000 0.52000000
H 0.43000000 0.31000000 0.77000000
H 0.69000000 0.12000000 0.77000000
H 0.88000000 0.57000000 0.77000000
&END COORD
&KIND H
BASIS_SET ORB DZVP-MOLOPT-GGA-GTH-q1
POTENTIAL GTH-GGA-q1
&END KIND
&END SUBSYS
&END FORCE_EVAL

View file

@ -11,10 +11,12 @@
&KPOINTS
EPS_SYMMETRY 1.e-8
FULL_GRID OFF
INVERSION_SYMMETRY_ONLY ON
PARALLEL_GROUP_SIZE -1
SCHEME MONKHORST-PACK 3 3 2
SYMMETRY ON
SYMMETRY_BACKEND SPGLIB
VERBOSE T
&END KPOINTS
&MGRID
CUTOFF 120

View file

@ -1,6 +1,7 @@
"diamond_gapw_tc.inp" = [{matcher="M011", tol=1.0E-10, ref=-75.317785150617567}]
"diamond_gpw_extRI.inp" = [{matcher="M011", tol=1.0E-10, ref=-8.128239211260716}]
"diamond_gpw_extRI_kpsym.inp" = [{matcher="M011", tol=1.0E-10, ref=-8.128239211227628}]
"diamond_gpw_extRI_kpsym.inp" = [{matcher="M011", tol=1.0E-10, ref=-8.128239211227628},
{matcher="N_special_kpoints", tol=0.0, ref=2}]
"hBN_gapw_ovlp.inp" = [{matcher="M011", tol=1.0E-10, ref=-86.213599739489808}]
"hBN_gapw_tc.inp" = [{matcher="M011", tol=1.0E-10, ref=-77.588144157636464}]
"hBN_gapw_mix_cl_tc.inp" = [{matcher="M011", tol=1.0E-10, ref=-81.58088407995704}]

View file

@ -1,4 +1,4 @@
# runs are executed in the same order as in this file
"c_k290_space_group_ops.inp" = [{matcher="E_total", tol=1e-8, ref=-46.619328041359672},
"c_k290_space_group_ops.inp" = [{matcher="E_total", tol=1e-8, ref=-46.619328305735600},
{matcher="N_special_kpoints", tol=0.0, ref=10}]
#EOF