Through the API you can perform a chemical search using the /entities/search endpoint:
/entities/search?page%5Boffset%5D=0&page%5Blimit%5D=20&source=SN
Set the parameters in the URL "page[offset]" and "page[limit]" to your preferred values.
Source specifies the source of the entities:
Source | Description |
SN | Signals Notebook |
CONNECTED | ELN Archive |
IVT | Inventory |
CHEMICALS | Chemical drawing entities |
For the purpose of chemical searching, SN and CHEMICALS sources are equivalent.
For all other optional parameters please consult the swagger page for this endpoint.
The chemsearch operator used for chemical searches supports several mime types:
Type | Description |
---|---|
chemical/x-daylight-smiles | Smiles Format |
chemical/x-mdl-molfile | MDL Molfile |
chemical/x-mdl-molfile-v3000 | MDL Molfile V3000 |
text/xml | ChemDraw XML |
chemical/x-cdx | ChemDraw eXchange file |
Request body for a Signals Notebook search:
/entities/search?page%5Boffset%5D=0&page%5Blimit%5D=20&source=SN
{ "query": { "$and": [ { "$and": [ { "$child": { "$chemsearch": { "mime": "chemical/x-daylight-smiles", "molecule": "CC1C(CCCCCCC)=CC=C1", "options": "full=no,similar=no" } } } ] }, { "$and": [ { "$match": { "field": "isTemplate", "value": false } }, { "$or": [ { "$match": { "field": "isMaterial", "value": false } }, { "$not": [ { "$exists": { "field": "isMaterial" } } ] } ] }, { "$not": [ { "$match": { "field": "_parent_type", "value": "chemicalCollection" } }, { "$in": { "field": "type", "values": [ "chemicalCollection", "order", "monomerLibrary", "monomer" ] } } ] } ] } ] } }
The above query excludes:
- Materials
- Templates
Request body for a Signals Notebook ELN Archive search:
/entities/search?page%5Boffset%5D=0&page%5Blimit%5D=20&source=CONNECTED
{ "query": { "$child": { "$chemsearch": { "mime": "chemical/x-daylight-smiles", "molecule": "[2H]C1=C([H])C(N=O)=CC=C1", "options": "full=no,similar=no" } } } }
Request body for searching Inventory :
/entities/search?page%5Boffset%5D=0&page%5Blimit%5D=20&source=IVT
{ "query": { "$child": { "$chemsearch": { "mime": "chemical/x-daylight-smiles", "molecule": "[2H]C1=C([H])C(N=O)=CC=C1", "options": "full=no,similar=no" } } } }
Request body to search a particular Materials Library
(replace the assetType eid with your own Materials Library eid):
/entities/search?page%5Boffset%5D=0&page%5Blimit%5D=20&source=SN
{ "query": { "$and": [ { "$match": { "field": "assetTypeEid", "mode": "keyword", "value": "assetType:5edb8269005c8e0006f048a1" } }, { "$chemsearch": { "mime": "chemical/x-daylight-smiles", "molecule": "[2H]C1=C([H])C(N=O)=CC=C1", "options": "full=yes" } }, { "$and": [ { "$match": { "field": "isMaterial", "value": true } } ] } ] } }
Comments
0 comments
Article is closed for comments.