User Guide#

The user guide contains the top-level classes and concepts of EncoderMap.

Working with MD data#

These classes offer new ways of working with large quantities of inhomogeneous molecular dynamics data and implement lazy loading of coordinates and other collective variables (see Featurization). The API function encodermap.load returns either of the new trajectory classes.

Neural network model building and training#

These classes build tf.keras.Model models which will be trained and tf.data.Dataset datasets which will be used for training. The easiest pipelines provide the __init__ method of these classes with an numpy.ndarray as data and a encodermap.parameters.Parameters class (more on that later) as parameters. That’s all you need to use these classes.

import encodermap as em
import numpy as np

# create some random data 100 observations with 10 features
data = np.random.random((100, 10))

# create the parameters
p = em.Parameters()
emap = em.EndoerMap(p, data)

# create lowd by calling the encoder
lowd = emap.encode(data)

# create highd by callind the decoder
highd = em.decode(lowd)

To learn more about these classes, visit:

Autoencoder classes

Parameters#

These classes are containers for parameters and allow an easy way to adjust the training of the neural network models. They can be loaded from and saved to .json files. They support indexing via keys and dot notation:

import encodermap as em

# setting parameters at instantiation
p = em.Parameters(center_cost_scale=2.5)

# setting some other parameters
p.auto_cost_variant = "mean_square"

# print a pretty-formatted table of the parameters
print(p.parameters)

To learn more about these classes and also what parameters affect what in EncoderMap, visit:

Parameter classes

Featurization#

Accompanying the new classes for MD trajectories, the featurization of EncoderMap.

Featurization

Lower-level modules#

Models#

The models module is what handles the creation of the tensorflow models, using custom layers, implementing custom learning, etc.

Models

Layers#

EncoderMap implements some custom tensorflow layers, that are documented here.

Layers

Loss functions#

You can also write custom loss functions or experiment with EncoderMap’s loss functions.

Loss functions