QMCPACK#

nexus.qmcpack.get_path(o, path, value=None)[source]#

Retrieve a value from a nested dict-like object by slash-delimited path.

class nexus.qmcpack.GCTA(input, system, flavor)[source]#

Bases: DevBaseNexus

This class holds the functionality and data to carry out grand canonical twist averaging in Nexus. Throughout the class, the handling of k-points uses unit (crystal) coordinates, which ranges in [0, 1). Note that QMCPACK interally uses the range (-0.5, 0.5) for k-points.

Methods

check_charge_neutrality()

Check the net charge of the twist averaged system

check_kmesh_size()

Make sure that NSCF k-points and QMC twists are commensurate for GCTA

check_kpoint_consistency([tol])

The kpoints expected by the GCTA object and what is found in the self.eig_data.data should be consistent.

check_magnetization_accuracy(scf_magnet)

Check that the net magnetization is close to the reference SCF value

copy()

gcta_converter_kmapping([tol])

The k-points defined by the GCTA object and the k-points written by a converter may have different ordering.

int_kpoint_weight(float_value[, atol])

This function checks if the float k-point weight/norm is close to its integer value.

prim_kpoints()

Returns the k-points used to build the supercell in unit coordinates

read_eshdf_data(filename)

Read the ESHDF eigenvalues, k-point info and store the data in the GCTA instance as an attribute

save([filepath])

sum_charge_twists()

Returns the net charge of a system with multiple twists (not averaged)

sum_spin_twists()

Returns the net spin of a system with multiple twists (not averaged)

traceback_dependency(dependency, cls[, levels])

This function provides limited functionality to go back in dependency by a certain level

unfolded_nelecs()

Returns the number of electrons in the primitive cell

unfolded_nkpoints()

Returns the number of unsymmetrized k-points when a supercell is unfolded back to the primitive cell

adapted_fermi_level

check_implementation

clear

error

items

keys

load

nxs_print

pwscf_fermi

pwscf_tot_magnet

set_gcta_occupations

spin_adapted_fermi_level

update

values

warn

write_gcta_report

check_implementation(gcta_possible, dependency)[source]#
static int_kpoint_weight(float_value, atol=1e-08)[source]#

This function checks if the float k-point weight/norm is close to its integer value. If so, returns the integer value.

read_eshdf_data(filename)[source]#

Read the ESHDF eigenvalues, k-point info and store the data in the GCTA instance as an attribute

unfolded_nelecs()[source]#

Returns the number of electrons in the primitive cell

unfolded_nkpoints()[source]#

Returns the number of unsymmetrized k-points when a supercell is unfolded back to the primitive cell

prim_kpoints()[source]#

Returns the k-points used to build the supercell in unit coordinates

check_kmesh_size()[source]#

Make sure that NSCF k-points and QMC twists are commensurate for GCTA

check_kpoint_consistency(tol=1e-08)[source]#

The kpoints expected by the GCTA object and what is found in the self.eig_data.data should be consistent. The kpoints in self.eig_data.data are expected to be in unit coordinates. (Conversion: dot(kpoints, inv(kaxes))). This function checks if there is 1-to-1 mapping between the GCTA object and the converted data.

gcta_converter_kmapping(tol=1e-08)[source]#

The k-points defined by the GCTA object and the k-points written by a converter may have different ordering. We need to figure out the mapping between these two so that the k-points fold into correct twists.

static traceback_dependency(dependency, cls, levels=1)[source]#

This function provides limited functionality to go back in dependency by a certain level

static pwscf_tot_magnet(filepath)[source]#
static pwscf_fermi(filepath, scf_type)[source]#
adapted_fermi_level()[source]#
spin_adapted_fermi_level(scf_magnet)[source]#
set_gcta_occupations(fermi_level)[source]#
sum_charge_twists()[source]#

Returns the net charge of a system with multiple twists (not averaged)

sum_spin_twists()[source]#

Returns the net spin of a system with multiple twists (not averaged)

check_charge_neutrality()[source]#

Check the net charge of the twist averaged system

check_magnetization_accuracy(scf_magnet)[source]#

Check that the net magnetization is close to the reference SCF value

write_gcta_report(locdir, fermi_level, scf_magnet=None)[source]#
class nexus.qmcpack.Qmcpack(*, job: Job, identifier: str | None = None, path: PathLike = '', infile: PathLike | None = None, outfile: PathLike | None = None, errfile: PathLike | None = None, nexus_logfile: PathLike | None = None, imagefile: PathLike | None = None, input: SimulationInput | None = None, files: Collection[PathLike] | None = None, dependencies: tuple[Simulation, str] | list[tuple[Simulation, str]] | None = None, analysis_request: QmcpackAnalysisRequest | None = None, block: bool = False, block_subcascade: bool = False, app_name: str | PathLike | None = None, app_props: Collection[str] | None = None, system: PhysicalSystem | None = None, skip_submit: bool | None = None, force_write: bool = False, simlabel: str | None = None, fake_sim: bool | None = None, restartable: bool = False, force_restart: bool = False)[source]#

Bases: Simulation

Attributes:
working_directory

Methods

acquire_dependents(sim)

copy()

eliminate()

enter(directory, *[, changedir, msg])

Have Nexus enter a directory and change its current working directory.

nxs_print(*texts[, n, progress])

Write text to standard output.

save([filepath])

separate_inputs(kwargs[, overlapping_kw, sim_kw])

traverse_full_cascade(operation, *args, **kwargs)

active

analyze

analyzer_type

app_command

attempt_files

block_dependents

check_dependencies

check_result

check_sim_status

check_status

check_subcascade

clear

clear_all_sims

code_name

completed

condense_name

copy_file

create_directories

depends

downstream_simids

errfile_text

error

execute

fake

fill_produces

fill_products

get_dependencies

get_output

get_output_files

get_restart_entry

get_result

has_afqmc_input

has_generic_input

idstr

incorporate_restart_entry

incorporate_result

init_job

init_job_extra

input_type

items

keys

leave

load

load_analyzer_image

load_image

mem_usage

outfile_text

post_analyze

post_init

post_submit

pre_check_status

pre_create_directories

pre_init

pre_send_files

pre_write_inputs

progress

propagate_identifier

read_bandinfo_dat

ready

receive_jastrow

receive_pwscf_orbitals

receive_structure

receive_wavefunction

reconstruct_cascade

record_timestamp

reset_indicators

reset_wait_ids

restartable_input

save_analyzer_image

save_attempt

save_image

send_files

set_app_name

set_directories

show_input

submit

traverse_cascade

twist_average

undo_depends

update

update_process_id

values

warn

write_dependents

write_inputs

write_prep

input_type#

alias of QmcpackInput

analyzer_type#

alias of QmcpackAnalyzer

generic_identifier = 'qmcpack'#
infile_extension = '.in.xml'#
application = 'qmcpack'#
application_properties = frozenset({'mpi', 'omp', 'serial'})#
application_results = frozenset({'cuspcorr', 'jastrow', 'restart', 'wavefunction'})#
allowed_requirements = ('none', 'pwscf_orbitals', 'jastrow', 'wavefunction')#
has_afqmc_input()[source]#
post_init()[source]#
propagate_identifier()[source]#
pre_write_inputs(save_image)[source]#
static restartable_input(input)[source]#
get_restart_entry(input, group=None, twistnum=None)[source]#
incorporate_restart_entry(input, restart)[source]#
check_result(result_name, sim)[source]#
get_result(result_name, sim)[source]#
incorporate_result(result_name, result, sim)[source]#
check_sim_status()[source]#
get_output_files()[source]#
post_analyze(analyzer)[source]#
app_command()[source]#
twist_average(twistnums)[source]#
write_prep()[source]#
read_bandinfo_dat()[source]#
fill_produces()[source]#
fill_products()[source]#
receive_structure(struct)[source]#
receive_pwscf_orbitals(orb_file)[source]#
receive_jastrow(jastrow_file)[source]#
receive_wavefunction(wf_file)[source]#
nexus.qmcpack.generate_qmcpack(**kwargs)[source]#
nexus.qmcpack.generate_cusp_correction(**kwargs)[source]#