This file describes how each planner output should be prepared for the visualizer.
Input:
- direct
synplan.mcts.tree.Treepickle
Do not use TreeWrapper.
Expected raw artifact:
tree.pkl
Ingest:
retro-tree-visual ingest synplanner \
--tree tree.pkl \
--out-dir out/synplanner \
--html out/synplanner/index.htmlSynPlanner-specific behavior:
- Direct tree node IDs are preserved.
- Winning nodes and route provenance are taken from the tree when available.
- Multi-product precursor nodes are stored in node metadata.
- The renderer creates render-only visual product bubbles for multi-product nodes.
- CGR enrichment can use SynPlanner's direct tree-based RouteCGR path.
Inputs:
full_search_tree.jsonorfull_search_tree.json.gz- route export JSON
Expected raw artifacts:
full_search_tree.json.gz
routes.json
Ingest:
retro-tree-visual ingest aizynthfinder \
--tree full_search_tree.json.gz \
--routes routes.json \
--algorithm MCTS \
--target-id apatinib \
--target-smiles 'N#CC1(c2ccc(NC(=O)c3cccnc3NCc3ccncc3)cc2)CCCC1' \
--out-dir out/aizynthfinder \
--html out/aizynthfinder/index.htmlAiZynthFinder-specific behavior:
- MCTS nodes are planner states, not single molecules.
- Each state can contain multiple molecule IDs.
- The raw search trace keeps one node per MCTS state.
- The renderer creates molecule-level visual bubbles from each state.
- Route provenance matches normalized route states back to raw MCTS state nodes.
- CGR enrichment uses successful route reactions, not state-mixture trace SMILES.
The canonical Apatinib config uses iteration_limit: 500 under
runs/apatinib_mcts_500/aizynthfinder/config.yml. Regenerate the raw tree and
routes in a fresh AiZynthFinder-only environment; do not reuse or relabel the
historical 400-iteration artifacts under runs/apatinib_mcts_200/.
Inputs:
- graph pickle
- optional route export JSON
Expected raw artifacts:
graph.pkl
routes.json # optional
Ingest:
retro-tree-visual ingest syntheseus \
--graph graph.pkl \
--algorithm LocalRetro \
--target-id apatinib \
--target-smiles 'N#CC1(c2ccc(NC(=O)c3cccnc3NCc3ccncc3)cc2)CCCC1' \
--out-dir out/syntheseus \
--html out/syntheseus/index.htmlSyntheseus-specific behavior:
- The timeline uses deterministic node creation order. Original creation seconds
are kept as
syntheseus_created_at_secondsmetadata, butcreated_atis a discrete playback step. - Multi-parent graph edges are preserved in
SearchTrace.edges. parent_idstores one display parent only; it is not the full graph contract.- If
--routesis omitted, successful routes are extracted fromgraph.pklwith Syntheseusiter_routes_time_order, capped at 50 routes by default, converted to nested route dicts, and then processed through the existing RouteCGR/SB-CGR enrichment path. - If
--routesis provided, the external route file overrides graph-derived route extraction. - Route provenance is inferred from Syntheseus route terminal state IDs when graph-derived routes are used, then falls back to molecule/reaction matching.
The current canonical Apatinib Syntheseus config is:
runs/apatinib_mcts_500/syntheseus/config.yml
Regenerate runs/apatinib_mcts_500/syntheseus/graph.pkl from that config in a
source model environment before treating the comparison suite as complete.
For comparable reports, keep the same:
- target SMILES and target ID
- stock source
- max depth
- iteration or wall-clock budget where possible
- route limit or top-k where possible
- random seed where supported
The reports are expected to be similar, not identical. Search strategies, policy implementations, stocks, and route extraction rules can produce different branches and route counts.