Skip to content

Fix Shooting Point Analysis - #725

Merged
dwhswenson merged 1 commit into
openpathsampling:masterfrom
hejung:fix_SPA
Feb 26, 2020
Merged

dwhswenson merged 1 commit into
openpathsampling:masterfrom
hejung:fix_SPA

Conversation

@hejung

@hejung hejung commented Oct 27, 2017 •

Copy link
Copy Markdown
Contributor

closes #722
I reimplemented the TransformedDict.iter() method and updated the corresponding test.
Now self.values(), self.keys() and self.items() work consistently and return counter, snapshots and tuples of them respectively.

@dwhswenson

Copy link
Copy Markdown
Member

Quick side note @hejung (not specific to the code; review will come later): It looks like you don't have matching email addresses in you git config and GitHub account. This is either because your git config doesn't have an email set, or because the email you set isn't linked to GitHub. See more:

Setting this helps us track contributions, and ensures that you get credit for your contributions!

hejung added a commit to hejung/openpathsampling that referenced this pull request Apr 11, 2018
@jhprinz

jhprinz commented Jun 19, 2018

Copy link
Copy Markdown
Contributor

What is the status on this? Can this be merged?

@jhprinz jhprinz changed the title Fix spa Fix Shooting Point Analysis Jun 19, 2018
@dwhswenson

Copy link
Copy Markdown
Member

@jhprinz : Our policy was to hold off on user contributions until the paper is accepted. This will be one of the first PRs to be merged once we accept external contributions!

@dwhswenson

Copy link
Copy Markdown
Member

Please note that we have changed to the OPS license from LGPL (2.1 or later) to MIT. For any pull request to OPS that was started while the license was still LGPL, I need an explicit confirmation that you approve of the license change. Please add a comment with something like "The changes in this pull request are licensed under the MIT license."

@hejung
hejung force-pushed the fix_SPA branch 2 times, most recently from 6d10876 to 3caac79 Compare February 23, 2020 14:09
@hejung

hejung commented Feb 23, 2020

Copy link
Copy Markdown
Contributor Author

The changes in this pull request are licensed under the MIT license.

Now rebased on the current master.

Just as a reminder what changed:
ShootingPointAnalysis.keys(), ShootingPointAnalysis.items() and iterating over the ShootingPointAnalysis now hide that we in fact that we use the string representation of the snapshots coordinates instead of the snapshot as key.
I.e. we now return the snapshots associated with the hashstring whenever we are asked for a key, the strings are only accessible via the keys of the self.hash_representative or self.store dictionaries.

@dwhswenson dwhswenson added the bugfix PRs fixing bugs label Feb 24, 2020
@dwhswenson

dwhswenson commented Feb 24, 2020 •

Copy link
Copy Markdown
Member

This technically changes tested behavior, but I'm of the opinion that the tested behavior was incorrect from a user perspective, hence a bug. (This is the difference between API breaking and not.)

Just to check that no one is relying on the old behavior (that keys in shooting point analysis results are internally string reps of the coords, not the snapshots), mentioning @sroet @arjunwadhawan -- if either of you have a good reason to be concerned about this PR, let me know. If not, I'll doubt that it has become important to anyone's workflow. I leave this open for comment for 48 hours, merging no earlier than Wednesday, 26 Feb.

This also opens the way to something else I was thinking about: since this hides the actual keys from users, they can be different for different engines. The UUID of the statics object in snapshots from OpenMM can be used, instead of the coordinates. I think this might make the analysis faster (might be able to only load UUIDs, not the whole snapshot).

@sroet

sroet commented Feb 24, 2020

Copy link
Copy Markdown
Member

@dwhswenson I don't think this should raise any issues on my codes, and I agree that the current tested behavior is incorrect. So if it raises issues on my code I should be able to alter it pretty quickly.

@dwhswenson

Copy link
Copy Markdown
Member

No complaints, so merging it!

@dwhswenson
dwhswenson merged commit 26997b4 into openpathsampling:master Feb 26, 2020
@hejung
hejung deleted the fix_SPA branch February 28, 2020 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PRs fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ShootingPointAnalysis items() and values() not working/result in error

4 participants