def _extract_results_if_not_present(myinput, resultdir): resultshelf = os.path.join(resultdir, ssc.DENSCOMP_RESULT_FILE) if sc.shelf_exists(resultshelf): return calculator = AtomCompressionResult(myinput.calculator) output = calculator.get_output(resultdir) result = { 'potentials': output.get_potentials(), 'density': output.get_density012() } sc.store_as_shelf(resultshelf, result)
def _extract_results_if_not_present(myinput, shells, resultdir): resultshelf = os.path.join(resultdir, ssc.WAVECOMP_RESULT_FILE) if sc.shelf_exists(resultshelf): return calculator = AtomCompressionResult(myinput.calculator) output = calculator.get_output(resultdir) resultdict = {} for nn, ll in shells: # Needs name as shelf allows only strings as keys shellname = sc.shell_ind_to_name(nn, ll) resultdict[shellname] = output.get_wavefunction012(0, nn, ll) sc.store_as_shelf(resultshelf, resultdict)
def _extract_results_if_not_present(myinput, occshells, resultdir): resultshelf = os.path.join(resultdir, ssc.DENSCOMP_RESULT_FILE) if sc.shelf_exists(resultshelf): return calculator = AtomCompressionResult(myinput.calculator) output = calculator.get_output(resultdir) result = { 'potentials': output.get_potentials(), 'density': output.get_density012() } for qn, _ in occshells: nn = qn[0] ll = qn[1] # needs name as shelf allows only strings as keys shellname = sc.shell_ind_to_name(nn, ll) result[shellname] = output.get_wavefunction012(0, nn, ll) sc.store_as_shelf(resultshelf, result)