Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OverflowError: Python integer -1000 out of bounds for uint32 int32_to_negative(int32) in supplemental.py #157

Open
gmrandazzo opened this issue Aug 16, 2024 · 0 comments

Comments

@gmrandazzo
Copy link

Describe the bug

program crash while running the example with an OverflowError: Python integer -1000 out of bounds for uint32

To Reproduce
Steps to reproduce the behavior:

  1. Install python3.12, openbabel and all the dependencies.
  2. Install plip in python3.12
  3. Run the example plipcmd.py -i 1vsn -yv

Expected behavior

plipcmd.py -i 1vsn -yv
2024-08-16 15:56:28,763 [INFO] [plipcmd.py:124] plip: Protein-Ligand Interaction Profiler (PLIP) 2.3.0
2024-08-16 15:56:28,763 [INFO] [plipcmd.py:125] plip: brought to you by: PharmAI GmbH (2020-2021) - www.pharm.ai - [email protected]
2024-08-16 15:56:28,763 [INFO] [plipcmd.py:126] plip: please cite: Adasme,M. et al. PLIP 2021: expanding the scope of the protein-ligand interaction profiler to DNA and RNA. Nucl. Acids Res. (05 May 2021), gkab294. doi: 10.1093/nar/gkab294
2024-08-16 15:56:28,763 [INFO] [webservices.py:41] plip.exchange.webservices: downloading file from PDB
2024-08-16 15:56:29,389 [INFO] [plipcmd.py:99] plip: file downloaded as ./1vsn.pdb
2024-08-16 15:56:29,389 [INFO] [plipcmd.py:49] plip: starting analysis of 1vsn.pdb
2024-08-16 15:56:29,403 [DEBUG] [supplemental.py:413] plip.basic.supplemental: detected pdb as format, trying to read file with OpenBabel
2024-08-16 15:56:29,661 [DEBUG] [supplemental.py:430] plip.basic.supplemental: molecule successfully read
2024-08-16 15:56:29,663 [INFO] [preparation.py:1389] plip.structure.preparation: PDB structure successfully read
2024-08-16 15:56:29,663 [DEBUG] [preparation.py:1400] plip.structure.preparation: PyMOL name set as: 1vsn
2024-08-16 15:56:29,665 [DEBUG] [preparation.py:415] plip.structure.preparation: 1 ligand(s) after first filtering step
2024-08-16 15:56:29,666 [DEBUG] [preparation.py:276] plip.structure.preparation: 1 ligand kmer(s) detected for closer inspection
Traceback (most recent call last):
  File "/Users/marco/Library/Python/3.12/bin/plipcmd.py", line 313, in <module>
    main()
  File "/Users/marco/Library/Python/3.12/bin/plipcmd.py", line 309, in main
    run_analysis(expanded_path, arguments.pdbid)  # Start main script
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marco/Library/Python/3.12/bin/plipcmd.py", line 159, in run_analysis
    process_pdb(pdbpath, config.OUTPATH, outputprefix=output_prefix)
  File "/Users/marco/Library/Python/3.12/bin/plipcmd.py", line 52, in process_pdb
    mol.load_pdb(pdbfile, as_string=as_string)
  File "/Users/marco/Library/Python/3.12/lib/python/site-packages/plip/structure/preparation.py", line 1403, in load_pdb
    ligandfinder = LigandFinder(self.protcomplex, self.altconf, self.modres, self.covalent, self.Mapper)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marco/Library/Python/3.12/lib/python/site-packages/plip/structure/preparation.py", line 237, in __init__
    self.ligands = self.getligs()
                   ^^^^^^^^^^^^^^
  File "/Users/marco/Library/Python/3.12/lib/python/site-packages/plip/structure/preparation.py", line 282, in getligs
    ligands.append(self.extract_ligand(kmer))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marco/Library/Python/3.12/lib/python/site-packages/plip/structure/preparation.py", line 300, in extract_ligand
    members = [(res.GetName(), res.GetChain(), int32_to_negative(res.GetNum())) for res in kmer]
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/marco/Library/Python/3.12/lib/python/site-packages/plip/basic/supplemental.py", line 378, in int32_to_negative
    dct[np.uint32(i)] = i
        ^^^^^^^^^^^^
OverflowError: Python integer -1000 out of bounds for uint32

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS
  • CPU: M2
  • Version Sonoma 14.6.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant