[WIP] Functions to convert netcdfplus CVs to SimStore CVs#1005
[WIP] Functions to convert netcdfplus CVs to SimStore CVs#1005dwhswenson wants to merge 3 commits intoopenpathsampling:masterfrom
Conversation
Still need to do some custom work on the func_config for MDTraj
Codecov Report
@@ Coverage Diff @@
## master #1005 +/- ##
=======================================
Coverage 81.17% 81.17%
=======================================
Files 139 139
Lines 15143 15143
=======================================
Hits 12292 12292
Misses 2851 2851 Continue to review full report at Codecov.
|
|
@sroet, @hejung, @gyorgy-hantal (and anyone else who has some old CVs from netcdfplus and is comfortable trying an experimental branch): Could you try this branch out and see if the The following script is a rough template of I hope you can try, especially for any CV that might have an unusual setup: import openpathsampling as paths
from openpathsampling.experimental.storage.collective_variables import MDTrajFunctionCV
storage = paths.Storage("old_file.nc", mode='r')
old = storage.cvs['phi'] # was originally defined as a paths.MDTrajFunctionCV
# create the new CV using the classmethod `from_netcdfplus_cv`
new = MDTrajFunctionCV.from_netcdfplus_cv(old)
snap = storage.snapshots[-1] # take an arbitrary snapshot from storage
assert old(snap) == new(snap)So far, the CV types in the following table have been implemented in the new storage. (Only
|
This adds a constructor to SimStore-based CVs to create the appropriate SimStore CV from a netcdfplus CV. This is a necessary step toward writing a script that converts netcdfplus files to SimStore files. That will be useful now for users who want to experiment with SimStore, and will be necessary in a pre-2.0 release so that users can upgrade.