User Tools

Site Tools


ultimate-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
ultimate-api [2020/07/20 14:59] – [Quote API] flackultimate-api [2021/05/25 14:21] flack
Line 225: Line 225:
 </code> </code>
  
-In case of similarity searches the **tan** value contains the similarity value.+In case of similarity searches the **tan** value the response contains the similarity value. 
 + 
 +In case of similarity searches you can control the minimum similarity with the **sim_threshold** param. Its default  value is 0.7. Its minimum value is also 0.7 unless you are allowed to use a lower value. For example: 
 +<code> 
 +
 +    "query":
 +        "type": "sim", 
 +        "query": "C(N1C(C(OC2CCCN(C3=CC=CC=C3)C2)=O)CN(C)C1=O)(=O)C(=C)CN1CCOCC1", 
 +        "limit": 5, 
 +        "sim_threshold": 0.8 
 +    } 
 +
 +</code>
  
  
Line 304: Line 316:
     "count": 5     "count": 5
 } }
 +</code>
 +
 +
 +====== Compounds API ======
 +
 +===== Compound details =====
 +
 +For example for the compound identified by the InChIKey **PKGBDLPHSYFAFJ-UHFFFAOYSA-N** you can get the detail response the following way:
 +
 +== Example API request: ==
 +<code>http https://ultimateapp.mcule.com/api/v1/compounds/PKGBDLPHSYFAFJ-UHFFFAOYSA-N/ --print HBhb</code>
 +
 +== Request: ==
 +<code>
 +GET /api/v1/compounds/PKGBDLPHSYFAFJ-UHFFFAOYSA-N/ HTTP/1.1                                                                                                          
 +</code>
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK                                                                                                                                                      Content-Type: application/json                                                                                                                                       
 +
 +{
 +    "archived_at": null,
 +    "inchi_key": "PKGBDLPHSYFAFJ-UHFFFAOYSA-N",
 +    "mol": "\n  -INDIGO-05252114022D\n\n 31 35  0  0  0  0  0  0  0  0999 V2000\n   -4.4450   -1.7960    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -4.2778   -0.2047    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -5.5722    0.7357    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n   -7.0339    0.0849    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -7.2011   -1.5063    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -8.6628   -2.1571    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -9.9572   -1.2166    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -9.7900    0.3746    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -8.3283    1.0254    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -11.4189   -1.8674    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n  -12.7133   -0.9270    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -14.1750   -1.5777    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -14.3423   -3.1690    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -15.8039   -3.8198    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -17.0983   -2.8793    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -16.9311   -1.2881    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  -15.4694   -0.6373    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -2.8161    0.4460    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n   -2.6489    2.0373    0.0000 O    0  0  0  0  0  0  0  0  0  0  0\n   -1.5217   -0.4944    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n   -1.5217   -2.0944    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.0000   -2.5889    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.9405   -1.2944    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    0.0000    0.0000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    0.9405    1.2944    0.0000 N    0  0  0  0  0  0  0  0  0  0  0\n    2.4621    0.8000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.8478    1.6000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.2334    0.8000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    5.2334   -0.8000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    3.8478   -1.6000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n    2.4621   -0.8000    0.0000 C    0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  2  0  0  0  0\n  8  9  1  0  0  0  0\n  9  4  2  0  0  0  0\n  7 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  1  0  0  0  0\n 12 13  1  0  0  0  0\n 13 14  2  0  0  0  0\n 14 15  1  0  0  0  0\n 15 16  2  0  0  0  0\n 16 17  1  0  0  0  0\n 17 12  2  0  0  0  0\n  2 18  1  0  0  0  0\n 18 19  2  0  0  0  0\n 18 20  1  0  0  0  0\n 20 21  1  0  0  0  0\n 21 22  1  0  0  0  0\n 22 23  1  0  0  0  0\n 23 24  1  0  0  0  0\n 24 20  1  0  0  0  0\n 24 25  2  0  0  0  0\n 25 26  1  0  0  0  0\n 26 27  1  0  0  0  0\n 27 28  2  0  0  0  0\n 28 29  1  0  0  0  0\n 29 30  2  0  0  0  0\n 30 31  1  0  0  0  0\n 31 23  1  0  0  0  0\n 31 26  2  0  0  0  0\nM  END\n",
 +    "properties": {
 +        "OandN_atom_count": 6,
 +        "acidic_and_basic_group_count": 0,
 +        "acidic_group_count": 0,
 +        "aliphatic_rings": 1,
 +        "aromatic_rings": 4,
 +        "basic_group_count": 0,
 +        "c_atom_count": 25,
 +        "chiral_centers": 1,
 +        "cis/trans_stereo_double_bonds": 0,
 +        "formula": "C25H23N3O3",
 +        "fsp3": 0.2,
 +        "h_atom_count": 23,
 +        "h_bond_acceptors": 6,
 +        "h_bond_donors": 0,
 +        "halogen_atom_count": 0,
 +        "heavy_atom_count": 31,
 +        "hetero_atom_count": 6,
 +        "heteroatom_ratio": 0.24,
 +        "logp": 4.494400000000002,
 +        "mol_mass": 413.46718999999996,
 +        "non-organic_atom_count": 0,
 +        "non_cyclic_amide_count": 0,
 +        "nso_atom_count": 6,
 +        "psa": 56.59,
 +        "rings": 5,
 +        "ro3_violations": 4,
 +        "ro5_violations": 0,
 +        "rotatable_bonds": 7,
 +        "stereo_double_bonds": 0,
 +        "undefined_stereo_double_bonds": 0,
 +        "unknown_stereo_double_bonds": 0
 +    },
 +    "smiles": "C(N1CCN2C3=C(N=C12)C=CC=C3)(=O)C(C)OC1=CC=C(OCC2=CC=CC=C2)C=C1"
 +}
 +</code>
 +
 +===== Compounds export =====
 +
 +If you have a set of identifiers you can export the corresponding compounds into SMILES or SDF files.
 +
 +==== SDF file: ====
 +
 +<code>
 +echo '{"export_type": "sdf", "compounds": ["YTIUNGFRKPDPPS-UHFFFAOYSA-N", "SSEIGWFVYLDHEH-UHFFFAOYSA-N"]}' | http https://ultimateapp.mcule.com/api/v1/compounds/export/ --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +POST /api/v1/compounds/export/ HTTP/1.1
 +Content-Type: application/json
 +
 +{
 +    "compounds": [
 +        "YTIUNGFRKPDPPS-UHFFFAOYSA-N",
 +        "SSEIGWFVYLDHEH-UHFFFAOYSA-N"
 +    ],
 +    "export_type": "sdf"
 +}
 +</code>
 +
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Content-Type: chemical/x-mdl-sdfile
 +Content-Disposition: attachment; filename="mcule_ultimate_export.sdf"
 +</code>
 +
 +
 +
 +==== SMILES file: ====
 +
 +<code>
 +echo '{"export_type": "smi", "compounds": ["YTIUNGFRKPDPPS-UHFFFAOYSA-N", "SSEIGWFVYLDHEH-UHFFFAOYSA-N"]}' | http https://ultimateapp.mcule.com/api/v1/compounds/export/ --print HBhb
 +</code>
 +
 +== Request: ==
 +<code>
 +POST /api/v1/compounds/export/ HTTP/1.1
 +Content-Type: application/json
 +
 +{
 +    "compounds": [
 +        "YTIUNGFRKPDPPS-UHFFFAOYSA-N",
 +        "SSEIGWFVYLDHEH-UHFFFAOYSA-N"
 +    ],
 +    "export_type": "smi"
 +}
 +</code>
 +
 +
 +== Response: ==
 +<code>
 +HTTP/1.1 200 OK
 +Content-Type: chemical/x-daylight-smiles
 +Content-Disposition: attachment; filename="mcule_ultimate_export.smi"
 </code> </code>
  
Line 321: Line 455:
 == Example API request: == == Example API request: ==
 <code> <code>
-echo '{"compounds": ["VKCCTPSYCYARFI-UHFFFAOYSA-N", "DVPXLZBGJCHMEO-UHFFFAOYSA-N", "XKJIOIJSLLCDOZ-UHFFFAOYSA-N", "XVWBPPRZAKJXSY-UHFFFAOYSA-N", "ZNOWNQHKOHUYLP-UHFFFAOYSA-N", "IEJBADVRNXRNLB-UHFFFAOYSA-N", "LZRUMHHZJMDZLR-UHFFFAOYSA-N", "PTKVKZOBUQFOJX-UHFFFAOYSA-N", "LFHNTOJEMXUDKP-UHFFFAOYSA-N", "SICGQCSMIMRHLF-UHFFFAOYSA-N", "YGLRUSPDEQEHKM-UHFFFAOYSA-N"], "amount": 1, "currency":"USD", individual": true}' | http https://ultimateapp.mcule.com/api/v1/pricing/ --print HBhb+echo '{"compounds": ["VKCCTPSYCYARFI-UHFFFAOYSA-N", "DVPXLZBGJCHMEO-UHFFFAOYSA-N", "XKJIOIJSLLCDOZ-UHFFFAOYSA-N", "XVWBPPRZAKJXSY-UHFFFAOYSA-N", "ZNOWNQHKOHUYLP-UHFFFAOYSA-N", "IEJBADVRNXRNLB-UHFFFAOYSA-N", "LZRUMHHZJMDZLR-UHFFFAOYSA-N", "PTKVKZOBUQFOJX-UHFFFAOYSA-N", "LFHNTOJEMXUDKP-UHFFFAOYSA-N", "SICGQCSMIMRHLF-UHFFFAOYSA-N", "YGLRUSPDEQEHKM-UHFFFAOYSA-N"], "amount": 1, "currency":"USD", "individual": true}' | http https://ultimateapp.mcule.com/api/v1/pricing/ --print HBhb
 </code> </code>
  
Line 941: Line 1075:
   * **avg_product_price_currency**: Currency of average product price   * **avg_product_price_currency**: Currency of average product price
   * **coverage_percent**: How many of the query molecules appear in the quote. E.g. if your query contains 10 molecules and you get a quote for 9, it is 90%.   * **coverage_percent**: How many of the query molecules appear in the quote. E.g. if your query contains 10 molecules and you get a quote for 9, it is 90%.
-  * **created**: The creation datetime of the quote.+  * **created_at**: The creation datetime of the quote.
   * **id**: The ID of the Instant Quote.   * **id**: The ID of the Instant Quote.
   * **items**: list of product level data   * **items**: list of product level data
ultimate-api.txt · Last modified: 2021/05/25 14:27 by flack