rochoa85 / PepFun

Bioinformatics and Cheminformatics protocols for peptide analysis
MIT License
36 stars 9 forks source link

fix UFFOptimizeMolecule error #1

Closed sbwiecko closed 2 years ago

sbwiecko commented 2 years ago

For some peptides, AllChem.UFFOptimizeMolecule(mol), i.e., AllChem.EmbedMolecule(mol) in the generate_conformer method, generates a ValueError: Bad Conformer Id, e.g., with the sequences DNIMVTFRNQASRPY or GLKMFPDLTKCYSTD, and others, and no conformer can be obtained.

As to https://github.com/rdkit/rdkit/issues/1433,

For large extremely flexible molecules like that it can take quite a few tries to get a successful embedding

The fix is just increasing the number of attempts

#AllChem.EmbedMolecule(mh)
AllChem.EmbedMolecule(mh,maxAttempts=5000)

biopython 1.79 rdkit-pypi 2022.3.2

sbwiecko commented 2 years ago

still doesn't work with longer peptides, getting a ValueError: Bad Conformer Id error

rochoa85 commented 2 years ago

Hi @sbwiecko, thanks for trying our code. Indeed using RDKit to predict long peptide conformers can be an issue based on their flexibility and structural restraints. We are planning to publish soon a special script to run this kind of predictions that can be helpful for your case. In the meanwhile, I recommend you this server if you want to do this for single cases: https://bioserv.rpbs.univ-paris-diderot.fr/services/PEP-FOLD3/

I will let you know as soon as we have the code available