Project

General

Profile

Bug #1743

Selections like "x 1 to 1.5 2 to 2.5" select unwanted atoms

Added by Teemu Murtola about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
selections
Target version:
Affected version - extra info:
4.5.*, 4.6.*, 5.0-5.0.5
Affected version:
Difficulty:
uncategorized
Close

Description

If a selection fulfills the following conditions, it is incorrectly evaluated: * it uses a real-valued keyword (like x or charge), * it uses multiple A to B parts in the same expression (like in the title), and * the difference between the closer endpoints of two to ranges is less than one.

In such a case, the selection incorrectly selects also values between the two to ranges. For example, in the case in the title, also positions with x between 1.5 and 2 are incorrectly selected.

Will upload a fix shortly; the issue is a copy-paste bug between integer and real to implementations.

Associated revisions

Revision 4124756a (diff)
Added by Teemu Murtola about 2 years ago

Fix handling of real-valued 'to' selection ranges

Two adjacent ranges were incorrectly merged to a single range if the
difference between their nearest endpoints was less than one (the extra
+1 in the code is incorrectly copy-pasted from the integer case).

Add tests for handling overlapping and near-overlapping ranges.

Fixes #1743.

Change-Id: I3ac79c55dc3817e6325e43e27e0ccb4fe360e609

History

#1 Updated by Gerrit Code Review Bot about 2 years ago

Gerrit received a related patchset '1' for Issue #1743.
Uploader: Teemu Murtola ()
Change-Id: I3ac79c55dc3817e6325e43e27e0ccb4fe360e609
Gerrit URL: https://gerrit.gromacs.org/4637

#2 Updated by Teemu Murtola about 2 years ago

  • Status changed from Fix uploaded to Closed

Also available in: Atom PDF