Itemized Selection class
ItemizedSelection() => ItemizedSelection instance
Itemized selections are selections where all of the objects selected
are enumerated.
|
Methods
|
|
|
|
|
|
__copy__
|
__copy__ ( self )
|
|
|
__del__
|
__del__ ( self )
|
|
|
__init__
|
__init__ ( self )
|
|
|
__len__
|
__len__ ( self )
Return total count of items (except barren graphs)
|
|
|
__str__
|
__str__ ( self )
Return simple string representation.
str(selection) => string
The returned string has the name of the selection and
the number of contained vertices and edges.
|
|
|
add
|
add ( self, it )
Add selectable item or sequence/dict of items to selection.
selection.add(it) => None
if it is a dictionary, the keys are assumed to be the items
to add. The values are ignored.
|
|
|
addImplied
|
addImplied (
self,
vertices=True,
edges=True,
)
Add implied vertices/edges (see implied())
selection.addImplied() => None
Somewhat more efficient than implied() followed by add()
|
|
|
apply
|
apply (
self,
vFunc=None,
eFunc=None,
)
Apply given functions to selected items.
selection.apply(vFunc=lambda....) => None
|
|
|
atoms
|
atoms ( self, **kw )
|
|
|
barrenGraphs
|
barrenGraphs ( self, asDict=False )
Graphs that have no child edges/vertices
|
|
|
bonds
|
bonds ( self, **kw )
|
|
|
clear
|
clear ( self )
|
|
|
contains
|
contains ( self, object )
Is object contained in selection?
selection.contains(object) => boolean
Test for membership in selection.
|
|
|
contents
|
contents (
self,
asDict=False,
ordered=False,
)
Return all vertices/edges selected by the selection.
selection.contents() => ( [vertex-objs], [edge-objs] )
Returns a 2-tuple composed of a list of vertices and a list of
edges. If asDict is true, then dictionaries whose keys are
vertices/edges are returned instead of lists.
if ordered is true and lists are being returned, the lists are
in the same order as the edges and vertices were added to the
selection. If dictionaries are being returned, the values are
integers that indicate the ordering (may be non-consecutive
integers).
|
|
|
counts
|
counts ( self )
Return counts of vertices/atoms as tuple
|
|
|
edges
|
edges (
self,
asDict=False,
ordered=False,
)
Return all edges in the selection.
selection.edges() => [edge-objs]
if asDict is True, return a dictionary whose keys are
the edges and whose values are arbitrary.
if ordered is True, return in the same order that the
edges were added to the selection.
|
|
|
graphs
|
graphs ( self, asDict=False )
|
|
|
implied
|
implied (
self,
vertices=True,
edges=True,
asDict=False,
)
Return vertices/edges implied by selection but not in it.
selection.implied() => ( [vertices], [edges] )
if vertices and/or edges is False, the corresponding tuple
entry will be None. If asDict is True, the vertices/edges
will be returned as dictionaries (keys: vertices/edges,
values: arbitrary)
|
|
|
merge
|
merge (
self,
method,
selection,
)
Use method to merge given selection with this selection.
selection.merge(method, other-selection) => None
method may be one of the module constants INTERSECT, EXTEND,
REPLACE, or REMOVE.
|
|
|
molecules
|
molecules ( self, **kw )
|
|
|
remove
|
remove ( self, it )
Remove selectable item or items from selection.
selection.remove(it) => None
|
|
|
residues
|
residues ( self, **kw )
|
|
|
subgraphs
|
subgraphs ( self, asDict=False )
|
|
|
toggle
|
toggle ( self, it )
Toggle selectable item or items in selection.
selection.toggle(it) => None
Add the item if it isn't there, remove it if it is there.
|
|
|
vertices
|
vertices (
self,
asDict=False,
ordered=False,
)
Return all vertices in the selection.
selection.vertices() => [vertex-objs]
if asDict is True, return a dictionary whose keys are
the vertices and whose values are arbitrary.
if ordered is True, return in the same order that the
vertices were added to the selection.
|
|