pyhande.lazy

Tools for the lazy amongst us: automation of common HANDE analysis tasks.

pyhande.lazy.std_analysis(datafiles, start=0, select_function=None, extract_psips=False, reweight_history=0, mean_shift=0.0, arith_mean=False)

Perform a ‘standard’ analysis of HANDE output files.

Parameters:
  • datafiles (list of strings) – names of files containing HANDE QMC calculation output.
  • start (int) – iteration from which the blocking analysis is performed.
  • select_function (function) – function which returns a boolean mask for the iterations to include in the analysis. Not used if set to None (default). Overrides start. See below for examples.
  • extract_psips (bool) – also extract the mean number of psips from the calculation.
  • reweight_history (integer) – reweight in an attempt to remove population control bias. According to [Umrigar93] this should be set to be a few correlation times.
  • mean_shift (float) – prevent the weights from beoming to large.
Returns:

info – raw and analysed data, consisting of:

metadata, data

from pyhande.extract.extract_data_sets(). If data consists of several concatenated calculations, then the only metadata object is from the first calculation.

data_len, reblock, covariance

from pyblock.pd_utils.reblock(). The projected energy estimator (evaluated by pyhande.analysis.projected_energy()) is included in reblock.

opt_block, no_opt_block

from pyhande.analysis.qmc_summary(). A ‘pretty-printed’ estimate string is included in opt_block.

Return type:

list of collections.namedtuple()

Examples

The following are equivalent and will extract the data from the file called hande.fciqmc.out, perform a blocking analysis from the 10000th iteration onwards, calculated the projected energy estimator and find the optimal block size from the blocking analysis:

>>> std_analysis(['hande.fciqmc.out'], 10000)
>>> std_analysis(['hande.fciqmc.out'],
...              select_function=lambda d: d['iterations'] > 10000)

References

Umrigar93
Umrigar et al., J. Chem. Phys. 99, 2865 (1993).