biotite.database.rcsb.count

biotite.database.rcsb.count(query, return_type='entry')[source]

Count PDB entries that meet the given query requirements, via the RCSB search API.

This function requires an internet connection.

Parameters
queryQuery

The search query.

return_type{‘entry’, ‘assembly’, ‘polymer_entity’, ‘non_polymer_entity’, ‘polymer_instance’}, optional

The type of the counted identifiers:

  • 'entry': All macthing PDB entries are counted.

  • 'assembly': All matching assemblies are counted.

  • 'polymer_entity': All matching polymeric entities are counted.

  • 'non_polymer_entity': All matching non-polymeric entities are counted.

  • 'polymer_instance': All matching chains are counted.

Returns
idslist of str

A list of strings containing all PDB IDs that meet the query requirements.

Examples

>>> query = FieldQuery("reflns.d_resolution_high", less_or_equal=0.6)
>>> print(count(query))
9
>>> ids = search(query)
>>> print(sorted(ids))
['1EJG', '1I0T', '2GLT', '3NIR', '3P4J', '4JLJ', '5D8V', '5NW3', '7ATG']