Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces the key components of the DimeNet model to the HydraGNN library by modifying the PyG implementation.
The core addition is the DIMEStack which is inherits from
Base
to provide convolutional layers on request using the_get_conv()
method.Notice: Because the PyG implementations use the glorot initialization, the construction of the hidden dimension must be larger than 1 to avoid division by zero. Only the
input_dim
andoutput_dim
are provided to_get_conv()
, without constraint on the dimension of the convolution. Therefore, DIMEStack will use theinput_dim
if larger than 1 or theoutput_dim
otherwise. If neither is larger than one, then the assertion will fail.The DIMEStack also computes the necessary convolutional arguments, being
rbf
: (tensor) the radial basis function output.sbf
: (tensor) the spherical basis function output.i
: The message passing target.j
: The message passing source.idx_kj
: A portion of the bond triple.idx_ji
: The second component of the bond triple.Notice: DimeNet uses the
triplet()
method to compute the bond angles between triplets of nodes. This information is computed on every call but there is room for computational speed ups by computing once and then updating iteratively.The stack modifies the
Embedding
andInteractionBlock
and preserves theOutputBlock
of the baseline DimeNet implementation. For theEmbedding
layer, the baseline atomic feature embedding is removed as embedding is handled by HydraGNN.The baseline
InteractionBlock
does not find the optimal path when usingeinsum
so this call is segmented into two equivalent steps.Six hyperparameters are introduced.
num_before_skip
/num_after_skip
control layers before and after the attention mechanism in theOutputBlock
.num_bilinear
determines the number of bilinear layers used in theInteractionBlock
num_radial
/envelope_exponent
determine the radial basis functions used.num_spherical
determines the number of spherical basis functions usedThese arguments are checked to exist or set to none, and verified not to be none before use by DimeNet.
Other updates include documentation and testing.