Download src/lib/tool-mapping.ts from meljendy/proteinea: direct link, hf CLI and curl.
- Browser
- Download file 7.71 kB
-
https://huggingface.co/spaces/meljendy/proteinea/resolve/main/src/lib/tool-mapping.ts
- Command line
-
hf download hf://spaces/meljendy/proteinea/src/lib/tool-mapping.ts
-
curl -L -o tool-mapping.ts https://huggingface.co/spaces/meljendy/proteinea/resolve/main/src/lib/tool-mapping.ts
7.71 kB
| /** | |
| * Two registries live here: | |
| * | |
| * 1. TOOL_NAME_MAP (below) β demo engine short names β Hub endpoint names. | |
| * Some of these target endpoints that are NOT yet registered on the live | |
| * Hub (`hub-api.hound-bass.ts.net/api/registry/tools`). They'll start | |
| * resolving as the build pipeline ships those images. Until then the | |
| * mapping is aspirational for those lines (marked `NOT LIVE`). | |
| * | |
| * 2. LIVE_HUB_ENDPOINTS β a build-time SNAPSHOT of Hub endpoints (may drift). The tools page | |
| * Hub as of 2026-04-16. Exported so the UI can browse / chip / plan | |
| * against real, runnable tools (including Proteinea's proprietary Fc | |
| * receptor panel, Ankh, RaGene, CRPS Fc-DMS, Boltz, RosettaFold3). | |
| */ | |
| /** Maps demo engine short tool names β Hub endpoint names */ | |
| export const TOOL_NAME_MAP: Record<string, string> = { | |
| // ---- Design tools (research-reproduction catalog, not yet live on Hub) ---- | |
| "RFdiffusion": "design/rfantibody", // NOT LIVE | |
| "ProteinMPNN": "design/proteinmpnn", // NOT LIVE | |
| "ColabDesign": "design/colabdesign", // NOT LIVE | |
| "BindCraft": "design/bindcraft", // NOT LIVE | |
| "AntiFold": "design/antifold", // NOT LIVE | |
| "EvoProtGrad": "design/evoprotgrad", // NOT LIVE | |
| "AbMPNN": "design/abmpnn", // NOT LIVE | |
| "IgLM": "design/iglm", // NOT LIVE | |
| "Germinal": "design/germinal", // NOT LIVE | |
| "mBER": "design/mber", // NOT LIVE | |
| "Mosaic": "design/mosaic", // NOT LIVE | |
| // ---- Structure prediction β pointed at REAL live endpoints where possible ---- | |
| "AF2": "structure/alphafold", // LIVE | |
| "Chai-1": "structure/parallel_chai", // LIVE | |
| "Boltz": "structure/boltz", // LIVE | |
| "RF3": "structure/rosettafold3", // LIVE (RosettaFold3) | |
| "RF2": "structure/rosettafold3", // LIVE β best available RF-family endpoint | |
| "MSA": "structure/msa_generation", // LIVE | |
| "ESMFold": "structure/esmfold", // NOT LIVE (in tools.yaml, not deployed) | |
| "ABodyBuilder3":"structure/abodybuilder3", // NOT LIVE | |
| "Protenix": "structure/protenix", // NOT LIVE | |
| // ---- Sequence generation & fitness β LIVE proprietary stack ---- | |
| "Ankh": "fitness/ankh_sequence_generation", // LIVE β Proteinea PLM | |
| "D3PM": "fitness/d3pm_sequence_generation", // LIVE | |
| "InverseFold": "fitness/inverse_fold_d3pm", // LIVE (D3PM inverse fold) | |
| "ESM-Fc": "fitness/esm_predictions_fc", // LIVE | |
| "GP-Fc": "fitness/gp_predictions_fc", // LIVE | |
| "CRPS-Fc-DMS": "fitness/crps_fc_dms_binding", // LIVE | |
| "CRPS-ESM": "fitness/crps_esm_ensemble", // LIVE | |
| // ---- Fc receptor panel β LIVE proprietary binders ---- | |
| "FcgR2A": "fc/human_fcgr2a_131r_binding_v1.1", // LIVE | |
| "FcgR2B": "fc/human_fcgr2b_binding_v1.1", // LIVE | |
| "FcRn-pH6": "fc/human_fcrn_ph6_binding_v1.1", // LIVE β half-life | |
| "FcRn-pH7": "fc/human_fcrn_ph7_binding_v1.1", // LIVE β release kinetics | |
| "Fc-Convert": "fc/human_fc_format_converter", // LIVE | |
| // ---- MD validation β LIVE ---- | |
| "MD-Validate": "md/physical_validation", // LIVE | |
| "MD-Bench": "md/benchmarking", // LIVE | |
| // ---- Scoring tools (build-catalog, not yet live) ---- | |
| "DeepImmuno": "scoring/deepimmuno", // NOT LIVE | |
| "pDockQ2": "scoring/pdockq2", // NOT LIVE | |
| "PyRosetta": "scoring/pyrosetta_scoring", // NOT LIVE | |
| "ThermoMPNN": "scoring/thermompnn", // NOT LIVE | |
| "ProteinMPNN-ddG": "scoring/proteinmpnn_ddg", // NOT LIVE | |
| "NetSolP": "scoring/netsolp", // NOT LIVE | |
| "DeepStabP": "scoring/deepstabp", // NOT LIVE | |
| // ---- Analysis tools ---- | |
| "ANARCI": "analysis/anarci", // NOT LIVE | |
| "Agmata": "agonist/agmata", // LIVE β aggregation propensity | |
| "Agmata-Ξ": "agonist/agmata-delta", // LIVE | |
| "PTM": "quality/ptm", // LIVE β post-translational modification QC | |
| "Struct-Filter":"sa/structural_filtration", // LIVE | |
| }; | |
| /** | |
| * Live Hub endpoints (2026-04-16), grouped by namespace. | |
| * Source of truth: https://hub-api.hound-bass.ts.net/api/registry/tools | |
| * | |
| * Use these for category chips, plan-proposal tools, and browser surfaces. | |
| * Anything not listed here is NOT runnable right now. | |
| */ | |
| export const LIVE_HUB_ENDPOINTS = { | |
| fc: [ | |
| "fc/human_fc_format_converter", | |
| "fc/human_fcgr2a_131r_binding_v1.1", | |
| "fc/human_fcgr2b_binding_v1.1", | |
| "fc/human_fcrn_ph6_binding_v1.0", | |
| "fc/human_fcrn_ph6_binding_v1.1", | |
| "fc/human_fcrn_ph7_binding_v1.0", | |
| "fc/human_fcrn_ph7_binding_v1.1", | |
| "fc/id_creation", | |
| "fc/undo_id_creation", | |
| ], | |
| fitness: [ | |
| "fitness/ankh_sequence_generation", | |
| "fitness/cfm_generation", | |
| "fitness/conditional_autoencoder_generation", | |
| "fitness/crps_esm_ensemble", | |
| "fitness/crps_fc_dms_binding", | |
| "fitness/d3pm_sequence_generation", | |
| "fitness/esm_predictions_fc", | |
| "fitness/fc_canine_bind_rank", | |
| "fitness/fold_to_seq_gen", | |
| "fitness/gp_predictions_fc", | |
| "fitness/inverse_fold_d3pm", | |
| "fitness/inverse_fold_d3pm_single", | |
| "fitness/multinomial_diffusion_generation", | |
| "fitness/scbd_generation", | |
| "fitness/wj_sequence_generation", | |
| ], | |
| structure: [ | |
| "structure/alphafold", | |
| "structure/alphafold-old", | |
| "structure/boltz", | |
| "structure/msa_generation", | |
| "structure/parallel_chai", | |
| "structure/rosettafold3", | |
| ], | |
| ragene: [ | |
| "ragene/inference/list_models", | |
| "ragene/inference/v2", | |
| "ragene/inference/v3", | |
| "ragene/inference/v4", | |
| "ragene/inference/v5", | |
| "ragene/train/v2", | |
| "ragene/train/v3", | |
| "ragene/train/v4", | |
| "ragene/train/v5", | |
| ], | |
| training: [ | |
| "training/cfm_training", | |
| "training/conditional_autoencoder_training", | |
| "training/d3pm_model_training", | |
| "training/denoise_bytenet_training", | |
| "training/multinomial_diffusion_training", | |
| "training/scbd_training", | |
| ], | |
| md: [ | |
| "md/benchmarking", | |
| "md/optimized_standard", | |
| "md/physical_validation", | |
| ], | |
| agonist: ["agonist/agmata", "agonist/agmata-delta"], | |
| analysis: ["analysis/generative_benchmark", "analysis/regression_benchmark"], | |
| misc: [ | |
| "fep/glycoprotein", | |
| "generation/brute_force", | |
| "botied/scores", | |
| "sa/structural_filtration", | |
| "quality/ptm", | |
| ], | |
| } as const; | |
| /** Human-readable labels for each namespace. Used by the tool browser UI. */ | |
| export const LIVE_HUB_CATEGORY_LABELS: Record<keyof typeof LIVE_HUB_ENDPOINTS, string> = { | |
| fc: "Fc receptor panel", | |
| fitness: "Sequence generation & fitness", | |
| structure: "Structure prediction", | |
| ragene: "RaGene", | |
| training: "Model training", | |
| md: "Molecular dynamics", | |
| agonist: "Aggregation", | |
| analysis: "Benchmarks", | |
| misc: "Other", | |
| }; | |
| /** Flat list of all runnable live-Hub endpoint names (2026-04-16). */ | |
| export const LIVE_HUB_ENDPOINT_LIST: string[] = Object.values(LIVE_HUB_ENDPOINTS).flat(); | |
| /** Is this endpoint currently live on the Hub? */ | |
| export function isLiveHubEndpoint(endpoint: string): boolean { | |
| return LIVE_HUB_ENDPOINT_LIST.includes(endpoint); | |
| } | |
| /** | |
| * Resolve a short tool name to its Hub API endpoint name. | |
| * Falls back to lowercase if the name is not in the map. | |
| */ | |
| export function resolveToolEndpoint(shortName: string): string { | |
| return TOOL_NAME_MAP[shortName] ?? shortName.toLowerCase(); | |
| } | |