schrodinger.application.fpsim module

This module provides an API for performing GPU-based fingerprint similarity queries against compound databases on FPsim servers. Two variants of the API are provided: a query function and the FPsimSearcher class.

The module-level query function can be used to query either all or a specific subset of the public databses available on a single FPsim server.

The FPsimSearcher class allows multiple servers to be specified, each with either all public databases or a specific subset. The entire collection of databases may then be queried in a single call.

The server url should be the base url without the endpoint extension (e.g. http://fpsim.foo.com/, not http://fpsim.foo.com/similarity_search)

schrodinger.application.fpsim.query(smiles, url=<object object>, max_results=100, similarity_cutoff=0, dbnames=<object object>)

Perform an FPSim query for a given smiles on a specific server.

Parameters:
  • smiles – the query smiles to search against
  • url – the base FPsim server URL
  • max_results – max number of matches to return
  • similarity_cutoff – minimum similarity cutoff for matches
  • dbnames – names of databases to search. Default: all public databases
Returns:

a pandas.DataFrame of similar smiles with corresponding corporate ids and similarity scores.

schrodinger.application.fpsim.get_public_databases

Retrieves a list of database names for the public databases on an FPsim server.

Parameters:url – the base FPsim server url. By default this will be the Schrodinger FPsim server.
Returns:a list of database names, which may be used as the dbnames parameter to a query.
class schrodinger.application.fpsim.FPsimSearcher(url=<object object>, dbnames=<object object>)

Bases: object

A search context for FPsim queries. Specify a collection of data sources on the object to perform multiple queries on the same servers and databases.

__init__(url=<object object>, dbnames=<object object>)

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

addSource(url=<object object>, dbnames=<object object>)

Add databases to the searcher specified by URL and database name(s).

Parameters:
  • url – the base FPsim server url. By default this will be the Schrodinger FPsim server.
  • dbnames – the database name to add for the specified server. This may be a single name or a list of names.
getSources()

Gets all the sources that have been added to this searcher. :return: a dictionary of {url:dbnames}.

query(smiles, max_results=100, similarity_cutoff=0)

Perform a query on all the sources in this searcher. Each server will be queried in the order it was added via addSource until max_results results have been found. The results from each server are simply concatenated, with no de-duplication of results.

See module function query() for parameter docs.

exception schrodinger.application.fpsim.ServerError

Bases: RuntimeError

__init__

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

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception schrodinger.application.fpsim.QueryError

Bases: RuntimeError

__init__

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

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception schrodinger.application.fpsim.SearchError

Bases: RuntimeError

__init__

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

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.