Re: [Rdkit-discuss] Compound Neutralization

2013-12-24 Thread Gerebtzoff, Gregori
Hi Yingfeng, Let me remind you some chemistry basics: Chlorine atom has 17 electrons. In last orbit it has 7 electrons hence it requires 1 electron to complete octet. Hence it's valency is 1. Thus it's not a surprise that your smiles is generating an error. In order to check for get the charge st

Re: [Rdkit-discuss] Compound Neutralization

2013-12-20 Thread Yingfeng Wang
John, Thanks. I meet a couple of problems with the code you suggested. Input smiles: [O-][Cl+3]([O-])([O-])O Output smiles: O[Cl+3](O)(O)O First of, the input smiles is not charged, so the neutralizing function is supposed to do nothing. Could you please help me to know whether there is a f

Re: [Rdkit-discuss] Compound Neutralization

2013-12-20 Thread John May
Hi Yingfeng, You should use the NeutralisingCompounds on the page Markus linked: http://www.rdkit.org/docs/Cookbook.html. This version has different SMARTS for neutralising Tetrazoles. In the version you linked: # Tetrazoles Chem.MolFromSmarts('[n-]'): Chem.MolFromSm

Re: [Rdkit-discuss] Compound Neutralization

2013-12-19 Thread Markus Hartenfeller
Dear Yingfeng, The problem is the way the aromatic hetero cycles are encoded. They don't fit the aromaticity model RDKit is using. For example that works with RDKit by default: c1c[nH]cc1 But this does not: c1cncc1 Try the sanifix4.py routine from James Davidson with your smiles. http://www

[Rdkit-discuss] Compound Neutralization

2013-12-19 Thread Yingfeng Wang
The original compound is CCCc1nc2ccc(Cl)nc2n1-c1ccc(-c2ccc(-c3c3Cc3nn[n-]n3)cc2)cc1 I used the code at the following link http://code.google.com/p/rdkit/wiki/NeutralisingCompounds , and got the neutralized compound CCCc1nc2ccc(Cl)nc2n1-c1ccc(-c2ccc(-c3c3Cc33)cc2)cc1 But it has a pr