> 
> If what you are looking for is information about what type of atom 
> [*:1] is in the original molecule, I think you can probably figure 
> it out based on the additional info that's present in the output 
> from Jameed's code.
> 
> For example, here's one of the output lines from an indexing.py run 
> that I did for an RDKit blog post I'm working on (hopefully going up 
today):
> Cc1c(CCN2CCNCC2)ccc3cc(F)ccc13,Fc1ccc2cc(CCN3CCNCC3)ccc2c1,521767,
> 521766,[*:1]C>>[*:1][H],[*:1]c1c(CCN2CCNCC2)ccc2cc(F)ccc21
> The last entry in that line is the "core", which shows where the [*:
> 1] is attached.
> 
> Using these cores, you can get information about where points are 
> attached to them like this:
> In [2]: m = Chem.MolFromSmiles('[*:1]c1c(CCN2CCNCC2)ccc2cc(F)ccc21')
> In [3]: attaches = [x for x in m.GetAtoms() if x.GetAtomicNum()==0]
> In [7]: for at in attaches:
>     if at.HasProp("molAtomMapNumber"):
>         nbr = at.GetNeighbors()[0]
>         print at.GetProp("molAtomMapNumber"),nbr.GetSymbol
> (),nbr.GetIsAromatic()
>    ...:         
> 1 C True
> 
> This says that attachment point 1 is connected to a carbon which is 
aromatic.
> 
> Does that help?

Absolutely, this saves my day!

Thank you very much for this snippet!


Paul


This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient, you 
must not copy this message or attachment or disclose the contents to any other 
person. If you have received this transmission in error, please notify the 
sender immediately and delete the message and any attachment from your system. 
Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept 
liability for any omissions or errors in this message which may arise as a 
result of E-Mail-transmission or for damages resulting from any unauthorized 
changes of the content of this message and any attachment thereto. Merck KGaA, 
Darmstadt, Germany and any of its subsidiaries do not guarantee that this 
message is free of viruses and does not accept liability for any damages caused 
by any virus transmitted therewith.

Click http://www.merckgroup.com/disclaimer to access the German, French, 
Spanish and Portuguese versions of this disclaimer.
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to