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 not None, then a list of Composition instance objects or an existing Compositions 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 by condition.
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 by Vector t.