Possible to compile the neighbor function separate from full package? #299
-
I'm given to understand the neighbor list / radial graph function neighbors is very efficient, and I was hoping to test it in another pipeline I'm developing, without installing the full torchmd-net suite. Is this possible / easy to do? I'm not experienced at compiling standalone cuda+cpp modules so apologies if it is obvious. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Indeed! If you are not planning to modify the extension itself I would just conda install torchmd-net. You can then just import this https://torchmd-net.readthedocs.io/en/latest/generated/torchmdnet.extensions.html#torchmdnet.extensions.get_neighbor_pairs_kernel Building torch extensions is really tricky, so I would start by using the conda builds. If you want to build locally to fiddle with the code you can also use conda to get the depencencies: https://torchmd-net.readthedocs.io/en/latest/installation.html#install-from-source |
Beta Was this translation helpful? Give feedback.
Indeed!
99% of the building time of torchmd-net comes from the neighbor list extensions. So I would not worry about wasting time by building the rest.
If you are not planning to modify the extension itself I would just conda install torchmd-net.
You can then just import this https://torchmd-net.readthedocs.io/en/latest/generated/torchmdnet.extensions.html#torchmdnet.extensions.get_neighbor_pairs_kernel
Or alternatively this wrapper: https://torchmd-net.readthedocs.io/en/latest/generated/torchmdnet.models.utils.html#torchmdnet.models.utils.OptimizedDistance
Building torch extensions is really tricky, so I would start by using the conda builds. If you want to build locally to fiddle with th…