0.5 factor in the last line times r_ees[0][0] fixs the double counting in jnp.sum(r_ees[0][0]), however jnp.sum(r_ees[0][0]) still need to be divided by 4, since they are parallel electrons.
As for r_ees[0][1], there are no double-counting problems and the 0.5 factor in the last line produces the correct cusp factor for anti-parallel electrons.
Hello, there~ I have a question about exact_cusp function in your code, although it's actually turned off.
https://github.com/deepmind/ferminet/blob/c6c53bf96c1425750d6b7e9038eee68ff3de9d81/ferminet/networks.py#L411
If I understand correctly, cusp factor for parallel spin electrons should be 1/4 and 1/2 for anti-parallel spin electrons. I am afraid it should be
0.5 factor in the last line times r_ees[0][0] fixs the double counting in jnp.sum(r_ees[0][0]), however jnp.sum(r_ees[0][0]) still need to be divided by 4, since they are parallel electrons. As for r_ees[0][1], there are no double-counting problems and the 0.5 factor in the last line produces the correct cusp factor for anti-parallel electrons.
Sorry for bothering~