Skip to content

CV File external engine#626

Open
dwhswenson wants to merge 67 commits into
openpathsampling:masterfrom
dwhswenson:cv_external_engine
Open

CV File external engine#626
dwhswenson wants to merge 67 commits into
openpathsampling:masterfrom
dwhswenson:cv_external_engine

Conversation

@dwhswenson

Copy link
Copy Markdown
Member

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.

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
@dwhswenson dwhswenson added this to the 1.x milestone 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])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

self.cv = {cv.name: cv for cv in cvs}

self.shape = (n_atoms, n_spatial)
self.velocities = np.zeros(self.shape) # HACK

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a good use-case for a ConfigurationSnapshot called Configuration :) Just an idea.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants