I posted some code about DGL before. Recently DGL team published life science focused package DGL life sci. It seems almost as same as DGL but code is well organized. User can install the package from conda!
And I got some comments about my attentive FP example.
So I tried to use new DGL-LS and build attentive fp model.
Now 11:10PM in Japan so I’m so sleepy… So I just pasted my jupyter notebook and go to bed Zzzzzzzz.
https://nbviewer.jupyter.org/gist/iwatobipen/017fae146c1d67a2cfee455c0a427330
I added color bar in drawing code.

The code always normalize atom weight and coloring it so I think range of weight is always 0 – 1.
I felt that the package will be good starting point of chemoinformatics. And some new functions are implemented. I’ll check and play them.
Good night!
Thanks iwatobipen! It is a very clear demonstration on how to implement attentiveFP for classification task and visualize its prediction results!
Really appreciate your effort!
Thanks for your comment!
I’m happy to help you.
Hi iwatobipen,
You used self-defined atom_featurizer and bond_featurizer and mol_to_bigraph in the script.
Can explain why you used self-defined featurizer instead of the default featurizer e.g. CanonicalAtomFeaturizer() in dgl and mol_to_bigraph instead of mol_to_complete_graph?
Dose the featurizer and graph method giving better results?
Many thanks in advance!
Hi Mark,
Hope you are doing well. And thanks for your question.
It’s short answer I defined the feature because I would like to use same features as original publication.
https://docs.dgl.ai/en/0.4.x/generated/dgl.data.chem.CanonicalAtomFeaturizer.html
DGL default featurizer has different features to the article.
https://docs.dgl.ai/en/0.4.x/generated/dgl.data.chem.CanonicalAtomFeaturizer.html
And I haven’t tried AttentiveFP with different featurizer. Hope this will answer for your question.
Thanks,
Hello, I’m a rookie who just started to learn DGL and PyG. Recently, I am interested in the model of an article.
https://github.com/materialsvirtuallab/megnet
I want to try to use DGL or PyG to implement this model, but I don’t have a proper idea. Can you give me some guidance?
Hi,
Thanks for your comment. I’ll check the article and back if I have any ideas.
Thanks a lot for your kind comments,I’m looking forward to your reply.