pythtb.WFArray.choose_states#
- WFArray.choose_states(state_idx)[source]#
Keep only the specified states in the
WFArray.This method modifies the existing states in place to keep only those specified by
state_idx.- Parameters:
- state_idxint or array-like of int
Indices of states to keep.
Changed in version 2.0.0: Renamed from
subsetfor consistency.
Notes
This modifies the shape of the
wfs,energies,u_nkandpsi_nkarrays.The indices in
state_idxrefer to the current ordering of states. After removal, the remaining states are re-indexed accordingly.
Examples
Keep only states 3 and 5 from the
WFArray>>> wf.choose_states([3, 5])