Logo

A comprehensive library for computational molecular biology

Navigation

  • Installation
  • Tutorial
  • API Reference
  • Examples
  • Extensions
  • Contributing
  • Biotite logo

Quick search


GitHub PyPI Twitter

biotite.database.pubchem.search¶

biotite.database.pubchem.search(query, throttle_threshold=0.5, return_throttle_status=False)[source]¶

Get all CIDs that meet the given query requirements, via the PubChem REST API.

This function requires an internet connection.

Parameters:
queryQuery

The search query.

throttle_thresholdfloat or None, optional

A value between 0 and 1. If the load of either the request time or count exceeds this value the execution is halted. See ThrottleStatus for more information. If None is given, the execution is never halted.

return_throttle_statusfloat, optional

If set to true, the ThrottleStatus is also returned.

Returns:
idslist of int

List of all compound IDs (CIDs) that meet the query requirement.

throttle_statusThrottleStatus

The ThrottleStatus obtained from the server response. This can be used for custom request throttling, for example. Only returned, if return_throttle_status is set to true.

Examples

>>> print(search(NameQuery("Alanine")))
[5950, 449619, 7311724, 155817681]

Gallery¶

Enumeration of alkane isomers

Enumeration of alkane isomers

Enumeration of alkane isomers
©2017-2020, the Biotite contributors. | Powered by Sphinx 5.0.2 & Alabaster 0.7.12 | Page source
Fork me on GitHub