Skip to main content

Gaussian Process Temporal Embedding for Protein Simulations and Transitions

Project description

GP-TEMPEST

GP-TEMPEST

Gaussian Process Temporal Embedding for Protein Simulations and Transitions

DOI License: MIT Tests Coverage Python 3.9+ PyTorch

FeaturesInstallationUsageCitation


GP-TEMPEST is a PyTorch implementation of the Gaussian Process Variational Autoencoder (GP-VAE) framework for time-aware dimensionality reduction of molecular dynamics (MD) simulations. The method leverages physics-informed Gaussian Process priors to capture temporal correlations in the latent space, enabling the recovery of hidden or kinetically relevant degrees of freedom in complex biomolecular systems.

Features

  • Physics-informed dimensionality reduction using Gaussian Processes as temporal priors
  • Flexible kernel selection with support for the Matérn kernel (ν = 0.5, 1.5, 2.5)
  • Sparse GP inference with inducing points for scalability to large molecular trajectories
  • Compatible with large MD datasets and batch-wise training

Installation

1. Clone the repository:

git clone https://github.com/moldyn/GP-TEMPEST.git
cd GP-TEMPEST

2. Install dependencies:

pip install torch --index-url https://download.pytorch.org/whl/cpu  # or cu118 for CUDA
pip install -r requirements.txt

Usage

Command-line interface

Fully-connected variant:

# Generate a default config file
python tempest_main.py --generate_config

# Run with your config
python tempest_main.py --config my_config.yaml

Python API

import numpy as np
import torch
from gptempest import TEMPEST, MaternKernel, load_prepare_data

# Set up kernel and model
kernel = MaternKernel(scale=10.0, nu=1.5, dtype=torch.float64)
inducing_points = np.linspace(0, 1, 50)

model = TEMPEST(
    cuda=False,
    kernel=kernel,
    dim_input=dim_input,
    dim_latent=2,
    layers_hidden_encoder=[128, 64],
    layers_hidden_decoder=[64, 128],
    inducing_points=inducing_points,
    beta=1.0,
    N_data=N_data,
    dtype=torch.float64,
)

# Train
model.train_model(dataset, train_size=1.0, learning_rate=1e-3,
                  weight_decay=1e-5, batch_size=512, n_epochs=100)

# Extract latent space
embedding = model.extract_latent_space(dataset, batch_size=512)

Configuration file

GP-TEMPEST is configured via YAML files. Generate a template with --generate_config and adjust the following key parameters. The discussion of these parameters can be found in the paper.

Parameter Description
dim_latent Dimensionality of the latent space (typically 2)
layers_hidden Hidden layer sizes for encoder/decoder
kernel_nu Matérn kernel smoothness (0.5, 1.5, or 2.5)
kernel_scale Time-scale of the GP prior
beta Weight of the GP regularization term
inducing_points Path to inducing point time coordinates

Citation

If you use GP-TEMPEST in your research, please cite:

@article{diez2025gptempest,
  title   = {Recovering Hidden Degrees of Freedom Using Gaussian Processes},
  author  = {Diez, Georg and Dethloff, Nele and Stock, Gerhard},
  journal = {J. Chem. Phys.},
  volume  = {163},
  pages   = {124105},
  year    = {2025},
  doi     = {10.1063/5.0282147}
}

G. Diez, N. Dethloff, G. Stock, "Recovering Hidden Degrees of Freedom Using Gaussian Processes," J. Chem. Phys. 163, 124105 (2025), https://doi.org/10.1063/5.0282147

License

This project is licensed under the MIT License — see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gp_tempest-0.1.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gp_tempest-0.1.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file gp_tempest-0.1.0.tar.gz.

File metadata

  • Download URL: gp_tempest-0.1.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gp_tempest-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7305173a0dca79267bab676142ffc037c383060b75d6c20a3dbba6f6a9b8cb39
MD5 e70ac0b151be044f33f7b71bdf23750b
BLAKE2b-256 daf0403346efd3c7bd8d98e2252d840c9dbed6188110d8e853080208aed1b68d

See more details on using hashes here.

File details

Details for the file gp_tempest-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gp_tempest-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for gp_tempest-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd40586f1b3052c9ccea400010043eda616d435f79bf07672e3185cdf335af90
MD5 a34d24cc8c7fe2edabc67e4a71263cdc
BLAKE2b-256 4a342fc687b4a82fb598076f71376d44ee3ee0387e07a48d58dbbead15c2be4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page