syndirella.fairy
syndirella.fairy.py
This module provides functions to find similar cheaper reactants, filter out reactants based on simple filters, fingerprint generation, and others…
Attributes
Functions
|
|
|
|
|
Check if the reaction names need an alternative route. |
|
Find additional similar reactants that are cheaper as defined in the reactant_filters. |
|
Make similar reactant to query reactant from the reactant_filters. |
|
Create a similar reactant by modifying the original reactant according to matched_details. |
|
Filter out reactants and return a dictionary with SMILES strings as keys and their associated scores as values. |
|
Filter out molecules based on repeats, and non-abundant isotopes. |
|
Remove molecules with only hydrogen ions. |
|
Remove repeated molecules by checking for Tanimoto similarity of 1. |
Remove molecules with non-abundant isotopes. |
|
|
Remove chirality from all molecules in the list. |
|
Remove chirality from a single molecule. |
|
Print the difference between the original number of molecules and the number of valid molecules. |
|
|
|
Find a reaction by name in the additional_rxn_options. |
Get the fingerprint of a molecule. |
|
|
This function is used to generate a unique id for the route just using the scaffold. |
|
Check if the molecule can be sanitized. |
Module Contents
- syndirella.fairy.do_i_need_alternative_route(reaction_names: List[str], additional_rxn_options: List[Dict[str, str]]) bool[source]
Check if the reaction names need an alternative route.
- syndirella.fairy.find_similar_reactants(reactant: syndirella.error.Chem.Mol, reaction_name: str, reactant_filters: Dict[str, Dict[str, Any]]) List[str] | None[source]
Find additional similar reactants that are cheaper as defined in the reactant_filters.
- syndirella.fairy.get_similar_reactant(reactant: syndirella.error.Chem.Mol, reactant_filters: Dict[str, str]) str | None[source]
Make similar reactant to query reactant from the reactant_filters.
- syndirella.fairy.make_similar_reactant(reactant: syndirella.error.Chem.Mol, to_replace: str, matched_details: Dict[str, Any]) str[source]
Create a similar reactant by modifying the original reactant according to matched_details.
- syndirella.fairy.filter_molecules(hits: List[Tuple[str, float]]) List[str][source]
Filter out reactants and return a dictionary with SMILES strings as keys and their associated scores as values.
- syndirella.fairy.simple_filters(mols: List[syndirella.error.Chem.Mol]) List[syndirella.error.Chem.Mol][source]
Filter out molecules based on repeats, and non-abundant isotopes.
- syndirella.fairy.remove_hydrogen_ions(mols: List[syndirella.error.Chem.Mol]) List[syndirella.error.Chem.Mol][source]
Remove molecules with only hydrogen ions.
- syndirella.fairy.remove_repeat_mols(mols: List[syndirella.error.Chem.Mol]) List[syndirella.error.Chem.Mol][source]
Remove repeated molecules by checking for Tanimoto similarity of 1.
- syndirella.fairy.remove_non_abundant_isotopes(mols: List[syndirella.error.Chem.Mol]) List[syndirella.error.Chem.Mol][source]
Remove molecules with non-abundant isotopes.
- syndirella.fairy.remove_chirality(mols: List[syndirella.error.Chem.Mol]) List[syndirella.error.Chem.Mol][source]
Remove chirality from all molecules in the list.
- syndirella.fairy.remove_chirality_from_mol(mol: syndirella.error.Chem.Mol) syndirella.error.Chem.Mol[source]
Remove chirality from a single molecule.
- syndirella.fairy.print_diff(hits: List[Tuple[str, float]], valid_mols: List[syndirella.error.Chem.Mol], desc: str) None[source]
Print the difference between the original number of molecules and the number of valid molecules.
- syndirella.fairy.calculate_tanimoto(mol1: syndirella.error.Chem.Mol, mol2: syndirella.error.Chem.Mol) float[source]
- syndirella.fairy.find_reaction_by_name(reaction_name: str, additional_rxn_options: List[Dict[str, str]]) Dict[str, Any] | None[source]
Find a reaction by name in the additional_rxn_options.
- syndirella.fairy.get_morgan_fingerprint(mol: syndirella.error.Chem.Mol) rdkit.Chem.rdFingerprintGenerator.MorganFP[source]
Get the fingerprint of a molecule.
- syndirella.fairy.generate_inchi_ID(smiles: str | None = None, mol: syndirella.error.Chem.Mol | None = None, isomeric: bool = False) str | syndirella.error.MolError[source]
This function is used to generate a unique id for the route just using the scaffold.