Is there a function for the reverse process, i.e. getting a molecule object 
from an adjacency matrix?

Best regards, Jan

On 17 Jan 2018, at 17:19, Guillaume GODIN 
<guillaume.go...@firmenich.com<mailto:guillaume.go...@firmenich.com>> wrote:

Dear Mario,

There is a adjacency matrix available:

from rdkit import Chem
mol = Chem.MolFromSmiles('CC(C)CC')
adj = Chem.GetAdjacencyMatrix(mol)
print adj

[[0 1 0 0 0]
 [1 0 1 1 0]
 [0 1 0 0 0]
 [0 1 0 0 1]
 [0 0 0 1 0]]

But this is not what you want…

Can you explain your output generation process please ?

BR,

Guillaume


De : Mario Lovrić
Date : mercredi, 17 janvier 2018 à 16:31
À : RDKit Discuss
Objet : [Rdkit-discuss] edge matrix

Dear all,

Does any one have an idea how to get an edge matrix (graph theory) out of 
Rdkit, I digged deep but didnt find anything.

F.example for:

'CC(C)CC'


it would be:

array([[0, 1, 1, 0],
       [1, 0, 1, 0],
       [1, 1, 0, 1],
       [0, 0, 1, 0]])

Thanks.


--
Mario Lovrić
***********************************************************************************
DISCLAIMER
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.
***********************************************************************************
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org<http://slashdot.org>! 
http://sdm.link/slashdot_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto: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

Reply via email to