-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new parameters in forward function #163
Comments
Can you explain what you mean by that? How would they differ from global parameters? |
They cannot be defined globally but are dependent on the state of the system, for example, the electrostatic potential on each atom. |
You're saying it's a per-particle parameter? And it's time-varying, so it can't be fixed in the model? |
Exactly! |
It would be awesome if you could give me some clues on how the positions and boxvectors are passed from OpenMM to the interface, then maybe I could try to pass other time-varying parameters in the same way. |
Maybe I could make my question clearer. For example, is it possible to add the MM forces on all atoms as a new parameter to the forward function? |
The complicated part is where and how the value is stored. Anything that varies with time should be stored in the Context. It stores all the standard properties, like positions and velocities. It also has a generic mechanism for storing and updating global parameters, but only scalar valued ones. Extending it to allow storing arbitrary vector valued parameters in the Context would be a major feature. Alternatively it could be stored in the Force, but in that case it's treated as constant. Modifying a Force doesn't affect any Contexts that have already been created for it, but it can have an |
Thank you! With that, is the forward function on the interface currently taking positions and boxvectors from the Context object? |
Correct. |
Dear developers,
I was wondering if it is possible to add user-defined parameters in the forward function other than the positions or boxvectors. The parameters are not constant for different MD snapshots, thus they cannot be defined as global parameters.
The text was updated successfully, but these errors were encountered: