← Về thư mục
skills/retrosynthesis_planning/atom_mapping_benchmark.py
- _chem · function · L28-L33 — def _chem()
- _split_reaction · function · L36-L46 — def _split_reaction(value: Any) -> tuple[str, str]
- validate_public_reactions · function · L49-L67 — def validate_public_reactions( rows: Iterable[Mapping[str, Any]], ) -> tuple[dict[str, str], ...]
- _mapped_side · function · L70-L102 — def _mapped_side(side: str, *, prefix: str) -> dict[str, Any]
- _canonical_side_without_maps · function · L105-L119 — def _canonical_side_without_maps(side: str) -> tuple[str, ...]
- _correspondence_entries · function · L122-L146 — def _correspondence_entries(value: Any) -> dict[int, tuple[str, str]]
- _atom_identity · function · L149-L150 — def _atom_identity(pair: tuple[str, str]) -> str
- analyze_mapping_prediction · function · L153-L234 — def analyze_mapping_prediction( original_reaction: str, prediction: Mapping[str, Any], ) -> dict[str, Any]
- atom_identity · function · L198-L205 — def atom_identity(map_num: int) -> str
- normalize_mapping_outputs · function · L237-L258 — def normalize_mapping_outputs( reactions: Sequence[Mapping[str, str]], predictions: Iterable[Mapping[str, Any]], ) -> tuple[dict[str, Any], ...]
- _f1 · function · L261-L270 — def _f1(predicted: set[str], reference: set[str]) -> tuple[float, float, float]
- evaluate_mappings · function · L273-L358 — def evaluate_mappings( predictions: Sequence[Mapping[str, Any]], reference_rows: Iterable[Mapping[str, Any]], ) -> dict[str, Any]: # The non-empty invariant is enforced on the normalize side by every # validate_* helper; without it here the metric divisions below reduce # to a bare ZeroDivisionError instead of a protocol refusal.