class pyemma.coordinates.pipelines.Discretizer(reader, transform=None, cluster=None, chunksize=100, param_stride=1)

A Discretizer gets a FeatureReader, which extracts features (distances, angles etc.) of given trajectory data and passes this data in a memory efficient way through the given pipeline of a Transformer and Clustering. The clustering object is responsible for assigning the data to the cluster centers.

Parameters:
  • reader (a FeatureReader object) – reads trajectory data and selects features.
  • transform (a Transformer object (optional)) – the Transformer will be used to e.g reduce dimensionality of inputs.
  • cluster (a clustering object) – used to assign input data to discrete states/ discrete trajectories.
  • chunksize (int, optional) – how many frames shall be processed at once.
add_element(e)

Appends a pipeline stage.

Appends the given element to the end of the current chain.

dtrajs

get discrete trajectories

parametrize()

Reads all data and discretizes it into discrete trajectories.

run()

deprecated. Identical to parametrize()

save_dtrajs(prefix='', output_dir='.', output_format='ascii', extension='.dtraj')

Saves calculated discrete trajectories. Filenames are taken from given reader. If data comes from memory dtrajs are written to a default filename.

Parameters:
  • prefix (str) – prepend prefix to filenames.
  • output_dir (str (optional)) – save files to this directory. Defaults to current working directory.
  • output_format (str) – if format is ‘ascii’ dtrajs will be written as csv files, otherwise they will be written as NumPy .npy files.
  • extension (str) – file extension to append (eg. ‘.itraj’)
set_element(index, e)

Replaces a pipeline stage.

Replace an element in chain and return replaced element.

class pyemma.coordinates.pipelines.Pipeline(chain, chunksize=100, param_stride=1)

Data processing pipeline.

Parameters:
  • chain (list of transformers like objects) – the order in the list defines the direction of data flow.
  • chunksize (int, optional) – how many frames shall be processed at once.
  • param_stride (int, optional) – omit every n’th data point
add_element(e)

Appends a pipeline stage.

Appends the given element to the end of the current chain.

parametrize()

Reads all data and discretizes it into discrete trajectories.

run()

deprecated. Identical to parametrize()

set_element(index, e)

Replaces a pipeline stage.

Replace an element in chain and return replaced element.