Skip to main content
. 2022 May 7;27(9):3004. doi: 10.3390/molecules27093004
Algorithms 1 The pseudo-code of GNN-DDI
input: Molecular graph Gx of drug x and its original features Hi(0) of atomic nodes
               Molecular graph Gy of drug y and its original features Hi(0) of atomic nodes
output: Probability score p(Gx,Gy) of drug pair (x,y)
1: Initialize parameter sets in GNN-DDI.
2: for k in K:
3: Compute hx(k+1) and hy(k+1) based on Equations (1) to (3).
4: SAGPooling based on Equation (4) to obtain HGx(k+1) and Hy(k+1) in layer k.
5: end for
6: Concatenate k-hops HGx(k+1) and Hy(k+1) based on Equation (5) to obtain HGx and HGy.
7: Concatenate HGx and HGy to obtain the latent feature vector of a drug pair H(Gx,Gy)
8: Feed feature vector H(Gx,Gy) into the predictor to get probability score p(Gx,Gy).