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

Can't kekulize mol #11

Open
mewoo15 opened this issue Oct 2, 2017 · 4 comments
Open

Can't kekulize mol #11

mewoo15 opened this issue Oct 2, 2017 · 4 comments

Comments

@mewoo15
Copy link

mewoo15 commented Oct 2, 2017

Hi,

I was trying to use automartini to convert my molecule (5-(2-aminobutanyl)-6-(furan-2-yl)pyridazin-3(2H)-one : NC(CC1=CC(NN=C1C=1OC=CC1)=O)CC). The script was not able to convert this molecule and the sanitize.log reported the following error. How can I get this work?

[14:22:02] Can't kekulize mol. Unkekulized atoms: 2 3 4 5 6

WARNING:main:Bad smiles format O=c1cccnn1 found
[14:22:02] Can't kekulize mol. Unkekulized atoms: 2 3 4 5 6

[14:22:02] Can't kekulize mol. Unkekulized atoms: 2 3 4 6

[14:22:02] Can't kekulize mol. Unkekulized atoms: 2 3 4

WARNING:main:Smiles cannot be adjusted O=c1cccnn1
[14:22:02] Can't kekulize mol. Unkekulized atoms: 2 3 4 5 6

Traceback (most recent call last):
File "../auto_martini.py", line 1307, in
cg_molecule(mol, args.molname, args.aa, args.cg, args.forcepred)
File "../auto_martini.py", line 1238, in cg_molecule
atom_partitioning, ring_atoms, ring_atoms_flat, True)
File "../auto_martini.py", line 850, in print_atoms
mol_frag = gen_molecule_smi(smi_frag)
File "../auto_martini.py", line 127, in gen_molecule_smi
AllChem.EmbedMolecule(molecule, randomSeed = 1, useRandomCoords=True) # Set Seed for random coordinate generation = 1.
ValueError: Sanitization error: Can't kekulize mol. Unkekulized atoms: 2 3 4 5 6

Regards,
Mei Woo

@tbereau
Copy link
Owner

tbereau commented Oct 2, 2017

Dear Mei Woo,

Yes, that unfortunately happens once in a while. I don't have a systematic fix. That often happens on some aromatic nitro groups. I would suggest trying to parametrize a molecule that's similar but doesn't have the problematic group. I'm not sure which one it is here, but you could play around with the chemistry and see what works. Also, it doesn't seem like the SMILES you provide is valid. Did you check that?

Best,
Tristan

@mewoo15
Copy link
Author

mewoo15 commented Oct 2, 2017

Hi Tristan,

Thanks for your reply.
I have tried another SMILES translator and tired this SMILES ( CCC(N)Cc1cc(=O)[nH]nc1c2ccco2 ) as well but I still got the same error. Do you get the same error as well? Are there any ways those we can work around this problem. I have a set of molecules to parametrize with this starting structure.

Regards,
Mei Woo

@tbereau
Copy link
Owner

tbereau commented Oct 2, 2017

I do get the same error.

I would replace the aromatic nitrogens by carbon and try to parametrize that. For instance, the slightly different compound CCC(N)Cc1cc(=O)ncc1c2ccco2 does go through in the Master branch. You'll then need to manually adjust the bead type to correct for the change in water/oil partitioning.

Not extremely systematic unfortunately, but that might do it.

Best,
Tristan

@yucel-yilmaz
Copy link

!pip install selfies

import selfies as sf
sm = "NC(CC1=CC(NN=C1C=1OC=CC1)=O)CC)"

new_sm = sf.decoder(sf.encoder(sm))

Chem.MolFromSmiles(new_sm)

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

3 participants