ncsw_data.storage.cacs.sqlite_db.utility.select¶
The ncsw_data.storage.cacs.sqlite_db.utility package select_ module.
Classes¶
The computer-assisted chemical synthesis (CaCS) SQLite database select utility class. |
Module Contents¶
- class ncsw_data.storage.cacs.sqlite_db.utility.select_.CaCSSQLiteDatabaseSelectUtility¶
The computer-assisted chemical synthesis (CaCS) SQLite database select utility class.
- static _add_archive_source_where_clause_to_select_statement(select_statement: sqlalchemy.sql.selectable.Select[Any], as_names_versions_and_file_names: Iterable[Tuple[str, str, str]]) sqlalchemy.sql.selectable.Select[Any]¶
Add the archive source where clause to a select statement of the database.
- Parameters:
select_statement – The select statement of the database.
as_names_versions_and_file_names – The names, versions, and file names of the archive sources.
- Returns:
The select statement of the database with the archive source where clause.
- static construct_archive_compound_select_statement() sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveCompoundTuple]¶
Construct the archive chemical compound select statement of the database.
- Returns:
The archive chemical compound select statement of the database.
- static construct_archive_compound_from_source_select_statement(as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveCompoundFromSourceTuple]¶
Construct the archive chemical compound from source select statement of the database.
- Parameters:
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the archive chemical compounds should be retrieved.
- Returns:
The archive chemical compound from source select statement of the database.
- static construct_archive_reaction_select_statement() sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveReactionTuple]¶
Construct the archive chemical reaction select statement of the database.
- Returns:
The archive chemical reaction select statement of the database.
- static construct_archive_reaction_from_source_select_statement(as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveReactionFromSourceTuple]¶
Construct the archive chemical reaction from source select statement of the database.
- Parameters:
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the archive chemical reactions should be retrieved.
- Returns:
The archive chemical reaction from source select statement of the database.
- static construct_archive_compound_pattern_select_statement() sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveCompoundPatternTuple]¶
Construct the archive chemical compound pattern select statement of the database.
- Returns:
The archive chemical compound pattern select statement of the database.
- static construct_archive_compound_pattern_from_source_select_statement(as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveCompoundPatternFromSourceTuple]¶
Construct the archive chemical compound pattern from source select statement of the database.
- Parameters:
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the archive chemical compound patterns should be retrieved.
- Returns:
The archive chemical compound pattern from source select statement of the database.
- static construct_archive_reaction_pattern_select_statement() sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveReactionPatternTuple]¶
Construct the archive chemical reaction pattern select statement of the database.
- Returns:
The archive chemical reaction pattern select statement of the database.
- static construct_archive_reaction_pattern_from_source_select_statement(as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseArchiveReactionPatternFromSourceTuple]¶
Construct the archive chemical reaction pattern from source select statement of the database.
- Parameters:
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the archive chemical reaction patterns should be retrieved.
- Returns:
The archive chemical reaction pattern from source select statement of the database.
- static construct_workbench_compound_select_statement(wcs_are_building_blocks: bool | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchCompoundTuple]¶
Construct the workbench chemical compound select statement of the database.
- Parameters:
wcs_are_building_blocks – The indicator of whether the workbench chemical compounds are building blocks.
- Returns:
The workbench chemical compound select statement of the database.
- static construct_workbench_compound_from_source_select_statement(wcs_are_building_blocks: bool | None, as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchCompoundFromSourceTuple]¶
Construct the workbench chemical compound from source select statement of the database.
- Parameters:
wcs_are_building_blocks – The indicator of whether the workbench chemical compounds are building blocks.
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the workbench chemical compounds should be retrieved.
- Returns:
The workbench chemical compound from source select statement of the database.
- static construct_workbench_reaction_select_statement(wrrc_smiles_strings: Iterable[str] | None, wrsc_smiles_strings: Iterable[str] | None, wrpc_smiles_strings: Iterable[str] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchReactionTuple]¶
Construct the workbench chemical reaction select statement of the database.
- Parameters:
wrrc_smiles_strings – The SMILES strings of the workbench chemical reaction reactant compounds.
wrsc_smiles_strings – The SMILES strings of the workbench chemical reaction spectator compounds.
wrpc_smiles_strings – The SMILES strings of the workbench chemical reaction product compounds.
- Returns:
The workbench chemical reaction select statement of the database.
- static construct_workbench_reaction_from_source_select_statement(wrrc_smiles_strings: Iterable[str] | None, wrsc_smiles_strings: Iterable[str] | None, wrpc_smiles_strings: Iterable[str] | None, as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchReactionFromSourceTuple]¶
Construct the workbench chemical reaction from source select statement of the database.
- Parameters:
wrrc_smiles_strings – The SMILES strings of the workbench chemical reaction reactant compounds.
wrsc_smiles_strings – The SMILES strings of the workbench chemical reaction spectator compounds.
wrpc_smiles_strings – The SMILES strings of the workbench chemical reaction product compounds.
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the workbench chemical reactions should be retrieved.
- Returns:
The workbench chemical reaction from source select statement of the database.
- static construct_workbench_compound_pattern_select_statement() sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchCompoundPatternTuple]¶
Construct the workbench chemical compound pattern select statement of the database.
- Returns:
The workbench chemical compound pattern select statement of the database.
- static construct_workbench_compound_pattern_from_source_select_statement(as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchCompoundPatternFromSourceTuple]¶
Construct the workbench chemical compound pattern from source select statement of the database.
- Parameters:
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the workbench chemical compound patterns should be retrieved.
- Returns:
The workbench chemical compound pattern from source select statement of the database.
- static construct_workbench_reaction_pattern_select_statement(wrrcp_smarts_strings: Iterable[str] | None, wrscp_smarts_strings: Iterable[str] | None, wrpcp_smarts_strings: Iterable[str] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchReactionPatternTuple]¶
Construct the workbench chemical reaction pattern select statement of the database.
- Parameters:
wrrcp_smarts_strings – The SMARTS strings of the workbench chemical reaction reactant compound patterns.
wrscp_smarts_strings – The SMARTS strings of the workbench chemical reaction spectator compound patterns.
wrpcp_smarts_strings – The SMARTS strings of the workbench chemical reaction product compound patterns.
- Returns:
The workbench chemical reaction pattern select statement of the database.
- static construct_workbench_reaction_pattern_from_source_select_statement(wrrcp_smarts_strings: Iterable[str] | None, wrscp_smarts_strings: Iterable[str] | None, wrpcp_smarts_strings: Iterable[str] | None, as_names_versions_and_file_names: Iterable[Tuple[str, str, str]] | None) sqlalchemy.sql.selectable.Select[ncsw_data.storage.cacs.sqlite_db.utility.typing.CaCSSQLiteDatabaseWorkbenchReactionPatternFromSourceTuple]¶
Construct the workbench chemical reaction pattern from source select statement of the database.
- Parameters:
wrrcp_smarts_strings – The SMARTS strings of the workbench chemical reaction reactant compound patterns.
wrscp_smarts_strings – The SMARTS strings of the workbench chemical reaction spectator compound patterns.
wrpcp_smarts_strings – The SMARTS strings of the workbench chemical reaction product compound patterns.
as_names_versions_and_file_names – The names, versions, and file names of the archive sources from which the workbench chemical reaction patterns should be retrieved.
- Returns:
The workbench chemical reaction pattern from source select statement of the database.
- static construct_reversed_synthesis_route_select_statement(wc_smiles: str, reversed_sr_maximum_depth: int) sqlalchemy.sql.selectable.Select[Tuple[int, int, str, bool, bool, int | None, int | None, str | None]]¶
Construct the reversed chemical synthesis route select statement of the database.
- Parameters:
wc_smiles – The SMILES string of the workbench chemical compound.
reversed_sr_maximum_depth – The maximum depth of the reversed chemical synthesis routes.
- Returns:
The reversed chemical synthesis route select statement of the database.