Hi folks it seems that the “easiest” way to get my coords if I know the ChEBI identifier is to do something like this in Python3 (note this snippet has no error checking!):
> import sys # only needed to parse the command-line arguments > chebi = sys.argv[1] # expect ChEBI identifier without the leading “CHEBI:" > import pubchempy # have to pip install or conda install, whatever for your > environment > pubchempy.download("SDF", f“ChEBI_{chebi}.sdf", f”CHEBI:{chebi}", "name", > record_type="3d", overwrite=True) and running that with “64119” as the argument gives me a file ChEBI_64119.sdf with 3D coords. Many thanks to all who got me out of my hole! Harry > On 6 Dec 2022, at 12:19, Harry Powell <hrp-ccp...@virginmedia.com> wrote: > > Hi Julie > > Ta. > > Do you know if there’s an API (pref. Python 3.9 or later) for downloading the > 3D coordinates from ChemSpider? > > Harry > >> On 6 Dec 2022, at 12:04, Julie Tucker >> <000020908adb55d7-dmarc-requ...@jiscmail.ac.uk> wrote: >> >> Chemspider can also provide you with a .mol file amongst other things. >> http://www.chemspider.com/Chemical-Structure.2424.html?rid=281bd645-a2c9-4d07-af08-c3148b323194 >> Best wishes >> Julie >> >> On Tue, 6 Dec 2022 at 11:55, Oliver Smart <oliver.s.sm...@gmail.com> wrote: >> Hi Harry, >> >> The SDF found at ChEBI is a 2D SDF with the coordinates used for the >> diagram. I do not think that ChEBI has >> 3D coordinates. Why not use PubChem instead as this does provide 3D sdf >> files? >> >> For your caffeine example: >> >> https://pubchem.ncbi.nlm.nih.gov/compound/64119 >> >> There >> >> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/CID/2519/record/SDF/?record_type=3d&response_type=save&response_basename=Conformer3D_CID_2519 >> >> >> Provides a SDF file. >> >> Hope this helps >> >> Oliver >> >> p.s. I you are stuck with ChEBI identifiers it would be possible to >> programatically find the equivalent PubChem CID. >> >> >> >> >>> On 6 Dec 2022, at 11:31, Harry Powell >>> <0000193323b1e616-dmarc-requ...@jiscmail.ac.uk> wrote: >>> >>> Hi folks >>> >>> Can anyone help with this? >>> >>> I must have missed something in the documentation, because I don’t >>> understand why the .mol and .sdf files downloaded from >>> >>> https://www.ebi.ac.uk/chebi >>> >>> seem to have aromatic C-C bonds that are 0.825 Å long (it’s a few decades >>> now since I solved any small molecule structures, but something around >>> 1.395Å rings a faint bell). >>> >>> I need to have ligands that have realistic sizes, and while I’m perfectly >>> at ease scaling the models to what I think are sensible sizes, I can’t help >>> but think that this isn’t necessary and I’ve missed something somewhere. >>> >>> Here’s an example of a molecule that I used this morning - >>> >>> >>> https://www.ebi.ac.uk/chebi/saveStructure.do?defaultImage=true&chebiId=31332&imageId=0 >>> >>> contents of downloaded file - >>>> >>>> Marvin 01140911122D >>>> >>>> 15 15 0 0 0 0 999 V2000 >>>> -0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> -0.7145 0.4125 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 0.7145 0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 0.0000 -0.8250 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 0.0000 0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 1.4992 0.6674 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 1.4992 -0.6675 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 1.9841 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> -1.4289 -0.8250 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 0.0001 1.6500 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 0.0001 -1.6500 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 1.7541 1.4520 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> -1.4289 0.8250 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 2.0809 -1.5365 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 >>>> 10 1 2 0 0 0 0 >>>> 1 2 1 0 0 0 0 >>>> 14 2 1 0 0 0 0 >>>> 8 3 1 0 0 0 0 >>>> 4 3 2 0 0 0 0 >>>> 7 4 1 0 0 0 0 >>>> 1 5 1 0 0 0 0 >>>> 5 3 1 0 0 0 0 >>>> 12 5 1 0 0 0 0 >>>> 6 2 1 0 0 0 0 >>>> 6 4 1 0 0 0 0 >>>> 11 6 2 0 0 0 0 >>>> 9 7 1 0 0 0 0 >>>> 13 7 1 0 0 0 0 >>>> 9 8 2 0 0 0 0 >>>> M END >>>> >>> >>> Harry >>> >>> ######################################################################## >>> >>> To unsubscribe from the CCP4BB list, click the following link: >>> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB&A=1 >>> >>> This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing >>> list hosted by www.jiscmail.ac.uk, terms & conditions are available at >>> https://www.jiscmail.ac.uk/policyandsecurity/ >> >> >> To unsubscribe from the CCP4BB list, click the following link: >> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB&A=1 >> >> >> >> -- >> Julie Tucker >> York Biomedical Research Institute >> Department of Biology and HYMS >> University of York >> >> My normal working days are Monday-Tuesday and Thursday-Friday. Please be >> patient if you do not hear from me promptly. I choose to work flexibly; >> please only respond to this message when convenient for you to do so. >> >> Email disclaimer >> >> To unsubscribe from the CCP4BB list, click the following link: >> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB&A=1 >> > ######################################################################## To unsubscribe from the CCP4BB list, click the following link: https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=CCP4BB&A=1 This message was issued to members of www.jiscmail.ac.uk/CCP4BB, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/