ncsw_data.storage.cacs.sqlite_db.utility

The ncsw_data.storage.cacs.sqlite_db.utility package initialization module.

Submodules

Attributes

CaCSSQLiteDatabaseArchiveCompoundTuple

CaCSSQLiteDatabaseArchiveCompoundFromSourceTuple

CaCSSQLiteDatabaseArchiveCompoundPatternTuple

CaCSSQLiteDatabaseArchiveCompoundPatternFromSourceTuple

CaCSSQLiteDatabaseArchiveReactionTuple

CaCSSQLiteDatabaseArchiveReactionFromSourceTuple

CaCSSQLiteDatabaseArchiveReactionPatternTuple

CaCSSQLiteDatabaseArchiveReactionPatternFromSourceTuple

CaCSSQLiteDatabaseWorkbenchCompoundTuple

CaCSSQLiteDatabaseWorkbenchCompoundFromSourceTuple

CaCSSQLiteDatabaseWorkbenchCompoundPatternTuple

CaCSSQLiteDatabaseWorkbenchCompoundPatternFromSourceTuple

CaCSSQLiteDatabaseWorkbenchReactionTuple

CaCSSQLiteDatabaseWorkbenchReactionFromSourceTuple

CaCSSQLiteDatabaseWorkbenchReactionPatternTuple

CaCSSQLiteDatabaseWorkbenchReactionPatternFromSourceTuple

Classes

CaCSSQLiteDatabaseInsertUtility

The computer-assisted chemical synthesis (CaCS) SQLite database insert utility class.

CaCSSQLiteDatabaseSelectUtility

The computer-assisted chemical synthesis (CaCS) SQLite database select utility class.

Package Contents

class ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseInsertUtility

The computer-assisted chemical synthesis (CaCS) SQLite database insert utility class.

static insert_and_select_archive_source(db_session: sqlalchemy.orm.Session, as_name: str, as_version: str, as_file_name: str, as_created_by: str) int

Insert and select an archive source from the database.

Parameters:
  • db_session – The session of the database.

  • as_name – The name of the archive source.

  • as_version – The version of the archive source.

  • as_file_name – The file name of the archive source.

  • as_created_by – The user of the database inserting the archive source.

Returns:

The ID of the archive source.

static _insert_and_select_archive_compounds(db_session: sqlalchemy.orm.Session, ac_smiles_strings: Iterable[str], acs_created_by: str) List[int]

Insert and select the archive chemical compounds from the database.

Parameters:
  • db_session – The session of the database.

  • ac_smiles_strings – The SMILES strings of the archive chemical compounds.

  • acs_created_by – The user of the database inserting the archive chemical compounds.

Returns:

The IDs of the archive chemical compounds.

static _insert_archive_compound_sources(db_session: sqlalchemy.orm.Session, ac_ids: Iterable[int], as_id: int) None

Insert the archive chemical compound sources into the database.

Parameters:
  • db_session – The session of the database.

  • ac_ids – The IDs of the archive chemical compounds.

  • as_id – The ID of the archive source.

static insert_archive_compounds(db_session: sqlalchemy.orm.Session, acs: Iterable[str], acs_created_by: str, as_id: int) None

Insert the archive chemical compounds into the database.

Parameters:
  • db_session – The session of the database.

  • acs – The archive chemical compounds: [ ac_smiles, … ].

  • acs_created_by – The user of the database inserting the archive chemical compounds.

  • as_id – The ID of the archive source.

static _insert_and_select_archive_reactions(db_session: sqlalchemy.orm.Session, ar_smiles_strings: Iterable[str], ars_created_by: str) List[int]

Insert and select the archive chemical reactions from the database.

Parameters:
  • db_session – The session of the database.

  • ar_smiles_strings – The SMILES strings of the archive chemical reactions.

  • ars_created_by – The user of the database inserting the archive chemical reactions.

Returns:

The IDs of the archive chemical reactions.

static _insert_archive_reaction_sources(db_session: sqlalchemy.orm.Session, ar_ids: Iterable[int], as_id: int) None

Insert the archive chemical reaction sources into the database.

Parameters:
  • db_session – The session of the database.

  • ar_ids – The IDs of the archive chemical reactions.

  • as_id – The ID of the archive source.

static insert_archive_reactions(db_session: sqlalchemy.orm.Session, ars: Iterable[str], ars_created_by: str, as_id: int) None

Insert the archive chemical reactions into the database.

Parameters:
  • db_session – The session of the database.

  • ars – The archive chemical reactions: [ ar_smiles, … ].

  • ars_created_by – The user of the database inserting the archive chemical reactions.

  • as_id – The ID of the archive source.

static _insert_and_select_archive_compound_patterns(db_session: sqlalchemy.orm.Session, acp_smarts_strings: Iterable[str], acps_created_by: str) List[int]

Insert and select the archive chemical compound patterns from the database.

Parameters:
  • db_session – The session of the database.

  • acp_smarts_strings – The SMARTS strings of the archive chemical compound patterns.

  • acps_created_by – The user of the database inserting the archive chemical compound patterns.

Returns:

The IDs of the archive chemical compound patterns.

static _insert_archive_compound_pattern_sources(db_session: sqlalchemy.orm.Session, acp_ids: Iterable[int], as_id: int) None

Insert the archive chemical compound pattern sources into the database.

Parameters:
  • db_session – The session of the database.

  • acp_ids – The IDs of the archive chemical compound patterns.

  • as_id – The ID of the archive source.

static insert_archive_compound_patterns(db_session: sqlalchemy.orm.Session, acps: Iterable[str], acps_created_by: str, as_id: int) None

Insert the archive chemical compound patterns into the database.

Parameters:
  • db_session – The session of the database.

  • acps – The archive chemical compound patterns: [ acp_smarts, … ].

  • acps_created_by – The user of the database inserting the archive chemical compound patterns.

  • as_id – The ID of the archive source.

static _insert_and_select_archive_reaction_patterns(db_session: sqlalchemy.orm.Session, arp_smarts_strings: Iterable[str], arps_created_by: str) List[int]

Insert and select the archive chemical reaction patterns from the database.

Parameters:
  • db_session – The session of the database.

  • arp_smarts_strings – The SMARTS strings of the archive chemical reaction patterns.

  • arps_created_by – The user of the database inserting the archive chemical reaction patterns.

Returns:

The IDs of the archive chemical reaction patterns.

static _insert_archive_reaction_pattern_sources(db_session: sqlalchemy.orm.Session, arp_ids: Iterable[int], as_id: int) None

Insert the archive chemical reaction pattern sources into the database.

Parameters:
  • db_session – The session of the database.

  • arp_ids – The IDs of the archive chemical reaction patterns.

  • as_id – The ID of the archive source.

static insert_archive_reaction_patterns(db_session: sqlalchemy.orm.Session, arps: Iterable[str], arps_created_by: str, as_id: int) None

Insert the archive chemical reaction patterns into the database.

Parameters:
  • db_session – The session of the database.

  • arps – The archive chemical reaction patterns: [ arp_smarts, … ].

  • arps_created_by – The user of the database inserting the archive chemical reaction patterns.

  • as_id – The ID of the archive source.

static _insert_and_select_workbench_compounds(db_session: sqlalchemy.orm.Session, wc_smiles_strings: Iterable[str], wcs_are_building_blocks: bool | None, wcs_created_by: str) Dict[str, int]

Insert and select the workbench chemical compounds from the database.

Parameters:
  • db_session – The session of the database.

  • wc_smiles_strings – The SMILES strings of the workbench chemical compounds.

  • wcs_are_building_blocks – The indicator of whether the workbench chemical compounds are building blocks.

  • wcs_created_by – The user of the database inserting the workbench chemical compounds.

Returns:

The SMILES string to ID dictionary of the workbench chemical compounds.

static _insert_workbench_compound_archives(db_session: sqlalchemy.orm.Session, ac_ids_and_wc_smiles_strings: Iterable[Tuple[int, str]], wcs_smiles_to_id: Dict[str, int]) None

Insert the workbench chemical compound archives into the database.

Parameters:
  • db_session – The session of the database.

  • ac_ids_and_wc_smiles_strings – The IDs of the archive chemical compounds and SMILES strings of the workbench chemical compounds.

  • wcs_smiles_to_id – The SMILES string to ID dictionary of the workbench chemical compounds.

static insert_workbench_compounds(db_session: sqlalchemy.orm.Session, wcs: Iterable[Tuple[int, str]], wcs_are_building_blocks: bool | None, wcs_created_by: str) None

Insert the workbench chemical compounds into the database.

Parameters:
  • db_session – The session of the database.

  • wcs – The workbench chemical compounds: [ ( ac_id, wc_smiles, ), … ].

  • wcs_are_building_blocks – The indicator of whether the workbench chemical compounds are building blocks.

  • wcs_created_by – The user of the database inserting the workbench chemical compounds.

static _insert_and_select_workbench_reactions(db_session: sqlalchemy.orm.Session, wr_smiles_strings: Iterable[str], wrs_created_by: str) Dict[str, int]

Insert and select the workbench chemical reactions from the database.

Parameters:
  • db_session – The session of the database.

  • wr_smiles_strings – The SMILES strings of the workbench chemical reactions.

  • wrs_created_by – The user of the database inserting the workbench chemical reactions.

Returns:

The workbench chemical reaction SMILES string to ID dictionary.

static _insert_workbench_reaction_archives(db_session: sqlalchemy.orm.Session, ar_ids_and_wr_smiles_strings: Iterable[Tuple[int, str]], wrs_smiles_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction archives into the database.

Parameters:
  • db_session – The session of the database.

  • ar_ids_and_wr_smiles_strings – The IDs of the archive chemical reactions and SMILES strings of the workbench chemical reactions.

  • wrs_smiles_to_id – The SMILES string to ID mapping of the workbench chemical reactions.

static _insert_workbench_reaction_reactant_compounds(db_session: sqlalchemy.orm.Session, wr_smiles_strings_and_wrrc_smiles_strings: Iterable[Tuple[str, str]], wrrcs_created_by: str, wrs_smiles_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction reactant compounds into the database.

Parameters:
  • db_session – The session of the database.

  • wr_smiles_strings_and_wrrc_smiles_strings – The SMILES strings of the workbench chemical reactions and SMILES strings of the workbench chemical reaction reactant compounds.

  • wrrcs_created_by – The user of the database inserting the workbench chemical reaction reactant compounds.

  • wrs_smiles_to_id – The SMILES string to ID mapping of the workbench chemical reactions.

static _insert_workbench_reaction_spectator_compounds(db_session: sqlalchemy.orm.Session, wr_smiles_strings_and_wrsc_smiles_strings: Iterable[Tuple[str, str]], wrscs_created_by: str, wrs_smiles_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction spectator compounds into the database.

Parameters:
  • db_session – The session of the database.

  • wr_smiles_strings_and_wrsc_smiles_strings – The SMILES strings of the workbench chemical reactions and SMILES strings of the workbench chemical reaction spectator compounds.

  • wrscs_created_by – The user of the database inserting the workbench chemical reaction spectator compounds.

  • wrs_smiles_to_id – The SMILES string to ID mapping of the workbench chemical reactions.

static _insert_workbench_reaction_product_compounds(db_session: sqlalchemy.orm.Session, wr_smiles_strings_and_wrpc_smiles_strings: Iterable[Tuple[str, str]], wrpcs_created_by: str, wrs_smiles_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction product compounds into the database.

Parameters:
  • db_session – The session of the database.

  • wr_smiles_strings_and_wrpc_smiles_strings – The SMILES strings of the workbench chemical reactions and SMILES strings of the workbench chemical reaction product compounds.

  • wrpcs_created_by – The user of the database inserting the workbench chemical reaction product compounds.

  • wrs_smiles_to_id – The SMILES string to ID mapping of the workbench chemical reactions.

static insert_workbench_reactions(db_session: sqlalchemy.orm.Session, wrs: Iterable[Tuple[int, str, Iterable[str], Iterable[str], Iterable[str]]], wrs_created_by: str) None

Insert the workbench chemical reactions into the database.

Parameters:
  • db_session – The session of the database.

  • wrs – The workbench chemical reactions: [ ( ar_id, wr_smiles, wrrc_smiles_strings, wrsc_smiles_strings, wrpc_smiles_strings, ), … ].

  • wrs_created_by – The user of the database inserting the workbench chemical reactions.

static _insert_and_select_workbench_compound_patterns(db_session: sqlalchemy.orm.Session, wcp_smarts_strings: Iterable[str], wcps_created_by: str) Dict[str, int]

Insert and select the workbench chemical compound patterns from the database.

Parameters:
  • db_session – The session of the database.

  • wcp_smarts_strings – The SMARTS strings of the workbench chemical compound patterns.

  • wcps_created_by – The user of the database inserting the workbench chemical compound patterns.

Returns:

The SMARTS string to ID dictionary of the workbench chemical compound patterns.

static _insert_workbench_compound_pattern_archives(db_session: sqlalchemy.orm.Session, acp_ids_and_wcp_smarts_strings: Iterable[Tuple[int, str]], wcps_smarts_to_id: Mapping[str, int]) None

Insert the workbench chemical compound pattern archives into the database.

Parameters:
  • db_session – The session of the database.

  • acp_ids_and_wcp_smarts_strings – The IDs of the archive chemical compound patterns and SMARTS strings of the workbench chemical compound patterns.

  • wcps_smarts_to_id – The SMARTS string to ID dictionary of the workbench chemical compound patterns.

static insert_workbench_compound_patterns(db_session: sqlalchemy.orm.Session, wcps: Iterable[Tuple[int, str]], wcps_created_by: str) None

Insert the workbench chemical compound patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wcps – The workbench chemical compound patterns: [ ( acp_id, wcp_smarts, ), … ].

  • wcps_created_by – The user of the database inserting the workbench chemical compound patterns.

static _insert_and_select_workbench_reaction_patterns(db_session: sqlalchemy.orm.Session, wrp_smarts_strings: Iterable[str], wrps_created_by: str) Dict[str, int]

Insert and select the workbench chemical reaction patterns from the database.

Parameters:
  • db_session – The session of the database.

  • wrp_smarts_strings – The SMARTS strings of the workbench chemical reaction patterns.

  • wrps_created_by – The user of the database inserting the workbench chemical reaction patterns.

Returns:

The SMARTS string to ID dictionary of the workbench chemical reaction patterns.

static _insert_workbench_reaction_pattern_archives(db_session: sqlalchemy.orm.Session, arp_ids_and_wrp_smarts_strings: Iterable[Tuple[int, str]], wrps_smarts_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction pattern archives into the database.

Parameters:
  • db_session – The session of the database.

  • arp_ids_and_wrp_smarts_strings – The IDs of the archive chemical reaction patterns and SMARTS strings of the workbench chemical reaction patterns.

  • wrps_smarts_to_id – The SMARTS string to ID dictionary of the workbench chemical reaction patterns.

static _insert_workbench_reaction_reactant_compound_patterns(db_session: sqlalchemy.orm.Session, wrp_smarts_strings_and_wrrcp_smarts_strings: Iterable[Tuple[str, str]], wrrcps_created_by: str, wrps_smarts_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction reactant compound patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wrp_smarts_strings_and_wrrcp_smarts_strings – The SMARTS strings of the workbench chemical reaction patterns and SMARTS strings of the workbench chemical reaction reactant compound patterns.

  • wrrcps_created_by – The user of the database inserting the workbench chemical reaction reactant compound patterns.

  • wrps_smarts_to_id – The SMARTS string to ID dictionary of the workbench chemical reaction patterns.

static _insert_workbench_reaction_spectator_compound_patterns(db_session: sqlalchemy.orm.Session, wrp_smarts_strings_and_wrscp_smarts_strings: Iterable[Tuple[str, str]], wrscps_created_by: str, wrps_smarts_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction spectator compound patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wrp_smarts_strings_and_wrscp_smarts_strings – The SMARTS strings of the workbench chemical reaction patterns and SMARTS strings of the workbench chemical reaction spectator compound patterns.

  • wrscps_created_by – The user of the database inserting the workbench chemical reaction spectator compound patterns.

  • wrps_smarts_to_id – The SMARTS string to ID dictionary of the workbench chemical reaction patterns.

static _insert_workbench_reaction_product_compound_patterns(db_session: sqlalchemy.orm.Session, wrp_smarts_strings_and_wrpcp_smarts_strings: Iterable[Tuple[str, str]], wrpcps_created_by: str, wrps_smarts_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction product compound patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wrp_smarts_strings_and_wrpcp_smarts_strings – The SMARTS strings of the workbench chemical reaction patterns and SMARTS strings of the workbench chemical reaction product compound patterns.

  • wrpcps_created_by – The user of the database inserting the workbench chemical reaction product compound patterns.

  • wrps_smarts_to_id – The SMARTS string to ID dictionary of the workbench chemical reaction patterns.

static insert_workbench_reaction_patterns(db_session: sqlalchemy.orm.Session, wrps: Iterable[Tuple[int, str, Iterable[str], Iterable[str], Iterable[str]]], wrps_created_by: str) None

Insert the workbench chemical reaction patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wrps – The workbench chemical reaction patterns: [ ( arp_id, wrp_smarts, wrrcp_smarts_strings, wrscp_smarts_strings, wrpcp_smarts_strings, ), … ].

  • wrps_created_by – The user of the database inserting the workbench chemical reaction patterns.

static _insert_workbench_reaction_transformation_patterns(db_session: sqlalchemy.orm.Session, wr_ids_and_wrp_smarts_strings: Iterable[Tuple[int, str]], wrps_smarts_to_id: Mapping[str, int]) None

Insert the workbench chemical reaction transformation patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wr_ids_and_wrp_smarts_strings – The IDs of the workbench chemical reactions and SMARTS strings of the workbench chemical reaction patterns.

  • wrps_smarts_to_id – The SMARTS string to ID dictionary of the workbench chemical reaction patterns.

static insert_workbench_reaction_transformation_patterns(db_session: sqlalchemy.orm.Session, wrtps: Iterable[Tuple[int, str, Iterable[str], Iterable[str], Iterable[str]]], wrtps_created_by: str) None

Insert the workbench chemical reaction transformation patterns into the database.

Parameters:
  • db_session – The session of the database.

  • wrtps – The workbench chemical reaction transformation patterns: [ ( wr_id, wrp_smarts, wrrcp_smarts_strings, wrscp_smarts_strings, wrpcp_smarts_strings, ), … ].

  • wrtps_created_by – The user of the database inserting the workbench chemical reaction transformation patterns.

class ncsw_data.storage.cacs.sqlite_db.utility.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.

ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveCompoundTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveCompoundFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveCompoundPatternTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveCompoundPatternFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveReactionTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveReactionFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveReactionPatternTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseArchiveReactionPatternFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchCompoundTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchCompoundFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchCompoundPatternTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchCompoundPatternFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchReactionTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchReactionFromSourceTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchReactionPatternTuple
ncsw_data.storage.cacs.sqlite_db.utility.CaCSSQLiteDatabaseWorkbenchReactionPatternFromSourceTuple