Skip to content

Commit

Permalink
Merge pull request #4868 from camelto2/nxs_soc_jastrow_cusp
Browse files Browse the repository at this point in the history
Nexus: set correct cusp in SOC jastrow
  • Loading branch information
ye-luo committed Dec 9, 2023
2 parents f625e0a + 9185efb commit e818f01
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/spin_orbit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ where we now utilize determinants of spinors, as opposed to the usual product of
</correlation>
</jastrow>
<jastrow type="Two-Body" name="J2" function="bspline" print="yes">
<correlation speciesA="u" speciesB="u" size="8">
<correlation speciesA="u" speciesB="u" size="8" cusp="-0.5">
<coefficients id="uu" type="Array">
</coefficients>
</correlation>
Expand All @@ -88,8 +88,9 @@ need a product of up and down determinants.
In the Jastrow specification, we only need to provide
the jastrow terms for the same spin as there is no longer a
distinction between the up and down spins.
The electon-electron cusp in this case should be -1/2, as discussed in :cite:`Melton2016-2`.

We also make a small modification in the particleset specification:
We also make a small modification in the particleset specification

.. code-block::
:caption: specification for the electron particle when performing spin-orbit calculations
Expand Down
3 changes: 3 additions & 0 deletions nexus/lib/qmcpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,14 @@ def incorporate_result(self,result_name,result,sim):
spinor = input.get('spinor')
if spinor is not None and spinor:
# remove u-d term from optmized jastrow
# also set correct cusp condition
J2 = optwf.get('J2')
if J2 is not None:
corr = J2.get('correlation')
if 'ud' in corr:
del corr.ud
if 'uu' in corr:
corr.uu.cusp = -0.5
#end if
#end if
#end if
Expand Down
3 changes: 3 additions & 0 deletions nexus/lib/qmcpack_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -7609,11 +7609,14 @@ def generate_basic_input(**kwargs):

if kw.spinor is not None and kw.spinor:
# remove u-d
# also set correct cusp
J2 = wfn.jastrows.get('J2')
if J2 is not None:
corr = J2.get('correlation')
if 'ud' in corr:
del corr.ud
if 'uu' in corr:
corr.uu.cusp = -0.5

h_estimators = kw.estimators
d_estimators = None
Expand Down

0 comments on commit e818f01

Please sign in to comment.