biomol.core.View#
- class View(mol, indices)[source]#
Bases:
Generic[A_co,R_co,C_co,M_co]Base class for all views.
This class defines the common interface for all views, including methods for converting between different structural levels, accessing features, and performing set operations.
- Parameters:
mol (BioMol) – The parent molecule.
indices (NDArray[np.integer]) – The indices of the elements in the view.
Attributes
View of the atoms in the selection.
View of the chains in the selection.
Return the indices of the view.
The structural level of the view.
Return the parent molecule.
View of the residues in the selection.
Return the unique indices of the view, preserving first-occurrence order.
Methods
Extract a new BioMol cropped to the current view.
Return the feature container cropped to the view's indices.
Return the feature for the given key, cropped to the view's indices.
Return True if the view is empty (contains no elements).
Return True if the view is a subset of another view.
Return a new view with the specified indices.
Return a new view filtered by feature values.
Return a new view with sorted indices.
Return an AtomView of the atoms in the selection.
Return a ChainView of the chains in the selection.
Return a ResidueView of the residues in the selection.
Return a new view with unique indices, preserving first-occurrence order.
Modify features in the current view and return an updated BioMol.