Merge pull request #916 from jtkrogel/qman_deprecated

Remove deprecated features from the manual
This commit is contained in:
Ye Luo 2018-07-05 16:10:21 -05:00 committed by GitHub
commit 6f8a46bc1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 168 additions and 383 deletions

View File

@ -6,6 +6,7 @@
pseudo_dir = './',
outdir='out'
disk_io='low'
wf_collect=.false.
/
&system
ibrav=2, celldm(1) =7.100, nat= 2, ntyp= 2,

View File

@ -6,6 +6,7 @@
pseudo_dir = './',
outdir='out'
disk_io='low'
wf_collect=.false.
/
&system
ibrav=2, celldm(1) =7.100, nat= 2, ntyp= 2,

View File

@ -6,6 +6,7 @@
pseudo_dir = './',
outdir='out'
disk_io='low'
wf_collect=.false.
/
&system
ibrav=2, celldm(1) =7.100, nat= 2, ntyp= 2,

View File

@ -6,6 +6,7 @@
pseudo_dir = './',
outdir='out'
disk_io='low'
wf_collect=.false.
/
&system
ibrav=2, celldm(1) =7.100, nat= 2, ntyp= 2,

View File

@ -169,8 +169,6 @@ qmc1 = generate_qmcpack(
pseudos = qmc_pps,
meshfactor = xxx,
precision = '---',
truncate = False,
buffer = 0.0,
jastrows = [],
calculations = [
vmc(
@ -205,8 +203,6 @@ qmc2 = generate_qmcpack(
pseudos = qmc_pps,
meshfactor = 1.0,
precision = 'double',
truncate = False,
buffer = 1.0,
jastrows = [],
calculations = [
vmc(

View File

@ -1,195 +0,0 @@
#! /usr/bin/env python
# import Nexus functions
from nexus import settings,job,run_project,get_machine
from nexus import generate_physical_system
from nexus import generate_pwscf
from nexus import generate_pw2qmcpack
from nexus import generate_qmcpack,vmc,loop,linear,dmc
# Nexus settings
settings(
pseudo_dir = './pseudopotentials',
runs = '',
results = '',
status_only = 0,
generate_only = 0,
sleep = 3,
machine = 'vesta',
account = 'QMCPACK-Training'
)
# allow max of one job at a time (lab only)
vesta = get_machine('vesta')
vesta.queue_size = 1
# locations of pwscf, pw2qmcpack and qmcpack executables
pwscf = '/soft/applications/qmcpack/Binaries/pw.x'
pw2qmcpack = '/soft/applications/qmcpack/Binaries/pw2qmcpack.x'
qmcpack = '/soft/applications/qmcpack/Binaries/qmcpack'
# run directory and pseudopotentials
directory = 'graphene' # directory to perform runs
dft_pps = ['C.BFD.upf'] # pwscf pseudopotentials
qmc_pps = ['C.BFD.xml'] # qmcpack pseudopotentials
# job details
dft_job = job(nodes=1,minutes=20,queue="qmcpack",app=pwscf)
p2q_job = job(cores=1,minutes=20,queue="qmcpack",app=pw2qmcpack)
qmc_job = job(nodes=32,minutes=20,threads=16,queue="qmcpack",app=qmcpack)
# create 2 atom sheet of graphene
graphene = generate_physical_system(
axes = [[9.30501148, 0.00000000, 0.0000000],
[-4.6525058, 8.05837632, 0.0000000],
[0.00000000, 0.00000000, 15.0000000]],
elem = ['C','C','C','C','C','C','C','C'],
pos = [[ 0.00000000, 0.00000000, 7.50000000],
[ 2.32625287, 1.34306272, 7.50000000],
[ 4.65250574, 0.00000000, 7.50000000],
[ 6.97875861, 1.34306272, 7.50000000],
[-2.32625290, 4.02918816, 7.50000000],
[-0.00000003, 5.37225088, 7.50000000],
[ 2.32625284, 4.02918816, 7.50000000],
[ 4.65250571, 5.37225088, 7.50000000]],
units = 'B',
kgrid = (1,1,1),
kshift = (0,0,0),
net_charge= 0,
net_spin = 0,
C = 4
)
sims = []
# scf run to generate converged charge density
scf = generate_pwscf(
identifier = 'scf',
path = directory+'/scf',
job = dft_job,
input_type = 'scf',
system = graphene,
pseudos = dft_pps,
input_dft = 'lda',
ecut = 200,
conv_thr = 1e-8,
mixing_beta = .7,
nosym = False,
wf_collect = False,
kgrid = (4,4,1),
kshift = (0,0,0)
)
sims.append(scf)
# nscf run to generate orbitals
nscf = generate_pwscf(
identifier = 'nscf',
path = directory+'/nscf',
job = dft_job,
input_type = 'nscf',
system = graphene,
pseudos = dft_pps,
input_dft = 'lda',
ecut = 200,
conv_thr = 1e-8,
mixing_beta = .7,
tprnfor = False,
tstress = False,
nosym = True,
wf_collect = True,
dependencies = (scf,'charge_density')
)
sims.append(nscf)
# conversion step to create h5 file with orbitals
p2q = generate_pw2qmcpack(
identifier = 'p2q',
path = directory+'/nscf',
job = p2q_job,
write_psir = False,
dependencies = (nscf,'orbitals')
)
sims.append(p2q)
# optimization inputs
linopt1 = linear(
energy = 0.0,
unreweightedvariance = 1.0,
reweightedvariance = 0.0,
timestep = 0.4,
samples = 5000,
warmupsteps = 50,
blocks = 200,
substeps = 1,
nonlocalpp = True,
usebuffer = True,
walkers = 1,
minwalkers = 0.5,
maxweight = 1e9,
usedrift = True,
minmethod = 'quartic',
beta = 0.025,
exp0 = -16,
bigchange = 15.0,
alloweddifference = 1e-4,
stepsize = 0.2,
stabilizerscale = 1.0,
nstabilizers = 3
)
linopt2 = linopt1.copy()
linopt2.samples = 20000
# optimization run
opt = generate_qmcpack(
identifier = 'opt',
path = directory+'/opt',
job = qmc_job,
input_type = 'basic',
system = graphene,
bconds = 'ppn',
pseudos = qmc_pps,
jastrows = [('J1','bspline',8),
('J2','bspline',8,'coeff',[8*[0],8*[0]])],
calculations = [loop(max=8,qmc=linopt1),
loop(max=4,qmc=linopt2)],
dependencies = (p2q,'orbitals')
)
sims.append(opt)
# VMC run
buffers = [0.5,1.0,1.5,2.0]
for buff in buffers:
b = '{0:.2f}'.format(buff)
qmc = generate_qmcpack(
identifier = 'vmc',
path = directory+'/vmc-buffer-'+b,
job = qmc_job,
input_type = 'basic',
system = graphene,
bconds = 'ppn',
pseudos = qmc_pps,
meshfactor = 0.6,
precision = 'float',
truncate = True,
buffer = buff,
jastrows = [],
calculations = [
vmc(
walkers = 1,
warmupsteps = 30,
blocks = 64,
steps = 8,
substeps = 4,
timestep = .6,
samples = 524288
),
],
dependencies = [(p2q,'orbitals'),(opt,'jastrow')]
)
sims.append(qmc)
run_project(sims)

View File

@ -173,8 +173,6 @@ for factor in factors:
pseudos = qmc_pps,
meshfactor = factor,
precision = 'double',
truncate = False,
buffer = 0.0,
jastrows = [],
calculations = [
vmc(

View File

@ -10,28 +10,41 @@ different file formats and QMCPACK (e.g. ppconvert and convert4qmc),
\section{Post-Processing}
\subsection{qmca}
qmca is a versatile tool to analyze and plot the raw data from QMCPACK *.scalar.dat files.
\texttt{qmca} is a versatile tool to analyze and plot the raw data from QMCPACK *.scalar.dat files.
It is a python executable and part of the Nexus suite of tools. It can be found in
\texttt{trunk/nexus/executables}.
\subsection{qmcfit}
\texttt{trunk/nexus/executables}. For more detail, see section \ref{sec:qmca}.
\subsection{qfit}
\texttt{qfit} is a curve fitting tool to obtain statistical error bars on fitted parameters.
It is useful for DMC timestep extrapolation. For more details, see section \ref{sec:qfit}.
\subsection{qmcfinitesize}
qmcfinitesize is a utility to compute many-body finite-size corrections to the energy. It
\texttt{qmcfinitesize} is a utility to compute many-body finite-size corrections to the energy. It
is a C++ executable that is built alongside the qmcpack executable. It can be found in
\texttt{trunk/build/bin}
\subsection{trace-density}
\section{Converters}
\input{convert4qmc}
\subsection{wfconvert}
wfconvert allows the conversion of wavefunction from another code into a format supported by QMCPACK.
Currently most its important features are available within QMCPACK and there is no need to use it anymore.
Converting wavefunctions from LAPW, nonuniform b-splines, wannier functions has not been transferred.
\subsection{pw2qmcpack.x}
pw2qmcpack.x is an executable that converts PWSCF wavefunctions to QMCPACK readable
HDF5 format. This utility is built alongside the Quantum Espresso post-processing utilities.
This utility is written in Fortran90, and is distributed as a patch of the Quantum Espresso
source code. The patch, as well as automated QE download and patch scripts, can be found in
\texttt{trunk/external\_codes/quantum\_espresso}.
pw2qmcpack used to be used in serial without problems in small systems and becomes a severe bottleneck for a large system.
Due to the large energy cutoff in the calculation with pw.x required by the pseudopotentials and the increasing sizes of systems we are interested in, one limitation of QE can be easily reached
that \texttt{wf\_collect=.true.} results in problems of writing and loading correct plane wave coefficients on disks by pw.x because of the 32bit integer issue. Thus, pw2qmcpack.x fails to convert the orbitals for QMCPACK.
Since Quantum ESPRESSO 5.3.0, the new converter has been fully parallelized to overcome that limitation completely.
By setting \texttt{wf\_collect=.false.} (by default \texttt{.false.} 6.1 and before and \texttt{.true.} since 6.2), pw.x doesn't collect the whole wave function into individual files for each k point but write one small file for each processor instead.
By just running pw2qmcpack.x in the same parallel setup (MPI tasks and k-pools) as the last scf/nscf calculation with pw.x,
the orbitals distributed among processors will first be aggregated by the converter into individual temporal HDF5 files for each k-pool and then merged into the final file.
In large calculations, users should benefit from a significant reduction of time in writing the wave function by pw.x thanks to avoiding the wavefunction collection.
pw2qmcpack has been included in the test suite of QMCPACK, see instructions about how to activate the tests in Sec.~\ref{sec:buildqe}.
There are tests labeled ``no-collect'' running the pw.x with setting \texttt{wf\_collect=.false.}.
The input files are stored at examples/solids/dft-inputs-polarized-no-collect.
The scf, nscf, pw2qmcpack runs are performed on 16, 12, 12 MPI tasks with 16, 2, 2 k-pools respectively.
\subsection{ppconvert}
\label{sec:ppconvert}
ppconvert is a utility to convert pseudopotentials between different commonly used formats.
@ -60,7 +73,7 @@ different file formats and QMCPACK (e.g. ppconvert and convert4qmc),
Unfortunately, if the generated UPF file is used in Quantum ESPRESSO, the calculation may be incorrect due to the presence of ``ghost'' states. Potentially these can be removed by adjusting the local chanel, e.g. by setting \texttt{--local\_channel 1} which chooses the p channel as the local channel instead of d.
For this reason, validation of UPF pseudopotentials is always required from the third row and strongly encouraged in general. For example, check that the expected ionization potential and electron affinities are obtained for the atom and check that dimer properties are consistent with those obtained by a Quantum Chemistry code or a plane-wave code that does not use the Kleinman-Bylander projectors.
\input{pseudopotentials}
\section{Miscellaneous}
\subsection{extract-eshdf-kvectors}
%\section{Miscellaneous}
% \subsection{extract-eshdf-kvectors}

View File

@ -1186,9 +1186,10 @@ estimated value of $-3848.28(7)$ instead.
\section{Densities and spin-densities}
\label{sec:densities}
TBD.
\section{Energy densities}
\label{sec:energydensities}
%\section{Energy densities}
%\label{sec:energydensities}

View File

@ -106,21 +106,7 @@ Many pair potentials are supported. Though only the most commonly used pair pot
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{pseudo } & \multicolumn{2}{l}{Semilocal pseudopotential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{mpc } & \multicolumn{2}{l}{Modified Periodic Coulomb interaction/correction}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{cpp } & \multicolumn{2}{l}{Core polarization potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{numerical/*num* } & \multicolumn{2}{l}{Numerical radial potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{skpot } & \multicolumn{2}{l}{\textit{Unknown}}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{vhxc } & \multicolumn{2}{l}{Exchange correlation potential (external)}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{jellium } & \multicolumn{2}{l}{Atom-centered spherical jellium potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{hardsphere } & \multicolumn{2}{l}{Hard sphere potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{gaussian } & \multicolumn{2}{l}{Gaussian potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{modpostel } & \multicolumn{2}{l}{Modified Poschl-Teller potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{huse } & \multicolumn{2}{l}{Huse quintic potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{modInsKE } & \multicolumn{2}{l}{Model insulator kinetic energy}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{oscillatory } & \multicolumn{2}{l}{\textit{Unknown}}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{LJP\_smoothed } & \multicolumn{2}{l}{Helium pair potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{HeSAPT\_smoothed } & \multicolumn{2}{l}{Helium pair potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{HFDHE2\_Moroni1995} & \multicolumn{2}{l}{Helium pair potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{HFDHE2 } & \multicolumn{2}{l}{Helium pair potential}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{eHe } & \multicolumn{2}{l}{Helium-electron pair potential}\\
\multicolumn{2}{l}{shared attributes:} & \multicolumn{4}{l}{}\\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type}$^r$ & text & \textit{See above} & 0 & Select pairpot type \\
@ -139,11 +125,11 @@ Additional information:
\item{\textbf{type:} Used to select the desired pair potential. Must be selected from the list of type options above.}
\item{\textbf{name:} A unique name used to identify this pair potential. Block averaged output data will appear under this name in \texttt{scalar.dat} and/or \texttt{stat.h5} files.}
\item{\textbf{source/target:} These specify the particles involved in a pair interaction. If an interaction is between classical (e.g. ions) and quantum (e.g. electrons), \texttt{source}/\texttt{target} should be the name of the classical/quantum particleset.}
\item{Only \texttt{coulomb, pseudo, mpc} are described in detail below. The older or less used types (\texttt{cpp, numerical, jellium, hardsphere, gaussian, huse, modpostel, oscillatory, skpot, vhxc, modInsKE, LJP\_smoothed, HeSAPT\_smoothed, HFDHE2\_Moroni1995, eHe, HFDHE2}) are not covered.}
\item{Only \texttt{coulomb, pseudo, mpc} are described in detail below. The older or less used types (\texttt{cpp, skpot}) are not covered.}
\dev{
\item{Available only if \texttt{QMC\_BUILD\_LEVEL>2} and \texttt{QMC\_CUDA} is not defined: \texttt{hardsphere, gaussian, huse, modpostel, oscillatory, skpot}.}
\item{Available only if \texttt{QMC\_BUILD\_LEVEL>2} and \texttt{QMC\_CUDA} is not defined: \texttt{skpot}.}
\item{Available only if \texttt{OHMMS\_DIM==3}: \texttt{mpc, vhxc, pseudo}.}
\item{Available only if \texttt{OHMMS\_DIM==3} and \texttt{QMC\_BUILD\_LEVEL>2} and \texttt{QMC\_CUDA} is not defined: \texttt{cpp, LJP\_smoothed, HeSAPT\_smoothed, HFDHE2\_Moroni1995, eHe, jellium, HFDHE2, modInsKE}.}
\item{Available only if \texttt{OHMMS\_DIM==3} and \texttt{QMC\_BUILD\_LEVEL>2} and \texttt{QMC\_CUDA} is not defined: \texttt{cpp}.}
}
\end{itemize}
@ -435,6 +421,8 @@ When an \texttt{<estimator/>} element appears in \texttt{<hamiltonian/>}, it is
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{gofr } & \multicolumn{2}{l}{Pair correlation function (quantum species)}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{sk } & \multicolumn{2}{l}{Static structure factor}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{structurefactor } & \multicolumn{2}{l}{Species resolved structure factor}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{specieskinetic } & \multicolumn{2}{l}{Species resolved kinetic energy}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{latticedeviation } & \multicolumn{2}{l}{Spatial deviation between two particlesets}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{momentum } & \multicolumn{2}{l}{Momentum distribution}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{energydensity } & \multicolumn{2}{l}{Energy density on uniform or Voronoi grid}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{dm1b } & \multicolumn{2}{l}{One body density matrix in arbitrary basis}\\
@ -444,14 +432,8 @@ When an \texttt{<estimator/>} element appears in \texttt{<hamiltonian/>}, it is
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{orbitalimages } & \multicolumn{2}{l}{Create image files for orbitals, then exit}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{flux } & \multicolumn{2}{l}{Checks sampling of kinetic energy}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{localmoment } & \multicolumn{2}{l}{Atomic spin polarization within cutoff radius}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{numberfluctuations} & \multicolumn{2}{l}{Spatial number fluctuations}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{HFDHE2 } & \multicolumn{2}{l}{Helium pressure}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{NearestNeighbors } & \multicolumn{2}{l}{Trace nearest neighbor indices}\\
\dev{
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{Kinetic } & \multicolumn{2}{l}{\textit{No current function}}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{Pressure } & \multicolumn{2}{l}{\textit{No current function}}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{ZeroVarObs } & \multicolumn{2}{l}{\textit{No current function}}\\
\multicolumn{2}{l}{ } & \multicolumn{2}{l}{DMCCorrection } & \multicolumn{2}{l}{\textit{No current function}}\\
\multicolumn{2}{l}{shared attributes:} & \multicolumn{4}{l}{}\\
}
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
@ -582,68 +564,6 @@ Additional information:
<estimator name="Density" type="density" delta="0.05 0.05 0.05"/>
\end{lstlisting}
\subsection{Lattice deviation estimator}
Record deviation of a group of particles in one particle set (target) from a group of particles in another particle set (source).
\FloatBarrier
\begin{table}[h]
\begin{center}
\begin{tabularx}{\textwidth}{l l l l l l }
\hline
\multicolumn{6}{l}{\texttt{estimator type=sk} element} \\
\hline
\multicolumn{2}{l}{parent elements:} & \multicolumn{4}{l}{\texttt{hamiltonian, qmc}}\\
\multicolumn{2}{l}{child elements:} & \multicolumn{4}{l}{\textit{None}}\\
\multicolumn{2}{l}{attributes} & \multicolumn{4}{l}{}\\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type}$^r$ & text & latticedeviation & & Must be latticedeviation \\
& \texttt{name}$^r$ & text & \textit{anything} & any & Unique name for estimator \\
& \texttt{hdf5}$^o$ & boolean & yes/no & no & Output to \texttt{stat.h5} (yes) \\
& \texttt{per\_xyz}$^o$ & boolean & yes/no & no & Directional-resolved (yes) \\
& \texttt{source}$^r$ & text & e/ion0/\dots & no & source particle set \\
& \texttt{sgroup}$^r$ & text & u/d/\dots & no & source particle group \\
& \texttt{target}$^r$ & text & e/ion0/\dots & no & target particle set \\
& \texttt{tgroup}$^r$ & text & u/d/\dots & no & target particle group \\
\hline
\end{tabularx}
\end{center}
\end{table}
\FloatBarrier
Additional information:
\begin{itemize}
\item{\texttt{source}: The ``reference'' particle set to measure distances from, actual reference points are determined together with \verb|sgroup|.}
\item{\texttt{sgroup}: The ``reference'' particle group to measure distances from.}
\item{\texttt{source}: The ``target'' particle set to measure distances to.}
\item{\texttt{sgroup}: The ``target'' particle group to measure distances to. For example, in Listing~\ref{lst:latdev}, the distance from the up electron (``u'') to the origin of the coordinate system is recorded.}
\item{\texttt{per\_xyz}: Record direction-resolved distance. In Listing~\ref{lst:latdev}, the x,y,z coordinates of the up electron will be recorded separately if \texttt{per\_xyz=yes}.}
\item{\texttt{hdf5}: Record particle-resolved distances in the h5 file if \texttt{gdf5=yes}.}.
\end{itemize}
\begin{lstlisting}[caption={Lattice deviation estimator element.},label={lst:latdev}]
<particleset name="e" random="yes">
<group name="u" size="1" mass="1.0">
<parameter name="charge" > -1 </parameter>
<parameter name="mass" > 1.0 </parameter>
</group>
<group name="d" size="1" mass="1.0">
<parameter name="charge" > -1 </parameter>
<parameter name="mass" > 1.0 </parameter>
</group>
</particleset>
<particleset name="wf_center">
<group name="origin" size="1">
<attrib name="position" datatype="posArray" condition="0">
0.00000000 0.00000000 0.00000000
</attrib>
</group>
</particleset>
<estimator type="latticedeviation" name="latdev" hdf5="yes" per_xyz="yes"
source="wf_center" sgroup="origin" target="e" tgroup="u"/>
\end{lstlisting}
\subsection{Spin density estimator}
The spin density is similar to the total density described above. In this case, the sum over particles is performed independently for each spin component.
@ -767,33 +687,6 @@ Additional information:
<estimator type="gofr" name="gofr" num_bin="200" rmax="3.0" source="ion0" />
\end{lstlisting}
\subsection{Species kinetic energy}
Record species-resolved kinetic energy instead of the total kinetic energy in the \verb|Kinetic| column of scalar.dat. \verb|SpeciesKineticEnergy| is arguable the simplest estimator in QMCPACK. The implementation of this estimator is detailed in \verb|manual/estimator/estimator_implementation.pdf|.
\FloatBarrier
\begin{table}[h]
\begin{center}
\begin{tabularx}{\textwidth}{l l l l l l }
\hline
\multicolumn{6}{l}{\texttt{estimator type=sk} element} \\
\hline
\multicolumn{2}{l}{parent elements:} & \multicolumn{4}{l}{\texttt{hamiltonian, qmc}}\\
\multicolumn{2}{l}{child elements:} & \multicolumn{4}{l}{\textit{None}}\\
\multicolumn{2}{l}{attributes} & \multicolumn{4}{l}{}\\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type}$^r$ & text & specieskinetic & & Must be specieskinetic \\
& \texttt{name}$^r$ & text & \textit{anything} & any & Unique name for estimator \\
& \texttt{hdf5}$^o$ & boolean & yes/no & no & Output to \texttt{stat.h5} (yes) \\
\hline
\end{tabularx}
\end{center}
\end{table}
\FloatBarrier
\begin{lstlisting}[caption=Species kinetic energy estimator element.]
<estimator type="specieskinetic" name="skinetic" hdf5="no"/>
\end{lstlisting}
\subsection{Static structure factor, $S(k)$}
@ -840,6 +733,101 @@ Additional information:
\subsection{Species kinetic energy}
Record species-resolved kinetic energy instead of the total kinetic energy in the \verb|Kinetic| column of scalar.dat. \verb|SpeciesKineticEnergy| is arguable the simplest estimator in QMCPACK. The implementation of this estimator is detailed in \verb|manual/estimator/estimator_implementation.pdf|.
\FloatBarrier
\begin{table}[h]
\begin{center}
\begin{tabularx}{\textwidth}{l l l l l l }
\hline
\multicolumn{6}{l}{\texttt{estimator type=specieskinetic} element} \\
\hline
\multicolumn{2}{l}{parent elements:} & \multicolumn{4}{l}{\texttt{hamiltonian, qmc}}\\
\multicolumn{2}{l}{child elements:} & \multicolumn{4}{l}{\textit{None}}\\
\multicolumn{2}{l}{attributes} & \multicolumn{4}{l}{}\\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type}$^r$ & text & specieskinetic & & Must be specieskinetic \\
& \texttt{name}$^r$ & text & \textit{anything} & any & Unique name for estimator \\
& \texttt{hdf5}$^o$ & boolean & yes/no & no & Output to \texttt{stat.h5} (yes) \\
\hline
\end{tabularx}
\end{center}
\end{table}
\FloatBarrier
\begin{lstlisting}[caption=Species kinetic energy estimator element.]
<estimator type="specieskinetic" name="skinetic" hdf5="no"/>
\end{lstlisting}
\subsection{Lattice deviation estimator}
Record deviation of a group of particles in one particle set (target) from a group of particles in another particle set (source).
\FloatBarrier
\begin{table}[h]
\begin{center}
\begin{tabularx}{\textwidth}{l l l l l l }
\hline
\multicolumn{6}{l}{\texttt{estimator type=latticedeviation} element} \\
\hline
\multicolumn{2}{l}{parent elements:} & \multicolumn{4}{l}{\texttt{hamiltonian, qmc}}\\
\multicolumn{2}{l}{child elements:} & \multicolumn{4}{l}{\textit{None}}\\
\multicolumn{2}{l}{attributes} & \multicolumn{4}{l}{}\\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type}$^r$ & text & latticedeviation & & Must be latticedeviation \\
& \texttt{name}$^r$ & text & \textit{anything} & any & Unique name for estimator \\
& \texttt{hdf5}$^o$ & boolean & yes/no & no & Output to \texttt{stat.h5} (yes) \\
& \texttt{per\_xyz}$^o$ & boolean & yes/no & no & Directional-resolved (yes) \\
& \texttt{source}$^r$ & text & e/ion0/\dots & no & source particle set \\
& \texttt{sgroup}$^r$ & text & u/d/\dots & no & source particle group \\
& \texttt{target}$^r$ & text & e/ion0/\dots & no & target particle set \\
& \texttt{tgroup}$^r$ & text & u/d/\dots & no & target particle group \\
\hline
\end{tabularx}
\end{center}
\end{table}
\FloatBarrier
Additional information:
\begin{itemize}
\item{\texttt{source}: The ``reference'' particle set to measure distances from, actual reference points are determined together with \verb|sgroup|.}
\item{\texttt{sgroup}: The ``reference'' particle group to measure distances from.}
\item{\texttt{source}: The ``target'' particle set to measure distances to.}
\item{\texttt{sgroup}: The ``target'' particle group to measure distances to. For example, in Listing~\ref{lst:latdev}, the distance from the up electron (``u'') to the origin of the coordinate system is recorded.}
\item{\texttt{per\_xyz}: Record direction-resolved distance. In Listing~\ref{lst:latdev}, the x,y,z coordinates of the up electron will be recorded separately if \texttt{per\_xyz=yes}.}
\item{\texttt{hdf5}: Record particle-resolved distances in the h5 file if \texttt{gdf5=yes}.}.
\end{itemize}
\begin{lstlisting}[caption={Lattice deviation estimator element.},label={lst:latdev}]
<particleset name="e" random="yes">
<group name="u" size="1" mass="1.0">
<parameter name="charge" > -1 </parameter>
<parameter name="mass" > 1.0 </parameter>
</group>
<group name="d" size="1" mass="1.0">
<parameter name="charge" > -1 </parameter>
<parameter name="mass" > 1.0 </parameter>
</group>
</particleset>
<particleset name="wf_center">
<group name="origin" size="1">
<attrib name="position" datatype="posArray" condition="0">
0.00000000 0.00000000 0.00000000
</attrib>
</group>
</particleset>
<estimator type="latticedeviation" name="latdev" hdf5="yes" per_xyz="yes"
source="wf_center" sgroup="origin" target="e" tgroup="u"/>
\end{lstlisting}
\subsection{Energy density estimator}
An energy density operator, $\hat{\mathcal{E}}_r$, satisfies
\begin{align}

View File

@ -1,7 +1,7 @@
\section{Introduction}
\label{sec:intro_wavefunction}
This section describes the input blocks associated with the specification of the trial wavefunction in a QMCPACK calculation. These sections are contained within the $<wavefunction > ... </wavefunction>$ xml blocks. \textbf{Users are expected to rely on converters to generate the input blocks described in this section.} The converters and the workflows are designed such that input blocks require minimum modifications from users. Unless the workflow requires modification of wavefunction blocks (e.g. setting the cutoff in a multi determinant calculation), only expert users should directly alter them.
This section describes the input blocks associated with the specification of the trial wavefunction in a QMCPACK calculation. These sections are contained within the \texttt{<wavefunction> ... </wavefunction>} xml blocks. \textbf{Users are expected to rely on converters to generate the input blocks described in this section.} The converters and the workflows are designed such that input blocks require minimum modifications from users. Unless the workflow requires modification of wavefunction blocks (e.g. setting the cutoff in a multi determinant calculation), only expert users should directly alter them.
The trial wavefunction in QMCPACK has a general product form:
\begin{equation}

View File

@ -4,7 +4,7 @@
Jastrow factors are among the simplest and most effective ways of including
dynamical correlation in the trial many body wavefunction. The resulting many body
wavefunction is expressed as the product of an antisymmetric (in the case
of Fermions) or symmetric (for Bosons) part and a correlating jastrow factor
of Fermions) or symmetric (for Bosons) part and a correlating Jastrow factor
like so:
\begin{equation}
\Psi(\vec{R}) = \mathcal{A}(\vec{R}) \exp\left[J(\vec{R})\right]
@ -12,9 +12,9 @@ like so:
In this section we will detail the types and forms of Jastrow factor used
in QMCPACK. Note that each type of Jastrow factor needs to be specified using
its own individual jastrow XML element. For this reason, we have repeated the
specification of the jastrow tag in each section, with specialization for the
options available for that given type of jastrow.
its own individual \texttt{jastrow} XML element. For this reason, we have repeated the
specification of the \texttt{jastrow} tag in each section, with specialization for the
options available for that given type of Jastrow.
\subsection{One-body Jastrow functions}
\label{sec:onebodyjastrow}
@ -23,7 +23,7 @@ of correlations between particles that are included in the wavefunction with
particles that are not explicitly part of it. The most common example of
this are correlations between electrons and ions.
The jastrow function is specified within a \texttt{wavefunction} element
The Jastrow function is specified within a \texttt{wavefunction} element
and must contain one or more \texttt{correlation} elements specifying
additional parameters as well as the actual coefficients. Section
\ref{sec:1bjsplineexamples} gives examples of the typical nesting of
@ -44,8 +44,8 @@ type & text & One-body & (required) & Define a one-body function \\
function & text & Bspline & (required) & BSpline Jastrow \\
& text & pade2 & & Pade form \\
& text & \ldots & & \ldots \\
source & text & name & (required) & name of attribute of classical particle set \\
print & text & yes / no & yes & jastrow factor printed in external file?\\
source & text & name & (required) & Name of attribute of classical particle set \\
print & text & yes / no & yes & Jastrow factor printed in external file?\\
\hline
\multicolumn{5}{l}{elements}\\ \hline
& Correlation & & & \\ \hline
@ -56,7 +56,7 @@ print & text & yes / no & yes & jastrow factor printed in external file?\\
\end{center}
\end{table}
To be more concrete, the one-body jastrow factors used to describe correlations
To be more concrete, the one-body Jastrow factors used to describe correlations
between electrons and ions take the form below
\begin{equation}
J1=\sum_I^{ion0}\sum_i^e u_{ab}(|r_i-R_I|)
@ -74,7 +74,7 @@ of dynamic correlation between two particles included in the wavefunction. It
is almost always given in a spin dependent form so as to satisfy the Kato cusp
condition between electrons of different spins\cite{kato}.
The two body jastrow function is specified within a \texttt{wavefunction} element
The two body Jastrow function is specified within a \texttt{wavefunction} element
and must contain one or more correlation elements specifying additional parameters
as well as the actual coefficients. Section \ref{sec:2bjsplineexamples} gives
examples of the typical nesting of \texttt{jastrow}, \texttt{correlation} and
@ -93,7 +93,7 @@ examples of the typical nesting of \texttt{jastrow}, \texttt{correlation} and
name & text & & (required) & Unique name for this Jastrow function \\
type & text & Two-body & (required) & Define a one-body function \\
function & text & Bspline & (required) & BSpline Jastrow \\
print & text & yes / no & yes & jastrow factor printed in external file?\\
print & text & yes / no & yes & Jastrow factor printed in external file?\\
\hline
\multicolumn{5}{l}{elements}\\ \hline
& Correlation & & & \\ \hline
@ -104,13 +104,13 @@ print & text & yes / no & yes & jastrow factor printed in external file?\\
\end{center}
\end{table}
The two-body jastrow factors used to describe correlations between electrons take the form
The two-body Jastrow factors used to describe correlations between electrons take the form
\begin{equation}
J2=\sum_i^{e}\sum_{j>i}^{e} u_{ab}(|r_i-r_j|)
\end{equation}
The most commonly used form of two body jastrow factor supported by the code is a splined
jastrow factor, with many similarities to the one body spline jastrow.
The most commonly used form of two body Jastrow factor supported by the code is a splined
Jastrow factor, with many similarities to the one body spline Jastrow.
\include{jastrow_two_body_spline}
@ -372,5 +372,5 @@ For both the Yukawa and Gaskell RPA Jastrows, the default value for $r_s$ is $r_
\subsection{Three-body Jastrow functions}
Explicit three body correlations can be included in the wavefunction via the three-body
jastrow factor.
Jastrow factor.

View File

@ -21,10 +21,10 @@ needed centers can be used.
elementType & text & name & see below & Classical particle target \\
speciesA & text & name & see below & Classical particle target \\
speciesB & text & name & see below & Quantum species target \\
size & integer & $> 0$ & (required) & number of coefficients \\
rcut & real & $> 0$ & see below & distance at which the correlation goes to 0 \\
cusp & real & $\ge 0$ & 0 & value for use in Kato cusp condition \\
spin & text & yes or no & no & spin dependent jastrow factor \\
size & integer & $> 0$ & (required) & Number of coefficients \\
rcut & real & $> 0$ & see below & Distance at which the correlation goes to 0 \\
cusp & real & $\ge 0$ & 0 & Value for use in Kato cusp condition \\
spin & text & yes or no & no & Spin dependent jastrow factor \\
\hline
\multicolumn{5}{l}{elements}\\ \hline
& Coefficients & & & \\ \hline

View File

@ -38,8 +38,7 @@ labs/lab4_condensed_matter/
├── Be-16at-qmc.py - DFT and QMC for prim to 16 atom cell
├── graphene-setup.py - DFT and OPT for graphene
├── graphene-loop-mesh.py - VMC scan over orbital bspline mesh factors
├── graphene-loop-buffer.py - VMC scan over orbital bspline buffer region size
├── graphene-final.py - DMC for final meshfactor and buffer region
├── graphene-final.py - DMC for final meshfactor
└── pseudopotentials - pseudopotential directory
├── Be.ncpp - Be PP for Quantum ESPRESSO
├── Be.xml - Be PP for QMCPACK
@ -182,16 +181,14 @@ Another useful exercise would be to attempt to validate this pseudopotential by
\section{Handling a 2D system: graphene}
In this section we will examine a calculation of an isolated sheet of graphene. As graphene is a two dimensional system, we will take advantage of qmcpack's ability to mix periodic and open boundary conditions to eliminate and spurious interaction of the sheet with its images in the z direction. Run the script graphene-setup.py which will generate the wavefunction and optimize one and two body jastrow factors. In the script, notice line 160: bconds = 'ppn' in the generate\_qmcpack function which specifies this mix of open and periodic boundary conditions. As a consequence of this, the atoms will need to be kept away from this open boundary in the z direction as the electronic wavefunction will not be defined outside of the simulation box in this direction. For this reason, all of the atom positions in at the beginning of the file have z coordinates 7.5. At this point, run the script graphene-setup.py.
Aside from the change in boundary conditions, the main thing that distinguished this kind of calculation from the beryllium example above is the large amount of vacuum in the cell. While this is a very small calculation designed to run quickly in the tutorial, in general a more converged calculation would quickly become memory limited on an architecture like BG/Q. When the initial wavefunciton optimizaiton has completed to your satisfaction, run the scripts graphene-loop-buffer.py and graphene-loop-mesh.py. These examine within variational Monte Carlo two approaches to reducing the memory required to store the wavefunction. In graphene-loop-mesh.py, the spacing between the b-spline points is varied uniformly. The mesh spacing is a prefactor to the linear spacing between the spline points, so the memory usage goes as the cube of the meshfactor. When you run the calculations, examine the .s000.scalar.dat files with qmca to determine the lowest possible mesh spacing that preserves both the vmc energy and the variance. Similarly, the script graphene-loop-buffer.py uses a feature which generates two spline tables for the wavefunction. One will have half of the mesh spacing requested in the input file and will be valid everywhere. The second one will only be defined in the smallest parallelpiped that contains all of the atoms in the simulation cell with minimum distance given by the buffer size. Again, see what the smallest possible buffer size is that preserves the vmc energy and variance.
Aside from the change in boundary conditions, the main thing that distinguished this kind of calculation from the beryllium example above is the large amount of vacuum in the cell. While this is a very small calculation designed to run quickly in the tutorial, in general a more converged calculation would quickly become memory limited on an architecture like BG/Q. When the initial wavefunciton optimizaiton has completed to your satisfaction, run the script graphene-loop-mesh.py. This examines within variational Monte Carlo an approache to reducing the memory required to store the wavefunction. In graphene-loop-mesh.py, the spacing between the b-spline points is varied uniformly. The mesh spacing is a prefactor to the linear spacing between the spline points, so the memory usage goes as the cube of the meshfactor. When you run the calculations, examine the .s000.scalar.dat files with qmca to determine the lowest possible mesh spacing that preserves both the vmc energy and the variance.
Finally, edit the file graphene-final.py which will perform two DMC calculations. In the first, (qmc1) replace the following lines:
\begin{lstlisting}
meshfactor = xxx,
precision = '---',
truncate = False,
buffer = 0.0,
\end{lstlisting}
using the values you have determined to perform the calculation with as small as possible of wavefunction. Note that we can also use single precision arithmetic to store the wavefunction by specifying precision='single'. When you run the script, compare the output of the two DMC calculations in terms of energy and variance. Also see if you can calculate the fraction of memory that you were able to save by using a meshfactor other than 1, a buffer table and single precision arithmetic.
using the values you have determined to perform the calculation with as small as possible of wavefunction. Note that we can also use single precision arithmetic to store the wavefunction by specifying precision='single'. When you run the script, compare the output of the two DMC calculations in terms of energy and variance. Also see if you can calculate the fraction of memory that you were able to save by using a meshfactor other than 1 and single precision arithmetic.
\section{Conclusion}
Upon completion of this lab, you should be able to use Nexus to perform DMC calculations on periodic solids when provided with a pseudopotential. You should also be able to reduce the size of the wavefunction in a solid state calculation in cases where memory is a limiting factor.

View File

@ -1724,22 +1724,5 @@ f(**o) # kw. args from obj, prints:
# ()
# {'timestep': 0.02, 'blocks': 100, 'steps': 5}
\end{shade}
\section{Appendix B: pw2qmcpack in parallel\label{app:pw2qmcpack}}
pw2qmcpack is a converter which extracts the orbitals calculated by DFT with Quantum ESPRESSO and packs them into a HDF5 file for QMCPACK.
It used to be used in serial without problems in small systems and becomes a severe bottleneck for a large system.
Due to the large energy cutoff in the calculation with pw.x required by the pseudopotentials and the increasing sizes of systems we are interested in, one limitation of QE can be easily reached
that \texttt{wf\_collect=.true.} results in problems of writing and loading correct plane wave coefficients on disks by pw.x because of the 32bit integer issue. Thus, pw2qmcpack.x fails to convert the orbitals for QMCPACK.
Since Quantum ESPRESSO 5.3.0, the new converter has been fully parallelized to overcome that limitation completely.
By removing \texttt{wf\_collect=.true.} (by default \texttt{wf\_collect=.false.}), pw.x doesn't collect the whole wave function into individual files for each k point but write one small file for each processor instead.
By just running pw2qmcpack.x in the same parallel setup (MPI tasks and k-pools) as the last scf/nscf calculation with pw.x,
the orbitals distributed among processors will first be aggregated by the converter into individual temporal HDF5 files for each k-pool and then merged into the final file.
In large calculations, users should benefit from a significant reduction of time in writing the wave function by pw.x thanks to avoiding the wavefunction collection.
pw2qmcpack has been included in the test suite of QMCPACK, see instructions about how to activate the tests in Sec.~\ref{sec:buildqe}.
There are tests labeled ``no-collect'' running the pw.x without setting \texttt{wf\_collect}.
The input files are stored at examples/solids/dft-inputs-polarized-no-collect.
The scf, nscf, pw2qmcpack runs are performed on 16, 12, 12 MPI tasks with 16, 2, 2 k-pools respectively.
%}

View File

@ -111,9 +111,9 @@
% control display of instructions in the labs
% normally one only wants to show the 'workstation' way of running the labs
\newif\ifws
%\wstrue
\wstrue
% for the pdf used during the labs, one wants to show the host supercomputer way
\wsfalse
%\wsfalse
% command for switching inline text (do not wrap verbatim environments with this!)
\ifws
\newcommand{\labsw}[2]{#1}

View File

@ -55,18 +55,18 @@ users can perform this step on fat nodes and transfer back the h5 file for QMC c
\multicolumn{2}{l}{parent elements:} & \multicolumn{4}{l}{\texttt{wavefunction}}\\
\multicolumn{2}{l}{child elements:} & \multicolumn{4}{l}{\texttt{slaterdeterminant}}\\
\multicolumn{2}{l}{attribute :} & \multicolumn{4}{l}{}\\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type} & text & bspline & & Type of \texttt{sposet}. \\
& \texttt{href} & text & & & Path to the h5 file generated by pw2qmcpack.x. \\
& \texttt{tilematrix} & 9 integers & & & Tiling matrix used to expand supercell. \\
& \texttt{twistnum} & integer & & & Index of the super twist. \\
& \texttt{twist} & 3 floats & & & Super twist. \\
& \texttt{meshfactor} & float & $\le 1.0$ & & Grid spacing ratio. \\
& \texttt{precision} & text & single/double & & Precision of spline coefficients. \\
& \texttt{gpu} & text & yes/no & & GPU switch. \\
& \texttt{Spline\_Size\_Limit\_MB} & integer & & & Limit the size of B-spline coefficient table on GPU. \\
& \texttt{check\_orb\_norm} & text & yes/no & yes & Check the norms of orbitals from the input h5 file \\
& \texttt{source} & text & \textit{any} & ion0 & Particle set with the position of atom centers. \\
& \bfseries name & \bfseries datatype & \bfseries values & \bfseries default & \bfseries description \\
& \texttt{type} & text & bspline & & Type of \texttt{sposet}. \\
& \texttt{href} & text & & & Path to the h5 file made by pw2qmcpack.x. \\
& \texttt{tilematrix} & 9 integers & & & Tiling matrix used to expand supercell. \\
& \texttt{twistnum} & integer & & & Index of the super twist. \\
& \texttt{twist} & 3 floats & & & Super twist. \\
& \texttt{meshfactor} & float & $\le 1.0$ & & Grid spacing ratio. \\
& \texttt{precision} & text & single/double & & Precision of spline coefficients. \\
& \texttt{gpu} & text & yes/no & & GPU switch. \\
& \texttt{Spline\_Size\_Limit\_MB} & integer & & & Limit B-spline table size on GPU. \\
& \texttt{check\_orb\_norm} & text & yes/no & yes & Check norms of orbitals from h5 file. \\
& \texttt{source} & text & \textit{any} & ion0 & Particle set with atomic positions. \\
\hline
\end{tabularx}
\end{center}
@ -87,7 +87,7 @@ users can perform this step on fat nodes and transfer back the h5 file for QMC c
%%</determinantset>
%%\end{lstlisting}
\begin{lstlisting}[caption=All electron Hamiltonian XML element.\label{listing:splineSPOs}]
\begin{lstlisting}[caption=Determinant set XML element.\label{listing:splineSPOs}]
<determinantset type="bspline" source="i" href="pwscf.h5"
tilematrix="1 1 3 1 2 -1 -2 1 0" twistnum="-1" gpu="yes" meshfactor="0.8"
twist="0 0 0" precision="double">