BenzDB proposes two kinds of requests: the unfiltered requests and the filtered ones. Unfiltered requests consider all the benzenoids in the database while filtered ones allow dealing with a selection of benzenoids.
Unfiltered requests can be performed by sending a GET request to BenzDB (which can be done via a web browser) using one of the following URLs, depending on the desired query:
Filtered requests are more refined since they consider only a part of the benzenoids of the database. To specify the desired benzenoids, several criteria can be provided using the JSON format.
The available criteria with their possible operators and the type of values are listed in the table below.
Each desired criterion is given under the form "key": "OP value"
(for OP in {<=, <, =, >, >=, <>}) or "key": "IN value1 value2"
.
Operator | ||||||||
---|---|---|---|---|---|---|---|---|
Type | Keys | <= | < | = | > | >= | <> | IN |
integer | duo | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
idBenzenoid | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
kekule | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
nbCarbons | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
nbHexagons | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
nbHydrogens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
quartet | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
solo | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
trio | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
float | frequency | ✓ | ✓ | ✓ | ✓ | ✓ | ||
intensity | ✓ | ✓ | ✓ | ✓ | ✓ | |||
irregularity | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |
string | inchi | ✓ | ||||||
label | ✓ | |||||||
symmetry | ✓ | ✓ | ||||||
Boolean | catacondensed | ✓ | ||||||
coronenoid | ✓ | |||||||
coronoid | ✓ |
For instance, the criteria {"nbHexagons": "= 6", "nbCarbons": "IN 22 28"}
aim to target the benzenoids having 6 hexagons and between 22 and 28 carbon atoms.
Then, the request with its criteria must be sent via a POST request to BenzDB. This cannot be performed directly using a web browser. However, several tools can be used like ReqBin or the linux command curl.
Here are the possible URLs, depending on the desired query:
For instance, the criteria {"nbHexagons": "= 6", "nbCarbons": "IN 22 28"}
can be send to the query benzenoids thanks to the curl command:
curl -H "Content-Type: application/json" --data '{"nbHexagons": "= 6", "nbCarbons": "IN 22 28"}' -X POST https://benzenoids.lis-lab.fr/find_benzenoids
or by using a tool like ReqBin:
The result of this query can be found here.
All the unfiltered or filtered requests can be derived to obtain the number of benzenoids involved in the result of the requests. For unfiltered requests (respectively filtered ones), the GET requests (resp. POST ones) should be sent to the URL where get (resp. find) should be replaced by count. For instance, the URL https://benzenoids.lis-lab.fr/count_all_benzenoids allows obtaining the number of benzenoids in the database.