Computer-Aided Drug Design at the Durrant Lab › Forums › Gypsum-DL › Error file with multiple ligands
- This topic has 12 replies, 2 voices, and was last updated 3 years, 7 months ago by
Jacob Durrant.
- AuthorPosts
- April 8, 2021 at 4:20 pm #30728
Sofea Arina Bt Shazali
GuestHi, i have this error can you help me identify why?i really need this program. very much appreciated.
i sent an input sdf file with multiple ligands(15000) i tested out with a sdf file with 4 ligands(of the same format with the 15000 ligand file) and it worked out fine.Loading molecules from forRealThisTime.sdf…
Traceback (most recent call last):
File "run_gypsum_dl.py", line 312, in <module>
prepare_molecules(INPUTS)
File "C:\Users\Sofea\Documents\SIV3001_FYP\gypsum_dl-1.1.8\gypsum_dl\Start.py", line 204, in prepare_molecules
smiles_data = load_sdf_file(src)
File "C:\Users\Sofea\Documents\SIV3001_FYP\gypsum_dl-1.1.8\gypsum_dl\Steps\IO\LoadFiles.py", line 125, in load_sdf_file
smiles = Chem.MolToSmiles(mol, isomericSmiles=True, canonical=True)
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdmolfiles.MolToSmiles(NoneType)
did not match C++ signature:
MolToSmiles(class RDKit::ROMol mol, bool isomericSmiles=True, bool kekuleSmiles=False, int rootedAtAtom=-1, bool canonical=True, bool allBondsExplicit=False, bool allHsExplicit=False, bool doRandom=False) - April 8, 2021 at 4:54 pm #30812
ikk6
KeymasterHello.
Are you sure your "large" file is properly formatted?- April 8, 2021 at 6:13 pm #30819
Sofea Arina Bt Shazali
Guesthi thank you for the quick reply,
im not sure if this is the best indicator, but all the molecules in the "large" file can be read in a chemical database manager which is DataWarrior . can you advice me any other ways i can check? - April 8, 2021 at 7:06 pm #30848
ikk6
KeymasterWell, I imagine you could pass it to openbabel to try and convert it. Something like:
obabel large_file.sdf -Onew.smi -m
Then check whether the number of the output files is equal to the number of compounds in the input file. - April 8, 2021 at 8:26 pm #30861
Sofea Arina Bt Shazali
Guestif thats the case then yes , i’ve actually run this file on openbabel before running it on gypsum to append the coconut_id to title.
i’ve also just tried the method u mentioned and it did return the same number of molecules. Should i share with you the file? - April 8, 2021 at 8:29 pm #30870
ikk6
KeymasterAs long as it is okay to share this data, please do. I will try to reproduce the error.
- April 9, 2021 at 2:55 am #30913
Sofea Arina Bt Shazali
Guesthere’s the link, thank you for your help. I’ve been trying to figure it out but no clue
https://drive.google.com/file/d/1b2c9JBcOPJIpoaPJJp_KwGrPUX2K66ZL/view?usp=sharing
- April 9, 2021 at 4:01 pm #31170
ikk6
KeymasterWhat’s the exact command did you run?
- April 26, 2021 at 8:00 pm #32940
Jacob Durrant
KeymasterHi Sofea. Much thanks for your interest in Gypsum-DL. ikk6 and I spent some time today trying to get to the bottom of the problem. We just released version 1.1.9, which should avoid errors like those you’re seeing.
Gypsum-DL is primarily designed to work with SMI (SMILES) files. Internally, it uses RDKit to convert SDF files to SMI files. If RDKit can’t process an SDF entry, Gypsum-DL won’t be able to either. Some of your SDF entries cause RDKit problems. I think it’s because there are no charges on some nitrogen atoms. For example, this entry:
CNP0017802 OpenBabel04082123302D 11 11 0 0 0 0 0 0 0 0999 V2000 2.5980 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 1.7320 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.7320 -1.5000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.8660 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.9135 -0.0932 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -1.5826 -0.8364 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 -1.0826 -1.7024 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.1045 -1.4945 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 0.6386 -2.1636 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -2.5771 -0.7318 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 2 3 1 0 0 0 0 2 4 1 0 0 0 0 4 5 1 0 0 0 0 5 6 2 0 0 0 0 5 9 1 0 0 0 0 6 7 1 0 0 0 0 7 8 1 0 0 0 0 7 11 1 0 0 0 0 8 9 2 0 0 0 0 9 10 1 0 0 0 0 M END > <coconut_id> CNP0017802 > <SMILES> O=C(O)CC1=CN(C=N1C)C $$$$
With the latest update, Gypsum-DL will now warn you that it’s skipping an entry like this, rather than throwing an error.
As a side note, if you just use a SMI file, Gypsum won’t get RDKit involved at this step, so you can avoid the problem entirely. You could create an SMI file using open babel like this:
obabel -isdf ligandFile.sdf -osmi > mysmi.smi
Much thanks for bringing this bug to our attention! Take care.
- May 3, 2021 at 2:01 pm #33022
Sofea
GuestHi. I’ve managed to run the software thank you very much for the help and information. Its very helpful to know which ligands that have problem in the file.Also thank you for creating such a useful software. Have a good day!
- July 11, 2021 at 5:08 am #38571
Jacob Durrant
KeymasterThank you, Sofea, for pointing out a useful new feature to include! Best of luck with your project.
- AuthorPosts
- The topic ‘Error file with multiple ligands’ is closed to new replies.