Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Water #360

Closed
wants to merge 33 commits into from
Closed

Water #360

wants to merge 33 commits into from

Conversation

mpharrigan
Copy link
Member

Added metric solventfp to cluster based on weighted solute-solvent distances

Also added a new script AssignOuter.py that takes a conformation that is in state i under one clustering, and state j in another clustering and assigns it to a combined state (ij)

mpharrigan and others added 25 commits January 9, 2014 12:44
Also this has the effect of removing triple nested for
loop to one loop
Merge the SaveStructures.py script from master
Merged in latest master from simtk
#!/usr/bin/env python
# This file is part of MSMBuilder.
#
# Copyright 2011 Stanford University
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe 2014?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch

@@ -97,6 +96,19 @@ def add_metric_parsers(parser):
help='which distance metric', choices=AtomPairs.allowable_scipy_metrics)
metric_parser_list.append(atompairs)

solventfp = metric_subparser.add_parser('solventfp', description='''SOLVENTFP: Get
the solvent fingerprint.''')
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we put a little bit more description here. Maybe a citation to the Gu paper would be sufficient.

# Get a traj_length x n_water_indices vector of distances
distances = md.compute_distances(trajectory,
atom_pairs,
periodic=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

md.compute_distances will ignore periodic=True if the trajectory file doesn't contain PBC information. Do we want to check for that explicitly and issue a warning or something?

@rmcgibbo
Copy link
Contributor

This is very nice. I made some small comments in the diff, but they're pretty minor.

@rmcgibbo
Copy link
Contributor

Also, we need to add a couple tests. These can be simple; one of the main reasons for having them is that ensures that if we break something somewhere else in the library (e.g. remove a method or refactor something) that is called by one of the SolventFP functions/classes, it gets registered immediately as a test failure.

The fact that no such tests exist for LPRMSD is the reason that I broke it on accident w/ msmb2.8. e.g. #356

@rmcgibbo
Copy link
Contributor

+1. All the changes in the diff (4421d71 - 2e0f94c) look good.

@mpharrigan mpharrigan mentioned this pull request Apr 4, 2014
@mpharrigan
Copy link
Member Author

Subsumed by #405

@mpharrigan mpharrigan closed this Apr 4, 2014
@mpharrigan mpharrigan deleted the water branch April 4, 2014 21:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants