pytc.ansatz.sj.update_jastrow_one_electron

pytc.ansatz.sj.update_jastrow_one_electron(sj, old_positions, new_positions, electron_idx, jastrow_params, old_log_jastrow)[source]

Update Jastrow log-value after moving one electron.

Recomputes only the N-1 pairs involving electron_idx instead of all N(N-1)/2 pairs:

new_log_J = old_log_J + sum_{j != k} [u_new(k,j) - u_old(k,j)]

Respects the argument order convention of compute_jastrow_log_value (sum_{i<j} u(r_i, r_j)), which matters when u is asymmetric.

Parameters:
  • sj (flax.struct.dataclass) – SlaterJastrow ansatz

  • old_positions – (n_electrons, 3)

  • new_positions – (n_electrons, 3)

  • electron_idx – int

  • jastrow_params – Jastrow parameters

  • old_log_jastrow – scalar

Returns:

scalar

Return type:

new_log_jastrow