IO#
Input/output helpers and format conversion utilities.
Core conversion#
- synkit.IO.conversion.ef_smirks_to_epd(ef_smirks: str, orbital_class: str | None = None, strict_bond_lookup: bool = True) dict[str, Any][source]#
- synkit.IO.chem_converter.gml_to_smart(gml: str, sanitize: bool = True, explicit_hydrogen: bool = False, useSmiles: bool = True) str[source]#
- synkit.IO.chem_converter.graph_to_rsmi(r: Graph, p: Graph, its: Graph | None = None, sanitize: bool = True, explicit_hydrogen: bool = False) str | None[source]#
- synkit.IO.chem_converter.graph_to_smi(graph: Graph, sanitize: bool = True, preserve_atom_maps: Sequence[int] | None = None) str | None[source]#
- synkit.IO.chem_converter.its_to_gml(its: Graph, core: bool = True, rule_name: str = 'rule', reindex: bool = True, explicit_hydrogen: bool = False, format: Literal['typesGH', 'tuple'] = 'typesGH') str[source]#
- synkit.IO.chem_converter.its_to_rsmi(its: Graph, sanitize: bool = True, explicit_hydrogen: bool = False, clean_wildcards: bool = False, format: Literal['typesGH', 'tuple'] = 'typesGH') str[source]#
- synkit.IO.chem_converter.rsmi_to_graph(rsmi: str, drop_non_aam: bool = True, sanitize: bool = True, use_index_as_atom_map: bool = True, node_attrs: Sequence[str] | None = None, edge_attrs: Sequence[str] | None = None) tuple[Graph | None, Graph | None][source]#
- synkit.IO.chem_converter.rsmi_to_its(rsmi: str, drop_non_aam: bool = True, sanitize: bool = True, use_index_as_atom_map: bool = True, core: bool = False, node_attrs: Sequence[str] | None = None, edge_attrs: Sequence[str] | None = None, explicit_hydrogen: bool = False, format: Literal['typesGH', 'tuple'] = 'typesGH') Graph[source]#
- synkit.IO.chem_converter.smart_to_gml(smart: str, core: bool = True, sanitize: bool = True, rule_name: str = 'rule', reindex: bool = False, explicit_hydrogen: bool = False, useSmiles: bool = True) str[source]#
- synkit.IO.chem_converter.smiles_to_graph(smiles: str, drop_non_aam: bool = False, sanitize: bool = True, use_index_as_atom_map: bool = False, node_attrs: Sequence[str] | None = None, edge_attrs: Sequence[str] | None = None) Graph | None[source]#
- class synkit.IO.mol_to_graph.MolToGraph(node_attrs: List[str] | None = None, edge_attrs: List[str] | None = None, *, attr_profile: str = 'minimal', with_topology: bool = False)[source]#
Bases:
object- PAULING_EN: Dict[str, float] = {'B': 2.04, 'Br': 2.96, 'C': 2.55, 'Cl': 3.16, 'F': 3.98, 'H': 2.2, 'I': 2.66, 'N': 3.04, 'O': 3.44, 'P': 2.19, 'S': 2.58, 'Se': 2.55}#
- SUPPORTED_PROFILES = ('minimal', 'full')#
- classmethod estimate_oxidation_states(mol: Mol, *, kek_mol: Mol | None = None, prefer_kekule: bool = True, en_tie_threshold: float = 0.05) Dict[int, float][source]#
- classmethod mol_to_graph(mol: Mol, drop_non_aam: bool = False, light_weight: bool = False, use_index_as_atom_map: bool = False) Graph[source]#
- classmethod oxidation_states_by_atom_map(mol: Mol, *, kek_mol: Mol | None = None, prefer_kekule: bool = True, en_tie_threshold: float = 0.05) Dict[int, Dict[str, Any]][source]#
- classmethod reaction_oxidation_state_delta_from_rsmi(rsmi: str, *, threshold: float = 0.5, prefer_kekule: bool = True, en_tie_threshold: float = 0.05) Dict[int, Dict[str, Any]][source]#
- transform_store(mol: Mol, drop_non_aam: bool = False, use_index_as_atom_map: bool = False) MolToGraph[source]#
- class synkit.IO.graph_to_mol.GraphToMol(node_attributes: Dict[str, str] = {'atom_map': 'atom_map', 'charge': 'charge', 'element': 'element'}, edge_attributes: Dict[str, str] = {'order': 'order'})[source]#
Bases:
object
Data and debug#
- synkit.IO.data_io.collect_data(num_batches: int, temp_dir: str, file_template: str) List[Any][source]#
- synkit.IO.data_io.save_database(database: List[Dict], pathname: str = './Data/database.json') None[source]#