modelchem_labels

qcmanybody.utils.modelchem_labels(nb_per_mc, presorted=False)[source]

Form ordinal and letter labels for model chemistries.

Parameters:
  • nb_per_mc (Dict[str, List[Union[int, Literal['supersystem']]]]) – Dictionary mapping model chemistries to lists of n-body levels computed. If a model chemistry is supersystem, the value should be [“supersystem”]. Generally, this is the ManyBodyCore.nbodies_per_mc_level data structure.

  • presorted (bool) – If True, the input dictionary keys and values are already sorted by increasing n-body level. This is the case when the input is ManyBodyCore.nbodies_per_mc_level.

Returns:

Dictionary mapping n-body levels to a tuple of full model chemistry label, single-letter ordinal label, and n-body-levels-covered label.

modelchem_labels({'ccsd': [1], 'mp2': [2, 3], 'hf': [4]})
#> {1: ('ccsd', '§A', '§1'), 2: ('mp2', '§B', '§23'), 3: ('mp2', '§B', '§23'), 4: ('hf', '§C', '§4')}

modelchem_labels({'hi': [1, 2, 3], 'md': [4], 'md2': [5, 6, 7, 8, 9, 10], 'lo': ['supersystem']})
#> {1: ('hi', '§A', '§123'), 2: ('hi', '§A', '§123'), 3: ('hi', '§A', '§123'),
#   4: ('md', '§B', '§4'),
#   5: ('md2', '§C', '§<10'), 6: ('md2', '§C', '§<10'), 7: ('md2', '§C', '§<10'), 8: ('md2', '§C', '§<10'), 9: ('md2', '§C', '§<10'), 10: ('md2', '§C', '§<10'),
#   "supersystem": ('lo', '§D', '§SS')}

Return type:

mc_per_nb