-
Notifications
You must be signed in to change notification settings - Fork 664
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
capped distance fails for very small (<0.1A) boxes #2670
Comments
I've narrowed it down to this access (but not the why): |
@richardjgowers is this fixed by your latest nsgrid code? |
I’d want to write a test, but I think so...
…On Wed, Mar 10, 2021 at 17:20, Irfan Alibay ***@***.***> wrote:
@richardjgowers <https://github.com/richardjgowers> is this fixed by your
latest nsgrid code?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2670 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACGSGB3JFTXILQFTLOEF6NLTC6S6LANCNFSM4MO37S7A>
.
|
I'll add it to the list for 1.0.2 then. |
Just tried this locally with the current |
Actually, it's not clear to me that the intended results from #2657 (comment) are actually happening, particularly with regards to:
Here len(ag) returns 0 on master, but the expectation from those comments was 1? Since I didn't really have much interaction with those PRs/Issues, I'm a little bit lost. Can @lilyminium or @richardjgowers pick this one up? |
@IAlibay that should return nothing. An This works: import MDAnalysis as mda
from MDAnalysisTests.datafiles import PDB
u = mda.Universe(PDB)
u.dimensions = [1e-3] * 3 + [90.] * 3
ag1 = u.select_atoms('resid 2 3')
# this is currently returning nothing, as nothing except resid 3 is within 0.0 of resid 3
ag = ag1.select_atoms('around 0.0 resid 3')
assert len(ag) == 0
# set an overlap from resid 1
u.residues[0].atoms[0].position = u.select_atoms('resid 3')[0].position
ag2 = u.select_atoms('resid 1 3')
# this gives you *only* the atom you've set to overlap with resid 3
ag = ag2.select_atoms('around 0.0 resid 3')
assert len(ag) == 1 As a side note, it's pretty slow because by setting the box so small, everything is overlapping so the search is (inefficiently) dong the full NxN search. tl;dr bug seems fixed, could add the above as a test to close this |
Thanks @richardjgowers I'm going to remove the tags though, as this is a |
@richardjgowers this was fixed right? Can I close it? |
Yeah there's a corner case in #3183 where the system is unrealistically large, but the issue here is fixed |
Code to reproduce the behavior
Doesn't seem to fail when boxsize is 0.1, so not likely to actually impact anyone.
Current version of MDAnalysis
python -c "import MDAnalysis as mda; print(mda.__version__)"
)v0.21 dev
python -V
)?The text was updated successfully, but these errors were encountered: