Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added zero-based indices for donors and acceptors in HBond Analysis. #833

Merged
merged 9 commits into from
May 9, 2016

Conversation

jdetle
Copy link
Contributor

@jdetle jdetle commented Apr 24, 2016

Fixes #807, #838

Changes made in this Pull Request:

  • Added references to 0-based indices in docs
  • Timeseries, counting by type, and timesteps by type now all have zero-based index
  • Added deprecation warning for 1-based indices upon calling HBondAnalysis
  • Recsql ids now also include zero-based indices even though they are redundant for uniqueness, figured that this would help when removing all references to 1-based indices later.
  • I went with a somewhat different name for 0-based indices than what was suggested in hbond analysis returns 1-based atom indices instead of canonical 0-based ones #807, just because it is shorter and I think it gets across the same thing. (donor_idx_zero instead of donor_atom_indices)

(Added versionchanged:: 0.15.0 4 times in different places saying essentially the same thing, I figured this was probably overkill but you could tell me where to delete extraneous stuff rather than where to add)

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

@jdetle
Copy link
Contributor Author

jdetle commented Apr 24, 2016

I need to add tests to prove that this works as expected, and try to increase code coverage.

8. "acceptor_atom"
9. "distance"
10. "angle"
3. "donor_idx_zero"
Copy link
Member

Choose a reason for hiding this comment

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

I don't like the "zero" in something that will eventually become the primary name. Can we go with donor_index and acceptor_index? I know that this is more confusing if you just look at the names but it will be better once we remove donor_idx and acceptor_idx.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, will do.

@jdetle
Copy link
Contributor Author

jdetle commented May 3, 2016

Hi, I made some changes to the docs and added one simple test. Adding testing on real data is something I am working with but as of right now it is very slow. Are there small files to work with where we have some knowledge of what hydrogen bonds exist? Either way, I think this PR is ready for review.

@samuel3181
Copy link

Hi @jdetle & @orbeckst
I have been following your efforts to fix the H-bond analysis defect. Does this mean that perhaps the version 15 of MDAnalysis would have this update?
thank you!
Sam

@@ -26,7 +26,7 @@
import itertools
import warnings

from MDAnalysisTests.datafiles import PDB_helix
from MDAnalysisTests.datafiles import PDB_helix, PSF, DCD
Copy link
Member

Choose a reason for hiding this comment

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

Are you using PSF, DCD anywhere for the tests?

@orbeckst
Copy link
Member

orbeckst commented May 6, 2016

@samuel3181 , the 0-based indices are almost ready to go in (unless @richardjgowers protests).
We don't have a fix for #801 yet.

@orbeckst
Copy link
Member

orbeckst commented May 6, 2016

Adding testing on real data is something I am working with but as of right now it is very slow. Are there small files to work with where we have some knowledge of what hydrogen bonds exist?

We don't have to look at whole trajectories. Just the first few frames can be sufficient. You can run a similar analysis with e.g. VMD and use that output as baseline truth. I think the original test looks for the i, i+4 protein backbone bonds in a alpha-helix.

@jdetle
Copy link
Contributor Author

jdetle commented May 6, 2016

Okay, I'll finish this up tonight with that in mind. I have tests ready to
upload on my machine, just didn't want to add something stupidly slow.

On Fri, May 6, 2016 at 1:53 PM Oliver Beckstein notifications@github.com
wrote:

Adding testing on real data is something I am working with but as of right
now it is very slow. Are there small files to work with where we have some
knowledge of what hydrogen bonds exist?

We don't have to look at whole trajectories. Just the first few frames can
be sufficient. You can run a similar analysis with e.g. VMD and use that
output as baseline truth. I think the original test looks for the i, i+4
protein backbone bonds in a alpha-helix.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#833 (comment)

Have a wonderful day,
John J. Detlefs

@orbeckst orbeckst added this to the 0.15.0 milestone May 6, 2016
@orbeckst orbeckst self-assigned this May 6, 2016
richardjgowers and others added 3 commits May 7, 2016 11:06
Changed distance metrics to staticmethods

Reworked selections to use implicit OR syntax

Used direct bool comparison of Groups
@jdetle
Copy link
Contributor Author

jdetle commented May 8, 2016

@richardjgowers, do you know why the tests are failing now?

@richardjgowers
Copy link
Member

@jdetle it was just the macos tests, so I'm blaming travis. I've restarted that set of tests

@jdetle
Copy link
Contributor Author

jdetle commented May 8, 2016

Can you try again one more time @richardjgowers? Or could you tell me how to restart travis builds myself without pushing a new commit?

@richardjgowers
Copy link
Member

@jdetle so around the top right of the travis webpage below "More options" there's a circular arrow type thingy that lets you restart a build (all jobs) or a single job (depending on where you click the thingy from)

@richardjgowers richardjgowers merged commit b750c24 into MDAnalysis:develop May 9, 2016
@kain88-de
Copy link
Member

I'm not sure if he is allowed to do that though.

@richardjgowers
Copy link
Member

ah right yeah, I had to sign in first, good point.

@jdetle
Copy link
Contributor Author

jdetle commented May 9, 2016

Any chance @MDAnalysis/coredevs could give me that level of access w/o giving me undue privileges? I think it would make things go smoother.

@richardjgowers
Copy link
Member

@jdetle not entirely sure re: permissions. You should be able to use travis off your fork of MDA (it's free). If you go to the website you can sign in via github and add your repo of MDA so it'll work identically to ours

@kain88-de
Copy link
Member

Random Travis failures are rare. Besides you can force a full rebuild by changing the SHA of the last commit.

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.

5 participants