Re: [Rdkit-discuss] boron atom/element support in RDkit

2018-06-12 Thread Andrew Dalke
On Jun 12, 2018, at 18:00, Bennion, Brian via Rdkit-discuss 
 wrote:
> Does RDkit support boron in SMILES strings?  We have a number of compounds 
> for which rdkit parsing is not successful.  The commonality is that there is 
> a B or b listed in the string.  

RDKit supports boron, including aromatic boron.

>>> from rdkit import  Chem
>>> mol = Chem.MolFromSmiles("[B]")
>>> Chem.MolToSmiles(mol)
'[B]'
mol = Chem.MolFromSmiles("B")
>>> [a.GetAtomicNum() for a in mol.GetAtoms()]
[5]
>>> mol = Chem.MolFromSmiles("[b]1c1")
>>> Chem.MolToSmiles(mol)
'b1c1'
>>> mol = Chem.MolFromSmiles("b1c1")
>>> Chem.MolToSmiles(mol)
'b1c1'
>>> [a.GetAtomicNum() for a in mol.GetAtoms()]
[5, 6, 6, 6, 6, 6]

What is the error message? Can you post a reproducible?

Cheers,


Andrew
da...@dalkescientific.com



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] boron atom/element support in RDkit

2018-06-12 Thread Bennion, Brian via Rdkit-discuss
Hello

Does RDkit support boron in SMILES strings?  We have a number of compounds for 
which rdkit parsing is not successful.  The commonality is that there is a B or 
b listed in the string.


Thank you for any help.

Brian Bennion

LLNL
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss