Snapshot

class sknano.core.atoms.trajectory.Snapshot(trajectory=None)[source] [edit on github][source]

Bases: sknano.core.strings.TabulateMixin, sknano.core.meta.BaseClass

Container class for Trajectory data at single timestep

Parameters:trajectory (Trajectory, optional) –

Attributes

aselect Alias for Snapshot.atom_selection.
atom_selection ndarray boolean array.
atoms Snapshot atoms.
fmtstr Format string.
formatter An instance of DUMPFormatter.
nselect Alias for Snapshot.nselected.
nselected Number of selected atoms in this snapshot.
selected True/False if this snapshot is selected.
tselect Alias for Snapshot.selected.

Methods

get_atoms([asarray]) Get atoms.
todict() Return dict of constructor parameters.

Attributes Summary

aselect Alias for Snapshot.atom_selection.
atom_selection ndarray boolean array.
atoms Snapshot atoms.
formatter An instance of DUMPFormatter.
nselect Alias for Snapshot.nselected.
nselected Number of selected atoms in this snapshot.
selected True/False if this snapshot is selected.
tselect Alias for Snapshot.selected.

Methods Summary

get_atoms([asarray]) Get atoms.
todict() Return dict of constructor parameters.

Attributes Documentation

aselect

Alias for Snapshot.atom_selection.

atom_selection

ndarray boolean array.

atoms

Snapshot atoms.

formatter

An instance of DUMPFormatter.

nselect

Alias for Snapshot.nselected.

nselected

Number of selected atoms in this snapshot.

selected

True/False if this snapshot is selected.

tselect

Alias for Snapshot.selected.

Methods Documentation

get_atoms(asarray=False)[source] [edit on github][source]

Get atoms.

Parameters:asarray (bool) –
Returns:if asarray is True, the atoms are returned as an ndarray, otherwise an MDAtoms instance is returned.
Return type:ndarray or MDAtoms
todict()[source] [edit on github][source]

Return dict of constructor parameters.