atomistic-machine-learning / schnetpack-gschnet

G-SchNet extension for SchNetPack
MIT License
45 stars 8 forks source link

Relative position vectors? #5

Closed ameya98 closed 1 year ago

ameya98 commented 1 year ago

In schnetpack's QM9 task, the input has the relative position vectors r_ij which are used to compute the relative distances d_ij. However, in this repository I see that only the distances are provided. Is there a way to obtain the position vectors as well?

NiklasGebauer commented 1 year ago

Hi @ameya98 ,

I made a small commit (f400b50) to support "input_modules" in the model (just like the NeuralNetworkPotential class in schnetpack). After you pulled and installed the newest version, you can add the following lines to your experiment.yaml:

model:
  input_modules:
    - _target_: schnetpack.atomistic.PairwiseDistances

Then, the model will compute the relative position vectors Rij and add it to the inputs as the very first step, just as in the schnetpack models.

Best, Niklas

ameya98 commented 1 year ago

Thank you so much for your help!