This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from datetime import datetime | |
| timestamp = datetime.today().strftime('%Y-%m-%d-%H%M%S') | |
| export_file = f'export_{timestamp}.txt' | |
| def get_additional_data(id): | |
| r = requests.get(f'https://drugs.ncats.io/api/v1/substances({id})/@additional') | |
| if 200 == r.status_code: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ''' | |
| Converts a list of SMILES to the corresponding Name, using Chemscript22 from ChemOffice | |
| (Chemscript finally supports Python 3.10) | |
| usage: python Smiles2Name.py input output | |
| input -- text file containing a list of SMILES stings | |
| output -- tabseparated list of the SMILES with the genarated name. | |
| ''' |