QMCPACK Input#
- class nexus.qmcpack_input.QIobj(*vars, **kwargs)[source]#
Bases:
DevBaseMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- afqmc_mode = False#
- permissive_read = False#
- permissive_write = False#
- permissive_init = False#
- class nexus.qmcpack_input.meta(*vars, **kwargs)[source]#
Bases:
objMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.qmcpack_input.section(*args, **kwargs)[source]#
Bases:
QIobjMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.qmcpack_input.collection(*elements)[source]#
Bases:
hiddenMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
get_single
hidden
inverse
items
keys
last
list
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
obj
open_log
pairlist
path_exists
public
random_key
remove
select_random
serial
set
set_optional
set_path
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.qmcpack_input.classcollection(*classes)[source]#
Bases:
QIobjMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.qmcpack_input.QmcpackInputCollections(*vars, **kwargs)[source]#
Bases:
QIobjMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
- class nexus.qmcpack_input.Names(*vars, **kwargs)[source]#
Bases:
QIobjMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
condense_name
condense_names
condensed_name_report
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
expand_name
extract
extract_optional
get
get_optional
get_path
get_required
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_afqmc_expanded_names
set_expanded_names
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
use_afqmc_expanded_names
use_rsqmc_expanded_names
values
write
- condensed_names#
- expanded_names = atomicbasisset str basisgroup str cuspcorrection str cuspinfo str dla str elecelec str elementtype str energydensity str exctlvl str expandylm str gevmethod str ionion str kecorr str l2_diffusion str l_local str localenergy str lr_dim_cutoff str lr_handler str lr_tol str maxage str maxweight str minmethod str mo str mpc str nearestneighbors str numerical str one_body str pairtype str pbcimages str posarray str printeloc str pseudopot str sigmabound str speciesa str speciesb str spin_mass str spindependent str substeps str twistangle str twistindex str two_body str usebuffer str usedrift str warmupsteps str #
- rsqmc_expanded_names = atomicbasisset str basisgroup str cuspcorrection str cuspinfo str dla str elecelec str elementtype str energydensity str exctlvl str expandylm str gevmethod str ionion str kecorr str l2_diffusion str l_local str localenergy str lr_dim_cutoff str lr_handler str lr_tol str maxage str maxweight str minmethod str mo str mpc str nearestneighbors str numerical str one_body str pairtype str pbcimages str posarray str printeloc str pseudopot str sigmabound str speciesa str speciesb str spin_mass str spindependent str substeps str twistangle str twistindex str two_body str usebuffer str usedrift str warmupsteps str #
- afqmc_expanded_names = afqmcinfo str estimator str hamiltonian str naea str naeb str nmo str nwalkers str onerdm str propagator str walkerset str wavefunction str #
- escape_names = {'False', 'None', 'True', 'and', 'as', 'assert', 'async', 'await', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'nonlocal', 'not', 'or', 'pass', 'raise', 'return', 'try', 'while', 'with', 'write', 'yield'}#
- escaped_names = {'False_', 'None_', 'True_', 'and_', 'as_', 'assert_', 'async_', 'await_', 'break_', 'class_', 'continue_', 'def_', 'del_', 'elif_', 'else_', 'except_', 'finally_', 'for_', 'from_', 'global_', 'if_', 'import_', 'in_', 'is_', 'lambda_', 'nonlocal_', 'not_', 'or_', 'pass_', 'raise_', 'return_', 'try_', 'while_', 'with_', 'write_', 'yield_'}#
- i = 35#
- class nexus.qmcpack_input.QIxml(*args, **kwargs)[source]#
Bases:
NamesMethods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
assign
check_junk
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
collect_profile
combine
condense_name
condense_names
condensed_name_report
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
difference
expand_name
extract
extract_optional
get
get_host
get_optional
get_path
get_precision
get_required
get_single
incorporate_defaults
init_class
init_from_args
init_from_inputs
init_from_kwargs
init_from_xml
inverse
items
last
list_optional
load
log
move
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
pluralize
random_key
remove
remove_empty
replace
select_random
serial
set
set_afqmc_expanded_names
set_expanded_names
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
use_afqmc_expanded_names
use_rsqmc_expanded_names
values
write
- class nexus.qmcpack_input.QIxmlFactory(name, types, typekey='', typeindex=-1, typekey2='', default=None)[source]#
Bases:
NamesMethods
__call__(*args, **kwargs)Call self as a function.
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
condense_name
condense_names
condensed_name_report
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
expand_name
extract
extract_optional
get
get_optional
get_path
get_required
init_class
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
select_random
serial
set
set_afqmc_expanded_names
set_expanded_names
set_optional
set_path
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
use_afqmc_expanded_names
use_rsqmc_expanded_names
values
write
- class nexus.qmcpack_input.Param[source]#
Bases:
Names- Attributes:
- metadata
Methods
__call__(*args, **kwargs)Call self as a function.
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
condense_name
condense_names
condensed_name_report
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
expand_name
extract
extract_optional
get
get_optional
get_path
get_required
init_class
inverse
items
last
list_optional
load
log
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
reset_precision
select_random
serial
set
set_afqmc_expanded_names
set_expanded_names
set_optional
set_path
set_precision
settings
shallow_copy
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
use_afqmc_expanded_names
use_rsqmc_expanded_names
values
write
write_val
- metadata = None#
- class nexus.qmcpack_input.QmcpackInput(arg0=None, arg1=None)[source]#
Bases:
SimulationInput,Names- Attributes:
- profile_collection
- working_directory
Methods
add_include(element_type, href[, placement])append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
modify([driver, remove_system, ...])Modify the parameters and xml elements of a QMCPACK input file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
assign
bundle
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
condense_name
condense_names
condensed_name_report
copy
copy_from
copy_to
cusp_correction
data_repr
delete
delete_optional
delete_required
dict
difference
dlog
expand_name
extract
extract_optional
gen_calculations
gen_jastrows
generate_jastrows
get
get_base
get_basename
get_calculations
get_driver
get_electron_particle_set
get_host
get_ion_particlesets
get_jastrows
get_multidet
get_optional
get_output_info
get_path
get_pp_files
get_qmc
get_required
has_calculations
has_jastrows
has_lcao_orbitals
has_multidet
has_qmc
include_xml
incorporate_defaults
incorporate_system
inverse
is_afqmc_input
is_valid
items
last
leave
list_optional
load
mem_usage
move
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
optimize_jastrows
optimize_multidet
path_exists
pluralize
random_key
read
read_file_text
read_text
read_xml
remove
remove_J1
remove_J2
remove_J3
remove_calculations
remove_empty
remove_jastrows
remove_physical_system
remove_qmc
replace
return_structure
return_system
select_random
serial
set
set_afqmc_expanded_names
set_driver
set_expanded_names
set_lcao_orbital_file
set_multidet_h5
set_multidet_params
set_optional
set_orbitals_h5
set_path
set_pseudo_files
settings
shallow_copy
simulation_type
standard_placements
tlog
to_dict
to_obj
trace
transfer_from
transfer_to
tree
tuple
twist_average
unroll_calculations
use_afqmc_expanded_names
use_rsqmc_expanded_names
values
write
write_end_splash
write_file_text
write_splash
write_text
- profile_collection = None#
- opt_methods = {'cslinear', 'linear', 'linear_batch', 'opt'}#
- simulation_type#
alias of
simulation
- default_metadata = ionid dict lattice dict position dict reciprocal dict #
- modify(driver=None, remove_system=False, change_system=False, remove_jastrows=False, remove_J1=False, remove_J2=False, remove_J3=False, remove_determinants=False, remove_multidet=False, remove_calculations=False, J1=False, J2=False, J3=False, J1_size=None, J1_rcut=None, J1_dr=0.5, J1_opt=True, J2_size=None, J2_rcut=None, J2_dr=0.5, J2_init='zero', J2_opt=True, J3_isize=3, J3_esize=3, J3_rcut=5.0, J3_opt=None, J1_rcut_open=5.0, J2_rcut_open=10.0, J1k=False, J1k_kcut=5.0, J1k_symm='crystal', J1k_opt=None, J2k=False, J2k_kcut=5.0, J2k_symm='crystal', J2k_opt=None, system=None, jastrow_opt=None, orbitals_h5=None, multidet_h5=None, multidet_cutoff=None, multidet_opt=None, optimize=None, pseudo_files=None, calculations=None, qmc=None, **gen_calcs)[source]#
Modify the parameters and xml elements of a QMCPACK input file.
- Parameters:
- driver{‘batched’, ‘legacy’}
orNone, default=None Sets
driver_versionin QMCPACK input. IfNone,'batched'is assumed.- remove_systembool, default=False
Removes
<simulationcell/>and<particleset/>.- change_system
PhysicalSystem(suchasfromgenerate_physical_system) Updates physical system information in
<simulationcell/>and<particleset/>to match the contents of thePhysicalSystemobject.- remove_jastrowsbool, default=False
Removes all
<jastrow/>elements.- remove_J1bool, default=False
Remove only the one-body jastrow,
<jastrow type="One-Body"/>- remove_J2bool, default=False
Remove only the two-body jastrow,
<jastrow type="Two-Body"/>- remove_J3bool, default=False
Remove only the three-body jastrow,
<jastrow type="eeI"/>- remove_determinantsbool, default=False
Removes
<determinantset/>- remove_multidetbool, default=False
Removes
<multideterminant/>- remove_calculationsbool, default=False
Removes all
<qmc/>and<loop/>elements.- optimizebool or
None, default=None Sets
optimizeparameter in all wavefunction components. IfTrueorFalseoptimizeis set accordingly. IfNoneno changes are made.- jastrow_optbool or
None, default=None Sets
optimizeparameters in all<jastrow/>elements. Logic is identical tooptimize.- orbitals_h5
strorNone Sets path to an HDF5 file containing single particle orbitals. If type
str,hrefis set in<sposet_builder/>or<sposet_collection/>if present and in<determinantset/>otherwise. IfNone, no action is taken.- multidet_h5bool or
None, default=None Set path to an HDF5 file containing multideterminat coefficents. If type
str,hrefis set in<multideterminant/>. IfNone, no action is taken.- multidet_cutoff
floatorNone, default=None Sets the multideterminant coefficient cutoff, which itself determints to include based on their magnitude relative to the cutoff. If type
float,cutoffin<detlist/>is set. IfNone, no action is taken.- pseudo_files
dictofstr:str, default={} Sets paths to pseudopotential files. Any atomic species as keywords and pseudopotential filepaths as values. For example:
qi.modify( pseudo_files = dict( Mo = 'Mo.ccECP.xml', S = 'S.ccECP.xml'))
Atomic species matching is case insensitive.
- calculations
Noneorlistofqmcorloopobjects Overwrite all
<qmc/>or<loop/>elements with those provided. IfNone, no action is taken.
- driver{‘batched’, ‘legacy’}
Notes
The remaining input parameters are broken into sections based on what part of the input file they modify.
Jastrow Generation Parameters#
Generate Jastrow factors based on the parameters given. Existing Jastrows are overwritten. The parameter signature is identical to
generate_jastrows_altcalled both here and bygenerate_qmcpack_inputorgenerate_qmcpack.- J1bool, default=False
Creates a one-body B-spline Jastrow if
True. If no otherJ1_parameters are given, sensible defaults are set: cutoff set to the Wigner-Seitz radius for periodic systems or to 5 Bohr for open boundary conditions. By default, one knot is placed every 0.5 Bohr up to the cutoff.- J2bool, default=False.
Creates both one-body and two-body B-spline Jastrows if
True. If no otherJ2_parameters are given, sensible defaults are set: cutoff set to the Wigner-Seitz radius for periodic systems or to 10 Bohr for open boundary conditions. By default, one knot is placed every 0.5 Bohr up to the cutoff.- J3bool, default=False.
Creates one-, two-, and three-body B-spline Jastrows if
True. If no otherJ3_parameters are given, sensible defaults are set: cutoff set to 5 Bohr,isize=3,esize=3.- J1_rcutfloat or None, default=None
Sets the cutoff (
rcut) in the one-body Jastrow. IfNone, the Wigner-Seitz radius is used for periodic systems, or the value ofJ1_rcut_openfor open boundary conditions.- J1_rcut_openfloat, default=5.0
Sets the cutoff (
rcut) in the one-body Jastrow for open systems.- J1_sizeint or None, default=None
Sets the number of knots in the one-body B-spline Jastrow. If
int, knots are placed up to the cutoff. IfNone,J1_dris used instead.- J1_drfloat, default=0.5
Sets B-spline knots every
J1_drup to the cutoff.- J1_optbool or None, default=None
If
bool, setsoptimizeflag in the one-body Jastrow. IfNone, no action is taken.- J2_rcutfloat or None, default=None
Sets the cutoff (
rcut) in the two-body Jastrow. IfNone, the Wigner-Seitz radius is used for periodic systems, or the value ofJ2_rcut_openfor open boundary conditions.- J2_rcut_openfloat, default=10.0
Sets the cutoff (
rcut) in the two-body Jastrow for open systems.- J2_sizeint or None, default=None
Sets the number of knots in the one-body B-spline Jastrow. If
int, knots are placed up to the cutoff. IfNone,J2_dris used instead.- J2_drfloat, default=0.5
Sets B-spline knots every
J2_drup to the cutoff.- J2_optbool or None, default=None
If
bool, setsoptimizeflag in the two-body Jastrow. IfNone, no action is taken.- J2_init{‘zero’, ‘rpa’}, default=’zero’
If
zero, set all B-spline coefficients to 0.0. Ifrpa, set B-spline coefficents based on the RPA Jastrow for a homogeneous electron gas with the same electron density as the current atomic system. For an open system only'zero'is allowed.- J1kbool, default=False
Creates a one-body k-space Jastrow with defaults below if
True.- J1k_kcutfloat, default=5.0
Sets the k-space cutoff which determines how many plane-waves and coefficients are used.
- J1k_symm{‘crystal’, ‘isotropic’, ‘none’}
Whether to use symmetries to constrain the plane-wave coefficients. If
'crystal', enforce translation symmetries. If'isotropic', impose symmetry based on identical \(|k|\). If'none', the coefficients are fully unconstrained.- J1k_optbool or None, default=None
If
bool, setsoptimizeflag in the one-body k-space Jastrow. IfNone, no action is taken.- J2kbool, default=False
Creates a two-body k-space Jastrow with defaults below if
True.- J2k_kcutfloat, default=5.0
Sets the k-space cutoff which determines how many plane-waves and coefficients are used.
- J2k_symm{‘crystal’, ‘isotropic’, ‘none’}
Whether to use symmetries to constrain the plane-wave coefficients. If
'crystal', enforce translation symmetries. If'isotropic', impose symmetry based on identical \(|k-k'|\). If'none', the coefficients are fully unconstrained.- J2k_optbool or None, default=None
If
bool, setsoptimizeflag in the two-body k-space Jastrow. IfNone, no action is taken.
QMC Calculation Generation Parameters#
Generate
<qmc/>and/or<loop/>elements. Any existing elements are overwritten.The number of input parameters depends on the value of
qmcand are given as keyword inputs represented bygen_calcs.Only inputs for batched drivers are described below.
Parameters at the top are shared by nearly all
qmcmethods.- qmc{‘vmc’, ‘vmc_test’, ‘vmc_noJ’, ‘dmc’, ‘dmc_test’, ‘dmc_noJ’, ‘opt’} or None
If
None, no action is taken. Otherwise calculations are generated as detailed below.
Case
qmc='vmc'#As in “Shared Parameters” above, but with the defaults below.
warmupsteps : int, default=50blocks : int, default=800steps : int, default=10substeps : int, default=3timestep : float, default=0.3usedrift : bool, default=False
Case
qmc='vmc_test'#As in
qmc='vmc', but with the defaults below. Intended to make a quick test run to check for successful execution or to obtain timing estimates to design production runs.Case
qmc='vmc_noJ'#As in
qmc='vmc', but with the defaults below. Uses increased sampling intended to better deal with the increased variance present in Jastrow-free runs.warmupsteps : int, default=200blocks : int, default=800steps : int, default=100
Case
qmc='dmc'#As in “Shared Parameters” above, but with the defaults below. These parameter names and defaults refer to the DMC sections.
warmupsteps : int, default=20blocks : int, default=200steps : int, default=10timestep : float, default=0.01
- nonlocalmoves{‘v0’, ‘v1’, ‘v3’} or bool or None, default=None
Perform T-moves or the locality approximation. If
None, use QMCPACK’s default (locality approx) IfFalse, use the locality approximation. IfTrueor'v0', use the first developed T-moves algorithm. If'v1', use the second developed T-moves algorithm. If'v3', use a modified T-moves algorithm, courtesy Ye Luo.- branching_cutoff_scheme
See QMCPACK manual.
- crowd_serialize_walkers
See QMCPACK manual.
- reconfiguration
See QMCPACK manual.
- maxage
See QMCPACK manual.
- feedback
See QMCPACK manual.
- sigmabound
See QMCPACK manual.
- vmc_warmupstepsint, default=30
Set
warmupstepsin the VMC block executed prior to DMC. The parameters below set the respective params in VMC.
vmc_blocks : int, default=40 vmc_steps : int, default=10 vmc_substeps : int, default=3 vmc_timestep : float, default=0.3 vmc_usedrift : bool, default=False vmc_checkpoint : int or None, default=None vmc_spin_mass : float or None, default=None
- eq_dmcbool, default=False
Insert a DMC block following VMC for the purpose of rapid equilibration prior to the subsequent production DMC sections.
eq_warmupsteps : int, default=20 eq_blocks : int, default=20 eq_steps : int, default=5
- eq_timestepfloat, default=0.02
The timestep should be greater than or equal to the ones used in the subsequent DMC sections.
eq_checkpoint : int or None, default=None
- ntimestepsint, default=1
If greater than one, create a sequence of
ntimestepsDMC sections with successively smaller timesteps. Intended for DMC timestep extrapolation.- timestep_factorfloat, default=0.5
The first timestep is given by
timestep, the following ones are reduced by successive multiplication oftimestep_factor.
Case
qmc='dmc_test'#As in
qmc='dmc', but with the defaults below. Intended to make a quick test run to check for successful execution or to obtain timing estimates to design production runs.warmupsteps : int, default=2blocks : int, default=10steps : int, default=2vmc_warmupsteps : int, default=10vmc_blocks : int, default=4eq_dmc : bool, default=Falseeq_warmupsteps : int, default=2eq_blocks : int, default=5eq_steps : int, default=2
Case
qmc='dmc_noJ'#As in
qmc='dmc', but with the defaults below. Uses increased sampling intended to better deal with the increased variance present in Jastrow-free runs. Note that Jastrow-free runs are much more likely to be unstable due to large fluctations in the branching weights.warmupsteps : int, default=40blocks : int, default=400steps : int, default=20
Case
qmc='opt'#Generate calculation elements for wavefunction optimization.
The parameter signature is identical to
generate_opt_calculations, which depends on the value ofmethodandminmethod.- method{‘linear’, ‘cslinear’}, default=’linear’
If
'linear', use one of the versions of the linear method. If'cslinear', use the correlated sampling linear method.
minmethod : {‘quartic’ , ‘rescale’ , ‘linemin’, ‘adaptive’, ‘oneshift’, ‘sr_cg’}, default=’quartic’
- minwalkersfloat, default=0.3
Minimum threshold to accept a parameter update based on the ratio of wavefunction values between internal sub-iterations. The value of
minwalkersshould be given in the range (0,1]. A small value ofminwalkerswill easily accept parameter updates, likely resulting in an unstable run.- cost{‘energy’, ‘variance’} or tuple
If
'energy', energy minization is performed. If'variance', variance minimization is performed. If length 2 tuple of floats(we, wv),cost = we*energy + wv*varianceIf length 3 tuple of floats
(we, wv, wuv),cost = we*energy + wv*variance + wuv*unreweightedvarianceWhen
minmethod='oneshift', no cost function is being minimized, but instead the parameter updates are determined solely byminwalkers.- cyclesint, default=12
Number of top level optimization iterations to perform. Sets
<loop max="cycles"/>.- samplesint or None, default=None
If not
Noneset thesamplesparameter, i.e. the total number of VMC walker configurations to use in each optimization cycle.- init_cyclesint, default=0
If
init_cycles>0, introduce a preceding optimization loop of the same type (sameminmethod,costand most other parameters). Sets<loop max="init_cycles"/>in this prior loop. A few parameters can be set to different values from the subsequent/main loop as listed below.- init_samplesint or None, default=None
If not
Noneset thesamplesparameter, i.e. the total number of VMC walker configurations to use in the preceding optimization loop.- init_stepsint or None
If not
Noneset thestepsparameter in the preceding optimization loop.- init_minwalkersfloat, default=0.1
If not
Noneset theminwalkersparameter in the preceding optimization loop. Often set to a smaller value than in the subsequent/main loop to allow more aggressive parameter updates in hopes of a faster convergence to the general vicinity of the cost minimum.- init_line_searchbool, default=False
Only applicable to
minmethod='sr_cg', see below. IfTrue, perform a linesearch along the direction of the parameter gradient using the minimum cost to determine the parameter stepsize.- init_sr_taufloat, default=0.1
Only applicable to
minmethod='opt_sr', see below. Set thesr_tauparameter appearing in the stochastic reconfiguration projector.
Case
qmc='opt'method={'linear', 'cslinear'}minmethod={'quartic', 'rescale', 'linemin'}#- minmethod{‘quartic’, ‘rescale’, ‘linemin’}, default=’quartic’
Sets
minmethodparameter. See QMCPACK manual.- usebufferbool, default=True
Sets
usebufferparameter. See QMCPACK manual.- exp0float, default=-6
Sets
exp0parameter. See QMCPACK manual.- bigchangefloat, default=10.0
Sets
bigchangeparameter. See QMCPACK manual.- alloweddifferencefloat, default=1e-4
Sets
alloweddifferenceparameter. See QMCPACK manual.- stepsizefloat, default=0.15
Sets
stepsizeparameter. See QMCPACK manual.- nstabilizersint, default=1
Sets
nstabilizersparameter. See QMCPACK manual.- var_cyclesint, default=0
If
var_cycles>0, introduce a preceding loop of variance minmization to obtain a preconditioned starting point, e.g. to stabilize subsequent energy minimization. Sets<loop max="var_cycles"/>in this prior loop. Uses all other parameters as set for the subsequent/main loop, perhaps exceptingsamples.- var_samplesint or None, default=None
If not
Noneset thesamplesparameter, i.e. the total number of VMC walker configurations to use in the preceding variance minimization cycle.
Case
qmc='opt'method='linear'minmethod='oneshift'#Use the
"oneshift"variant of the linear method, courtesy Ye Luo.- shift_ifloat
Set the
shift_iparameter. See QMCPACK manual.- shift_sfloat
Set the
shift_sparameter. See QMCPACK manual.
Case
qmc='opt'method='linear'minmethod='adaptive'#- max_relative_changefloat, default=10.0
Sets
max_relative_changeparameter. See QMCPACK manual.- max_param_changefloat, default=0.3
Sets
max_param_changeparameter. See QMCPACK manual.- shift_ifloat, default=0.01
Set the
shift_iparameter. See QMCPACK manual.- shift_sfloat, default=1.0
Set the
shift_sparameter. See QMCPACK manual.
Case
qmc='opt'method='linear'minmethod='sr_cg'#Use a preliminary implementation of stochastic reconfiguration, courtesy Cody Melton.
- sr_taufloat, default=0.01
Set the
sr_tauparameter, which is the timestep in the stochastic reconfiguration projector.- sr_tolerancefloat, default=0.001.
Set the
sr_toleranceparameter. See QMCPACK manual.- sr_regularizationfloat, default=0.01.
Set the
sr_regularizationparameter. See QMCPACK manual.- linesearchbool, default=False
Perform a correlated sampling linesearch to determine tau automatically for each iteration. If
True, the default forsr_tauis 0.1 instead.
- class nexus.qmcpack_input.BundledQmcpackInput(inputs, filenames)[source]#
Bases:
SimulationInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
generate_filenames
get
get_optional
get_output_info
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
read_file_text
read_text
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.qmcpack_input.TracedQmcpackInput(quantity=None, values=None, input=None)[source]#
Bases:
BundledQmcpackInput- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
bundle_inputs
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
generate_filenames
get
get_optional
get_output_info
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
random_key
read
read_file_text
read_text
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- class nexus.qmcpack_input.QmcpackInputTemplate(filepath=None, text=None)[source]#
Bases:
SimulationInputTemplate- Attributes:
- working_directory
Methods
append(value)class_error(message[, header, exit, trace, ...])Report an error relating to a class.
enter(directory[, changedir, msg])Have Nexus enter a directory and change its current working directory.
error(message[, header, exit, trace])Report an error inside a class.
first()keys()list(*keys)log(*texts, **kwargs)Write output to log file.
open_log(filepath)save([fpath])sorted_keys()warn(msg[, indent])Warning from inside a Nexus class.
add
add_optional
allow_no_assign
assign
check_required
check_types
check_types_optional
class_get
class_has
class_items
class_keys
class_log
class_set
class_set_optional
class_set_single
class_warn
clear
close_log
copy
copy_from
copy_to
data_repr
delete
delete_optional
delete_required
dict
dlog
extract
extract_optional
get
get_optional
get_output_info
get_path
get_required
incorporate_system
inverse
is_valid
items
last
leave
list_optional
load
mem_usage
move_from
move_from_optional
move_to
move_to_optional
not_implemented
obj
path_exists
preprocess
random_key
read
read_file_text
read_text
reset
return_structure
return_system
select_random
serial
set
set_optional
set_path
shallow_copy
tlog
to_dict
to_obj
transfer_from
transfer_to
tree
tuple
values
write
write_end_splash
write_file_text
write_splash
write_text
- nexus.qmcpack_input.generate_simulationcell(bconds='ppp', lr_dim_cutoff=15, lr_tol=None, lr_handler=None, system=None)[source]#
- nexus.qmcpack_input.generate_particlesets(electrons='e', ions='ion0', up='u', down='d', spinor=None, system=None, randomsrc=True, hybrid_rcut=None, hybrid_lmax=None)[source]#
- nexus.qmcpack_input.generate_sposets(type=None, occupation=None, spin_polarized=False, nup=None, ndown=None, spo_up='spo_u', spo_down='spo_d', system=None, sposets=None, spindatasets=False, spinor=None, rotate=False)[source]#
- nexus.qmcpack_input.generate_bspline_builder(type='bspline', meshfactor=1.0, precision='float', twistnum=None, twist=None, sort=None, version='0.10', truncate=False, buffer=None, spin_polarized=False, hybridrep=None, href='MISSING.h5', rotate=False, ions='ion0', spo_up='spo_u', spo_down='spo_d', sposets=None, system=None, orbitals_cpu=None, gpusharing=None, spinor=None)[source]#
- nexus.qmcpack_input.generate_heg_builder(twist=None, spin_polarized=False, spo_up='spo_u', spo_down='spo_d', sposets=None, system=None)[source]#
- nexus.qmcpack_input.partition_sposets(sposet_builder, partition, partition_meshfactors=None)[source]#
- nexus.qmcpack_input.generate_determinantset(up='u', down='d', spo_up='spo_u', spo_down='spo_d', spin_polarized=False, delay_rank=None, det_batch=None, matrix_inv_cpu=None, system=None, spinor=None, rotate=False)[source]#
- nexus.qmcpack_input.generate_determinantset_old(type='bspline', meshfactor=1.0, precision='float', twistnum=None, twist=None, spin_polarized=False, hybridrep=None, source='ion0', href='MISSING.h5', excitation=None, delay_rank=None, gpusharing=None, system=None, spinor=None)[source]#
- nexus.qmcpack_input.generate_hamiltonian(name='h0', type='generic', electrons='e', ions='ion0', wavefunction='psi0', pseudos=None, algorithm=None, dla=None, format='xml', estimators=None, system=None, wf_elem=None, interactions='default')[source]#
- nexus.qmcpack_input.generate_estimators_batched(estimators, electrons='e', ions='ion0', wavefunction='psi0', wf_elem=None)[source]#
- nexus.qmcpack_input.generate_jastrows(jastrows, system=None, return_list=False, check_ions=False)[source]#
- nexus.qmcpack_input.generate_jastrows_alt(J1=False, J2=False, J3=False, J1_size=None, J1_rcut=None, J1_dr=0.5, J1_opt=None, J2_size=None, J2_rcut=None, J2_dr=0.5, J2_init='zero', J2_opt=True, J3_isize=3, J3_esize=3, J3_rcut=5.0, J3_opt=None, J1_rcut_open=5.0, J2_rcut_open=10.0, J1k=False, J1k_kcut=5.0, J1k_symm='crystal', J1k_opt=None, J2k=False, J2k_kcut=5.0, J2k_symm='crystal', J2k_opt=None, system=None)[source]#
- nexus.qmcpack_input.generate_jastrow1(function='bspline', size=8, rcut=None, coeff=None, cusp=0.0, ename='e', iname='ion0', elements=None, system=None, opt=None, **elemargs)[source]#
- nexus.qmcpack_input.generate_bspline_jastrow2(size=8, rcut=None, coeff=None, spins=('u', 'd'), density=None, system=None, init='rpa', opt=None)[source]#
- nexus.qmcpack_input.generate_pade_jastrow2(Buu=None, Bud=None, spins=('u', 'd'), system=None)[source]#
- nexus.qmcpack_input.generate_jastrow3(function='polynomial', esize=3, isize=3, rcut=4.0, coeff=None, iname='ion0', spins=('u', 'd'), elements=None, system=None, opt=None)[source]#
- nexus.qmcpack_input.generate_kspace_jastrow(kc1: float | None = None, kc2: float | None = None, nk1: int = 0, nk2: int = 0, symm1: str = 'isotropic', symm2: str = 'isotropic', coeff1: list = None, coeff2: list = None, opt1: bool | None = None, opt2: bool | None = None)[source]#
Generate
<jastrow type="kSpace">- Parameters:
- kc1
float, optional kcut for one-body Jastrow. Must provide this and/or
kc2.- kc2
float, optional kcut for two-body Jastrow. Must provide this and/or
kc1.- nk1
int, default=0 Number of coefficients for one-body Jastrow.
- nk2
int, default=0 Number of coefficients for two-body Jastrow.
- symm1{‘crystal’, ‘isotropic’, ‘none’}, default=’isotropic’
Impose specified symmetry on 1-body Jastrow coefficients. See Notes for description.
- symm2{‘crystal’, ‘isotropic’, ‘none’}, default=’isotropic’
Impose specified symmetry on 2-body Jastrow coefficients. See Notes for description.
- coeff1
list, optional One-body Jastrow coefficients, optional.
- coeff2
list, optional Two-body Jastrow coefficients, optional.
- opt1bool or
None, default=None Set whether or not the one-body Jastrow coefficients are optimizable. See Notes for more information.
- opt2bool or
None, default=None Set whether or not the two-body Jastrow coefficients are optimizable. See Notes for more information.
- kc1
- Returns:
- jk
QIxml kspace_jastrowqmcpack_input element
- jk
Notes
The
symm1andsymm2parameters yield the following behavior:"crystal"Impose crystal symmetry on coefficients according to the structure factor.
"isotropic"Impose spherical symmetry on coefficients according to G-vector magnitude.
"none"Impose no symmetry on the coefficients.
The parameters
opt1andopt2are not necessarily guaranteed to control the behavior of QMCPACK. See QMCPACK’s documentation on k-space Jastrow.
- nexus.qmcpack_input.generate_energydensity(name=None, dynamic=None, static=None, coord=None, grid=None, scale=None, ion_grids=None, system=None)[source]#
- nexus.qmcpack_input.generate_opt(method, repeat=1, energy=None, rw_variance=None, urw_variance=None, params=None, jastrows=None, processes=None, walkers_per_proc=None, threads=None, blocks=2000, decorr=10, min_walkers=None, timestep=0.5, nonlocalpp=False, sample_factor=1.0)[source]#
- nexus.qmcpack_input.generate_legacy_opt_calculations(method, cost, cycles, var_cycles, var_samples, init_cycles, init_samples, init_minwalkers, loc='generate_opt_calculations', **opt_inputs)[source]#
- nexus.qmcpack_input.generate_legacy_vmc_calculations(walkers, warmupsteps, blocks, steps, substeps, timestep, checkpoint, usedrift, max_seconds, spin_mass, loc='generate_vmc_calculations')[source]#
- nexus.qmcpack_input.generate_legacy_dmc_calculations(warmupsteps, blocks, steps, timestep, checkpoint, vmc_samples, vmc_samplesperthread, vmc_walkers, vmc_warmupsteps, vmc_blocks, vmc_steps, vmc_substeps, vmc_timestep, vmc_usedrift, vmc_checkpoint, vmc_spin_mass, eq_dmc, eq_warmupsteps, eq_blocks, eq_steps, eq_timestep, eq_checkpoint, ntimesteps, timestep_factor, nonlocalmoves, branching_cutoff_scheme, maxage, feedback, sigmabound, max_seconds, spin_mass, loc='generate_dmc_calculations')[source]#
- nexus.qmcpack_input.generate_batched_opt_calculations(method, cost, cycles, var_cycles, var_samples, init_cycles, init_samples, init_steps, init_minwalkers, init_line_search, init_sr_tau, loc='generate_opt_calculations', **opt_inputs)[source]#
- nexus.qmcpack_input.generate_batched_vmc_calculations(total_walkers, walkers_per_rank, warmupsteps, blocks, steps, substeps, timestep, usedrift, checkpoint, maxcpusecs, crowds, spin_mass, loc='generate_vmc_calculations')[source]#
- nexus.qmcpack_input.generate_batched_dmc_calculations(total_walkers, walkers_per_rank, warmupsteps, blocks, steps, substeps, timestep, checkpoint, vmc_warmupsteps, vmc_blocks, vmc_steps, vmc_substeps, vmc_timestep, vmc_usedrift, vmc_checkpoint, vmc_spin_mass, eq_dmc, eq_warmupsteps, eq_blocks, eq_steps, eq_timestep, eq_checkpoint, ntimesteps, timestep_factor, nonlocalmoves, branching_cutoff_scheme, crowd_serialize_walkers, crowds, reconfiguration, maxage, feedback, sigmabound, spin_mass, loc='generate_dmc_calculations')[source]#
- nexus.qmcpack_input.generate_opt_jastrow_input(id='qmc', series=0, purpose='', seed=None, bconds=None, remove_cell=False, meshfactor=1.0, precision='float', twistnum=None, twist=None, spin_polarized=False, orbitals_h5='MISSING.h5', system=None, pseudos=None, jastrows='generateJ12', corrections=None, observables=None, processes=None, walkers_per_proc=None, threads=None, decorr=10, min_walkers=None, timestep=0.5, nonlocalpp=False, sample_factor=1.0, opt_calcs=None, det_format='new')[source]#
- nexus.qmcpack_input.c#
alias of
onerdm