(git:3d5d2e5)
Loading...
Searching...
No Matches
upf_inverse_unittest.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Inverse reconstruction identities, conditioning and analytic field/operator responses.
10! **************************************************************************************************
17 USE ieee_arithmetic, ONLY: ieee_quiet_nan,&
18 ieee_value
19 USE kinds, ONLY: dp
20 USE mathconstants, ONLY: pi
22 ncoset
23 USE upf_core, ONLY: upf_core_fourier
24 USE upf_inverse, ONLY: &
30
31 IMPLICIT NONE
32 REAL(dp), PARAMETER :: step = 1.e-5_dp
33 REAL(dp) :: max_error = 0.0_dp
34 CALL check_inverse()
35 CALL check_atomic_residual()
36 CALL check_gaussian_fields()
38 WRITE (*, '(A)') 'upf_inverse_unittest PASS'
39CONTAINS
40! **************************************************************************************************
41!> \brief Original core normalization, finite endpoint and joint phase/lattice/volume derivative.
42! **************************************************************************************************
43 SUBROUTINE check_core_fourier()
44 COMPLEX(dp) :: dg(3, 3), dr(3, 3), response(3), rho(3), &
45 samples(3, 2)
46 INTEGER :: side
47 REAL(dp) :: delta_g(3, 3), delta_r(3), g(3, 3), &
48 position(3), shift
49 TYPE(atom_upfpot_type) :: pot
50
51 ALLOCATE (pot%r(5), pot%rab(5), pot%rho_nlcc(5))
52 pot%r(:) = [0.0_dp, 0.5_dp, 1.0_dp, 1.5_dp, 2.0_dp]
53 pot%rab = 0.5_dp
54 pot%rho_nlcc(:) = [1.0_dp, 0.8_dp, 0.5_dp, 0.2_dp, 0.1_dp]
55 pot%core_correction = .true.
56 g(:, 1) = 0.0_dp
57 g(:, 2) = [0.3_dp, -0.2_dp, 0.4_dp]
58 g(:, 3) = -g(:, 2)
59 position = [0.2_dp, -0.3_dp, 0.1_dp]
60 delta_r = [0.02_dp, 0.01_dp, -0.03_dp]
61 delta_g = 0.02_dp*g
62 CALL upf_core_fourier(pot, g, position, 3.0_dp, rho, dr, dg)
63 CALL check(abs(3.0_dp*rho(1) - 4.0_dp*pi/6.0_dp* &
64 sum([1.0_dp, 4.0_dp, 2.0_dp, 4.0_dp, 1.0_dp]*pot%r**2*pot%rho_nlcc)), "Original core zero mode", 1.e-12_dp)
65 CALL check(abs(rho(3) - conjg(rho(2))), "Original core Fourier reality", 1.e-12_dp)
66 response = sum(dr*spread(delta_r, 2, 3), dim=1) + sum(dg*delta_g, dim=1) - 0.01_dp*rho
67 DO side = 1, 2
68 shift = real(2*side - 3, dp)*step
69 CALL upf_core_fourier(pot, g + shift*delta_g, position + shift*delta_r, &
70 3.0_dp*(1.0_dp + 0.01_dp*shift), samples(:, side))
71 END DO
72 CALL check(maxval(abs((samples(:, 2) - samples(:, 1))/(2.0_dp*step) - response)), "Original core joint response", 2.e-9_dp)
73 pot%core_correction = .false.
74 CALL upf_core_fourier(pot, g, position, 3.0_dp, rho, dr, dg)
75 CALL check(maxval(abs(rho)) + maxval(abs(dr)) + maxval(abs(dg)), "Absent partial core", 0.0_dp)
76 END SUBROUTINE check_core_fourier
77
78! **************************************************************************************************
79!> \brief ...
80! **************************************************************************************************
81 SUBROUTINE check_inverse()
82 INTEGER, PARAMETER :: nb = 2, nf = 5, np = 3
83
84 COMPLEX(KIND=dp) :: actual(nb, nb), b(np, nb), bd(np, np), chi(nf, nb), dchi(nf, nb), &
85 dd(np, np), ddd(np, np), ddelta(nf, np), ddg(np, nb), delta(nf, np), dg(np, nb), &
86 dgd(nb, np), dgg(nb, nb), donsite(np, np), dop(nf, nf), dprojector(np, nf), ds(nf, nb), &
87 dw(np, nb), empty_b(0, nb), empty_delta(nf, 0), empty_q(0, 0), empty_w(0, nb), &
88 gd(nb, np), gg(nb, nb), images(nf, nb, 2), onsite(np, np), op(nf, nf), projected(np, nb), &
89 projector(np, nf), reference(nb, nb), response(nb, nb), sampled(nb, nb, 2), &
90 shifted_chi(nf, nb), shifted_delta(nf, np), shifted_op(nf, nf), shifted_p(np, nf)
91 COMPLEX(KIND=dp) :: shifted_q(np, np), soft(nf, nb), w(np, nb)
92 INTEGER :: i, info, j, phase, side
93 REAL(KIND=dp) :: shift
94 TYPE(upf_inverse_type) :: inverse
95
96 DO phase = 1, 2
97 DO j = 1, nb
98 DO i = 1, nf
99 chi(i, j) = cmplx(sin(real(i + 2*j, dp)), (phase - 1)*cos(real(i*j, dp)), dp)
100 dchi(i, j) = 0.07_dp*cmplx(cos(real(i + j, dp)), (phase - 1)*sin(real(2*i + j, dp)), dp)
101 END DO
102 END DO
103 DO j = 1, np
104 DO i = 1, nf
105 delta(i, j) = 0.12_dp*cmplx(cos(real(i*j, dp)), (phase - 1)*sin(real(i + j, dp)), dp)
106 ddelta(i, j) = 0.03_dp*cmplx(sin(real(i + 2*j, dp)), (phase - 1)*cos(real(i*j, dp)), dp)
107 projector(j, i) = 0.15_dp*cmplx(sin(real(i + j, dp)), (phase - 1)*cos(real(2*i + j, dp)), dp)
108 dprojector(j, i) = 0.02_dp*cmplx(cos(real(i + j, dp)), (phase - 1)*sin(real(i*j, dp)), dp)
109 END DO
110 END DO
111 ! A non-Hermitian operator exposes an accidental conjugation/symmetrization.
112 DO j = 1, nf
113 DO i = 1, nf
114 op(i, j) = cmplx(0.1_dp*i - 0.05_dp*j, (phase - 1)*0.03_dp*(i + j), dp)
115 dop(i, j) = cmplx(0.02_dp*(i + j), (phase - 1)*0.01_dp*(i - j), dp)
116 END DO
117 END DO
118 onsite = op(1:np, 1:np)*0.3_dp
119 donsite = dop(1:np, 1:np)*0.4_dp
120 bd = matmul(projector, delta)
121 b = matmul(projector, chi)
122 CALL upf_inverse_init(bd, inverse, info)
123 IF (info /= 0 .OR. .NOT. inverse%ready) error stop 'Inverse factorization failed'
124 CALL upf_inverse_project(inverse, b, w)
125 CALL upf_inverse_basis(chi, delta, w, soft)
126 projected = matmul(projector, soft)
127 CALL check(maxval(abs(projected - w)), 'inverse projector identity')
128 CALL check(maxval(abs(soft + matmul(delta, projected) - chi)), 'full reconstruction round trip')
129 CALL upf_inverse_project_response(inverse, w, matmul(dprojector, chi) + matmul(projector, dchi), &
130 matmul(dprojector, delta) + matmul(projector, ddelta), dw)
131 CALL upf_inverse_basis_response(dchi, delta, ddelta, w, dw, ds)
132 gg = matmul(conjg(transpose(chi)), matmul(op, chi))
133 gd = matmul(conjg(transpose(chi)), matmul(op, delta))
134 dg = matmul(conjg(transpose(delta)), matmul(op, chi))
135 dd = matmul(conjg(transpose(delta)), matmul(op, delta))
136 CALL upf_inverse_operator(gg, gd, dg, dd, onsite, w, actual)
137 reference = matmul(conjg(transpose(soft)), matmul(op, soft)) + &
138 matmul(conjg(transpose(projected)), matmul(onsite, projected))
139 CALL check(maxval(abs(actual - reference)), 'inverse operator versus direct fields')
140 dgg = matmul(conjg(transpose(dchi)), matmul(op, chi)) + &
141 matmul(conjg(transpose(chi)), matmul(dop, chi) + matmul(op, dchi))
142 dgd = matmul(conjg(transpose(dchi)), matmul(op, delta)) + &
143 matmul(conjg(transpose(chi)), matmul(dop, delta) + matmul(op, ddelta))
144 ddg = matmul(conjg(transpose(ddelta)), matmul(op, chi)) + &
145 matmul(conjg(transpose(delta)), matmul(dop, chi) + matmul(op, dchi))
146 ddd = matmul(conjg(transpose(ddelta)), matmul(op, delta)) + &
147 matmul(conjg(transpose(delta)), matmul(dop, delta) + matmul(op, ddelta))
148 CALL upf_inverse_operator_response(dgg, gd, dg, dd, onsite, w, dgd, ddg, ddd, donsite, dw, response)
149 DO side = 1, 2
150 shift = (2*side - 3)*step
151 shifted_chi = chi + shift*dchi
152 shifted_delta = delta + shift*ddelta
153 shifted_p = projector + shift*dprojector
154 shifted_op = op + shift*dop
155 shifted_q = onsite + shift*donsite
156 CALL upf_inverse_init(matmul(shifted_p, shifted_delta), inverse, info)
157 IF (info /= 0) error stop 'Displaced inverse factorization failed'
158 CALL upf_inverse_project(inverse, matmul(shifted_p, shifted_chi), w)
159 CALL upf_inverse_basis(shifted_chi, shifted_delta, w, images(:, :, side))
160 projected = matmul(shifted_p, images(:, :, side))
161 sampled(:, :, side) = matmul(conjg(transpose(images(:, :, side))), &
162 matmul(shifted_op, images(:, :, side))) + &
163 matmul(conjg(transpose(projected)), matmul(shifted_q, projected))
164 END DO
165 CALL check(maxval(abs(ds - (images(:, :, 2) - images(:, :, 1))/(2*step))), 'inverse basis response', 1.e-9_dp)
166 CALL check(maxval(abs(response - (sampled(:, :, 2) - sampled(:, :, 1))/(2*step))), &
167 'inverse operator response', 1.e-9_dp)
168 END DO
169
170 CALL upf_inverse_init(empty_q, inverse, info)
171 IF (info /= 0 .OR. .NOT. inverse%ready) error stop 'Empty inverse failed'
172 CALL upf_inverse_project(inverse, empty_b, empty_w)
173 CALL upf_inverse_basis(chi, empty_delta, empty_w, soft)
174 CALL check(maxval(abs(soft - chi)), 'identity without reconstruction projectors')
175 bd = cmplx(0.0_dp, 0.0_dp, dp)
176 bd(2, 2) = -1.0_dp
177 CALL upf_inverse_init(bd, inverse, info)
178 IF (info /= 2 .OR. inverse%ready) error stop 'Singular inverse accepted'
179 bd(2, 2) = -1.0_dp + 1.e-12_dp
180 CALL upf_inverse_init(bd, inverse, info, minimum_rcond=1.e-10_dp)
181 IF (info /= np + 1 .OR. inverse%ready) error stop 'Ill-conditioned inverse accepted'
182 bd(1, 1) = cmplx(ieee_value(0.0_dp, ieee_quiet_nan), 0.0_dp, dp)
183 CALL upf_inverse_init(bd, inverse, info)
184 IF (info /= np + 2 .OR. inverse%ready) error stop 'Nonfinite inverse accepted'
185 END SUBROUTINE check_inverse
186
187! **************************************************************************************************
188!> \brief Verify the one-center reduction against an explicit finite transformed operator.
189!> Nonzero closure residuals and off-diagonal channel couplings must remain present.
190! **************************************************************************************************
191 SUBROUTINE check_atomic_residual()
192 COMPLEX(dp) :: b(2, 2), chi(3, 2), coupling(2, 2), &
193 metric(2, 2), soft(3, 2), w(2, 2)
194 COMPLEX(dp), ALLOCATABLE :: rs(:, :), rt(:, :)
195 INTEGER :: info
196 REAL(dp) :: delta(3, 2), hard(3, 2), ps(3, 2), &
197 q(2, 2), t(3, 3)
198 TYPE(upf_inverse_atomic_type) :: atomic
199
200 ps = reshape([0.2_dp, 0.5_dp, -0.3_dp, 0.1_dp, -0.4_dp, 0.7_dp], [3, 2])
201 delta = reshape([0.3_dp, -0.1_dp, 0.2_dp, -0.2_dp, 0.4_dp, 0.1_dp], [3, 2])
202 hard = ps + delta
203 t = reshape([1.0_dp, 0.2_dp, 0.1_dp, 0.2_dp, 2.0_dp, -0.3_dp, 0.1_dp, -0.3_dp, 1.5_dp], [3, 3])
204 q = reshape([0.4_dp, 0.1_dp, 0.1_dp, 0.6_dp], [2, 2])
205 chi = cmplx(ps, delta, dp)
206 coupling = cmplx(matmul(transpose(ps), delta), 0.0_dp, dp)
207 CALL upf_inverse_init(coupling, atomic%inverse, info)
208 IF (info /= 0) error stop 'Atomic inverse failed'
209 b = matmul(transpose(ps), chi)
210 CALL upf_inverse_project(atomic%inverse, b, w)
211 CALL upf_inverse_basis(chi, cmplx(delta, 0.0_dp, dp), w, soft)
212 atomic%hard%nproj = 2
213 ALLOCATE (atomic%kinetic, source=matmul(transpose(hard), matmul(t, hard)) - matmul(transpose(ps), matmul(t, ps)))
214 ALLOCATE (atomic%difference_kinetic, source=matmul(transpose(delta), matmul(t, delta)))
215 ALLOCATE (atomic%wave_overlap, source=matmul(transpose(hard), hard) - matmul(transpose(ps), ps))
216 ALLOCATE (atomic%difference_overlap, source=matmul(transpose(delta), delta))
217 CALL upf_inverse_atomic_residual(atomic, w, matmul(transpose(delta), chi), matmul(transpose(delta), matmul(t, chi)), rt, rs)
218 CALL check(maxval(abs(matmul(conjg(transpose(chi)), matmul(t, chi)) + rt - &
219 matmul(conjg(transpose(w)), matmul(atomic%kinetic, w)) - &
220 matmul(conjg(transpose(soft)), matmul(t, soft)))), 'atomic kinetic closure residual')
221 metric = matmul(conjg(transpose(chi)), chi) + rs + &
222 matmul(conjg(transpose(w)), matmul(q - atomic%wave_overlap, w))
223 CALL check(maxval(abs(metric - matmul(conjg(transpose(soft)), soft) - &
224 matmul(conjg(transpose(w)), matmul(q, w)))), 'atomic metric closure residual')
225 IF (maxval(abs(rt)) < 1.e-3_dp .OR. maxval(abs(rs)) < 1.e-3_dp) error stop 'Trivial closure test'
226 END SUBROUTINE check_atomic_residual
227
228! **************************************************************************************************
229!> \brief ...
230! **************************************************************************************************
231 SUBROUTINE check_gaussian_fields()
232 INTEGER, PARAMETER :: nb = 11, nf = 5
233
234 COMPLEX(dp) :: dg(nf, nb, 3), dv(nf, nb), g(nf, nb, 3), &
235 gss(nf, nb, 3, 2), other(nf, nb), &
236 v(nf, nb), vs(nf, nb, 2)
237 INTEGER :: axis, ico, image, images(3, 3), row, &
238 side, translated_images(3, 3)
239 REAL(dp) :: bloch(3), cell(3, 3), center(3), dc(3, 3), dcenter(3), dk(3), dpnt(3, nf), &
240 gradient(nf, nb, 3), gs(nf, nb, 3, 2), hh(nf, nb, 3, 3), samples(nf, nb, 2), shift, &
241 value(nf, nb), x(3, nf), xp(3, nf)
242 TYPE(gto_basis_set_type), POINTER :: basis
243
244 NULLIFY (basis)
246 CALL allocate_gto_basis_set(basis)
247 basis%nset = 2
248 basis%nsgf = nb
249 ALLOCATE (basis%lmax(2), basis%npgf(2), basis%nshell(2), basis%l(2, 2), &
250 basis%first_sgf(2, 2), basis%last_sgf(2, 2), basis%zet(2, 2), basis%sphi(40, nb))
251 basis%lmax = [3, 1]
252 basis%npgf = [2, 1]
253 basis%nshell = [2, 1]
254 basis%l = 0
255 basis%l(:, 1) = [0, 3]
256 basis%l(1, 2) = 1
257 basis%first_sgf = 0
258 basis%last_sgf = 0
259 basis%first_sgf(:, 1) = [1, 2]
260 basis%last_sgf(:, 1) = [1, 8]
261 basis%first_sgf(1, 2) = 9
262 basis%last_sgf(1, 2) = 11
263 basis%zet = 0.0_dp
264 basis%zet(:, 1) = [.4_dp, .9_dp]
265 basis%zet(1, 2) = .7_dp
266 basis%sphi = 0.0_dp
267 basis%sphi(1, 1) = .6_dp
268 basis%sphi(21, 1) = -.2_dp
269 DO row = 2, 8
270 DO ico = ncoset(2) + 1, ncoset(3)
271 basis%sphi(ico, row) = .03_dp*sin(real(ico*row, dp))
272 basis%sphi(ico + 20, row) = -.02_dp*cos(real(ico + row, dp))
273 END DO
274 END DO
275 DO row = 9, nb
276 DO ico = 2, 4
277 basis%sphi(ico, row) = .1_dp*sin(real(ico*row, dp))
278 END DO
279 END DO
280 x(:, 1) = 0.0_dp
281 x(:, 2) = [.3_dp, 0.0_dp, 0.0_dp]
282 x(:, 3) = [0.0_dp, -.7_dp, 0.0_dp]
283 x(:, 4) = [.23_dp, .51_dp, -.4_dp]
284 x(:, 5) = [-.6_dp, .2_dp, .8_dp]
285 CALL gaussian_basis_fields_evaluate(basis, x, value, gradient, hh)
286 CALL check(maxval(abs(value(:, 1) - (.6_dp*exp(-.4_dp*sum(x*x, dim=1)) &
287 - .2_dp*exp(-.9_dp*sum(x*x, dim=1))))), 'native signed s contraction')
288 DO axis = 1, 3
289 DO side = 1, 2
290 xp = x
291 xp(axis, :) = xp(axis, :) + (2*side - 3)*step
292 CALL gaussian_basis_fields_evaluate(basis, xp, samples(:, :, side), gs(:, :, :, side))
293 END DO
294 CALL check(maxval(abs(gradient(:, :, axis) - (samples(:, :, 2) - samples(:, :, 1))/(2*step))), &
295 'contracted Gaussian point gradient', 2.e-8_dp)
296 CALL check(maxval(abs(hh(:, :, :, axis) - (gs(:, :, :, 2) - gs(:, :, :, 1))/(2*step))), &
297 'contracted Gaussian origin/axis Hessian', 2.e-7_dp)
298 END DO
299 cell = reshape([2.3_dp, .1_dp, .2_dp, .2_dp, 2.7_dp, -.1_dp, .1_dp, .3_dp, 2.1_dp], [3, 3])
300 center = [.1_dp, -.2_dp, .3_dp]
301 images = reshape([0, 0, 0, 1, -1, 0, -1, 0, 1], [3, 3])
302 bloch = [.23_dp, -.17_dp, .11_dp]
303 dc = .03_dp*cell
304 dcenter = [.07_dp, -.02_dp, .01_dp]
305 dpnt = .02_dp*x
306 dk = [.03_dp, .02_dp, -.01_dp]
307 CALL gaussian_basis_fields_periodic(basis, x, center, cell, images, bloch, v, g, dv, dg, dpnt, dcenter, dc, dk)
308 DO side = 1, 2
309 shift = (2*side - 3)*step
310 CALL gaussian_basis_fields_periodic(basis, x + shift*dpnt, center + shift*dcenter, cell + shift*dc, &
311 images, bloch + shift*dk, vs(:, :, side), gss(:, :, :, side))
312 END DO
313 CALL check(maxval(abs(dv - (vs(:, :, 2) - vs(:, :, 1))/(2*step))), 'native Gaussian Bloch joint response', 2.e-8_dp)
314 CALL check(maxval(abs(dg - (gss(:, :, :, 2) - gss(:, :, :, 1))/(2*step))), 'native Gaussian Bloch gradient response', 2.e-7_dp)
315 CALL gaussian_basis_fields_periodic(basis, x, center, cell, images, -bloch, other)
316 CALL check(maxval(abs(other - conjg(v))), 'native Gaussian Bloch time reversal')
317 DO image = 1, 3
318 translated_images(:, image) = images(:, image) - [1, 0, 0]
319 END DO
320 CALL gaussian_basis_fields_periodic(basis, x, center + cell(:, 1), cell, translated_images, bloch, other)
321 CALL check(maxval(abs(other - exp(cmplx(0.0_dp, -2*pi*bloch(1), dp))*v)), 'native Gaussian lattice representative')
322 CALL deallocate_gto_basis_set(basis)
323 END SUBROUTINE check_gaussian_fields
324
325! **************************************************************************************************
326!> \brief ...
327!> \param value ...
328!> \param label ...
329!> \param tolerance ...
330! **************************************************************************************************
331 SUBROUTINE check(value, label, tolerance)
332 REAL(KIND=dp), INTENT(IN) :: value
333 CHARACTER(LEN=*), INTENT(IN) :: label
334 REAL(KIND=dp), INTENT(IN), OPTIONAL :: tolerance
335
336 REAL(KIND=dp) :: tol
337
338 tol = 2.e-12_dp
339 IF (PRESENT(tolerance)) tol = tolerance
340 max_error = max(max_error, value)
341 IF (value > tol) THEN
342 WRITE (*, *) trim(label), value, tol
343 error stop 'Inverse primitive mismatch'
344 END IF
345 END SUBROUTINE check
346END PROGRAM upf_inverse_unittest
subroutine, public deallocate_gto_basis_set(gto_basis_set)
...
subroutine, public allocate_gto_basis_set(gto_basis_set)
...
Native contracted Gaussian fields and their consistent Cartesian/Bloch responses. Uses the stored sph...
subroutine, public gaussian_basis_fields_evaluate(basis, displacements, value, gradient, hessian, cutoff_squared)
Evaluate a native contracted basis at explicit point-minus-center displacements. No minimum-image ope...
subroutine, public gaussian_basis_fields_periodic(basis, points, center, cell, images, reduced_k, value, gradient, response, gradient_response, point_response, center_response, cell_response, reduced_k_response, cutoff_squared)
Sum explicit Gaussian images with physical Bloch gradients and joint geometry response....
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Definition of mathematical constants and functions.
real(kind=dp), parameter, public pi
Provides Cartesian and spherical orbital pointers and indices.
subroutine, public init_orbital_pointers(maxl)
Initialize or update the orbital pointers.
integer, dimension(:), allocatable, public ncoset
Fourier coefficients and geometry derivatives of the original UPF partial core density.
Definition upf_core.F:8
subroutine, public upf_core_fourier(pot, gvecs, position, volume, density, dposition, dg)
Integrate the supplied true spherical density with the original radial quadrature....
Definition upf_core.F:35
Inverse of a specified finite-rank UPF reconstruction, including intercenter coupling....
Definition upf_inverse.F:15
subroutine, public upf_inverse_project(inverse, beta_gaussian, coefficients)
Solve for W=P*U*chi; do not replace original q by an orthogonalized metric.
subroutine, public upf_inverse_init(beta_delta, inverse, info, minimum_rcond)
Factor K with original projector normalization and all supplied intercenter blocks.
subroutine, public upf_inverse_basis_response(gaussian_response, delta, delta_response, coefficients, coefficients_response, response)
Joint field response d(U*chi)=dchi-dDelta*W-Delta*dW.
subroutine, public upf_inverse_basis(gaussian, delta, coefficients, soft)
Evaluate inverse images on a field batch: U*chi=chi-Delta*W. Spatial derivatives use the correspondin...
subroutine, public upf_inverse_atomic_residual(atomic, coefficients, delta_overlap, delta_kinetic, kinetic_residual, metric_residual)
Finite partial-wave closure residuals added to Gaussian T plus hard D-T and Gaussian S....
subroutine, public upf_inverse_project_response(inverse, coefficients, beta_gaussian_response, beta_delta_response, response)
Differentiate the same reconstruction: K*dW=dB-dK*W. Displacement/strain responses must include the o...
subroutine, public upf_inverse_operator(gaussian_operator, gaussian_delta, delta_gaussian, delta_operator, augmentation, coefficients, transformed)
Pull back A+P^dagger*augmentation*P into reconstructed Gaussian variables.
subroutine, public upf_inverse_operator_response(gaussian_response, gaussian_delta, delta_gaussian, delta_operator, augmentation, coefficients, gaussian_delta_response, delta_gaussian_response, delta_operator_response, augmentation_response, coefficients_response, response)
Differentiate the full operator pullback, including both inverse-basis legs. Matrix responses already...
Owned UPF dataset and radial conventions shared by ATOM and Quickstep. Dataset availability does not ...
Definition upf_types.F:12
program upf_inverse_unittest
Inverse reconstruction identities, conditioning and analytic field/operator responses.
subroutine check_core_fourier()
Original core normalization, finite endpoint and joint phase/lattice/volume derivative.