Error file with multiple ligands

Computer-Aided Drug Design at the Durrant Lab Forums Gypsum-DL Error file with multiple ligands

Viewing 4 reply threads
  • Author
    Posts
    • #30728
      Sofea Arina Bt Shazali
      Guest

      Hi, 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)

    • #30812
      ikk6
      Keymaster

      Hello.
      Are you sure your "large" file is properly formatted?

      • #30819
        Sofea Arina Bt Shazali
        Guest

        hi 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?

      • #30848
        ikk6
        Keymaster

        Well, 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.

      • #30861
        Sofea Arina Bt Shazali
        Guest

        if 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?

      • #30870
        ikk6
        Keymaster

        As long as it is okay to share this data, please do. I will try to reproduce the error.

      • #30913
        Sofea Arina Bt Shazali
        Guest

        here’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

    • #31170
      ikk6
      Keymaster

      What’s the exact command did you run?

      • #31334
        Sofea Arina Bt Shazali
        Guest

        this is the command
        python run_gypsum_dl.py –use_durrant_lab_filters –source ligandFile.sdf

      • #31332
        Sofea Arina Bt Shazali
        Guest

        python run_gypsum_dl.py –use_durrant_lab_filters –source ligandFile.sdf

    • #32940
      Jacob Durrant
      Keymaster

      Hi 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.

    • #33022
      Sofea
      Guest

      Hi. 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!

      • #38571
        Jacob Durrant
        Keymaster

        Thank you, Sofea, for pointing out a useful new feature to include! Best of luck with your project.

Viewing 4 reply threads
  • The topic ‘Error file with multiple ligands’ is closed to new replies.

Fatal error: Uncaught wfWAFStorageFileException: Unable to save temporary file for atomic writing. in /var/www/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php:35 Stack trace: #0 /var/www/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php(659): wfWAFStorageFile::atomicFilePutContents() #1 [internal function]: wfWAFStorageFile->saveConfig() #2 {main} thrown in /var/www/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/file.php on line 35