38 energy_self, runtime, force_fd, use_fd, use_mpi, use_self, error)
39 LOGICAL,
INTENT(IN) :: need_gradient, gapw_method
40 INTEGER,
INTENT(IN) :: max_l
41 LOGICAL,
INTENT(IN) :: is_model
42 INTEGER,
INTENT(IN) :: nranks
43 LOGICAL,
INTENT(IN) :: energy_self
44 CHARACTER(LEN=*),
INTENT(IN) :: runtime
45 LOGICAL,
INTENT(IN) :: force_fd
46 LOGICAL,
INTENT(OUT) :: use_fd, use_mpi, use_self
47 INTEGER,
INTENT(OUT) :: error
53 IF (.NOT. need_gradient)
RETURN
56 use_fd = force_fd .OR. (gapw_method .AND. max_l > 3 .AND. &
57 .NOT. (is_model .AND. gauxc_has_onedft_gradient_fix))
58 IF (.NOT. is_model .OR. nranks <= 1)
RETURN
62 use_mpi = gauxc_has_onedft_gradient_fix .AND. .NOT. energy_self .AND. .NOT. use_fd
63 use_self = .NOT. energy_self .AND. .NOT. use_mpi .AND. .NOT. use_fd
65 use_self = .NOT. energy_self .AND. .NOT. use_fd
67 IF (.NOT. gauxc_has_onedft_gradient_fix)
THEN
69 ELSE IF (energy_self)
THEN
pure subroutine, public gauxc_resolve_gradient_policy(need_gradient, gapw_method, max_l, is_model, nranks, energy_self, runtime, force_fd, use_fd, use_mpi, use_self, error)
Select molecular XC gradients without changing the energy/VXC runtime.