Grouping
#
- class biotite.database.rcsb.Grouping(sort_by=None)[source]#
Bases:
object
A representation of the JSON grouping options of the RCSB search API.
- Parameters:
- sort_bystr or Sorting, optional
If specified, the returned PDB IDs within each group are sorted by the values of the given field name. A complete list of the available fields is documented at https://search.rcsb.org/structure-search-attributes.html. and https://search.rcsb.org/chemical-search-attributes.html. If a string is given, sorting is performed in descending order. To choose the order a
Sorting
object needs to be provided.
- abstract get_content()#
Get the grouping content, i.e. the data belonging to the
'group_by'
attribute in the RCSB search API.This content is converted into JSON by the
search()
andcount()
functions.ABSTRACT: Override when inheriting.
- Returns:
- contentdict
The content dictionary for the
'group_by'
attributes.
- abstract is_compatible_return_type(return_type)#
Check whether this
Group
is compatible with the RCSB search APIreturn_type
.ABSTRACT: Override when inheriting.
- Parameters:
- return_typestr
The
return_type
attribute to be checked.
- Returns:
- is_compatiblebool
True, if this
Group
is compatible with the return_type, false otherwise.