Observed since 20 Oct, 19:07 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
adaptivepy-sampling
Adaptive sampling on MD trajectories via clustering and policy-driven seed selection
Adaptive sampling for molecular dynamics trajectories
Clustering-based and frame-level adaptive policies for MD workflows, including entropy-based MaxEnt VAMPNet and OOD-based TS-DAR seed selection.
AdaptivePy helps you identify under-sampled or high-uncertainty regions of conformational space and select seed frames for new simulations. It loads per-trajectory feature arrays, optionally clusters frames, applies adaptive policies, and writes reproducible metadata and optional PDB structures.
Most policies select seeds from clusters. MaxEnt VAMPNet (maxent_vampnet) and TS-DAR (ts_dar) are frame-level: they train Torch models on lagged features and select scored frames directly — no clustering required.
Full documentation: https://shuklagroup.github.io/AdaptivePy/
| Input | Feature arrays (.npy / .pkl), optional coordinate trajectories |
| Clustering | KMeans, MiniBatch KMeans, regular-space (optional for frame-level policies) |
| Policies | Least counts, random, FAST, MA-REAP, kNN-AS, MaxEnt VAMPNet, TS-DAR (extensible) |
| Output | Seeds, cluster assignments, model, logs, policy scores, optional PDBs |
pip install adaptivepy-sampling
For Torch-backed policies such as MaxEnt VAMPNet and TS-DAR:
pip install adaptivepy-sampling[torch]
For development:
git clone https://github.com/shuklagroup/AdaptivePy.git
cd AdaptivePy
pip install -e ".[dev,docs]"
For Torch-backed policy development:
pip install -e ".[dev,docs,torch]"
Prepare features — one file per trajectory, shape (n_frames, n_features):
features/
├── traj_0.npy
└── traj_1.pkl
Configure — edit examples/config.yaml (or create your own).
Run:
adaptivepy run examples/config.yaml
See the Getting Started guide for a complete walkthrough.
adaptivepy run config.yaml # run adaptive sampling
adaptivepy validate config.yaml # validate inputs only
adaptivepy list-policies # list available policies
from adaptivepy import run_adaptive_sampling
results = run_adaptive_sampling("config.yaml")
Built-in seed-selection policies:
| Policy | Use case |
|---|---|
least_counts | Target under-sampled clusters |
random | Baseline random sampling |
fast | Goal-directed sampling via feature columns (Zimmerman & Bowman 2015) |
ma_reap | Multi-agent coordinated sampling with learned CV weights (Kleiman & Shukla 2022) |
knn_as | k-nearest-neighbors adaptive sampling over cluster representatives (Rovers et al. 2025) |
maxent_vampnet | Entropy-based frame selection via VAMPNet soft state assignments (Kleiman & Shukla 2023); no clustering (forced for ensemble policy) |
ts_dar | OOD-score frame selection via TS-DAR hyperspherical embeddings (Liu et al. 2025); no clustering (forced for ensemble policy) |
fast, ma_reap, knn_as, maxent_vampnet, and ts_dar accept extra YAML under policy_params.
MA-REAP requires mapping each trajectory to an agent. Torch-backed policies require the
[torch] install extra (pip install adaptivepy-sampling[torch]). See the
Policies guide and
Configuration.
AdaptivePy also supports opt-in metapolicy ensembles with majority polling or
per-policy seed allocation through the metapolicy YAML block.
| Guide | Description |
|---|---|
| Getting Started | First run in minutes |
| Configuration | YAML options and defaults |
| Feature Inputs | File formats and layout |
| Policies | Seed selection strategies |
| API Reference | Module documentation |
MIT. See LICENSE for details.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
numpyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | numpy>=1.20 | runtime |
scikit-learnEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | scikit-learn>=1.0 | runtime |
pyyamlEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pyyaml>=6.0 | runtime |
clickEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | click>=8.0 | runtime |
joblibEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | joblib>=1.0 | runtime |
mdtrajEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | mdtraj>=1.9 | runtime |
scipyEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | scipy>=1.7 | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"dev\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pytest>=7.0; extra == "dev" | runtime |
mkdocs-materialEnvironment{
"extras": "",
"marker": "extra == \"docs\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | mkdocs-material>=9.0; extra == "docs" | runtime |
mkdocstringsEnvironment{
"extras": "python",
"marker": "extra == \"docs\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | mkdocstrings[python]>=0.24; extra == "docs" | runtime |
deeptimeEnvironment{
"extras": "",
"marker": "extra == \"torch\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | deeptime>=0.4; extra == "torch" | runtime |
torchEnvironment{
"extras": "",
"marker": "extra == \"torch\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | torch>=2.0; extra == "torch" | runtime |
bdist_wheel · 60.71 KB · Python py3
sdist · 55.36 KB · Python source
Observed since 20 Oct, 19:07 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:9d71879fac884b79dcf44cd0dcf6bf8b7185fcad46af6727a4963ae97a5834bd