ManyBodyCore
- class qcmanybody.ManyBodyCore(molecule, bsse_type, levels, *, return_total_data, supersystem_ie_only, embedding_charges)[source]
Bases:
objectAttributes Summary
Methods Summary
analyze(component_results)format_calc_plan([sset])Formulate per-modelchem and per-body job count data and summary text.
Iterate over all the molecules needed for the computation.
resize_gradient(grad, bas, *[, reverse])resize_hessian(hess, bas, *[, reverse])Attributes Documentation
- Parameters:
- compute_map
- has_supersystem
Methods Documentation
- analyze(component_results)[source]
- Parameters:
component_results (
Dict[str,Dict[str,Union[float,ndarray]]]) –Nested dictionary with results from all individual molecular system calculations, including all subsystem/basis combinations, all model chemistries, and all properties (e.g., e/g/h).
For example, the below is the format for a nocp gradient run on a helium dimer with 1-body at CCSD and 2-body at MP2. The outer string key can be generated with the
qcmanybody.utils.labelerfunction. The inner string key is any property; QCManyBody presently knows how to process energy/gradient/Hessian.{'["ccsd", [1], [1]]': {'energy': -2.87, 'gradient': array([[0., 0., 0.]])}, '["ccsd", [2], [2]]': {'energy': -2.87, 'gradient': array([[0., 0., 0.]])}, '["mp2", [1], [1]]': {'energy': -2.86, 'gradient': array([[0., 0., 0.]])}, '["mp2", [2], [2]]': {'energy': -2.86, 'gradient': array([[0., 0., 0.]])}, '["mp2", [1, 2], [1, 2]]': {'energy': -5.73, 'gradient': array([[ 0., 0., 0.0053], [ 0., 0., -0.0053]])}, }
- format_calc_plan(sset='all')[source]
Formulate per-modelchem and per-body job count data and summary text.
- Parameters:
sset (
str) – Among {“all”, “nocp”, “cp”, “vmfc_compute”}, which data structure to return.- Return type:
- Returns:
info –
A text summary with per- model chemistry and per- n-body-level job counts.
Model chemistry "c4-ccsd" (§A): 22 Number of 1-body computations: 16 (nocp: 0, cp: 0, vmfc_compute: 16) Number of 2-body computations: 6 (nocp: 0, cp: 0, vmfc_compute: 6) Model chemistry "c4-mp2" (§B): 28 Number of 1-body computations: 12 (nocp: 0, cp: 0, vmfc_compute: 12) Number of 2-body computations: 12 (nocp: 0, cp: 0, vmfc_compute: 12) Number of 3-body computations: 4 (nocp: 0, cp: 0, vmfc_compute: 4)Dict[str, Dict[int, int]] – Data structure with outer key mc-label, inner key 1-indexed n-body, and value job count.
- iterate_molecules()[source]
Iterate over all the molecules needed for the computation.
Yields model chemistry, label, and molecule.