Skip to content

Commit 62f1df1

Browse files
authored
Look for Absolute SMILES instead of Canonical (#29)
1 parent 7b571a4 commit 62f1df1

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

examples/chem-sync-local-flask/local_app/lib/pub_chem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def get_by_cid(cid: str) -> dict[str, Any]:
4545
synonyms_json = _pubchem_get(f"cid/{cid}/synonyms/JSON")
4646
compound_json = result_json["PC_Compounds"][0]
4747
name = synonyms_json["InformationList"]["Information"][0]["Synonym"][0]
48-
smiles = _get_compound_string_prop(compound_json, label="SMILES", name="Canonical")
48+
smiles = _get_compound_string_prop(compound_json, label="SMILES", name="Absolute")
4949
mono_isotopic_weight = _get_compound_string_prop(compound_json, label="Weight", name="MonoIsotopic")
5050
molecular_weight = _get_compound_string_prop(compound_json, label="Molecular Weight")
5151
return {

examples/chem-sync-local-flask/tests/files/pubchem/compound.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
"conformers": [
159159
{
160160
"x": [
161-
3.732,
161+
3.7321,
162162
6.3301,
163163
4.5981,
164164
2.866,
@@ -240,7 +240,7 @@
240240
"label": "Compound",
241241
"name": "Canonicalized",
242242
"datatype": 5,
243-
"release": "2021.10.14"
243+
"release": "2025.04.14"
244244
},
245245
"value": {
246246
"ival": 1
@@ -254,7 +254,7 @@
254254
"version": "3.4.8.18",
255255
"software": "Cactvs",
256256
"source": "Xemistry GmbH",
257-
"release": "2021.10.14"
257+
"release": "2025.04.14"
258258
},
259259
"value": {
260260
"fval": 212
@@ -269,7 +269,7 @@
269269
"version": "3.4.8.18",
270270
"software": "Cactvs",
271271
"source": "Xemistry GmbH",
272-
"release": "2021.10.14"
272+
"release": "2025.04.14"
273273
},
274274
"value": {
275275
"ival": 4
@@ -284,7 +284,7 @@
284284
"version": "3.4.8.18",
285285
"software": "Cactvs",
286286
"source": "Xemistry GmbH",
287-
"release": "2021.10.14"
287+
"release": "2025.04.14"
288288
},
289289
"value": {
290290
"ival": 1
@@ -299,7 +299,7 @@
299299
"version": "3.4.8.18",
300300
"software": "Cactvs",
301301
"source": "Xemistry GmbH",
302-
"release": "2021.10.14"
302+
"release": "2025.04.14"
303303
},
304304
"value": {
305305
"ival": 3
@@ -315,7 +315,7 @@
315315
"version": "3.4.8.18",
316316
"software": "Cactvs",
317317
"source": "Xemistry GmbH",
318-
"release": "2021.10.14"
318+
"release": "2025.04.14"
319319
},
320320
"value": {
321321
"binary": "00000371C0703800000000000000000000000000000000000000300000000000000000010000001A00000800000C04809800320E80000600880220D208000208002420000888010608C80C273684351A827B60A5E01108B98788C8208E00000000000800000000000000100000000000000000"
@@ -329,7 +329,7 @@
329329
"version": "2.7.0",
330330
"software": "Lexichem TK",
331331
"source": "OpenEye Scientific Software",
332-
"release": "2021.10.14"
332+
"release": "2025.04.14"
333333
},
334334
"value": {
335335
"sval": "2-acetoxybenzoic acid"
@@ -343,7 +343,7 @@
343343
"version": "2.7.0",
344344
"software": "Lexichem TK",
345345
"source": "OpenEye Scientific Software",
346-
"release": "2021.10.14"
346+
"release": "2025.04.14"
347347
},
348348
"value": {
349349
"sval": "2-acetyloxybenzoic acid"
@@ -357,7 +357,7 @@
357357
"version": "2.7.0",
358358
"software": "Lexichem TK",
359359
"source": "OpenEye Scientific Software",
360-
"release": "2021.10.14"
360+
"release": "2025.04.14"
361361
},
362362
"value": {
363363
"sval": "2-acetyloxybenzoic acid"
@@ -371,7 +371,7 @@
371371
"version": "2.7.0",
372372
"software": "Lexichem TK",
373373
"source": "OpenEye Scientific Software",
374-
"release": "2021.10.14"
374+
"release": "2025.04.14"
375375
},
376376
"value": {
377377
"sval": "2-acetyloxybenzoic acid"
@@ -385,7 +385,7 @@
385385
"version": "2.7.0",
386386
"software": "Lexichem TK",
387387
"source": "OpenEye Scientific Software",
388-
"release": "2021.10.14"
388+
"release": "2025.04.14"
389389
},
390390
"value": {
391391
"sval": "2-acetyloxybenzoic acid"
@@ -399,7 +399,7 @@
399399
"version": "2.7.0",
400400
"software": "Lexichem TK",
401401
"source": "OpenEye Scientific Software",
402-
"release": "2021.10.14"
402+
"release": "2025.04.14"
403403
},
404404
"value": {
405405
"sval": "2-acetoxybenzoic acid"
@@ -410,10 +410,10 @@
410410
"label": "InChI",
411411
"name": "Standard",
412412
"datatype": 1,
413-
"version": "1.0.6",
413+
"version": "1.07.2",
414414
"software": "InChI",
415415
"source": "iupac.org",
416-
"release": "2021.10.14"
416+
"release": "2025.04.14"
417417
},
418418
"value": {
419419
"sval": "InChI=1S/C9H8O4/c1-6(10)13-8-5-3-2-4-7(8)9(11)12/h2-5H,1H3,(H,11,12)"
@@ -424,10 +424,10 @@
424424
"label": "InChIKey",
425425
"name": "Standard",
426426
"datatype": 1,
427-
"version": "1.0.6",
427+
"version": "1.07.2",
428428
"software": "InChI",
429429
"source": "iupac.org",
430-
"release": "2021.10.14"
430+
"release": "2025.04.14"
431431
},
432432
"value": {
433433
"sval": "BSYNRYMUTXBXSQ-UHFFFAOYSA-N"
@@ -440,7 +440,7 @@
440440
"datatype": 7,
441441
"version": "3.0",
442442
"source": "sioc-ccbg.ac.cn",
443-
"release": "2021.10.14"
443+
"release": "2025.04.14"
444444
},
445445
"value": {
446446
"fval": 1.2
@@ -454,7 +454,7 @@
454454
"version": "2.2",
455455
"software": "PubChem",
456456
"source": "ncbi.nlm.nih.gov",
457-
"release": "2021.10.14"
457+
"release": "2025.04.14"
458458
},
459459
"value": {
460460
"sval": "180.04225873"
@@ -467,7 +467,7 @@
467467
"version": "2.2",
468468
"software": "PubChem",
469469
"source": "ncbi.nlm.nih.gov",
470-
"release": "2021.10.14"
470+
"release": "2025.04.14"
471471
},
472472
"value": {
473473
"sval": "C9H8O4"
@@ -480,7 +480,7 @@
480480
"version": "2.2",
481481
"software": "PubChem",
482482
"source": "ncbi.nlm.nih.gov",
483-
"release": "2021.10.14"
483+
"release": "2025.04.14"
484484
},
485485
"value": {
486486
"sval": "180.16"
@@ -489,12 +489,12 @@
489489
{
490490
"urn": {
491491
"label": "SMILES",
492-
"name": "Canonical",
492+
"name": "Absolute",
493493
"datatype": 1,
494494
"version": "2.3.0",
495495
"software": "OEChem",
496496
"source": "OpenEye Scientific Software",
497-
"release": "2021.10.14"
497+
"release": "2025.04.14"
498498
},
499499
"value": {
500500
"sval": "CC(=O)OC1=CC=CC=C1C(=O)O"
@@ -503,12 +503,12 @@
503503
{
504504
"urn": {
505505
"label": "SMILES",
506-
"name": "Isomeric",
506+
"name": "Connectivity",
507507
"datatype": 1,
508508
"version": "2.3.0",
509509
"software": "OEChem",
510510
"source": "OpenEye Scientific Software",
511-
"release": "2021.10.14"
511+
"release": "2025.06.30"
512512
},
513513
"value": {
514514
"sval": "CC(=O)OC1=CC=CC=C1C(=O)O"
@@ -523,7 +523,7 @@
523523
"version": "3.4.8.18",
524524
"software": "Cactvs",
525525
"source": "Xemistry GmbH",
526-
"release": "2021.10.14"
526+
"release": "2025.04.14"
527527
},
528528
"value": {
529529
"fval": 63.6
@@ -537,7 +537,7 @@
537537
"version": "2.2",
538538
"software": "PubChem",
539539
"source": "ncbi.nlm.nih.gov",
540-
"release": "2021.10.14"
540+
"release": "2025.04.14"
541541
},
542542
"value": {
543543
"sval": "180.04225873"

0 commit comments

Comments
 (0)