schrodinger.application.phase.packages.mmp2d module

This module provides functions that perform various types of queries on a matched molecular pairs 2D database.

class schrodinger.application.phase.packages.mmp2d.MMPDatabaseConnection(db_path)

Bases: object

Context manager for a 2D MMP SQLite database connection.

__init__(db_path)

Initialize self. See help(type(self)) for accurate signature.

schrodinger.application.phase.packages.mmp2d.get_activity_cliffs(mmp2d_db_path, property_name, property_diff)

Given an MMP 2D SQLite database, this function returns all pairs of compound ids from the pair table for which the absolute difference in the indicated property is greater than or equal to property_diff.

Parameters:mmp2d_db_path (str) – Path to MMP 2D database
Property_name:Name of the property for activity cliffs
Property_diff:Threshold on absolute property difference
Returns:Pairs of compound ids that exhibit an activity cliff
Return type:list[(int, int)]
schrodinger.application.phase.packages.mmp2d.get_compound_smiles(mmp2d_db_path)

Returns the compound id –> SMILES dictionary created from the compound table of the supplied MMP 2D SQLite database.

Parameters:mmp2d_db_path (str) – Path to MMP 2D database
Returns:compound id –> SMILES dictionary
Return type:dict{int: str}
schrodinger.application.phase.packages.mmp2d.get_ids_from_pairs(compound_pairs)

Returns all unique compound ids in the provided pairs of compound ids.

Parameters:compound_pairs (list[(int, int)]) – Pairs of compound ids
Returns:Unique compound ids in increasing order
Return type:list[int]
schrodinger.application.phase.packages.mmp2d.get_property_names(mmp2d_db_path)

Returns the property name –> property id dictionary created from the property_name table of the supplied MMP 2D SQLite database.

Parameters:mmp2d_db_path (str) – Path to MMP 2D database
Returns:property name –> property id dictionary
Return type:dict{str: int}
schrodinger.application.phase.packages.mmp2d.get_property_values(mmp2d_db_path, prop_name)

Returns the compound id –> property value dictionary created from the compound_property table of the supplied MMP 2D SQLite database.

Parameters:
  • mmp2d_db_path (str) – Path to MMP 2D database
  • property_name (str) – Property name whose values are desired
Returns:

compound id –> property value dictionary

Return type:

dict{int: float}

schrodinger.application.phase.packages.mmp2d.get_public_ids(mmp2d_db_path)

Returns the compound id –> public id dictionary created from the compound table of the supplied MMP 2D SQLite database.

Parameters:mmp2d_db_path (str) – Path to MMP 2D database
Returns:property id –> public id dictionary
Return type:dict{int: str}
schrodinger.application.phase.packages.mmp2d.select_dictionary(mmp2d_db_path, select_stmt)

Executes a select statement on the supplied MMP 2D SQLite database and returns the results as a dictionary.

Parameters:
  • mmp2d_db_path (str) – Path to MMP 2D database
  • select_stmt (str) – SELECT statement containing two fields
Returns:

field1 –> field2 dictionary

Return type:

dict{type(field1): type(field2)}

schrodinger.application.phase.packages.mmp2d.table_exists(mmp2d_db_path, table_name)

Returns true if the specified table exists in the supplied MMP 2D SQLite database.

Parameters:
  • mmp2d_db_path (str) – Path to MMP 2D database
  • table_name (str) – Table whose existence is sought
Returns:

Whether the table exists

Return type:

bool