Release notes#
Changelog#
All notable changes to SynPlanner are documented here. Format follows Keep a Changelog.
Unreleased#
1.4.3 - 2026-03-19#
Changed#
Parallelization#
Removed Ray dependency entirely — all parallel pipelines now use
ProcessPoolExecutorvia the newprocess_pool_map_streamutilityprocess_pool_map_streamenhanced withorderedmode (submission-order yield), per-futuretimeout,initializer/initargsfor non-picklable worker state,max_tasks_per_child(Python 3.11+), andon_timeoutcallbackNew
graceful_shutdown()context manager for SIGTERM/SIGINT handling with automatic signal handler restoration
Data Pipeline#
Standardization, filtering, rule extraction, and ML preprocessing pipelines migrated from Ray to
process_pool_map_streamwith initializer patternWriter-side CGR dedup:
hash(~rxn)(condensed graph of reaction hash) for mechanism-level reaction deduplication — 8 bytes per entry in memoryNew shared result types:
ProcessResult,ErrorEntry,FilteredEntry,PipelineSummaryinsynplan.chem.data.reaction_result
Compatibility#
Removed
from __future__ import annotationsfrom all modules (Dagster compatibility)Forward references quoted for self-referencing return types
Removed#
raydependency removed frompyproject.tomlinit_ray_logging()removed fromsynplan.utils.loggingDedupActorRay actor removed
Added#
10 unit tests for
process_pool_map_streamandgraceful_shutdown(tests/unit/utils/test_parallel.py)8 unit tests for
ProcessResult,PipelineSummary, and CGR dedup (tests/unit/chem/data/test_pipeline.py)
1.4.2 - 2026-03-15#
Added#
ORD (Open Reaction Database) Support#
New
synplan/utils/ord/package for reading ORD.pbDataset files via protobuf (dataset_pb2.py,reaction_pb2.py) without depending onord-schemaiter_ord_reactions()iterator for lazy ORD.pbfile parsingconvert_ord_to_smiles()utility for batch ORD-to-SMILES conversionsynplan ord_convertCLI command for converting ORD.pbfiles to.smiReactionReaderandRawReactionReadernow accept.pbfiles natively_ORDReadAdapterfor transparent ORD reading through the existingReaderprotocol367-line test suite (
test_ord_reader.py) covering ORD parsing
Configuration#
ReactorConfigpydantic model for typed Reactor construction parameters (automorphism_filter,delete_atoms,one_shot,fix_aromatic_rings,fix_tautomers) withto_reactor_kwargs()serializationload_reaction_rules()now accepts optionalreactor_configparameter
Changed#
Rule Extraction#
Rule deduplication now uses CGR (condensed graph of reaction) instead of
ReactionContainerhashing — correctly preserves query-level atom annotations (neighbors, hybridization) when rules containQueryContainermolecules_update_rules_statistics()andsort_rules()updated to usecgr_to_rulemapping for CGR-based dedupprocess_completed_batch()receivescgr_to_ruledict
Docker#
Added
.dockerignoreto exclude.git,.venv,docs,tests,tutorials, build caches, and data directories from Docker build context
Dependencies#
Added
protobuf>=4.21to core dependencies (ORD.pbsupport)Added
grpcio-tools>=1.78.0to dev dependencies (protobuf code generation)
Fixes & Cleanup#
depict_settings()calls updated to module-level function (wasMoleculeContainer.depict_settings())routes_clustering_report/routes_subclustering_report: safer target SMILES lookup with.get()fallback instead of direct key accessRemoved unused
yamlimports fromfiltering.pyandstandardizing.pyRemoved unused
osimport fromcli.pyRemoved unused
Anyimport frommapping.pyImport order cleanup (ruff/black formatting)
1.4.1 - 2026-03-03#
Fixed#
Coordinate bonds that break
mol_to_pyggraph conversion are now removed viaremove_coordinate_bonds(keep_to_terminal=False)before kekulization across 6 call sites (rdkit_compat.py,reaction.py,extraction.py,utils.py×2,preprocessing.py×2)
Changed#
Documentation#
Replaced
.nblinkfiles with direct symlinks to tutorial notebooks (removednbsphinx_linkdependency)Version switcher now uses
READTHEDOCS_CANONICAL_URLfor correct multi-version docs hostingReadTheDocs build switched from
jobstocommandswith explicituv run sphinxCleaned up
conf.pycomments and removednbsphinx_linkfrom extensions
Infrastructure#
Bumped version to 1.4.1 in
pyproject.tomlanduv.lock
1.4.0 - 2026-03-03#
This is a major breaking release. SynPlanner now uses
chython-synplanas its sole cheminformatics backend, replacing CGRtools and minimizing RDKit to an optional scoring dependency. All pretrained models must be retrained — chython produces different canonical SMILES, atom features, and reaction products than CGRtools for the same inputs. Results from previous SynPlanner versions are not reproducible.
Added#
Protection Strategy Scoring (NEW MODULE)#
New
synplan/route_quality/module implementing the competing-sites scoring framework from Westerlund et al. (ChemRxiv, 2025)FunctionalGroupDetectorwith 102 SMARTS patterns across 18 reactivity categoriesHalogenDetectorwith 140 SMARTS patterns across 5 halogen familiesCGR-based
ReactionClassifierwith broad (4-category) and detailed (12-category) reaction type classificationIncompatibilityMatrixwith 3-level severity (compatible / competing / incompatible)RouteScannerfor per-step competing functional group interaction detectionCompetingSitesScorewith worst-per-step S(T) formula for route quality scoringProtectionRouteScorerintegrated directly withTreefor automatic post-search route re-ranking based on functional group selectivityProtectionConfigdataclass with YAML serializationFull test suite: 69 unit tests across 4 test modules
Search Algorithms#
CombinedPolicyNetworkFunctionfor weighted filtering + ranking logit combination with configurableranking_weightandtemperatureparametersNew evaluation strategies:
RDKitEvaluationStrategy,PolicyEvaluationStrategyStochastic mode for
RolloutSimulator(probability-weighted rule sampling)Tree pruning via redundant expansion state caching (
enable_pruningconfig)predict_reaction_rules_light()for lightweight rollout rule prediction
Data Pipeline#
RawReactionReaderfor lazy batch processing of raw SMILES/RDF stringsDistributed SMILES parsing across Ray workers (was main-thread bottleneck)
BaseStandardizerabstract class with template method patternStandardizationErrorwith safe pickling for Ray workersSTANDARDIZER_REGISTRYfor declarative standardizer configurationDuplicateReactionStandardizerwith RayDedupActorfor cluster-wide dedupDedupActorRay actor for cluster-wide unique reaction tracking4 new reaction filters:
MultiCenterFilter,WrongCHBreakingFilter,CCsp3BreakingFilter,CCRingBreakingFilterignore_errorsmode with structured TSV error files for all data pipelinesCategorized error taxonomy (
_DATA_ERROR_STAGES,_DATA_ERROR_TYPES) distinguishing data noise from pipeline bugsparse_reaction()with format auto-detection (SMILES / RDF)load_rule_index_mapping_tsv()for new TSV rule format
Infrastructure#
download_preset()for structured preset downloads from HuggingFace (replaces deprecateddownload_all_data())HuggingFace data moved to
Laboratoire-De-Chemoinformatique/SynPlanner-dataPreset YAML manifests (e.g.,
presets/synplanner-article.yaml)TSV building blocks format support (
.tsv,.tsv.gz)CUDA 12.6 and 12.8 extras (
--extra cu126,--extra cu128)Python 3.13 and 3.14 support (
>=3.10,<3.15)Multi-stage Docker builds with
uv sync --lockedHEALTHCHECKdirective for GUI Docker imageCross-platform CI matrix (3 OS x 4 Python versions)
uv build --wheel+uv publishfor PyPI/TestPyPI releases--ignore-errors,--error-file,--batch_sizeCLI options on all processing commandssynplan download_presetCLI command
Tutorials & Documentation#
Tutorial 00: Welcome to Chython (chython onboarding for new users)
Tutorial 01: Coming from RDKit (migration guide with 35+ operation cheat sheet)
Tutorial 07: Protection Scoring (end-to-end with capivasertib, 128 routes)
Tutorial 08: Combined Ranking Filtering Policy (dual policy tuning)
Tutorial 09: NMCS Algorithms (Nested Monte Carlo Search guide)
API docs for
synplan.route_qualitymodule5 new user guide pages linked from docs index
Configs#
combined_ranking_filtering_policy.yaml— combined policy network configplanning_combined_policies.yaml— planning with combined filtering + rankingplanning_value.yaml— GCN value network evaluation configrules_extraction.yaml— fine-grained atom info retention for rule extractionextraction_functional_groups.yaml— FG-aware extraction with 26 SMARTS patterns
Testing#
80+ new unit and integration tests
test_clustering_visualization_e2e.py— 27+ tests covering full clustering pipelinetest_loading.py— building blocks loading with CSV, gzip, and TSVSAScore benchmark suite (
scripts/sascore_bench/) with configurable YAML and plotting
Changed#
Chemistry Backend Migration (BREAKING)#
ALL CGRtools imports replaced by chython equivalents across the entire codebase
chython-synplan[racer-default]>=1.93replaces bothcgrtools-stableand the git-pinned chython forkRDKit isolated to optional
synplan/chem/rdkit_utils.pyfor SA score calculationsModule-level
smiles_parsersingleton removed; each module importschython.smilesBridge functions
cgrtools_to_chython_molecule()andchython_query_to_cgrtools()deleted
Reaction Rule Format (BREAKING)#
Rules output changed from pickle to SMARTS TSV (human-readable, version-controllable, portable)
TSV columns:
rule_smarts,popularity,reaction_indicesLegacy pickle still loadable with automatic conversion via
_convert_cgrtools_query_container()load_reaction_rules()returnstuple(immutable, cached) instead oflist
Reactor API (BREAKING)#
Reactor constructed with explicit
patterns=,products=,delete_atoms=FalseReactants unpacked with
*reactantsinstead of passed as a listmolecule_substructure_as_query()replaces CGRtools’as_query=TrueAPI usingQueryElement.from_atom()with explicitneighbors,hydrogens,ring_sizesflags
MCTS Architecture (BREAKING)#
evaluation_functionparameter type changed fromValueNetworkFunctiontoEvaluationStrategytree.policy_networkrenamed totree.expansion_functiontree.value_networkremoved; replaced bytree.evaluatortree.building_blocksis nowfrozenset(immutable)tree.reaction_rulesis nowtuple(immutable)evaluation_typestring dispatch replaced by typed evaluation config objectsvalue_network_pathparameter removed fromrun_search(); useevaluation_config
Data Pipeline#
Ray workers receive raw SMILES strings instead of parsed
ReactionContainerobjectsextract_rules()returnstuple[list, bool]instead oflistsort_rules()returnstuple[list, dict];single_product_onlyparameter removedfilter_reaction()returns 3-tuple(bool, ReactionContainer | None, str | None)clean_atom()no longer manageshybridizationattributedepict_settingsis now a module-level function, not a class method
Dependencies#
cgrtools-stable==4.2.13removedchythongit pin replaced bychython-synplan[racer-default]>=1.93chytorch-synplan>=1.70(was>=1.69)chytorch-rxnmap-synplan>=1.7(was>=1.6)rdkit>=2023.9.1(relaxed from>2025.3.5)CUDA extras:
--extra cudareplaced by--extra cu126/--extra cu128
Other#
download_all_data()deprecated in favor ofdownload_preset()Type annotations modernized:
Dict,List,Union->dict,list,|tqdm->tqdm.autofor notebook compatibilityAll existing tutorials (Steps 2-6) rewritten for chython-synplan
Fixed#
Product validation now copies molecule before
kekule()to prevent mutationRankingPolicyDataset:if rule_id:->if rule_id is None:(was silently skipping rule index 0)Variable-shadowing bug in
_expand_node(for new_precursor in new_precursor)InvalidAromaticRingexception now caught alongsideKeyErrorandIndexErrorReactor no longer deletes atoms by default (
delete_atoms=False)Windows path handling
CUDA/PyTorch resolution in CI
GUI and CI fixes
Visualisation bugs
Breaking Changes Summary#
Data & Reproducibility: All pretrained models, reaction rules (pickle format), and building block files from previous versions produce different results with v1.4.0. Users must:
Re-extract reaction rules (now saved as SMARTS TSV)
Retrain all policy and value networks
Re-standardize building blocks
The root cause is that chython produces different canonical SMILES, different atom feature vectors, different Kekulization, and different reaction products compared to CGRtools. While the 11-dimensional atom feature schema is unchanged, the underlying values differ for aromaticity perception, ring detection, and hydrogen counting.
Breaking Change |
Migration Path |
|---|---|
CGRtools imports |
Replace with |
Pickle reaction rules |
Re-extract rules (outputs SMARTS TSV) or load legacy pickle (auto-converted) |
|
Use |
|
Use typed config objects ( |
|
Use |
|
Use |
|
Filter before Tree init ( |
|
Use |
|
Use |
|
Use |
Pretrained models |
Retrain — feature vectors differ |
HuggingFace repo |
Data moved to |
1.3.2 - 2025-12-14#
Added#
NMCS and LazyNMCS tutorials (
09_NMCS_Algorithms)Combined ranking and filtering policy tutorial (
08_Combined_Ranking_Filtering_Policy)SAScore benchmark scripts and result plotting
Support for loading SMILES from CSV files
Changed#
Moved build system from Poetry to uv
Fixed#
PyPI publishing pipeline (
--skip-existingflag)Black formatting
1.3.1 - 2025-11-13#
Fixed#
Streamlit GUI rerun error
1.3.0 - 2025-11-13#
Added#
NMCS (Nested Monte Carlo Search) and LazyNMCS search algorithms
Best-first, breadth-first, and beam search strategies
Parallel building block loading
Unified evaluation function loading (
load_evaluation_function)silentparameter for suppressing tree search progress outputClustering bug fix and improved test coverage
Changed#
Search algorithms separated from the tree into dedicated modules
Evaluation system refactored: unified node evaluation via
EvaluationServiceTree configuration updated: evaluation function now part of
TreeConfigRule extraction configuration updated
Simplified Docker setup
Removed single-core/single-worker legacy logic
Fixed#
NMCS algorithm correctness fixes
UCT formula after algorithm separation
mol_to_pygperformance (removed unnecessary molecule copy)SAScore division-by-zero edge case with UCT
Tree config backward compatibility
1.2.1 - 2025-09-15#
Changed#
Updated dependencies
Improved README and documentation
1.2.0 - 2025-08-13#
Added#
Route clustering by strategic bonds (contributed by Almaz Gilmullin)
Streamlit-based graphical user interface
Route clustering CLI command
Integration tests for clustering workflow
HTML clustering report generation
Changed#
Refactored route CGR representation (
SB-CGR)Refactored visualisation module
Enhanced GUI session state management
1.1.2 - 2025-05-11#
Changed#
Updated dependency versions
1.1.1 - 2025-05-11#
Added#
RxnMapper integration for atom-to-atom mapping
Fixed#
PyPI publishing configuration and dependencies
1.1.0 - 2025-05-04#
Added#
Initial CI pipeline and tests
Cross-platform dependency resolution
Changed#
Refactored standardization pipeline
Updated NumPy compatibility
1.0.0 - 2024-12-20#
Added#
Initial public release
MCTS-based retrosynthetic planning with rollout evaluation
Reaction data curation pipeline (standardization and filtration)
Reaction rule extraction from reaction databases
Ranking policy network training (GCN-based)
HTML route visualisation
CLI interface (
synplancommand)Docker images for CLI and GUI