Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[WIP] Functions to convert netcdfplus CVs to SimStore CVs#1005

Open
dwhswenson wants to merge 3 commits into
openpathsampling:masteropenpathsampling/openpathsampling:masterfrom
dwhswenson:new_cv_from_olddwhswenson/openpathsampling:new_cv_from_oldCopy head branch name to clipboard
Open

[WIP] Functions to convert netcdfplus CVs to SimStore CVs#1005
dwhswenson wants to merge 3 commits into
openpathsampling:masteropenpathsampling/openpathsampling:masterfrom
dwhswenson:new_cv_from_olddwhswenson/openpathsampling:new_cv_from_oldCopy head branch name to clipboard

Conversation

@dwhswenson

Copy link
Copy Markdown
Member

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.

Still need to do some custom work on the func_config for MDTraj
@codecov

codecov Bot commented Apr 8, 2021

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.17%. Comparing base (8292193) to head (2801508).
⚠️ Report is 597 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1005   +/-   ##
=======================================
  Coverage   81.17%   81.17%           
=======================================
  Files         139      139           
  Lines       15143    15143           
=======================================
  Hits        12292    12292           
  Misses       2851     2851           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dwhswenson

Copy link
Copy Markdown
Member Author

@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 from_netcdfplus_cv methods are working correctly? They work on the things I have tested, but those are based on the way that I create CVs; just checking to see if there are use cases I'm missing.

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 FunctionCV changed its name, because SimStore naming changed a little to avoid some domain-specific things in netcdfplus.) If you have a different CV type, let me know and I can prioritize setting up those, as well -- I assume these are the most-used CV types.

openpathsampling. openpathsampling.experimental.storage.collective_variables.
FunctionCV CollectiveVariable
CoordinateFunctionCV CoordinateFunctionCV
MDTrajFunctionCV MDTrajFunctionCV

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.