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.

__enter__()
__exit__(*args)
__class__

alias of builtins.type

__delattr__

Implement delattr(self, name).

__dict__ = mappingproxy({'__module__': 'schrodinger.application.phase.packages.mmp2d', '__doc__': '\n Context manager for a 2D MMP SQLite database connection.\n ', '__init__': <function MMPDatabaseConnection.__init__>, '__enter__': <function MMPDatabaseConnection.__enter__>, '__exit__': <function MMPDatabaseConnection.__exit__>, '__dict__': <attribute '__dict__' of 'MMPDatabaseConnection' objects>, '__weakref__': <attribute '__weakref__' of 'MMPDatabaseConnection' objects>})
__dir__() → list

default dir() implementation

__eq__

Return self==value.

__format__()

default object formatter

__ge__

Return self>=value.

__getattribute__

Return getattr(self, name).

__gt__

Return self>value.

__hash__

Return hash(self).

__init_subclass__()

This method is called when a class is subclassed.

The default implementation does nothing. It may be overridden to extend subclasses.

__le__

Return self<=value.

__lt__

Return self<value.

__module__ = 'schrodinger.application.phase.packages.mmp2d'
__ne__

Return self!=value.

__new__()

Create and return a new object. See help(type) for accurate signature.

__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__

Return repr(self).

__setattr__

Implement setattr(self, name, value).

__sizeof__() → int

size of object in memory, in bytes

__str__

Return str(self).

__subclasshook__()

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object (if defined)

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