How to represent 2 different chemical bonding in graph edge?

I want to represent RNA chemicals into graphs. However, when it comes to represent bondings, I face a problem: the chain bonding is the typical bonding while the base paralleling is the Hydrogen bonding. So, if I just want to represent these 2 bonding into 2 different classes, what should I do? Simply one-hot them or using hetero-graphs?

What do you mean by “represent these 2 bonding into 2 different classes”? Do you mean how to represent them as two types of edges? Also, I assume your graphs only have a single type of nodes?

1 Like

Thanks for the reply!

Yes, I just want to represent them in 2 types. However, I don’t want to use the hetero method since I want to graph2vec those RNAs. And there is just 1 type of node, they are all ribonucleic acid.

What do you mean by graph2vec? Do you want to apply some network embedding approaches? There can be two options:

  • Simply construct two graphs, one per edge type
  • Use one-hot encoding of edge types for edge features as you proposed
1 Like

True, you’ve got what I meant!
Here is 2 other little questions:

  1. Is there any graph embedding tutorial in DGL?

  2. How can I one-hot those edge features? just [0, 1] and [1, 0]?

Thanks a lot again !!!

  1. As far as I know, network embedding approaches learn node embeddings from scratch and they do not employ input node/edge features. One possibility is to construct two graphs, one per edge type, and then apply graph embedding approaches to each of them. DGL does not have tutorials on them. You can find some examples – DeepWalk, LINE.
  2. Yes, you can encode the two edge types with [0, 1] or [1, 0] if you want to use edge features in graph neural networks.

Thank you for keeping helping me😁