CV File external engine#626
Open
dwhswenson wants to merge 67 commits into
Open
Conversation
Instead of just writing "0.0" for each frame.
Still needs a little more to do the correct shooting as expected
Based on initial ipynb tests to play with it
Removed cv_file.engine_command -- users can subclass if wanted
jhprinz
reviewed
Nov 6, 2016
| # explanation for the strange i=i is because lambdas are annoying | ||
| # when defined in loops: http://stackoverflow.com/questions/938429 | ||
| cvs = [paths.FunctionCV(self.cv_names[i], | ||
| lambda s, i=i: s.xyz.flatten()[i]) |
Contributor
There was a problem hiding this comment.
Question: Just to clarify -- each column corresponds to a new CV right? There might be cases (especially for performance) where you want to use several columns together as one CV.
jhprinz
reviewed
Nov 6, 2016
| self.cv = {cv.name: cv for cv in cvs} | ||
|
|
||
| self.shape = (n_atoms, n_spatial) | ||
| self.velocities = np.zeros(self.shape) # HACK |
Contributor
There was a problem hiding this comment.
This could be a good use-case for a ConfigurationSnapshot called Configuration :) Just an idea.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a little "engine" that allows us use the OPS analysis tools for an engine that just outputs some reduced set of CVs. Obviously, it would be very hard to run sampling with this (you would need a way to get from the reduced space of your CVs into the full space for your starting frames; OPS will only know how to write the CVs), but that's not the goal.
The goal here was to make it easy to analyze output from a simulation without needing to have an OPS version of the CV. (The idea came out a question that Gerhard Hummer asked me at the Lorentz Center workshop.)
NOTE: This is based on the ExternalEngine, and so it requires that #144 be merged first. Therefore, I'm marking it "onhold" and with a 1.x milestone.