openmm / openmm-torch

OpenMM plugin to define forces with neural networks
180 stars 23 forks source link

Support for multivariate collective variable #129

Open ShashankSule opened 8 months ago

ShashankSule commented 8 months ago

Does openmm-torch support multivariate collective variables? I would like to do metadynamics along an NN collective variable in 3 dimensions, and the current openmm-torch documentation involves only univariate examples. Can this be done simply by changing the number of output dimensions of the NN, or is a more elaborate scheme required?

peastman commented 8 months ago

The model needs to return a single number, which gets interpreted as the energy. You can include three TorchForces, each calculating a single number, and use them as your collective variables.