diff --git a/datasources/goldbook_api.html b/datasources/goldbook_api.html index 773ef006..3840990f 100644 --- a/datasources/goldbook_api.html +++ b/datasources/goldbook_api.html @@ -574,7 +574,7 @@
{'term': {'id': '01093', 'doi': '10.1351/goldbook.C01093', 'code': 'C01093', 'status': 'current', 'longtitle': 'IUPAC Gold Book - cis-trans isomers', 'title': '<i>cis</i>-<i>trans</i> isomers', 'termversion': '2.3.3', 'lastupdated': '2014-02-24', 'definitions': [{'id': '1', 'text': 'Stereoisomeric olefins or cycloalkanes (or hetero-analogues) which differ in the positions of atoms (or groups) relative to a reference plane: in the cis-isomer the atoms are on the same side, in the trans-isomer they are on opposite sides. [image: molecular structures showing cis/trans isomerism]', 'chemicals': [{'type': 'chemimage', 'title': 'molecular structures showing cis/trans isomerism', 'file': 'https://goldbook.iupac.org/img/inline/C01093.png'}], 'links': [{'title': 'Stereoisomeric', 'type': 'internal', 'url': 'https://goldbook.iupac.org/terms/view/S05983'}, {'title': 'olefins', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/O04281'}, {'title': 'cycloalkanes', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/C01497'}, {'title': 'isomer', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/I03289'}, {'title': 'trans', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/C01092'}], 'sources': ["PAC, 1996, 68, 2193. 'Basic terminology of stereochemistry (IUPAC Recommendations 1996)' on page 2204 (https://doi.org/10.1351/pac199668122193)"]}], 'referencedin': [{'title': 'Wikipedia - Cis-trans izomerie (cs)', 'url': 'https://cs.wikipedia.org/wiki/Cis-trans_izomerie'}, {'title': 'Wikipedia - Cis-trans izoméria (sk)', 'url': 'https://sk.wikipedia.org/wiki/Cis-trans_izoméria'}, {'title': 'Wikipedia - Cis–trans isomerism (en)', 'url': 'https://en.wikipedia.org/wiki/Cis–trans_isomerism'}, {'title': 'Wikipedia - Isomeria (it)', 'url': 'https://it.wikipedia.org/wiki/Isomeria'}, {'title': 'Wikipedia - Isomeria cis-trans (it)', 'url': 'https://it.wikipedia.org/wiki/Isomeria_cis-trans'}, {'title': 'Wikipedia - Isomeria geométrica (pt)', 'url': 'https://pt.wikipedia.org/wiki/Isomeria_geométrica'}, {'title': 'Wikipedia - Isomería cis-trans (es)', 'url': 'https://es.wikipedia.org/wiki/Isomería_cis-trans'}, {'title': 'Wikipedia - Talk:Isomer (en)', 'url': 'https://en.wikipedia.org/wiki/Talk:Isomer'}, {'title': 'Wikipedia - Talk:Stereoisomerism (en)', 'url': 'https://en.wikipedia.org/wiki/Talk:Stereoisomerism'}, {'title': 'Wikipedia - Цис-транс изомеризъм (bg)', 'url': 'https://bg.wikipedia.org/wiki/Цис-транс_изомеризъм'}, {'title': 'Wikipedia - Цис–транс ізомерія (uk)', 'url': 'https://uk.wikipedia.org/wiki/Цис–транс_ізомерія'}, {'title': 'Wikipedia - ایزومری سیس–ترانس (fa)', 'url': 'https://fa.wikipedia.org/wiki/ایزومری_سیس–ترانس'}, {'title': 'Wikipedia - 顺反异构 (zh)', 'url': 'https://zh.wikipedia.org/wiki/顺反异构'}], 'links': {'html': 'https://goldbook.iupac.org/terms/view/C01093/html', 'json': 'https://goldbook.iupac.org/terms/view/C01093/json', 'xml': 'https://goldbook.iupac.org/terms/view/C01093/xml', 'plain': 'https://goldbook.iupac.org/terms/view/C01093/plain', 'pdf': 'https://goldbook.iupac.org/terms/view/C01093/pdf'}, 'citation': "Citation: '<i>cis</i>-<i>trans</i> isomers' in IUPAC Compendium of Chemical Terminology, 3rd ed. International Union of Pure and Applied Chemistry; 2006. Online version 3.0.1, 2019. 10.1351/goldbook.C01093", 'license': 'The IUPAC Gold Book is licensed under Creative Commons Attribution-ShareAlike CC BY-SA 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/) for individual terms.', 'collection': 'If you are interested in licensing the Gold Book for commercial use, please contact the IUPAC Executive Director at executivedirector@iupac.org .', 'disclaimer': 'The International Union of Pure and Applied Chemistry (IUPAC) is continuously reviewing and, where needed, updating terms in the Compendium of Chemical Terminology (the IUPAC Gold Book). Users of these terms are encouraged to include the version of a term with its use and to check regularly for updates to term definitions that you are using.', 'accessed': '2024-01-18T16:40:42+00:00'}}
+{'term': {'id': '01093', 'doi': '10.1351/goldbook.C01093', 'code': 'C01093', 'status': 'current', 'longtitle': 'IUPAC Gold Book - cis-trans isomers', 'title': '<i>cis</i>-<i>trans</i> isomers', 'termversion': '2.3.3', 'lastupdated': '2014-02-24', 'definitions': [{'id': '1', 'text': 'Stereoisomeric olefins or cycloalkanes (or hetero-analogues) which differ in the positions of atoms (or groups) relative to a reference plane: in the cis-isomer the atoms are on the same side, in the trans-isomer they are on opposite sides. [image: molecular structures showing cis/trans isomerism]', 'chemicals': [{'type': 'chemimage', 'title': 'molecular structures showing cis/trans isomerism', 'file': 'https://goldbook.iupac.org/img/inline/C01093.png'}], 'links': [{'title': 'Stereoisomeric', 'type': 'internal', 'url': 'https://goldbook.iupac.org/terms/view/S05983'}, {'title': 'olefins', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/O04281'}, {'title': 'cycloalkanes', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/C01497'}, {'title': 'isomer', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/I03289'}, {'title': 'trans', 'type': 'goldify', 'url': 'https://goldbook.iupac.org/terms/view/C01092'}], 'sources': ["PAC, 1996, 68, 2193. 'Basic terminology of stereochemistry (IUPAC Recommendations 1996)' on page 2204 (https://doi.org/10.1351/pac199668122193)"]}], 'referencedin': [{'title': 'Wikipedia - Cis-trans izomerie (cs)', 'url': 'https://cs.wikipedia.org/wiki/Cis-trans_izomerie'}, {'title': 'Wikipedia - Cis-trans izoméria (sk)', 'url': 'https://sk.wikipedia.org/wiki/Cis-trans_izoméria'}, {'title': 'Wikipedia - Cis–trans isomerism (en)', 'url': 'https://en.wikipedia.org/wiki/Cis–trans_isomerism'}, {'title': 'Wikipedia - Isomeria (it)', 'url': 'https://it.wikipedia.org/wiki/Isomeria'}, {'title': 'Wikipedia - Isomeria cis-trans (it)', 'url': 'https://it.wikipedia.org/wiki/Isomeria_cis-trans'}, {'title': 'Wikipedia - Isomeria geométrica (pt)', 'url': 'https://pt.wikipedia.org/wiki/Isomeria_geométrica'}, {'title': 'Wikipedia - Isomería cis-trans (es)', 'url': 'https://es.wikipedia.org/wiki/Isomería_cis-trans'}, {'title': 'Wikipedia - Talk:Isomer (en)', 'url': 'https://en.wikipedia.org/wiki/Talk:Isomer'}, {'title': 'Wikipedia - Talk:Stereoisomerism (en)', 'url': 'https://en.wikipedia.org/wiki/Talk:Stereoisomerism'}, {'title': 'Wikipedia - Цис-транс изомеризъм (bg)', 'url': 'https://bg.wikipedia.org/wiki/Цис-транс_изомеризъм'}, {'title': 'Wikipedia - Цис–транс ізомерія (uk)', 'url': 'https://uk.wikipedia.org/wiki/Цис–транс_ізомерія'}, {'title': 'Wikipedia - ایزومری سیس–ترانس (fa)', 'url': 'https://fa.wikipedia.org/wiki/ایزومری_سیس–ترانس'}, {'title': 'Wikipedia - 顺反异构 (zh)', 'url': 'https://zh.wikipedia.org/wiki/顺反异构'}], 'links': {'html': 'https://goldbook.iupac.org/terms/view/C01093/html', 'json': 'https://goldbook.iupac.org/terms/view/C01093/json', 'xml': 'https://goldbook.iupac.org/terms/view/C01093/xml', 'plain': 'https://goldbook.iupac.org/terms/view/C01093/plain', 'pdf': 'https://goldbook.iupac.org/terms/view/C01093/pdf'}, 'citation': "Citation: '<i>cis</i>-<i>trans</i> isomers' in IUPAC Compendium of Chemical Terminology, 3rd ed. International Union of Pure and Applied Chemistry; 2006. Online version 3.0.1, 2019. 10.1351/goldbook.C01093", 'license': 'The IUPAC Gold Book is licensed under Creative Commons Attribution-ShareAlike CC BY-SA 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/) for individual terms.', 'collection': 'If you are interested in licensing the Gold Book for commercial use, please contact the IUPAC Executive Director at executivedirector@iupac.org .', 'disclaimer': 'The International Union of Pure and Applied Chemistry (IUPAC) is continuously reviewing and, where needed, updating terms in the Compendium of Chemical Terminology (the IUPAC Gold Book). Users of these terms are encouraged to include the version of a term with its use and to check regularly for updates to term definitions that you are using.', 'accessed': '2024-01-22T13:45:48+00:00'}}
REQEST URL: https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/2244/property/MolecularFormula/txt
-
OUTPUT : C9H8O4
+OUTPUT : C9H8O4
MolecularWeight : 180.16
+HBondDonorCount : 1
HBondDonorCount : 1
-HBondAcceptorCoun: 4
-
HeavyAtomCount : 13
+HBondAcceptorCoun: 4
+HeavyAtomCount : 13
XLogP : 1.200
-
-
-TPSA : 63.6
+TPSA : 63.6
CID : 2244
-MolecularFormula: C9H8O4
MolecularWeight : 180.16
-IsomericSMILES : CC(=O)OC1=CC=CC=C1C(=O)O
+MolecularFormula: C9H8O4
+MolecularWeight : 180.16
+
+
+IsomericSMILES : CC(=O)OC1=CC=CC=C1C(=O)O
#-- CID 9581
-
PSEUDOEPHEDRINE HYDROCHLORIDE
+PSEUDOEPHEDRINE HYDROCHLORIDE
Pseudoephedrine Hcl
345-78-8
Rhinalair
@@ -812,11 +812,10 @@ 2. Getting chemical names for a given chemical structureAleve PM
+#-- CID 77098502
+Aleve PM
Naproxen sodium/DPH combination
Diphenhydramine HCl / naproxen sodium
BAY98-7111
diff --git a/datasources/pubchem_pugrest3.html b/datasources/pubchem_pugrest3.html
index 77f06ca6..213cacc4 100644
--- a/datasources/pubchem_pugrest3.html
+++ b/datasources/pubchem_pugrest3.html
@@ -702,8 +702,8 @@ 3. Performing 2-D and 3-D similarity search
-25
-['155903259', '167331698', '166157194', '163362001', '162396459', '169240696', '168301133', '168290284', '167094316', '167094315', '167065082', '164701818', '164701813', '164701812', '164701760', '164701758', '164040179', '163362031', '163362005', '163361849', '169240702', '163341926', '163285815', '166642632', '168476190']
+8
+['Status:', '504', 'Code:', 'PUGREST.Timeout', 'Message:', 'Request', 'timed', 'out']
@@ -777,7 +777,135 @@ 5. Performing substructure/superstructure search
-40602
+---------------------------------------------------------------------------
+KeyboardInterrupt Traceback (most recent call last)
+Cell In[15], line 2
+ 1 smiles = "C2CN=C(C1=C(C=CC=C1)N2)C3=CC=CC=C3"
+----> 2 cids = requests.post("https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastsubstructure/smiles/cids/txt", data={'smiles':smiles}).text.strip().split()
+ 3 print(len(cids))
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/requests/api.py:115, in post(url, data, json, **kwargs)
+ 103 def post(url, data=None, json=None, **kwargs):
+ 104 r"""Sends a POST request.
+ 105
+ 106 :param url: URL for the new :class:`Request` object.
+ (...)
+ 112 :rtype: requests.Response
+ 113 """
+--> 115 return request("post", url, data=data, json=json, **kwargs)
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/requests/api.py:59, in request(method, url, **kwargs)
+ 55 # By using the 'with' statement we are sure the session is closed, thus we
+ 56 # avoid leaving sockets open which can trigger a ResourceWarning in some
+ 57 # cases, and look like a memory leak in others.
+ 58 with sessions.Session() as session:
+---> 59 return session.request(method=method, url=url, **kwargs)
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/requests/sessions.py:589, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
+ 584 send_kwargs = {
+ 585 "timeout": timeout,
+ 586 "allow_redirects": allow_redirects,
+ 587 }
+ 588 send_kwargs.update(settings)
+--> 589 resp = self.send(prep, **send_kwargs)
+ 591 return resp
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/requests/sessions.py:703, in Session.send(self, request, **kwargs)
+ 700 start = preferred_clock()
+ 702 # Send the request
+--> 703 r = adapter.send(request, **kwargs)
+ 705 # Total elapsed time of the request (approximately)
+ 706 elapsed = preferred_clock() - start
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/requests/adapters.py:486, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
+ 483 timeout = TimeoutSauce(connect=timeout, read=timeout)
+ 485 try:
+--> 486 resp = conn.urlopen(
+ 487 method=request.method,
+ 488 url=url,
+ 489 body=request.body,
+ 490 headers=request.headers,
+ 491 redirect=False,
+ 492 assert_same_host=False,
+ 493 preload_content=False,
+ 494 decode_content=False,
+ 495 retries=self.max_retries,
+ 496 timeout=timeout,
+ 497 chunked=chunked,
+ 498 )
+ 500 except (ProtocolError, OSError) as err:
+ 501 raise ConnectionError(err, request=request)
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/urllib3/connectionpool.py:790, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)
+ 787 response_conn = conn if not release_conn else None
+ 789 # Make the request on the HTTPConnection object
+--> 790 response = self._make_request(
+ 791 conn,
+ 792 method,
+ 793 url,
+ 794 timeout=timeout_obj,
+ 795 body=body,
+ 796 headers=headers,
+ 797 chunked=chunked,
+ 798 retries=retries,
+ 799 response_conn=response_conn,
+ 800 preload_content=preload_content,
+ 801 decode_content=decode_content,
+ 802 **response_kw,
+ 803 )
+ 805 # Everything went great!
+ 806 clean_exit = True
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/urllib3/connectionpool.py:467, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
+ 464 try:
+ 465 # Trigger any extra validation we need to do.
+ 466 try:
+--> 467 self._validate_conn(conn)
+ 468 except (SocketTimeout, BaseSSLError) as e:
+ 469 self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/urllib3/connectionpool.py:1096, in HTTPSConnectionPool._validate_conn(self, conn)
+ 1094 # Force connect early to allow us to validate the connection.
+ 1095 if conn.is_closed:
+-> 1096 conn.connect()
+ 1098 if not conn.is_verified:
+ 1099 warnings.warn(
+ 1100 (
+ 1101 f"Unverified HTTPS request is being made to host '{conn.host}'. "
+ (...)
+ 1106 InsecureRequestWarning,
+ 1107 )
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/urllib3/connection.py:611, in HTTPSConnection.connect(self)
+ 609 def connect(self) -> None:
+ 610 sock: socket.socket | ssl.SSLSocket
+--> 611 self.sock = sock = self._new_conn()
+ 612 server_hostname: str = self.host
+ 613 tls_in_tls = False
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/urllib3/connection.py:203, in HTTPConnection._new_conn(self)
+ 198 """Establish a socket connection and set nodelay settings on it.
+ 199
+ 200 :return: New socket connection.
+ 201 """
+ 202 try:
+--> 203 sock = connection.create_connection(
+ 204 (self._dns_host, self.port),
+ 205 self.timeout,
+ 206 source_address=self.source_address,
+ 207 socket_options=self.socket_options,
+ 208 )
+ 209 except socket.gaierror as e:
+ 210 raise NameResolutionError(self.host, self, e) from e
+
+File /opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/urllib3/util/connection.py:73, in create_connection(address, timeout, source_address, socket_options)
+ 71 if source_address:
+ 72 sock.bind(source_address)
+---> 73 sock.connect(sa)
+ 74 # Break explicitly a reference cycle
+ 75 err = None
+
+KeyboardInterrupt:
@@ -791,7 +919,7 @@ 5. Performing substructure/superstructure search
-6817
+6746
@@ -808,7 +936,7 @@ 7. Molecular Formula search
-
@@ -860,7 +988,7 @@ 7. Molecular Formula search
-
diff --git a/manipulations/computing_inchis.html b/manipulations/computing_inchis.html
index bfacc5e1..7f2c2dc3 100644
--- a/manipulations/computing_inchis.html
+++ b/manipulations/computing_inchis.html
@@ -526,7 +526,7 @@ 1.2 Create a Molecular Object from SMILES
-<rdkit.Chem.rdchem.Mol object at 0x7fd7affd0c10>
+<rdkit.Chem.rdchem.Mol object at 0x7fbb92fc4c10>
@@ -607,7 +607,7 @@ 1.4 Calculate InChIs for a List of Molecules
-[<rdkit.Chem.rdchem.Mol object at 0x7fd7affd1070>, <rdkit.Chem.rdchem.Mol object at 0x7fd7affd10e0>, <rdkit.Chem.rdchem.Mol object at 0x7fd7affd15b0>, <rdkit.Chem.rdchem.Mol object at 0x7fd7affd1620>, <rdkit.Chem.rdchem.Mol object at 0x7fd7affd1690>, <rdkit.Chem.rdchem.Mol object at 0x7fd7affd1700>]
+[<rdkit.Chem.rdchem.Mol object at 0x7fbb92fc4eb0>, <rdkit.Chem.rdchem.Mol object at 0x7fbb92fc50e0>, <rdkit.Chem.rdchem.Mol object at 0x7fbb92fc55b0>, <rdkit.Chem.rdchem.Mol object at 0x7fbb92fc5620>, <rdkit.Chem.rdchem.Mol object at 0x7fbb92fc5690>, <rdkit.Chem.rdchem.Mol object at 0x7fbb92fc5700>]
@@ -766,7 +766,7 @@ 2.4 Calculate InChIs for a List of Molecules
-[<openbabel.pybel.Molecule object at 0x7fd7aeffc710>, <openbabel.pybel.Molecule object at 0x7fd7aeffc910>, <openbabel.pybel.Molecule object at 0x7fd7ae764550>, <openbabel.pybel.Molecule object at 0x7fd7ae765dd0>, <openbabel.pybel.Molecule object at 0x7fd7ae766ed0>, <openbabel.pybel.Molecule object at 0x7fd7ae766e90>]
+[<openbabel.pybel.Molecule object at 0x7fbb9135cf10>, <openbabel.pybel.Molecule object at 0x7fbb9135e990>, <openbabel.pybel.Molecule object at 0x7fbb9135eb10>, <openbabel.pybel.Molecule object at 0x7fbb9135e810>, <openbabel.pybel.Molecule object at 0x7fbb9135e590>, <openbabel.pybel.Molecule object at 0x7fbb9135e450>]
diff --git a/manipulations/dataset_search.html b/manipulations/dataset_search.html
index 8dbcac09..6691553b 100644
--- a/manipulations/dataset_search.html
+++ b/manipulations/dataset_search.html
@@ -1015,7 +1015,7 @@ 2.1 - Authentication to the FAIRSharing API
-{'success': True, 'jwt': 'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI0YjVkNzQyMi1hOTg3LTRlZWYtYjQyYi1hN2U3Yjc2MTM0ZTEiLCJzdWIiOiI4NTA5Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzA1NTk2MDk5LCJleHAiOjE3MDU2ODI0OTl9.6yAMqLN95YnwleUIUq_xUDg2yMYximXN_k-c-ABN4v4', 'username': 'ChemCookbook', 'id': 8509, 'role': 'user', 'profile_type': 'none', 'watched_records': [], 'is_curator': False, 'is_super_curator': False, 'third_party': False, 'expiry': 1705682499, 'message': 'Authentication successful'}
+{'success': True, 'jwt': 'eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI0YjVkNzQyMi1hOTg3LTRlZWYtYjQyYi1hN2U3Yjc2MTM0ZTEiLCJzdWIiOiI4NTA5Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzA1OTMxMzI3LCJleHAiOjE3MDYwMTc3Mjd9.HxBqNA_9ssKQlNOvPptCKsacRaXIVh0r8uwDoGTMzCs', 'username': 'ChemCookbook', 'id': 8509, 'role': 'user', 'profile_type': 'none', 'watched_records': [], 'is_curator': False, 'is_super_curator': False, 'third_party': False, 'expiry': 1706017727, 'message': 'Authentication successful'}
@@ -1187,22 +1187,22 @@ 2.3 - Output the data in a presentable format