freesasa / freesasa-python

FreeSASA Python Module
MIT License
47 stars 12 forks source link

Bug: Assign radius=-1.0 to unknown atoms in calcBioPDB #35

Closed EBGU closed 12 months ago

EBGU commented 1 year ago

Hi!

I am currently using the python api 'calcBioPDB ' for SASA calculation of small molecules. I found a very strange behavior, and I have to manually reprogram the classifier. Although the atom radius was guessed based on its element, the returned radius was -1.0 which caused errors.

image

My solution is to use a customed classifier to assign radius based on its element, but it is not very elegant.

Looking forward to your reply!

BTW, this project is really awesome!

mittinatten commented 1 year ago

Hi, Can you send me the PDB-file so I can use it to reproduce the error?

mittinatten commented 12 months ago

Closing due to inactivity

EBGU commented 6 months ago

Hi,

Sorry for the delay. It has been almost a year.

To reproduce this error, you could download my ligand file( in .mol2 format) and run:

    from rdkit import Chem
    from Bio.PDB import PDBParser
    from freesasa import calcBioPDB
    from io import StringIO
    parser = PDBParser()
    lig_pdbstring = StringIO(Chem.MolToPDBBlock(Chem.MolFromMol2File(mol2_file,sanitize=True)))
    #open a StringIO object and parse the pdb file
    lig_model = parser.get_structure('pdb', lig_pdbstring)
    calcBioPDB(lig_model ,options={'hetatm':True})

Thank you so much, and I apologize for my delay again.

4ce2_ligand.txt