Skip to content

Potential issue with spin handling in SIMPLE_EE Jastrow #1

Description

@ahmed-physics

I noticed a potential issue with the spin handling in the SIMPLE_EE Jastrow implementation.
In jastrow_ee, nspins is used to separate r_ee into parallel-spin and antiparallel-spin pairs:
r_ees = [
jnp.split(r, nspins[0:1], axis=1)
for r in jnp.split(r_ee, nspins[0:1], axis=0)
]
The code then applies different cusp coefficients in 2D:
cusp_parallel = interaction_strength / 3
cusp_anti = interaction_strength
This suggests that the Jastrow is intended to distinguish between same-spin and opposite-spin electron pairs.
However, when the Jastrow is applied in networks.py, the code uses
nspins_merged = (n_total, 0)
instead of the actual spin counts.
As a result, jastrow_ee interprets all electrons as belonging to the same spin sector. Therefore, all electron-electron pairs are treated as parallel-spin pairs, and the antiparallel-spin contribution is never included.
For a system containing both spin species, this appears to give
[
U =
\sum
{i<j}
-\frac{(1/3)\alpha^2}{\alpha+r
{ij}},
]
rather than
[
U =
\sum_{\sigma_i=\sigma_j}
-\frac{(1/3)\alpha^2}{\alpha+r_{ij}}
+
\sum_{\sigma_i\neq\sigma_j}
-\frac{\alpha^2}{\alpha+r_{ij}}.
]
Could you clarify whether using
nspins_merged = (n_total, 0)
is intentional? If the purpose of the 2D Jastrow is to satisfy the spin-dependent electron-electron Coulomb cusp conditions, it seems that the actual (n_up, n_down) should instead be passed to jastrow_apply.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions