[Rdkit-discuss] Question on how to create mol from fragmented mol

2017-10-05 Thread Lingtjien hong
I want to implement the following algorithm using RDkit

- given an atom
- break the bonds between this atom and its neighbor(s)
- create new mol types/variables from the neighboring fragments

example: R1-C-R2

- given atom C
- return two mol types/variables R1 and R2 (not C)

How can I achieve this? I tried rdmolops.FragmentOnBonds() but this creates the 
all fragments in the same mol variable.

Kind regards,
-Ling
--
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


Re: [Rdkit-discuss] nitrogen valence issues

2017-10-05 Thread Chris Earnshaw
Hi

Be aware that there is a problem with one of the azide groups in
CHEMBL592333 - in SMILES it's '-N=[NH+]-[NH-]' rather than '-N=[N+]=[N-].
This doesn't render the structure chemically invalid but it's probably
wrong.

What's the provenance of your SD file? It isn't the same as as a fresh
download of this structure from CHEMBL, which can be processed by RDkit
quite happily (allowing for the structure being wrong!). Is it possible
that your file has got corrupted by some other processing step?

Regards,
Chris

On 5 October 2017 at 03:28, Greg Landrum  wrote:

> Hi Brian,
>
> When you pasted that into the email the formatting of the mol block did
> end up screwed up, which makes this hard to reproduce.
> Could you please attach the mol block to the message as a file?
>
> -greg
>
> On Thu, Oct 5, 2017 at 2:21 AM, Bennion, Brian  wrote:
>
>> Hello,
>>
>> After looking at the email list and seeing that this error has cropped up
>> several times for aromatic/aliphatic heterocyclic nitrogens I still haven’t
>> been able to resolve the valence =4 error for one of the azo groups in a
>> molecule that has 7.  The first couple of azo groups seem to be interpreted
>> fine.
>>
>> Am I doing something incorrect here or is the mol file not formatted
>> properly?
>>
>> Thanks
>>
>> Brian
>>
>>
>>
>>
>>
>> [16:50:29] Explicit valence for atom # 85 N, 4, is greater than permitted
>>
>> [16:50:29] ERROR: Could not sanitize molecule ending on line 206
>>
>> [16:50:29] ERROR: Explicit valence for atom # 85 N, 4, is greater than
>> permitted
>>
>>
>>
>> CHEMBL592333
>>
>>3D
>>
>>
>>
>> 91 98  0  0  0  0  0  0  0  0999 V2000
>>
>> 8.3826   -4.17890. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 7.6967   -2.89680. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 8.5551   -1.59260. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 9.9817   -1.64490. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>10.7075   -3.00510. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 9.8956   -4.25770. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 9.51452.28820. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 9.87980.82840. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>11.31180.39830. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>12.39051.38200. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>12.01872.92050. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>10.62723.32730. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 9.82044.38660. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 7.94905.47790. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 8.51794.08830. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 4.38225.05110. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 7.66732.88200. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 6.41505.65410. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 5.56804.42640. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 6.12623.08490. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>11.0958   -0.91180. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 4.5054   -4.06120. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 6.0427   -3.93760. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 6.8866   -5.11860. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 6.3028   -6.49020. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 4.7637   -6.64580. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 3.9029   -5.41820. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 2.7159   -5.98310. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 0.6356   -5.60260. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 1.9599   -4.88510. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 3.13313.0. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 3.07344.82220. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 1.82162.53730. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>-2.1064   -0.88350. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>-1.65800.62550. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>-1.8630   -3.03920. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>-1.1133   -1.95280. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 0.52943.27430. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 1.79765.54000. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 0.47904.74180. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>-0.19400.91290. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>>-0.28002.22970. O   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 0.3560   -1.63640. C   0  0  0  0  0  0  0  0  0  0  0  0
>>
>> 0.7840   -0.17610. O   0 

[Rdkit-discuss] UFF atom type errors

2017-10-05 Thread Bennion, Brian
Hello,
As part of my workflow, I am attempting to generate a starting 3D structure 
from a 2D representation loaded from an sdf file.
On certain structures I receive the following UFF errors when attempting to 
minimize the structure.

[20:50:43] UFFTYPER: Unrecognized atom type: He1 (0)
[20:50:43] UFFTYPER: Unrecognized atom type: He (0)
[20:50:45] UFFTYPER: Unrecognized atom type: B_1 (0)
[20:50:45] UFFTYPER: Unrecognized atom type: B_1 (7)
[20:50:45] UFFTYPER: Unrecognized atom type: B_1 (0)
[20:50:45] UFFTYPER: Unrecognized atom type: B_1 (7)

I have searched for these atom labels in my 2D sdf file and they don't exist.  
So I am not sure how the uff code in rdkit is finding these types.
The relevant code is shown below, in case I am doing something incorrectly.
Any thoughts or suggestions to help me find my mistakes?

Brian


for m in ms:
#add hydrogen atoms to the molecule before generating 3D coordinates
  mHs=Chem.AddHs(m)
#start generating 3D coordinates and optimize the conformation
  embedError=AllChem.EmbedMolecule(mHs,useRandomCoords=True)
  if embedError == 0 :
 UffoptError=AllChem.UFFOptimizeMolecule(mHs,3000)
  elif UffoptError != 0 :
   print ("UFF optimization failed, trying MMFF optimization")
   MMFFoptError=AllChem.MMFFOptimizeMolecule(mHs,3000)
  elif MMFFoptError != 0 :
   print ("MMFF optimizaiton has also failed on: ", molName)
   print ("Continuing on to next molecule")
   continue
  else:
 print("Embedding Failed for: ", molName)
 continue

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


Re: [Rdkit-discuss] Question on how to create mol from fragmented mol

2017-10-05 Thread Paolo Tosco

Dear Ling,

This Jupyter notebook shows two possible different approaches to 
accomplish this:


https://gist.github.com/ptosco/f60d7fc122001c7f72e99bc66748c47b

HTH, cheers
p.

On 10/05/17 11:12, Lingtjien hong wrote:

I want to implement the following algorithm using RDkit

- given an atom
- break the bonds between this atom and its neighbor(s)
- create new mol types/variables from the neighboring fragments

example: R1-C-R2

- given atom C
- return two mol types/variables R1 and R2 (not C)

How can I achieve this? I tried rdmolops.FragmentOnBonds() but this 
creates the all fragments in the same mol variable.


Kind regards,
-Ling


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


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


Re: [Rdkit-discuss] nitrogen valence issues

2017-10-05 Thread Chris Earnshaw
Hi

Some interesting differences in behaviour compared with my RDkit
installation. Using the ChEMBL SMILES (freshly downloaded now) -

[NH-][NH+]=NC[C@H]1O[C@@H]2O[C@@H]3[C@@H](CN=[N+]=[N-])O[C@H](O[C@@H]4[C@@H](CN=[N+]=[N-])O[C@H](O[C@@H]5[C@@H](CN=[N+]=[N-])O[C@H](O[C@@H]6[C@@H](CN=[N+]=[N-])O[C@H](O[C@@H]7[C@@H](CN=[N+]=[N-])O[C@H](O[C@@H]8[C@@H](CN=[N+]=[N-])O[C@H](O[C@H]1[C@H](O)[C@H]2O)[C@H](O)[C@H]8O)[C@H](O)[C@H]7O)[C@H](O)[C@H]6O)[C@H](O)[C@H]5O)[C@H](O)[C@H]4O)[C@H](O)[C@H]3O

The problem atoms are the first two. If I convert this to an SD file
(using a C++ program based on the RDkit libraries) then the resulting
SD file contains no charge information in the atom block, it's all in
M CHG records (which are correct) and the problem atoms are still the
first two.

The bonding information is incorrect as there's a single bond between
the two nitrogens and it should be double. Editing the first record in
the bond block from -
  1  2  1  0
to -
  1  2  2  0
fixes the structure for me, and the resulting SD file can be processed
by other RDkit programs. I've attached the resulting file in case it
helps throw any light on what's happening.

I'm puzzled as to why the behaviour is significantly different for you...

Chris

On 5 October 2017 at 15:40, Bennion, Brian  wrote:
> The sdf is an rdkit reading of the original smiles string, which if wrong
> would explain the funky charge settings in the mol block for atoms 84 and
> 85.  I modified these to 5 and 3 respectively to make the correct charge
> states, however, that did not resolve the issue.  Perhaps the bonding info
> is also incorrect.  The file is on a remote server so I will repost with
> attachment if I continue to have problems.
>
> Brian
>
>
> 
> From: Chris Earnshaw 
> Sent: Thursday, October 5, 2017 12:04:02 AM
> To: Bennion, Brian; RDKit Discuss (rdkit-discuss@lists.sourceforge.net)
> Subject: Re: [Rdkit-discuss] nitrogen valence issues
>
> Hi
>
> Be aware that there is a problem with one of the azide groups in
> CHEMBL592333 - in SMILES it's '-N=[NH+]-[NH-]' rather than '-N=[N+]=[N-].
> This doesn't render the structure chemically invalid but it's probably
> wrong.
>
> What's the provenance of your SD file? It isn't the same as as a fresh
> download of this structure from CHEMBL, which can be processed by RDkit
> quite happily (allowing for the structure being wrong!). Is it possible that
> your file has got corrupted by some other processing step?
>
> Regards,
> Chris
>
> On 5 October 2017 at 03:28, Greg Landrum  wrote:
>>
>> Hi Brian,
>>
>> When you pasted that into the email the formatting of the mol block did
>> end up screwed up, which makes this hard to reproduce.
>> Could you please attach the mol block to the message as a file?
>>
>> -greg
>>
>> On Thu, Oct 5, 2017 at 2:21 AM, Bennion, Brian  wrote:
>>>
>>> Hello,
>>>
>>> After looking at the email list and seeing that this error has cropped up
>>> several times for aromatic/aliphatic heterocyclic nitrogens I still haven’t
>>> been able to resolve the valence =4 error for one of the azo groups in a
>>> molecule that has 7.  The first couple of azo groups seem to be interpreted
>>> fine.
>>>
>>> Am I doing something incorrect here or is the mol file not formatted
>>> properly?
>>>
>>> Thanks
>>>
>>> Brian
>>>
>>>
>>>
>>>
>>>
>>> [16:50:29] Explicit valence for atom # 85 N, 4, is greater than permitted
>>>
>>> [16:50:29] ERROR: Could not sanitize molecule ending on line 206
>>>
>>> [16:50:29] ERROR: Explicit valence for atom # 85 N, 4, is greater than
>>> permitted
>>>
>>>
>>>
>>> CHEMBL592333
>>>
>>>3D
>>>
>>>
>>>
>>> 91 98  0  0  0  0  0  0  0  0999 V2000
>>>
>>> 8.3826   -4.17890. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 7.6967   -2.89680. O   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 8.5551   -1.59260. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 9.9817   -1.64490. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>>10.7075   -3.00510. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 9.8956   -4.25770. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 9.51452.28820. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 9.87980.82840. O   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>>11.31180.39830. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>>12.39051.38200. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>>12.01872.92050. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>>10.62723.32730. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 9.82044.38660. O   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 7.94905.47790. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 8.51794.08830. C   0  0  0  0  0  0  0  0  0  0  0  0
>>>
>>> 4.38225.05110. O   0  0  0  0  

Re: [Rdkit-discuss] Implicit Hydrogens On Aromatic Hetereoatoms

2017-10-05 Thread Greg Landrum
Hi Chris,

There's an additional step performed during sanitization that recognizes
that the implicit H needs to be on the N. The steps of a normal full
molecular sanitization operation are documented here:
http://www.rdkit.org/docs/RDKit_Book.html#molecular-sanitization

The adjustHs() function is not exposed directly to Python, but you can take
care of aromaticity assignment and adjustHs in a single call with the
SanitizeMol() function:

In [21]: m = Chem.MolFromMolBlock(mb,sanitize=False)

In [22]: Chem.SanitizeMol(m,sanitizeOps=Chem.SANITIZE_
SETAROMATICITY|Chem.SANITIZE_ADJUSTHS)
Out[22]: rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE

In [23]: Chem.MolToSmiles(m)
Out[23]: 'CC(C)c12c(Cl)cc(-c3ccc(-c4ccc(C(=O)O)cc4)[nH]3)nc12'

I highlighted the N in the heterocyle with the implicit H.

Hopefully this helps.

Best,
-greg
p.s. Note: while testing parts of this answer I uncovered a bug in
AdjustHs() that causes it to fail for molecules that include atoms with
"bad valences": https://github.com/rdkit/rdkit/issues/1605 This looks like
it should be easy to fix for the upcoming release.


On Thu, Oct 5, 2017 at 11:06 PM, Chris Murphy 
wrote:

> Hi!
>
> I'm running at an issue with implicit hydrogens on aromatic heteroatoms. I
> am feeding the following sdf into a mol object:
>
>
>   Mrv16c5 10021719092D
>
>  28 31  0  0  0  0999 V2000
>-2.90000.20760. C   0  0  0  0  0  0  0  0  0  0  0  0
>-2.18710.62280. N   0  0  0  0  0  0  0  0  0  0  0  0
> 0.00630.29570. N   0  0  0  0  0  0  0  0  0  0  0  0
>-0.74860.63540. C   0  0  0  0  0  0  0  0  0  0  0  0
>-1.46570.21180. C   0  0  0  0  0  0  0  0  0  0  0  0
> 0.55990.91640. C   0  0  0  0  0  0  0  0  0  0  0  0
>-2.9000   -0.62280. C   0  0  0  0  0  0  0  0  0  0  0  0
>-2.1829   -1.03800. C   0  0  0  0  0  0  0  0  0  0  0  0
>-1.4657   -0.62280. C   0  0  0  0  0  0  0  0  0  0  0  0
>-3.62140.62280. C   0  0  0  0  0  0  0  0  0  0  0  0
>-0.67311.45740. C   0  0  0  0  0  0  0  0  0  0  0  0
> 0.14051.63350. C   0  0  0  0  0  0  0  0  0  0  0  0
> 3.86460.59760. C   0  0  0  0  0  0  0  0  0  0  0  0
> 1.38600.83670. C   0  0  0  0  0  0  0  0  0  0  0  0
> 3.03840.67310. C   0  0  0  0  0  0  0  0  0  0  0  0
> 4.34691.26870. O   0  0  0  0  0  0  0  0  0  0  0  0
> 1.72570.08180. C   0  0  0  0  0  0  0  0  0  0  0  0
> 1.86411.51610. C   0  0  0  0  0  0  0  0  0  0  0  0
> 2.68611.43220. C   0  0  0  0  0  0  0  0  0  0  0  0
> 2.5477   -0.00210. C   0  0  0  0  0  0  0  0  0  0  0  0
>-2.1829   -1.86830. Cl  0  0  0  0  0  0  0  0  0  0  0  0
>-3.62971.45320. C   0  0  0  0  0  0  0  0  0  0  0  0
> 4.2085   -0.16560. O   0  0  0  0  0  0  0  0  0  0  0  0
>-3.6214   -1.04630. C   0  0  0  0  0  0  0  0  0  0  0  0
>-4.33850.19920. C   0  0  0  0  0  0  0  0  0  0  0  0
>-4.3385   -0.63110. C   0  0  0  0  0  0  0  0  0  0  0  0
>-4.34691.86000. C   0  0  0  0  0  0  0  0  0  0  0  0
>-2.90421.86830. C   0  0  0  0  0  0  0  0  0  0  0  0
>   2  1  1  0  0  0  0
>   3  4  1  0  0  0  0
>   4  5  1  0  0  0  0
>   5  2  2  0  0  0  0
>   6  3  1  0  0  0  0
>   7  1  1  0  0  0  0
>   8  7  1  0  0  0  0
>   9  8  2  0  0  0  0
>  10  1  2  0  0  0  0
>  11  4  2  0  0  0  0
>  12 11  1  0  0  0  0
>  13 15  1  0  0  0  0
>  14  6  1  0  0  0  0
>  15 19  1  0  0  0  0
>  16 13  2  0  0  0  0
>  17 14  2  0  0  0  0
>  18 14  1  0  0  0  0
>  19 18  2  0  0  0  0
>  20 17  1  0  0  0  0
>  21  8  1  0  0  0  0
>  22 10  1  0  0  0  0
>  23 13  1  0  0  0  0
>  24  7  2  0  0  0  0
>  25 10  1  0  0  0  0
>  26 25  2  0  0  0  0
>  27 22  1  0  0  0  0
>  28 22  1  0  0  0  0
>  24 26  1  0  0  0  0
>   9  5  1  0  0  0  0
>   6 12  2  0  0  0  0
>  20 15  2  0  0  0  0
> M  END
> 
>
> The nitrogen in the heterocycle should have 1 implicit hydrogen on it, and
> when I look at it after initially creating the mol object, it does. I want
> to convert it to aromatic form, so I am calling rdmolops.SetAromatize(mol).
> Once I do this however, it seems that the implicit hydrogen on the nitrogen
> is removed, which then causes an error to be thrown if I ever try to
> convert it back to kekule form or do any kind of sanitization. Maybe my
> understanding of aromaticity is wrong, but shouldn't the hydrogen be on the
> nitrogen regardless of whether or not it is considered to be in an aromatic
> form?
>
> I could be misunderstanding rdkit's aromaticity models, but for my
> purposes, I want to be able to convert the mol to either kekule or aromatic
> form depending on some configuration settings. 

[Rdkit-discuss] Implicit Hydrogens On Aromatic Hetereoatoms

2017-10-05 Thread Chris Murphy
Hi!

I'm running at an issue with implicit hydrogens on aromatic heteroatoms. I
am feeding the following sdf into a mol object:


  Mrv16c5 10021719092D

 28 31  0  0  0  0999 V2000
   -2.90000.20760. C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.18710.62280. N   0  0  0  0  0  0  0  0  0  0  0  0
0.00630.29570. N   0  0  0  0  0  0  0  0  0  0  0  0
   -0.74860.63540. C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.46570.21180. C   0  0  0  0  0  0  0  0  0  0  0  0
0.55990.91640. C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.9000   -0.62280. C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.1829   -1.03800. C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.4657   -0.62280. C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.62140.62280. C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.67311.45740. C   0  0  0  0  0  0  0  0  0  0  0  0
0.14051.63350. C   0  0  0  0  0  0  0  0  0  0  0  0
3.86460.59760. C   0  0  0  0  0  0  0  0  0  0  0  0
1.38600.83670. C   0  0  0  0  0  0  0  0  0  0  0  0
3.03840.67310. C   0  0  0  0  0  0  0  0  0  0  0  0
4.34691.26870. O   0  0  0  0  0  0  0  0  0  0  0  0
1.72570.08180. C   0  0  0  0  0  0  0  0  0  0  0  0
1.86411.51610. C   0  0  0  0  0  0  0  0  0  0  0  0
2.68611.43220. C   0  0  0  0  0  0  0  0  0  0  0  0
2.5477   -0.00210. C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.1829   -1.86830. Cl  0  0  0  0  0  0  0  0  0  0  0  0
   -3.62971.45320. C   0  0  0  0  0  0  0  0  0  0  0  0
4.2085   -0.16560. O   0  0  0  0  0  0  0  0  0  0  0  0
   -3.6214   -1.04630. C   0  0  0  0  0  0  0  0  0  0  0  0
   -4.33850.19920. C   0  0  0  0  0  0  0  0  0  0  0  0
   -4.3385   -0.63110. C   0  0  0  0  0  0  0  0  0  0  0  0
   -4.34691.86000. C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.90421.86830. C   0  0  0  0  0  0  0  0  0  0  0  0
  2  1  1  0  0  0  0
  3  4  1  0  0  0  0
  4  5  1  0  0  0  0
  5  2  2  0  0  0  0
  6  3  1  0  0  0  0
  7  1  1  0  0  0  0
  8  7  1  0  0  0  0
  9  8  2  0  0  0  0
 10  1  2  0  0  0  0
 11  4  2  0  0  0  0
 12 11  1  0  0  0  0
 13 15  1  0  0  0  0
 14  6  1  0  0  0  0
 15 19  1  0  0  0  0
 16 13  2  0  0  0  0
 17 14  2  0  0  0  0
 18 14  1  0  0  0  0
 19 18  2  0  0  0  0
 20 17  1  0  0  0  0
 21  8  1  0  0  0  0
 22 10  1  0  0  0  0
 23 13  1  0  0  0  0
 24  7  2  0  0  0  0
 25 10  1  0  0  0  0
 26 25  2  0  0  0  0
 27 22  1  0  0  0  0
 28 22  1  0  0  0  0
 24 26  1  0  0  0  0
  9  5  1  0  0  0  0
  6 12  2  0  0  0  0
 20 15  2  0  0  0  0
M  END


The nitrogen in the heterocycle should have 1 implicit hydrogen on it, and
when I look at it after initially creating the mol object, it does. I want
to convert it to aromatic form, so I am calling rdmolops.SetAromatize(mol).
Once I do this however, it seems that the implicit hydrogen on the nitrogen
is removed, which then causes an error to be thrown if I ever try to
convert it back to kekule form or do any kind of sanitization. Maybe my
understanding of aromaticity is wrong, but shouldn't the hydrogen be on the
nitrogen regardless of whether or not it is considered to be in an aromatic
form?

I could be misunderstanding rdkit's aromaticity models, but for my
purposes, I want to be able to convert the mol to either kekule or aromatic
form depending on some configuration settings. Is there a way to manipulate
the hydogrens on an atom in this case?

Thanks!
Chris
--
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