auto_martini icon indicating copy to clipboard operation
auto_martini copied to clipboard

Can't kekulize mol

Open mewoo15 opened this issue 7 years ago • 4 comments

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

mewoo15 avatar Oct 02 '17 13:10 mewoo15

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

tbereau avatar Oct 02 '17 13:10 tbereau

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

mewoo15 avatar Oct 02 '17 14:10 mewoo15

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

tbereau avatar Oct 02 '17 14:10 tbereau

!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)

yucel-yilmaz avatar Mar 14 '22 12:03 yucel-yilmaz