mol2graph and graph2mol #rdkit #igraph

I posted about mol to graph object before. In the blog post, I wrote example that convert RDKit mol object to igraph object. It was one way. There was no method igraph to rdkit mol object. So I wrote very simple converter from graph to molecule. First, import modules. Then define two way function, mol2graphContinue reading “mol2graph and graph2mol #rdkit #igraph”

Convert rdkit molecule object to igraph graph object.

Molecules are often handled as graph in chemoinformatics. There are some libraries for graph analysis in python. Today, I wrote a sample script that convert from molecule to graph. I used python-igraph and rdkit. RDkit has method to get adjacency matrix from molecule so, I used the method. Code is following. Now test it. SeemsContinue reading “Convert rdkit molecule object to igraph graph object.”