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

Failed to compute 3D conformer #27

Closed
poinco-gogo opened this issue Nov 20, 2024 · 2 comments
Closed

Failed to compute 3D conformer #27

poinco-gogo opened this issue Nov 20, 2024 · 2 comments

Comments

@poinco-gogo
Copy link

poinco-gogo commented Nov 20, 2024

Dear developers,

thank you for making this project open source.

I have encountered a "ValueError: Failed to compute 3D conformer for CCCCCCCCCCCCCCCCCCCCCCCCC(=O)OC[C@H](COC(=O)CCCCCCCCCCCCCCCCC)O" error when specifying a compound with a long hydrocarbon chain (CCCCCCCCCCCCCCCCCCCCCCCCC(=O)OC[C@H](COC(=O)CCCCCCCCCCCCCCCCC)O) as a ligand.

The error seems to occur in compute_3d_conformer() within schema.py. It appears that conf_id = AllChem.EmbedMolecule(mol, options) returns -1, which causes the error.

After searching, I found a potentially relevant page (here). I tried the solution mentioned there (setting params.useRandomCoords=True), and this resolved the error - the protein-ligand complex structure is now being output successfully.

Here's the actual modified code:

options.clearConfs = False
options.useRandomCoords=True # inserted
conf_id = -1

I suggest implementing an option specifically for large ligands. We could allow users to enable this parameter (options.useRandomCoords=True) when dealing with large ligand molecules.

Sincerely,

@gcorso
Copy link
Collaborator

gcorso commented Nov 29, 2024

It should be fixed in the commit (will be live on pypi on the next release)!

I've made it run with random starting coordinates only in case it fails the generation without random starting coordinates and added a warning given that the conformer generated will be quite different and we have not tested this behavior extensively (but from a couple of examples the output looks fine!)

Big thank you for the recommendation!

@poinco-gogo
Copy link
Author

@gcorso
Thanks a lot! The latest code (bc6993) is working well.

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

2 participants