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