-
Notifications
You must be signed in to change notification settings - Fork 19
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
Custom expression evaluation for steered Molecular Dynamics #362
Comments
Thanks, this sounds great. I should be able to take a look through the code early next week and will get back to you with any comments / suggestions. |
Thanks again for this, it will be a really useful feature. I was wondering if we could assign a variable name to each collective variable to simplify the creation of expressions, e.g. if the user passes two CVs, then the expression should use something like I was also wondering how bounds are handled for the
I'd be happy for you to add the same functionality for the regular metadynamics configuration writer too. It's definitely a feature that will be of general use. |
So would the variable names be
|
The current sMD implementation allows to use RMSD, Distance and Torsion collective variables. I had a case where I had to use a custom function as one of my CVs (plumed docs). I think this is quite a niche case, but it could be a powerful way to add more flexibility to sMD protocols.
I have added a new
CollectiveVariable.Expression
on branchfeature-custom-smd
and also modifiedProcess._plumed
to write out the PLUMED input file in a way that works with the custom expression. The key feature was defining the CVs that are part of the expression at the start of the PLUMED input file, but not adding them into the steering itself in theMOVINGRESTRAINT
part. I tried to writeCollectiveVariable.Expression
to be consistent with BSS but of course make any changes that are needed. At the moment I have not modified the Metadynamics part (Process._plumed._createMetadynamicsConfig()
) but I can make the same changes if you are happt with what I did to the sMD (or simply make a custom expression not supported for it)As an example, here is a notebook and associated data to illustrate how the code would be used to run sMD with a custom expression.
The text was updated successfully, but these errors were encountered: