Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
991ebc0
LR-TDDFT analytical gradients: port onto refactored develop
maki49 Aug 13, 2026
a51848b
fix(lr-grad): replace LibRI RI::LR with a local two-density-matrix EX…
maki49 Aug 13, 2026
531542e
fix(lr-grad): correct nspin in the LR grid-force ModuleGint calls, cl…
maki49 Aug 13, 2026
3bbb90d
fix(lr-grad): gather the RHS before the LAPACK Z-vector solve
maki49 Aug 13, 2026
d5d5d10
fix: singlet gate for gxc
maki49 Aug 18, 2026
495b7c0
fix: Hxc dm-trans term (symmetrization and factor)
maki49 Aug 18, 2026
72970b7
Fix some factor bugs in ceZc, K_ii terms (visible in DZP)
maki49 Aug 19, 2026
cd937ea
Fix: transpose dm_trans in Z-vector eq. RHS
maki49 Aug 19, 2026
5e1bb03
Fix pot_hxc_gs: correct TDRPA@LDA (linear vxc=fxc[gs](T+Z) instead of…
maki49 Aug 19, 2026
2bdaa6a
Feature: implement gxc
maki49 Aug 20, 2026
2a4f778
Perf: share gxc kernels to save memory
maki49 Aug 24, 2026
a54e18b
Perf: put drho out to cal_v_eff for gxc, to save memory
maki49 Aug 24, 2026
51df46b
fix nspin=1
maki49 Aug 27, 2026
e6dbb01
small fixes
maki49 Aug 28, 2026
68199dc
Perf: speed up the LR kernel-to-potential integrands by ~45%
maki49 Sep 1, 2026
ca76c00
feat: lr-grad openshell implementation
maki49 Sep 2, 2026
a5c73b0
Feat: enable LRC kernel
maki49 Sep 3, 2026
d91a131
Remove the LR-Grad EXX debug scaffolding
maki49 Sep 3, 2026
135c52d
fix(lr): make the KS-orbital window copy and paraX_ setup re-entrant
maki49 Sep 3, 2026
35254a9
refactor(lr): keep the KS solver as a member and alias its geometry o…
maki49 Sep 3, 2026
dbd737a
feat(lr): re-run the ground state from runner(istep)
maki49 Sep 4, 2026
ae72baf
feat(lr): drive geometry relaxation from an excited-state surface
maki49 Sep 4, 2026
b2a246c
fix(lr): scope the relax-target inputs, and clear out the re-entrancy…
maki49 Sep 4, 2026
2e8c043
fix(lr): the excited-state force adds the LR part, and log the energy
maki49 Sep 4, 2026
6a3d3f3
fix(lr): build an Exx_LRI on the ks-lr path for a hybrid ground state
maki49 Sep 4, 2026
399ec7e
fix: use an spin-index mixing in close-shell grad: affect triplet gra…
maki49 Sep 8, 2026
f1b237c
fix: expand Z-window to nbands for complete orbital rotation space
maki49 Sep 9, 2026
4094aea
fix: small fixes about nupdown and degeneracy information
maki49 Sep 11, 2026
aaf4032
fix openshell bug: parallel index in HamiltULR and add-on op-lr-diag
maki49 Sep 14, 2026
31df937
fix: adapt LR-gradient code to develop interface changes after rebase
maki49 Sep 15, 2026
68e56c6
fix compile warning
maki49 Sep 16, 2026
d33af90
fix: clamp sigma for HSE06's wpbeh kernel; fix complex CXC index bug
maki49 Oct 1, 2026
157822d
chore: remove diagnostic env-var switches from the LR-Grad investigation
maki49 Oct 2, 2026
9d0c84a
feat(lr-grad): algebra for the degenerate-subspace gradient matrix
maki49 Sep 28, 2026
138b2ca
refactor(lr-grad): let the excited-state gradient take X from the caller
maki49 Sep 28, 2026
d7dc54a
feat(lr-grad): compute the gradient matrix of a degenerate multiplet
maki49 Sep 28, 2026
82d2640
feat(lr-grad): store the degenerate gradient matrix, print its eigenv…
maki49 Sep 29, 2026
818dc96
feat: state following by max overlap
maki49 Sep 29, 2026
fa31179
feat(lr-grad): find the Jahn-Teller direction from the degenerate gra…
maki49 Sep 29, 2026
b14820c
feat(lr-grad): lr_relax_degen_mode = jt, descending the Jahn-Teller b…
maki49 Sep 29, 2026
c1183ba
fix: adapt LR-gradient code to develop interface changes after rebase…
maki49 Oct 2, 2026
b4ef783
test(lr): add cal_force to the gamma-only LR-TDDFT integrate tests
maki49 Oct 2, 2026
e4cf077
fix: guard MPI-only and EXX-only symbols for the no-ELPA/no-EXX CI bu…
maki49 Oct 2, 2026
12776d4
fix: more MPI-only guards, and wire the Grad sources into Makefile.Ob…
maki49 Oct 2, 2026
9a47836
fix: make the gradient path build again under -DENABLE_MPI=OFF/Intel …
maki49 Oct 3, 2026
d144b9b
fix: reduce global dependency budget flagged by agent governance check
maki49 Oct 3, 2026
58cd935
feat(lr-grad): distributed ScaLAPACK and ELPA solvers for the Z-vecto…
maki49 Oct 4, 2026
d41fbf8
feat(lr-grad): add INPUT parameter lr_grad_solver to choose the Z-vec…
maki49 Oct 4, 2026
a981272
docs(lr): move hand-written input-main.md text into the C++ descripti…
maki49 Oct 4, 2026
4791751
feat(lr-grad): add lr_grad_solver = scalapack_chol, a ScaLAPACK Chole…
maki49 Oct 4, 2026
dffff57
fix(lr): clamp sigma in xc_gga_vxc for HSE06, matching fxc/kxc
maki49 Oct 4, 2026
fdd43e7
fix(lr-grad): build the LR unit tests against the 6-argument gather_2…
maki49 Oct 4, 2026
c04ee92
refactor(lr-grad): flatten Grad/ into module_lr, cap filenames at 15 …
maki49 Oct 5, 2026
af63607
chore(lr-grad): drop unused includes left over from removed diagnostics
maki49 Oct 5, 2026
ea71a3d
fix: match Makefile.Objects' LR-Grad object name to zeqlin_solv.cpp
maki49 Oct 5, 2026
739cfd5
fix para: ks-lr nb sync with groudstate; nrxx=0 guard
maki49 Oct 5, 2026
1912461
fix(lr-grad): replace #pragma once with include guards
maki49 Oct 5, 2026
fb90da4
fix para: dav_subspace bcast type and spectra spin index
maki49 Oct 5, 2026
c79ffec
fix(lr): derive occupied windows from charged spin populations
maki49 Oct 5, 2026
9a2b75e
fix(lr): update two nocc tests left stale by the post-SCF resolution …
maki49 Oct 5, 2026
a0700ca
fix(lr): balance force timers in degenerate gradient paths
maki49 Oct 6, 2026
27cadf1
fix(lr): handle empty grid ranks and align gamma CI coverage
maki49 Oct 6, 2026
b571f36
fix CI precision
maki49 Oct 6, 2026
7f2ee94
perf(lr): reuse transition density across output spins
maki49 Oct 6, 2026
bf1387c
fix: CI test lr force thr 1e-6
maki49 Oct 6, 2026
4fdd372
perf: vectorize Gamma and multi-k LR exchange projection
maki49 Oct 6, 2026
4607c35
refactor(dm): make internal real-space density updates non-const
maki49 Oct 7, 2026
ea6e740
refactor(lr): pass orbital layout explicitly to density transposition
maki49 Oct 7, 2026
463a022
refactor(lr): move gradient evaluation out of ESolver
maki49 Oct 7, 2026
36e9095
refactor(lr): lowercase new filenames and split gradient controllers
maki49 Oct 7, 2026
7659d84
refactor(lr): remove mutable operator work buffers
maki49 Oct 7, 2026
1f2d4b2
refactor(lr): keep new filename stems within fifteen characters
maki49 Oct 7, 2026
5f0765d
refactor(input): shorten LR degeneracy parameter names
maki49 Oct 7, 2026
d6f3b3b
fix(lr): restore CI builds after gradient refactor
maki49 Oct 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 77 additions & 4 deletions docs/advanced/input_files/input-main.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@
- [nocc](#nocc)
- [nvirt](#nvirt)
- [lr\_nstates](#lr_nstates)
- [lr\_target\_state](#lr_target_state)
- [lr\_degen\_thr](#lr_degen_thr)
- [lr\_degen\_mode](#lr_degen_mode)
- [lr\_grad\_solver](#lr_grad_solver)
- [lr\_target\_spin](#lr_target_spin)
- [lr\_unrestricted](#lr_unrestricted)
- [abs\_wavelen\_range](#abs_wavelen_range)
- [out\_wfc\_lr](#out_wfc_lr)
Expand Down Expand Up @@ -5131,7 +5136,7 @@
### xc_kernel

- **Type**: String
- **Description**: The exchange-correlation kernel used in the calculation. Currently supported: RPA, LDA, PBE, HSE, HF.
- **Description**: The exchange-correlation kernel used in the calculation. Currently supported: RPA, LDA, PWLDA, PBE, and the hybrids HF, PBE0, HSE, B3LYP, CAM_PBEH, LC_PBE, LC_WPBE, LRC_WPBE, LRC_WPBEH. A hybrid kernel needs the ground state to use the same functional: the exact-exchange operator $[\alpha+\beta\,\mathrm{erfc}(\mu r)]/r$ is built from exx_fock_alpha ($\alpha$), exx_erfc_alpha ($\beta$) and exx_erfc_omega ($\mu$), which are keyed off dft_functional, not off this parameter.
- **Default**: LDA

### lr_init_xc_kernel
Expand Down Expand Up @@ -5161,9 +5166,10 @@
### nocc

- **Type**: Integer
- **Description**: The number of occupied orbitals (up to HOMO) used in the LR-TDDFT calculation.
- Note: If the value is illegal ( > nelec/2 or <= 0), it will be autoset to nelec/2.
- **Default**: nband
- **Description**: The number of occupied orbitals (up to HOMO) retained in the majority-spin LR-TDDFT window. A positive value selects a shared core prefix to discard from both spin channels; it does not change the ground-state occupations.
- If omitted, non-positive, or larger than the occupied majority-spin channel, all occupied orbitals are used.
- The full occupied window is determined by the effective electron number (including nelec_delta once) and the ground-state spin populations. For nspin=2, the minority-spin window has abs(N_up-N_down) fewer occupied orbitals.
- **Default**: all occupied orbitals

### nvirt

Expand All @@ -5177,6 +5183,73 @@
- **Description**: The number of 2-particle states to be solved.
- **Default**: 0

### lr_target_state

- **Type**: Integer
- **Description**: Index of the excited state whose potential energy surface `calculation = relax` follows, counted from 0 within the spin channel selected by `lr_target_spin`.

Only the gradient of this one state is computed, since solving the Z-vector equation dominates the cost of an excited-state gradient. It also selects the state whose excitation energy is added to the ground-state total energy, which is the quantity the energy-based relaxation algorithms (`cg`, `bfgs`, `lbfgs`) line-search on.

Ignored outside `calculation = relax`: a single-point run solves and reports the gradients of every state.

> Note: The state is followed by index, not by character. If it crosses another state during the relaxation, the optimizer will silently continue on the other surface.
- **Default**: 0

### lr_degen_thr

- **Type**: Real
- **Description**: Excited states whose excitation energies lie within this threshold of each other are treated as one degenerate multiplet, and the full gradient matrix $G^{(A\alpha)}_{kl}=\langle X_k|\partial A/\partial R_{A\alpha}|X_l\rangle$ is computed for it in addition to the per-state gradients. Zero (the default) disables this and leaves the per-state gradients as the only output.

At a $d$-fold degeneracy no single state has a gradient vector: the branch slopes along a displacement $u$ are the eigenvalues of $\sum_{A\alpha}u_{A\alpha}G^{(A\alpha)}$, and the eigenvectors that diagonalise it depend on $u$. The per-state gradients are the diagonal of $G$ in whichever basis the eigensolver happened to return, so only their sum (the trace) is basis-independent, while $G$ itself is the complete first-order information -- it is the linear vibronic coupling Hamiltonian of the multiplet. The extra cost is $d(d-1)/2$ further Z-vector solves per multiplet.

The threshold proposes candidates; it cannot tell a true degeneracy from an accidental near-degeneracy, where the states have genuinely different excitation energies and the construction does not apply. Each multiplet's actual energy spread and the orthonormality of its eigenvectors are reported in the running log so the distinction can be made there.

> Note: A sensible value is a few times the eigensolver threshold `lr_thr`, so that states split by real physics are not merged.
- **Default**: 0
- **Unit**: Ry

### lr_degen_mode

- **Type**: String
- **Description**: What `calculation = relax` follows when `lr_target_state` sits inside a degenerate multiplet, as identified by `lr_degen_thr`. It has no effect when the target state is non-degenerate.

- state: follow the gradient of that one state, as returned by the eigensolver. This is the historical behaviour and is what reproduces earlier results, but inside a multiplet it is not a well-defined quantity: the per-state gradients are the diagonal of the subspace gradient matrix in whichever basis the eigensolver happened to return, so they depend on numerical details of the diagonalisation rather than on physics.
- average: follow the multiplet average $\bar\Omega=\frac{1}{d}\sum_k\Omega_k$, whose gradient is $\operatorname{Tr}G/d$. Unlike the individual states this is a smooth, basis-independent surface, and by symmetry its gradient is totally symmetric, so following it keeps the geometry on the symmetric configuration. Both the reported energy and the reported gradient switch to the average together, which the energy-based optimisers (`cg`, `bfgs`, `lbfgs`) require -- a gradient of one surface line-searched against the energy of another does not converge. This mode deliberately does NOT find the Jahn-Teller distortion, which is orthogonal to the totally symmetric average gradient.
- jt: descend the Jahn-Teller branch. Solves $\min_{\|u\|=1}\lambda_{\min}(\sum_{A\alpha}u_{A\alpha}G^{(A\alpha)})$ -- a joint optimisation over the displacement and the mixing inside the multiplet, since the two are determined together -- and follows the force of the resulting branch. This needs the off-diagonal part of the gradient matrix, so it costs $d(d-1)/2$ further Z-vector solves per step on top of the $d$ diagonal ones. The running log reports the branch's force, its mixing coefficients, and its split into the part common to the multiplet and the part that actually breaks the degeneracy.

> Note: The usual sequence is `average` first, to reach the symmetric stationary point, then `jt` from there: at a stationary point of the average surface the common part vanishes and the whole force is Jahn-Teller. `jt` is self-limiting -- once a step has split the multiplet there is no group left and the ordinary single-state gradient takes over.

> Note: `jt` gives the first-order DIRECTION. The distortion amplitude also needs the harmonic term, and the step norm is Cartesian rather than mass-weighted. A linear molecule has no first-order term at all (the effect is second-order Renner-Teller) and the log says so.
- **Default**: state

### lr_grad_solver

- **Type**: String
- **Description**: The method to solve the Z-vector (relaxed-density) equation $(A+B)Z=R$ in LR-TDDFT force and relaxation calculations, the linear-equation counterpart of `lr_solver`. Its dimension is $n_k n_{occ} n_{virt}$ summed over spin, where $n_{virt}$ counts every virtual band of the ground state, not only the `nvirt` window of the excitation.
- cg: Solve iteratively with the conjugate-gradient method, applying the orbital Hessian $A+B$ to a vector at each step. The matrix is never built.
- lapack: Construct the full matrix and solve directly with LAPACK (LU). Every MPI process holds the whole matrix and solves the same system.
- scalapack: Construct the matrix distributed over the MPI processes (2D block-cyclic) and solve with ScaLAPACK (LU).
- scalapack_chol: Construct the matrix distributed as for scalapack and solve by a ScaLAPACK Cholesky factorization, about half the flops of the LU and in place.
- elpa: Construct the matrix distributed as for scalapack and solve by an ELPA Cholesky factorization.

> Note: The direct solvers build the matrix column by column, at the cost of one application of $A+B$ per column, which usually dominates the cost of the solve itself; scalapack, scalapack_chol and elpa need an MPI build, elpa also an ELPA build.

> Note: scalapack_chol and elpa require $A+B$ to be positive definite, which holds at a stable ground state. If it is not, scalapack_chol stops with an error, while elpa does so only in a single-process run and hangs in a multi-process one; scalapack (LU) has no such requirement.
- **Default**: cg

### lr_target_spin

- **Type**: String
- **Description**: Which spin channel `lr_target_state` indexes.

- singlet / triplet: the two closed-shell channels solved at `nspin = 2`. At `nspin = 1` only `singlet` exists.
- updown: the single spin-conserving channel of an open-shell calculation (`lr_unrestricted`, or a spin-polarised ground state with a non-zero moment).

An open-shell calculation has only one channel, so any value is accepted there and relaxes that channel; an explicit `triplet` is reported as ignored. A closed-shell calculation rejects `updown`, since singlet and triplet are separate states with separate gradients.

Ignored outside `calculation = relax`.
- **Default**: singlet

### lr_unrestricted

- **Type**: Boolean
Expand Down
85 changes: 81 additions & 4 deletions docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2940,7 +2940,7 @@ parameters:
category: Linear Response TDDFT
type: String
description: |
The exchange-correlation kernel used in the calculation. Currently supported: RPA, LDA, PBE, HSE, HF.
The exchange-correlation kernel used in the calculation. Currently supported: RPA, LDA, PWLDA, PBE, and the hybrids HF, PBE0, HSE, B3LYP, CAM_PBEH, LC_PBE, LC_WPBE, LRC_WPBE, LRC_WPBEH. A hybrid kernel needs the ground state to use the same functional: the exact-exchange operator $[\alpha+\beta\,\mathrm{erfc}(\mu r)]/r$ is built from exx_fock_alpha ($\alpha$), exx_erfc_alpha ($\beta$) and exx_erfc_omega ($\mu$), which are keyed off dft_functional, not off this parameter.
default_value: LDA
unit: ""
availability: ""
Expand Down Expand Up @@ -2978,9 +2978,10 @@ parameters:
category: Linear Response TDDFT
type: Integer
description: |
The number of occupied orbitals (up to HOMO) used in the LR-TDDFT calculation.
* Note: If the value is illegal ( > nelec/2 or <= 0), it will be autoset to nelec/2.
default_value: nband
The number of occupied orbitals (up to HOMO) retained in the majority-spin LR-TDDFT window. A positive value selects a shared core prefix to discard from both spin channels; it does not change the ground-state occupations.
* If omitted, non-positive, or larger than the occupied majority-spin channel, all occupied orbitals are used.
* The full occupied window is determined by the effective electron number (including nelec_delta once) and the ground-state spin populations. For nspin=2, the minority-spin window has abs(N_up-N_down) fewer occupied orbitals.
default_value: all occupied orbitals
unit: ""
availability: ""
- name: nvirt
Expand All @@ -2999,6 +3000,82 @@ parameters:
default_value: "0"
unit: ""
availability: ""
- name: lr_target_state
category: Linear Response TDDFT
type: Integer
description: |
Index of the excited state whose potential energy surface `calculation = relax` follows, counted from 0 within the spin channel selected by `lr_target_spin`.

Only the gradient of this one state is computed, since solving the Z-vector equation dominates the cost of an excited-state gradient. It also selects the state whose excitation energy is added to the ground-state total energy, which is the quantity the energy-based relaxation algorithms (`cg`, `bfgs`, `lbfgs`) line-search on.

Ignored outside `calculation = relax`: a single-point run solves and reports the gradients of every state.

[NOTE] The state is followed by index, not by character. If it crosses another state during the relaxation, the optimizer will silently continue on the other surface.
default_value: "0"
unit: ""
availability: ""
- name: lr_degen_thr
category: Linear Response TDDFT
type: Real
description: |
Excited states whose excitation energies lie within this threshold of each other are treated as one degenerate multiplet, and the full gradient matrix $G^{(A\alpha)}_{kl}=\langle X_k|\partial A/\partial R_{A\alpha}|X_l\rangle$ is computed for it in addition to the per-state gradients. Zero (the default) disables this and leaves the per-state gradients as the only output.

At a $d$-fold degeneracy no single state has a gradient vector: the branch slopes along a displacement $u$ are the eigenvalues of $\sum_{A\alpha}u_{A\alpha}G^{(A\alpha)}$, and the eigenvectors that diagonalise it depend on $u$. The per-state gradients are the diagonal of $G$ in whichever basis the eigensolver happened to return, so only their sum (the trace) is basis-independent, while $G$ itself is the complete first-order information -- it is the linear vibronic coupling Hamiltonian of the multiplet. The extra cost is $d(d-1)/2$ further Z-vector solves per multiplet.

The threshold proposes candidates; it cannot tell a true degeneracy from an accidental near-degeneracy, where the states have genuinely different excitation energies and the construction does not apply. Each multiplet's actual energy spread and the orthonormality of its eigenvectors are reported in the running log so the distinction can be made there.

[NOTE] A sensible value is a few times the eigensolver threshold `lr_thr`, so that states split by real physics are not merged.
default_value: "0"
unit: Ry
availability: ""
- name: lr_degen_mode
category: Linear Response TDDFT
type: String
description: |
What `calculation = relax` follows when `lr_target_state` sits inside a degenerate multiplet, as identified by `lr_degen_thr`. It has no effect when the target state is non-degenerate.

* state: follow the gradient of that one state, as returned by the eigensolver. This is the historical behaviour and is what reproduces earlier results, but inside a multiplet it is not a well-defined quantity: the per-state gradients are the diagonal of the subspace gradient matrix in whichever basis the eigensolver happened to return, so they depend on numerical details of the diagonalisation rather than on physics.
* average: follow the multiplet average $\bar\Omega=\frac{1}{d}\sum_k\Omega_k$, whose gradient is $\operatorname{Tr}G/d$. Unlike the individual states this is a smooth, basis-independent surface, and by symmetry its gradient is totally symmetric, so following it keeps the geometry on the symmetric configuration. Both the reported energy and the reported gradient switch to the average together, which the energy-based optimisers (`cg`, `bfgs`, `lbfgs`) require -- a gradient of one surface line-searched against the energy of another does not converge. This mode deliberately does NOT find the Jahn-Teller distortion, which is orthogonal to the totally symmetric average gradient.
* jt: descend the Jahn-Teller branch. Solves $\min_{\|u\|=1}\lambda_{\min}(\sum_{A\alpha}u_{A\alpha}G^{(A\alpha)})$ -- a joint optimisation over the displacement and the mixing inside the multiplet, since the two are determined together -- and follows the force of the resulting branch. This needs the off-diagonal part of the gradient matrix, so it costs $d(d-1)/2$ further Z-vector solves per step on top of the $d$ diagonal ones. The running log reports the branch's force, its mixing coefficients, and its split into the part common to the multiplet and the part that actually breaks the degeneracy.

[NOTE] The usual sequence is `average` first, to reach the symmetric stationary point, then `jt` from there: at a stationary point of the average surface the common part vanishes and the whole force is Jahn-Teller. `jt` is self-limiting -- once a step has split the multiplet there is no group left and the ordinary single-state gradient takes over.

[NOTE] `jt` gives the first-order DIRECTION. The distortion amplitude also needs the harmonic term, and the step norm is Cartesian rather than mass-weighted. A linear molecule has no first-order term at all (the effect is second-order Renner-Teller) and the log says so.
default_value: state
unit: ""
availability: ""
- name: lr_grad_solver
category: Linear Response TDDFT
type: String
description: |
The method to solve the Z-vector (relaxed-density) equation $(A+B)Z=R$ in LR-TDDFT force and relaxation calculations, the linear-equation counterpart of `lr_solver`. Its dimension is $n_k n_{occ} n_{virt}$ summed over spin, where $n_{virt}$ counts every virtual band of the ground state, not only the `nvirt` window of the excitation.
* cg: Solve iteratively with the conjugate-gradient method, applying the orbital Hessian $A+B$ to a vector at each step. The matrix is never built.
* lapack: Construct the full matrix and solve directly with LAPACK (LU). Every MPI process holds the whole matrix and solves the same system.
* scalapack: Construct the matrix distributed over the MPI processes (2D block-cyclic) and solve with ScaLAPACK (LU).
* scalapack_chol: Construct the matrix distributed as for scalapack and solve by a ScaLAPACK Cholesky factorization, about half the flops of the LU and in place.
* elpa: Construct the matrix distributed as for scalapack and solve by an ELPA Cholesky factorization.

[NOTE] The direct solvers build the matrix column by column, at the cost of one application of $A+B$ per column, which usually dominates the cost of the solve itself; scalapack, scalapack_chol and elpa need an MPI build, elpa also an ELPA build.

[NOTE] scalapack_chol and elpa require $A+B$ to be positive definite, which holds at a stable ground state. If it is not, scalapack_chol stops with an error, while elpa does so only in a single-process run and hangs in a multi-process one; scalapack (LU) has no such requirement.
default_value: cg
unit: ""
availability: ""
- name: lr_target_spin
category: Linear Response TDDFT
type: String
description: |
Which spin channel `lr_target_state` indexes.

* singlet / triplet: the two closed-shell channels solved at `nspin = 2`. At `nspin = 1` only `singlet` exists.
* updown: the single spin-conserving channel of an open-shell calculation (`lr_unrestricted`, or a spin-polarised ground state with a non-zero moment).

An open-shell calculation has only one channel, so any value is accepted there and relaxes that channel; an explicit `triplet` is reported as ignored. A closed-shell calculation rejects `updown`, since singlet and triplet are separate states with separate gradients.

Ignored outside `calculation = relax`.
default_value: singlet
unit: ""
availability: ""
- name: lr_unrestricted
category: Linear Response TDDFT
type: Boolean
Expand Down
24 changes: 23 additions & 1 deletion source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ ${OBJS_DELTASPIN}\
${OBJS_TENSOR}\
${OBJS_HSOLVER_PEXSI}\
${OBJS_LR}\
${OBJS_LR_GRAD}\
${OBJS_RDMFT}

OBJS_MAIN=main.o\
Expand Down Expand Up @@ -1032,7 +1033,6 @@ OBJS_TENSOR=tensor.o\
refcount.o

OBJS_LR=lr_util.o\
lr_util_hcontainer.o\
utils/lr_io.o\
utils/exciton_plotter.o\
ao_to_mo_parallel.o\
Expand All @@ -1048,6 +1048,28 @@ OBJS_TENSOR=tensor.o\
hamilt_casida.o\
esolver_lr_lcao_tddft.o\

ifdef LIBRI_DIR
# BSE-related code and DMBand: only compiled with LibRI (__EXX), see module_lr/CMakeLists.txt
OBJS_LR+=utils/lr_io_krlist.o
OBJS_LR+=dm_band.o
endif

OBJS_LR_GRAD=lr_force.o\
lr_force_test.o\
grad_degen.o\
grad_jt.o\
gradient_output.o\
lr_grad_cs.o\
lr_grad_os.o\
exx_proj.o\
cvcx_serial.o\
cvcx_par.o\
cal_edm.o\
zeqlin_solv.o\
pot_grad_xc.o\
esolver_lr_grad.o\
esolver_lr_rlx.o\

OBJS_RDMFT=rdmft.o\
rdmft_tools.o\
rdmft_pot.o\
Expand Down
Loading
Loading