Reference
Classes
Main classes provided by the package
- exceptions.ChemicalConversionError
-
Error during chemical format conversion.
- exceptions.ClassificationError
-
Error during chemical classification.
- exceptions.ConfigurationError
-
Error in configuration settings.
- exceptions.DataExportError
-
Error exporting data to a file.
- exceptions.DataLoadingError
-
Error loading data from a file or URL.
- exceptions.InChIError
-
Error parsing an InChI string.
- exceptions.InvalidInputError
-
Error for invalid user input.
- exceptions.MoleculeParsingError
-
Error parsing a molecule representation.
- exceptions.NetworkError
-
Error during network operations.
- exceptions.SMARTSError
-
Error parsing a SMARTS pattern.
- exceptions.SMILESError
-
Error parsing a SMILES string.
Exceptions
Exception classes
- SmartclassError
-
Base exception for all smartclass errors.
Functions
Utility functions
- bfs_search_classes_generator.tqdm_bfs_search_classes_generator()
-
BFS search with tqdm progress bar.
- calculate_mcs()
-
Calculate Maximum Common Substructure (MCS) for a list of molecules.
- check_missing_stereochemistry()
-
Check stereochemistry.
- check_smiles_contains_no_dot()
-
Checks if SMILES contains no dot.
- check_smiles_contains_no_isotope()
-
Checks if SMILES contains no isotope.
- check_smiles_isomeric()
-
Check isomeric smiles.
- combine_csv_files()
-
Combine multiple CSV files into a single CSV file.
- configure_logging()
-
Configure logging for the smartclass package.
- convert_chemical_formula()
-
Convert chemical formula.
- convert_classyfire_dict()
-
Converts the classyfire json into a CHEMONTID dictionary.
- convert_inchi_to_inchikey()
-
Convert a structure InChI to InChIKey.
- convert_inchi_to_mass()
-
Convert a structure InChI to mass.
- convert_inchi_to_mol()
-
Convert a structure InChI to MOL.
- convert_inchi_to_smiles()
-
Convert a structure InChI to SMILES.
- convert_list_of_dict()
-
Convert a list of dictionaries to a dictionary with possible inversion.
- convert_mol_to_cxsmiles()
-
Convert a structure MOL to CXSMILES.
- convert_mol_to_inchi()
-
Convert a structure MOL to InChI.
- convert_mol_to_inchikey()
-
Convert an RDKit Mol object to an InChIKey.
- convert_mol_to_smarts()
-
Convert a structure MOL to SMARTS.
- convert_mol_to_smiles()
-
Convert a structure MOL to SMILES.
- convert_molblock_to_mol()
-
Convert a structure MOLBlock to MOL.
- convert_smarts_to_mol()
-
Convert a structure SMARTS to MOL.
- convert_smiles_to_canonical_smiles()
-
Convert a structure SMILES to canonical SMILES.
- convert_smiles_to_formula()
-
Convert a structure SMILES to a molecular formula.
- convert_smiles_to_inchi()
-
Convert a structure SMILES to InChI.
- convert_smiles_to_mass()
-
Convert a structure SMILES to an exact mass.
- convert_smiles_to_mol()
-
Convert a SMILES string to an RDKit Mol object.
- download_file_if_not_exists()
-
Downloads a file from the specified URL if it does not exist.
- enumerate_structures()
-
Enumerate structural variants of a molecule.
- export_dict_to_json()
-
Export dict to json.
- export_results()
-
Export a list of dictionaries to a CSV or TSV file.
- fix_inchi_tautomerization()
-
Fix InChI tautomerization.
- get_config()
-
Get the global configuration instance.
- get_logger()
-
Get a logger for the given module name.
- get_num_atoms_bonds()
-
Get number of atoms and bonds.
- get_num_matched_atoms_bonds()
-
Get number of matched atoms and bonds.
- get_request()
-
Send a GET request to a SPARQL endpoint and retrieve JSON data.
- load_csv_from_path()
-
Load csv from path.
- load_external_classes_file()
-
Load a Polars DataFrame from an external tsv file with chemical classes.
- load_json_from_path()
-
Load json from path.
- load_json_from_url()
-
Load JSON from URL.
- load_json_from_url_or_path()
-
Load json from URL or path.
- load_pkg_bitter_smiles()
-
Load bitter SMILES data from the package file into a Polars DataFrame.
- load_pkg_chemical_hierarchy()
-
Load chemical class hierarchy from a TSV file.
- load_pkg_classes()
-
Load chemical classes data from the package file into a Polars DataFrame.
- load_pkg_data()
-
Load the package data.
- load_pkg_file()
-
Load data from a package-bundled file into a Polars DataFrame.
- load_pkg_mappings()
-
Load chemont__wd mappings data from the package file into a Polars DataFrame.
- load_pkg_mia()
-
Load Mono Indole Alkaloids (MIA) data from the package file into a Polars DataFrame.
- load_smiles()
-
Load unique SMILES strings from a CSV or TSV file.
- load_tsv_from_path()
-
Load tsv from path.
- read_query()
-
Read a SPARQL query from a file path or URL.
- resources.extract_chebi()
-
Extract CHEBI.
- resources.get_chebi()
-
Get CHEBI.
- sample_list()
-
Randomly sample items from a list.
- search_class.build_filter_catalog()
-
Build a FilterCatalog from SMARTS patterns.
- search_classes.tqdm_bfs_search_classes_generator()
-
BFS search with tqdm progress bar.
- split_csv()
-
Split a CSV file into multiple smaller CSV files.
- standardize()
-
Standardize.
Constants
Module-level constants and data
- bfs_search_classes_generator.ClassDict
- bfs_search_classes_generator.ClassHierarchy
- bfs_search_classes_generator.MatchResult
- bfs_search_classes_generator.c
- bfs_search_classes_generator.class_hierarchy
- bfs_search_classes_generator.classes
- bfs_search_classes_generator.logger
- bfs_search_classes_generator.params
- bfs_search_classes_generator.results_bfs
- bfs_search_classes_generator.structures
- search_class.logger
- search_classes.RESULT_FIELDS
- search_classes.logger
Other
Additional exports
- api
-
SMARTCLASS API TODO.
- chebi
-
Smartclass classifies structures using SMARTS.resources.chebi.
- chem
-
Smartclass classifies structures using SMARTS.chem.
- chembl
-
Smartclass classifies structures using SMARTS.resources.chembl.
- chemont
-
Smartclass classifies structures using SMARTS.resources.chemont.
- examples
-
Smartclass classifies structures using SMARTS.examples.
- get_class_structures
-
Build class_id to class_structure mapping from a classes list.
- io
-
Smartclass classifies structures using SMARTS.io.
- schema
-
Smartclass classifies structures using SMARTS.schema.
- testing
-
Smartclass classifies structures using SMARTS.testing.
- wikidata
-
Smartclass classifies structures using SMARTS.resources.wikidata.