Coming back to this thread after a while. First, the original complaint is resolved on my side:
with v2.13.1309 both spin_dep_omega = 0 and 1 are accepted and optimise, and I have run the
Ω term through varmin for Nω = 2..9 without trouble. Thanks to Clio for the fixes.
While porting the Ω term to my own Python implementation and validating it against CASINO
reference runs, however, I ran into something that looks like a sign error in the
particle-symmetry constraints. I can only reproduce CASINO's parameter sets by copying it, so I
would like to check it with you.
The code
Code: Select all
src/pbackflow.f90, SUBROUTINE construct_omega_constraints (~line 4745) assigns +1
to
both matrix entries of each symmetry row:
Code: Select all
! Particle symmetry constraints.
if(omega_symm(s)>0)then
do n=1,nd
do m=1,nd
do l=1,nd
p0=param_indx(l,m,n)
select case(omega_symm(s))
case(1) ! Two spins equal -> first two indices interchangeable (l,m).
q=q+1 ; p=param_indx(m,l,n)
cmat(q,p0)=1._dp ; cmat(q,p)=1._dp
case(3) ! All three spins equal -> all three indices interchangeable.
q=q+1 ; p=param_indx(m,l,n)
cmat(q,p0)=1._dp ; cmat(q,p)=1._dp
q=q+1 ; p=param_indx(l,n,m)
cmat(q,p0)=1._dp ; cmat(q,p)=1._dp
endselect ! omega_symm
Each row therefore imposes K_lmn + K_mln = 0, while the comments ("interchangeable") call for
K_lmn − K_mln = 0.
The corresponding code in construct_H (src/pjastrow.f90, ~line 8775) has the intended form,
accumulating with opposite signs:
Code: Select all
case(1) ! i=j/=k (or permutation thereof) -> l,m interchangeable
q=q+1 ; p=1+m+l*nh+n*nh2 ; H(q,p0)=H(q,p0)+1._dp ; H(q,p)=H(q,p)-1._dp
This matters because the DIARY entry that introduced the current constraints states the
intention explicitly — v2.13.1272 (2026-04-09):
> Replaced lookup array spin_dep_omega with calls to which_striplet and a precalculated
> omega_index array. This approach is fully analogous to the one done in the H term. Proper
> symmetry constraints on the omega parameter array are now applied, vs the previous approach
> of imposing symmetry independent of l,m,n index order.
So the H term was the model, but the two +1s make the resulting constraints the opposite of
the H term's.
What it does to the parameters
With +1/+1 the constraints make K_lmn
antisymmetric rather than symmetric:
* every K with two equal indices is forced to zero — when l = m both assignments hit the
same column, so the row degenerates to K_lln = 0;
* the free-parameter count for spin_dep = 0 collapses from C(Nω+3,3) (symmetric multisets)
to C(Nω+1,3) (antisymmetric components). For Nω = 2 exactly
one parameter survives,
K_012; for Nω = 4 it is 10 rather than 35. The counts CASINO reports for Nω = 2..9 are
1, 4, 10, 20, 35, 56, 84, 120, which is C(Nω+1,3) throughout;
* the no-cusp rows added in v2.13.1258 become redundant for omega_symm = 3, since antisymmetry
already zeroes every parameter they refer to.
Why it is a problem beyond the parameter count
The transformation loses exchange equivariance. Under exchange of two identical electrons
j ↔ k the pair distances (r_jk, r_ki, r_ij) map onto (r_jk, r_ij, r_ki), i.e. the 2nd and
3rd polynomial indices swap, so ω → −ω. The vector (r_ij + r_ik) in the displacement is
unchanged, hence ξ_i → −ξ_i. Exchanging two electrons therefore does not simply permute the
backflow coordinates, and the determinant of backflow coordinates is no longer antisymmetric.
Numerical check using the K from an actual CASINO varmin run (Be, spin_dep = 0, Nω = 2,
L = 2.4143, C = 3, four electrons, exchanging the two spin-up electrons). "Exchange error" is
the deviation from ξ_a(P_ab r) = ξ_b(r) and ξ_c(P_ab r) = ξ_c(r):
K used max|xi| exchange error
from CASINO correlation.out.2 (antisym) 1.77e-05 2.26e-06
a symmetric K, same order and cutoff 2.94e-03 2.71e-19
a purely antisymmetric K 1.76e-04 2.25e-05
The violation is about 13% of the displacement itself, not roundoff, whereas any symmetric `K`
satisfies equivariance to machine precision.
Timeline
Reconstructed from the DIARY plus the Omega term: block of my own output files, same input
(Be, spin_dep = 0, Nω = 4):
* v2.13.1241 (2026-01-13) — reports **35** free params, consistent with true symmetry and no
no-cusp rows;
* v2.13.1248 (2026-01-20) — "Ensured omega_param symmetries are maintained without no-cusp
conditions";
* v2.13.1258 (2026-02-16) — no-cusp conditions imposed on eta and omega;
* v2.13.1272 (2026-04-09) — symmetry constraints rewritten, quoted above;
* v2.13.1291 (2026-06-04) and v2.13.1309 — report **10** free params, which matches the
antisymmetric form.
I see no DIARY entry after v2.13.1272 touching the omega symmetry constraints, so I assume
v2.13.1313 behaves the same.
Best wishes Vladimir.