it Discuss
Objet : Re: [Rdkit-discuss] edge matrix
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...@firmeni
Dear Jan,
There is not such kind of function in RDKit.
BR,
Guillaume
De : Jan Halborg Jensen
Date : jeudi, 18 janvier 2018 à 11:17
À : GVALMTGG
Cc : Mario Lovrić, RDKit Discuss
Objet : Re: [Rdkit-discuss] edge matrix
Dear Guillaume
I understand that the adjacency matrix, together
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
> wrote:
Dear Mario,
There is a adjacency matrix available:
ipal it’s only what you need.
BR,
Guillaume
De : Jan Halborg Jensen
Date : jeudi, 18 janvier 2018 à 10:59
À : GVALMTGG
Cc : Mario Lovrić, RDKit Discuss
Objet : Re: [Rdkit-discuss] edge matrix
Is there a function for the reverse process, i.e. getting a molecule object
from an adjacency matr
Dear Chris,
Thanks, thats it :)
On Wed, Jan 17, 2018 at 6:25 PM, Chris Earnshaw
wrote:
> I don't think there's a way to do this using RDKit itself, but it appears
> to be straightforward using Python with numpy and networkx, e.g.
>
> import numpy as np
> import networkx
I don't think there's a way to do this using RDKit itself, but it appears
to be straightforward using Python with numpy and networkx, e.g.
import numpy as np
import networkx as nx
a = np.matrix([[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]])
b =
Correct, I am looking for a rdkit-hidden-option to do it :D
On Wed, Jan 17, 2018 at 5:56 PM, Jason Biggs wrote:
> I am a novice when it comes to graph theory, but it seems like what is
> wanted here is the adjacency matrix of the corresponding line graph (
>
I am a novice when it comes to graph theory, but it seems like what is
wanted here is the adjacency matrix of the corresponding line graph (
http://mathworld.wolfram.com/LineGraph.html).
I don't know how to do this in python, but if I use mathematica, it goes
like this
adjacencyMatrix = {{0, 1,
Dear Marta and Guillaume,
Thank you both.
Your solutions are giving the same output, which is the vertices-adjacency
matrix.
There is something called the edge-adjaceny matrix. Its defined in several
papers by Trinajstic to calculate the M2 Zagreb indices, eg. "The Zagreb
Indices 30 Years After"
Hi Mario,
What exactly do you mean by 'edge matrix'? Are you sure you provided a
correct example? If you want to get an adjacency matrix of a molecular
graph you can iterate over bonds to get it:
from rdkit.Chem import MolFromSmiles
import numpy as np
m = MolFromSmiles('CC(C)CC')
n =
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
11 matches
Mail list logo