tkwant.manybody.add_boundstates¶
-
tkwant.manybody.add_boundstates(solver, boundstate_psi, boundstate_tasks)[source]¶ Add a sequence of boundstates to the manybody solver
- Parameters
solver (
tkwant.manybody.WaveFunction) – Manybody solver to which the boundstates should be added.boundstate_psi (dict of
tkwant.onebody.WaveFunction) – Dictionary with all boundstate wavefunctions. A dict key must be unique and present only on one MPI rank. For load balancing the dictionary should be distributed over all MPI ranks.boundstate_tasks (dict of
tkwant.onebody.Task) –Each element in the dict represents a single boundstate state. An element must have at least the following attribute:
weight : float, weighting factor
boundstate_tasksmust include all boundstates stored inboundstate_psi(all keys must be identical) and must be the same on all MPI ranks. Moreover, the keys of the boundstates dicts (boundstate_tasksandboundstate_psi) must not be present insolver.
Notes
solveris modified in place. Only when the error “boundstate key=.. already present in solver” occurs,solverhas not been modified. If any other exception is raised in this function however, there is no guarantee that thesolverhas not been modified.
