From 561626343ac995e5aef5c52326c34cde77d132f6 Mon Sep 17 00:00:00 2001 From: Vratin Srivastava Date: Tue, 3 Mar 2026 16:58:01 -0600 Subject: [PATCH 01/10] README.md updated with instructions to run code, cleaning up toml file --- .gitignore | 1 + README.md | 299 ++++++++++++++- pyproject.toml | 197 +--------- uv.lock | 994 ++----------------------------------------------- 4 files changed, 343 insertions(+), 1148 deletions(-) diff --git a/.gitignore b/.gitignore index 1aac477..fe8429a 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ build/ .venv/ venv/ notebooks/ +figures/ diff --git a/README.md b/README.md index cc882a8..0c7fc80 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,99 @@ # WaterFlow -Predicting water moelcule placements on protein surfaces using flow matching conditioned on learned protein structure embeddings. -This repo contains all the code required to process a dataset, load in features from a pre-trained model for protein structure embeddings, and run inference (and training) of the flow matching classes. +Predicting water molecule placements on protein surfaces using flow matching conditioned on learned protein structure embeddings. -# Environment Setup +## Project Structure -We use `uv` for our environment and package management, with python 3.12. +``` +WaterFlow/ +├── src/ # Core library code +│ ├── dataset.py # ProteinWaterDataset and data loading +│ ├── flow.py # FlowMatcher and FlowWaterGVP model +│ ├── gvp.py # Geometric Vector Perceptron layers +│ ├── gvp_encoder.py # GVP-based protein encoder +│ ├── esm_encoder.py # ESM embedding encoder +│ ├── slae_encoder.py # SLAE embedding encoder +│ ├── encoder_base.py # Encoder registry and factory +│ ├── constants.py # Shared constants (RBF bins, etc.) +│ └── utils.py # Metrics, plotting, logging utilities +├── scripts/ # Executable scripts +│ ├── train.py # Training pipeline +│ ├── inference.py # Run inference on trained models +│ ├── generate_esm_embeddings.py # Precompute ESM embeddings +│ ├── generate_slae_embeddings.py # Precompute SLAE embeddings +│ ├── qc_waters.py # Quality control for water molecules +│ └── qc_symmetry_mates.py # Quality control for crystal mates +├── tests/ # Test suite +│ ├── test_dataset.py # Dataset and preprocessing tests +│ ├── test_flow.py # Flow matching tests +│ ├── test_encoder.py # Encoder tests +│ ├── test_forward.py # End-to-end forward pass tests +│ ├── test_gvp.py # GVP layer tests +│ └── test_utils.py # Utility function tests +└── splits/ # Train/val/test split files + ├── train_list_0.95.txt # Training set (95% of data) + ├── valid_list_0.05.txt # Validation set (5% of data) + └── water_pdbs.txt # Full list of PDBs with waters +``` -You can install the environment by running `uv sync` and running the scripts with `uv run python