plumed2
plumed2 copied to clipboard
Track shortcut action usage
Description
Added functionality to track how actions are used in shortcuts to create more complex inputs.
There are two ways that I use shortcuts. The first is the straightforward way. For these I want the use of shortcuts to be visible to users.
The other is when you call things like CUSTOM, which is a shortcutAction that calls CUSTOM_SCALAR, CUSTOM_VECTOR, CUSTOM_MATRIX or CUSTOM grid. Here I want the user to use CUSTOM comfortable in the knowledge that PLUMED knows what to do with the input action. They don't need to know that the implementation has these are separate actions. They are only separate actions because I think that makes the code more readable.
Target release
I would like my code to appear in release 2.10
Type of contribution
- [x] changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
- [ ] changes to a module not authored by you
- [ ] new module contribution or edit of a module authored by you
Copyright
- [x] I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
- [ ] the module I added or modified contains a
COPYRIGHT
file with the correct license information. Code should be released under an open source license. I also used the commandcd src && ./header.sh mymodulename
in order to make sure the headers of the module are correct.
Tests
- [x] I added a new regtest or modified an existing regtest to validate my changes.
- [x] I verified that all regtests are passed successfully on GitHub Actions.
@gtribello great!
If I understand correctly from the change in the regtest, before this fix there were cases where the user was forces to use ARG1
even with a single argument, whereas now it is possible to just use ARG
. I agree this is better, especially if you want to later transform some other functionality in a shortcut, without the users need to update their input files.
For me it can be merged
Except that there are conflicts with another PR from @gtribello that I just merged (I guess easy to fix) and that some regtests are failing (not clear to me why)
OK @GiovanniBussi
I hope that should be all of those problem fixed now