Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Functor for Short Ranged en Jastrow #1680

Merged
merged 18 commits into from Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions manual/jastrow.tex
Expand Up @@ -67,6 +67,7 @@ \subsubsection{Input Specification}
two of the most common ones below.
\include{jastrow_one_body_spline}
\include{jastrow_one_body_pade}
\include{jastrow_one_body_srcusp}

\subsection{Two-body Jastrow functions}
The two-body Jastrow factor is a form that allows for the explicit inclusion
Expand Down
61 changes: 61 additions & 0 deletions manual/jastrow_one_body_srcusp.tex
@@ -0,0 +1,61 @@
\subsubsection{Short Range Cusp Form}
\label{sec:onebodyjastrowsrcusp}

The idea behind this functor is to encode nuclear cusps and other details at very
short range around a nucleus in the region that the Gaussian orbitals of quantum
chemistry are not capable of describing correctly.
The functor is kept short ranged, because outside this small region, quantum chemistry
orbital expansions are already capable of taking on the correct shapes.
Unlike a pre-computed cusp correction, this optimizable functor can respond to
changes in the wave function during VMC optimization.
The functor's form is
\begin{equation}
\label{srcuspform}
u(r) = -\exp{\left(-r/R_0\right)} \left( A R_0 + \sum_{k=0}^{N-1} B_k \frac{ (r/R_0)^{k+2} }{ 1 + (r/R_0)^{k+2} } \right)
\end{equation}
in which $R_0$ acts as a soft cutoff radius ($u(r)$ decays to zero quickly beyond roughly this distance)
and $A$ determines the cusp condition.
\begin{equation}
\label{srcusplimit}
\lim_{r \to 0} \frac{\partial u}{\partial r} = A
\end{equation}
The simple exponential decay is modified by the $N$ coefficients $B_k$ that define
an expansion in sigmoidal functions, thus adding detailed structure in a short-ranged
region around a nucleus while maintaining the correct cusp condition at the nucleus.
Note that sigmoidal functions are used instead of, say, a bare polynomial expansion, as they
trend to unity past the soft cutoff radius and so interfere less with the exponential decay
that keeps the functor short ranged.
Although $A$, $R_0$, and the $B_k$ coefficients can all be optimized as variational
parameters, $A$ will typically be fixed as the desired cusp condition is known.

To specify this one-body Jastrow factor, use an input section like the following.

\begin{lstlisting}[style=QMCPXML]
<jastrow name="J1Cusps" type="One-Body" function="shortrangecusp" source="ion0" print="yes">
<correlation rcut="6" cusp="3" elementType="Li">
<var id="LiCuspR0" name="R0" optimize="yes"> 0.06 </var>
<coefficients id="LiCuspB" type="Array" optimize="yes">
0 0 0 0 0 0 0 0 0 0
</coefficients>
</correlation>
<correlation rcut="6" cusp="1" elementType="H">
<var id="HCuspR0" name="R0" optimize="yes"> 0.2 </var>
<coefficients id="HCuspB" type="Array" optimize="yes">
0 0 0 0 0 0 0 0 0 0
</coefficients>
</correlation>
</jastrow>
\end{lstlisting}

Here ``rcut'' is specified as the range beyond which the functor is assumed to be zero.
The value of $A$ can either be specified via the ``cusp'' option as shown above, in
which case its optimization is disabled, or through its own ``var'' line as
for $R_0$, in which case it can be specified as either optimizable (``yes'')
or not (``no'').
The coefficients $B_k$ are specified via the ``coefficients'' section,
with the length $N$ of the expansion determined automatically based on the length
of the array.

Note that this one-body Jastrow form can (and probably should) be used in conjunction
with a longer ranged one-body Jastrow, such as a spline form.
Be sure to set the longer-ranged Jastrow to be cusp-free!
2 changes: 1 addition & 1 deletion manual/opt.tex
Expand Up @@ -268,7 +268,7 @@ \subsubsection{adaptive}

Recommendations:
\begin{itemize}
\item Default \ixml{shift_i}, \ixml{shift_s} should be fine.
\item Default \ixml{shift_i}, \ixml{shift_s} should be fine.
\item When there are fewer than about 5,000 variables being optimized, the traditional LM is preferred as it has a lower overhead than the BLM when the number of variables is small.
\item Initial experience with the BLM suggests that a few hundred blocks and a handful of \ixml{nolds} and \ixml{nkept}
often provide a good balance between memory use and accuracy. In general, using fewer blocks should be more accurate but will require more memory.
Expand Down
6 changes: 6 additions & 0 deletions src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp
Expand Up @@ -43,6 +43,7 @@
#include "QMCWaveFunctions/Jastrow/LRBreakupUtilities.h"
#include "QMCWaveFunctions/Jastrow/BsplineFunctor.h"
#include "QMCWaveFunctions/Jastrow/PadeFunctors.h"
#include "QMCWaveFunctions/Jastrow/ShortRangeCuspFunctor.h"
#include "QMCWaveFunctions/Jastrow/UserFunctor.h"
#include <iostream>

Expand Down Expand Up @@ -513,6 +514,11 @@ bool RadialJastrowBuilder::put(xmlNodePtr cur)
guardAgainstPBC();
success = createJ1<PadeFunctor<RealType>>(cur);
}
else if (Jastfunction == "shortrangecusp")
{
//guardAgainstPBC(); // is this needed?
success = createJ1<ShortRangeCuspFunctor<RealType>>(cur);
}
else if (Jastfunction == "user")
{
success = createJ1<UserFunctor<RealType>>(cur);
Expand Down