Adding support for PLUMED: based on xiangda's efforts #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on Xiangda's legacy codes, I've cleaned and added initial support for PLUMED.
A comparison between upside and PLUMED is done by
example/14.Plumed/compare_plumed_upside.py
: basically we have identical coordinates and radius of gyrations:However, there are a few caveats:
source_sh
:export PLUMED_TYPESAFE_IGNORE=yes
. Otherwise plumed will throw this error:And the full stack can be traced by
gdb
:The last relevant line executed is the
plumed_cmd(plumedmain, "setVirial", &virial);
, and I've also tried to initialize virial array with 0.0f, and it will still throw this error. It also seems to be related to theeh_throw.cc
. But anyways, it seems after exporting the global variable it works.2. recording issues: The comparison result above used frame-interval=1. If I use something large, e.g. 50, then there will be certain deviations between plumed and upside:
it seems to me that this is due to the rounding error when Upside records the trajectory to a time-frame, such that the plumed recorded frames are shifted compared to Upside recorded. For example, a time=1000, frame-interval=50, (PLUMED) STRIDE=50 simulation will give only 20 upside recorded frames but 21 PLUMED recorded frames.
And the
traj.time
in this case shows: