msmbuilder.assigning.assign_in_memory

msmbuilder.assigning.assign_in_memory(metric, generators, project, atom_indices_to_load=None)[source]

Assign every frame to its closest generator

This code does everything in memory, and does not checkpoint. It also does not save any results to disk.

Parameters:

metric : msmbuilder.metrics.AbstractDistanceMetric

A distance metric used to define “closest”

project : msmbuilder.Project

Used to load the trajectories

generators : msmbuilder.Trajectory

A trajectory containing the structures of all of the cluster centers

atom_indices_to_load : {None, list}

The indices of the atoms to load for each trajectory chunk. Note that this method is responsible for loading up atoms from the project, but does NOT load up the generators. Those are passed in as a trajectory object (above). So if the generators are already subsampled to a restricted set of atom indices, but the trajectories on disk are NOT, you’ll need to pass in a set of indices here to resolve the difference.

Versions