Calculate energy gradient using CASSCF
TODO: Implementation requires: 1. Converged CASSCF (orbitals and CI) 2. Solve Z-vector (CPHF-like) equations for response 3. Compute gradient contributions: a. One-electron derivative terms b. Two-electron derivative terms (with 2-RDM) c. Orbital response contribution d. CI response contribution (for state-specific) For state-averaged: gradient of weighted energy
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mcscf_method_t), | intent(in) | :: | this | |||
| type(physical_fragment_t), | intent(in) | :: | fragment | |||
| type(calculation_result_t), | intent(out) | :: | result |
subroutine mcscf_calc_gradient(this, fragment, result) !! Calculate energy gradient using CASSCF !! !! TODO: Implementation requires: !! 1. Converged CASSCF (orbitals and CI) !! 2. Solve Z-vector (CPHF-like) equations for response !! 3. Compute gradient contributions: !! a. One-electron derivative terms !! b. Two-electron derivative terms (with 2-RDM) !! c. Orbital response contribution !! d. CI response contribution (for state-specific) !! For state-averaged: gradient of weighted energy class(mcscf_method_t), intent(in) :: this type(physical_fragment_t), intent(in) :: fragment type(calculation_result_t), intent(out) :: result if (this%options%verbose) then print *, "MCSCF: Calculating CASSCF gradient" end if ! First get energy (and converged orbitals/CI) call this%calc_energy(fragment, result) if (result%has_error) return ! Allocate and fill dummy gradient allocate (result%gradient(3, fragment%n_atoms)) result%gradient = 0.0_dp ! Placeholder result%has_gradient = .true. if (this%options%verbose) then print *, "MCSCF: [STUB] Gradient computed" end if end subroutine mcscf_calc_gradient