pdb_transition_real_data_compressed.mp4
EmbedOpt inference guided by a real cryo-EM density map (EMD-64136, 3.52 Å).
Inputs already in this folder:
| File | Description |
|---|---|
emd_64136_cropped.mrc |
Cropped cryo-EM map (from EMDB EMD-64136) |
9UGC.pdb |
Reference PDB for Kabsch alignment during reward computation |
9UGC_A.fasta |
Protein sequence |
If starting from a raw EMDB download, crop the map with the embedopt-crop-map CLI:
embedopt-crop-map emd_64136.map --thresh 0.35 --pad 10 -o emd_64136_cropped.mrc--thresh is map-dependent — inspect the map in ChimeraX to find a density cutoff that tightly encloses the structure. --pad 10 adds a 10-voxel buffer on each side.
pixi run python examples/real_map_tutorial/01_make_minimal_json.pyReads 9UGC_A.fasta and writes 9UGC_A_minimal.json (sequence only, no MSA), which is the input for Step 2.
bash examples/real_map_tutorial/02_make_msa.shFetches MSA via the Protenix/ColabFold MMseqs2 server and writes results to 9UGC_A_msa/9UGC_A/msa/0/. Also produces 9UGC_A_minimal-update-msa.json with MSA paths embedded, which Step 3 uses as its basis.
Edit the variables at the top of 03_make_cfg.py:
ALGORITHMS— any subset of"base"(unconditional),"dps"(Denoising Posterior Sampling),"embedopt"(our method, embedding optimization)LEARNING_RATES— list of floats; one config per (algorithm, lr) combinationREF_PDB,REF_MAP,RESOLUTION— map reward inputsOUT_DIR— where configs are written (default:inference_configs/)
Then run:
pixi run python examples/real_map_tutorial/03_make_cfg.pyConfigs are written to inference_configs/, e.g. 9UGC_A_embedopt_lr{LEARNING_RATES}.json.
Edit the variables at the top of 04_run_inference.sh:
MODEL_NAME— model checkpoint (protenix_base_default_v0.5.0,protenix_base_default_v1.0.0, orprotenix-v2); auto-downloaded on first run. Note:protenix-v2weights currently cannot be auto-downloaded outside China (Bytedance CDN returns 403; see issue #296); usev0.5.0orv1.0.0instead, or setCHECKPOINT_DIRto a local copyINPUT_JSON— path to a config frominference_configs/DUMP_DIR— output directory (default:output/)N_STEPS— number of diffusion denoising stepsSEEDS— comma-separated seeds; one output structure per seed
Then run:
bash examples/real_map_tutorial/04_run_inference.shEnergy relaxation runs automatically on the final diffusion step.
Outputs under output/<config_name>/seed_<N>/:
trajectory/step_<last>_relaxed.pdb— energy-relaxed final structure (recommended for downstream use)predictions/*.cif— raw model output (before Kabsch alignment and energy relaxation)trajectory/step_<N>.pdb— intermediate snapshots everysave_pdb_every_n_stepsstepsreward_history.json— per-step map reward valuesprofile.json— timing and peak GPU memory