Documentation

synd.models.base

Abstract base SynD model class.

synd.models.discrete.discrete.DiscreteGenerator

Abstract base class for discrete SynD models.

synd.models.discrete.markov.MarkovGenerator

Generator using discrete Markov dynamics.

synd.core

Functions for interacting with SynD models.

synd.hosted

Store/retrieve SynD models from an S3 host.

SynD Models (synd.models)

class synd.models.discrete.markov.MarkovGenerator(transition_matrix, backmapper, seed=None)[source]

Generator using discrete Markov dynamics.

__init__(transition_matrix, backmapper, seed=None)[source]
Parameters
  • transition_matrix – A valid discrete transition matrix

  • backmapper – Callable mapping a discrete state index to a full-coordinate representation

  • seed – The seed for random number generator

add_backmapper(backmapper, name)[source]

Define a new backmapper.

Parameters
  • backmapper – A callable defining a new backmapper.

  • name – The name to associate with the new backmapper.

backmap(discrete_index, mapper='default')[source]

Return the full-coordinate representation of a discrete state.

Parameters
  • discrete_index – Discrete state index

  • mapper – Optional string to specify a backmapper for this model.

Return type

Array of coordinates

generate_trajectory(initial_states, n_steps)[source]
Parameters
  • initial_states – Array of initial discrete states to propagate trajectories from

  • n_steps – Number of steps forward to propagate from each initial state. Total trajectory length will be n_steps

Return type

Union[_SupportsArray[dtype], _NestedSequence[_SupportsArray[dtype]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]

static validate_transition_matrix(transition_matrix)[source]

Validate that a transition matrix is valid. Raises an AssertionError if it is not.

Parameters

transition_matrix – A transition matrix

save(outfile)

Saves a SynD model to a file on disk.

Parameters

outfile – Name of the file to save the model to.

serialize()

Get the serialized representation of the SynD model.

Return type

Serialized representation of the model.

class synd.models.discrete.discrete.DiscreteGenerator[source]

Abstract base class for discrete SynD models.

abstract backmap(discrete_index)[source]
abstract generate_trajectory(initial_distribution, n_steps)[source]
save(outfile)

Saves a SynD model to a file on disk.

Parameters

outfile – Name of the file to save the model to.

serialize()

Get the serialized representation of the SynD model.

Return type

Serialized representation of the model.

Abstract base SynD model class.

class synd.models.base.BaseSynDModel[source]

Abstract base SynD model.

serialize()[source]

Get the serialized representation of the SynD model.

Return type

Serialized representation of the model.

save(outfile)[source]

Saves a SynD model to a file on disk.

Parameters

outfile – Name of the file to save the model to.

WESTPA Propagator

SynD Core (synd.core)

Functions for interacting with SynD models.

synd.core.load_model(filename)[source]

Load a SynD model from a file.

Parameters

filename – Path to SynD model file

Return type

SynD model

Model Hosting

Store/retrieve SynD models from an S3 host.

synd.hosted.make_minio_client(access_key, secret_key, model_host='minios.jdrusso.dev', **client_kwargs)[source]
Return type

Minio

synd.hosted.download_model(identifier, client, bucket='models')[source]
Return type

BaseSynDModel

synd.hosted.upload_model(model, identifier, client, bucket='models')[source]