Compositions¶
-
class
sknano.core.structures.
Compositions
(compositions=None, update_item_class=True, **kwargs)[source] [edit on github][source]¶ Bases:
sknano.core.collections.UserList
Base class for collection of
Composition
objects.Parameters: compositions ({None, sequence, Compositions
}, optional) – if notNone
, then a list ofComposition
instance objects or an existingCompositions
instance object.Attributes
Ncompositions
Number of compositions in Compositions
.fmtstr
Format string. masses
Return list of Composition
masses.Methods
append
(item)clear
()copy
()count
(item)extend
(other)filter
(condition[, invert])Filter Compositions
bycondition
.filtered
(condition[, invert])get_compositions
([asarray])Return list of Compositions
.index
(item, *args)insert
(i, item)pop
([i])remove
(item)reverse
()rezero
([epsilon])Set really really small coordinates to zero. rotate
(**kwargs)Rotate Composition
position vectors.sort
([key, reverse])todict
()translate
(t[, fix_anchor_points])Translate Composition
position vectors byVector
t
.