Skip to content

feat: split structural neighbors vs profile-based substitutes - #222

Merged
rvnminers-A-and-N merged 1 commit into
mainfrom
substitutes-vs-structural-213
Jul 26, 2026
Merged

rvnminers-A-and-N merged 1 commit into
mainfrom
substitutes-vs-structural-213

Conversation

@rvnminers-A-and-N

Copy link
Copy Markdown
Collaborator

Closes #213. Substitutes rank by taste+aroma profile (vanillin → ethyl vanillin #1); structural neighbors rank by Tanimoto. Reference set widened to the full ~8.8k universe (ethyl vanillin wasn't a candidate before). 170-head profile matrix precomputed → profile_index.npz (gitignored). Surfaces synced (workbench/MCP/skill/README). 22 unit tests pass.

Two distinct nearest-neighbor searches, previously conflated under 'substitutes':
- Structural neighbors (/api/neighbors) — Tanimoto over Morgan fingerprints. The look-alikes.
- Substitutes (/api/substitutes) — NEW: cosine over predicted 6 taste + 164 aroma head scores.
  A molecule that tastes and smells like the target is the real drop-in swap regardless of
  structure. Vanillin -> ethyl vanillin #1 (0.94), then isovanillin, coniferaldehyde.

Widen the reference set from 3,845 taste-labelled molecules to the full ~8.8k universe so any
molecule can surface (ethyl vanillin wasn't a candidate before). The 170-head profile matrix is
precomputed by build_profile_index.py -> profile_index.npz (gitignored) for instant startup.

Surfaces synced: workbench two sections; MCP find_structural_neighbors + find_substitutes;
skill; README. 22 unit tests pass. Closes #213.

Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
@rvnminers-A-and-N rvnminers-A-and-N self-assigned this Jul 26, 2026
@rvnminers-A-and-N
rvnminers-A-and-N merged commit 05a32a7 into main Jul 26, 2026
4 checks passed
@rvnminers-A-and-N
rvnminers-A-and-N deleted the substitutes-vs-structural-213 branch July 26, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: split structural neighbors vs profile-based substitutes

1 participant