Project

General

Profile

Bug #1219

Selections that use a dynamically evaluated variable in different context may be evaluated incorrectly

Added by Teemu Murtola over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
selections
Target version:
Affected version - extra info:
4.5-4.5.6, 4.6-4.6.1
Affected version:
Difficulty:
uncategorized
Close

Description

Selections are not evalauted correctly if they have a variable with a dynamic value (i.e., needs to be evaluated for each frame) and use that variable both

  1. in a boolean expression such that its evaluation group was not known in advance, and
  2. in a context where it was always evaluated for all atoms (either as a selection, or as a parameter to a selection method),

and additionally the latter context appear later in the selection set.

Example of an affected selection is

var = atomnr 1 to 8 and x < 10;
atomnr 1 to 5 and y < 10 and var;
var;

Typical result is an internal error (out of pooled memory) in the selection engine, but it may be possible that incorrect results also occur.


Related issues

Related to GROMACS - Bug #1216: Selections that contain "same ... as" in a complex boolean expression are incorrectly evaluated Closed 04/05/2013

Associated revisions

Revision c049a1ce (diff)
Added by Teemu Murtola over 4 years ago

Fix another bug in selection subexpression handling.

In this case, it did not work correctly if a variable with a dynamic
value was used both
1. in a boolean expression such that its evaluation group was not known
in advance, and
2. in a context where it was always evaluated for all atoms (either as
a selection, or as a parameter to a selection method),
and additionally the latter context appeared later in the selection set.
The initialization of the SEL_CDATA_STATICEVAL flag has a dependency on
SEL_CDATA_FULLEVAL flag, and they were not initialized in the correct
sequence in the above case.

Fixes #1219.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1

Revision 3a0803da (diff)
Added by Teemu Murtola over 4 years ago

Fix another bug in selection subexpression handling.

In this case, it did not work correctly if a variable with a dynamic
value was used both
1. in a boolean expression such that its evaluation group was not known
in advance, and
2. in a context where it was always evaluated for all atoms (either as
a selection, or as a parameter to a selection method),
and additionally the latter context appeared later in the selection set.
The initialization of the SEL_CDATA_STATICEVAL flag has a dependency on
SEL_CDATA_FULLEVAL flag, and they were not initialized in the correct
sequence in the above case.

Fixes #1219.

Backported from master with the same Change-Id.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1

Revision fd6f7645 (diff)
Added by Teemu Murtola about 4 years ago

Fix another bug in selection subexpression handling.

In this case, it did not work correctly if a variable with a dynamic
value was used both
1. in a boolean expression such that its evaluation group was not known
in advance, and
2. in a context where it was always evaluated for all atoms (either as
a selection, or as a parameter to a selection method),
and additionally the latter context appeared later in the selection set.
The initialization of the SEL_CDATA_STATICEVAL flag has a dependency on
SEL_CDATA_FULLEVAL flag, and they were not initialized in the correct
sequence in the above case.

Fixes #1219.

Change-Id: Ic95d37a424c82c796806b3a5b39678e206c467a1

History

#1 Updated by Teemu Murtola over 4 years ago

  • Target version set to 4.5.7
  • Affected version - extra info set to 4.5-4.5.6, 4.6-4.6.1

Fix and a backport of it are in gerrit.

#2 Updated by Mark Abraham over 4 years ago

  • Status changed from In Progress to Resolved
  • Affected version set to 4.5.6

#3 Updated by Teemu Murtola over 4 years ago

This is not yet fully resolved, since https://gerrit.gromacs.org/#/c/2316/ (which fixes this for master, and also adds unit tests) is not yet merged. However, it is not possible to change the status back...

#4 Updated by Mark Abraham over 4 years ago

  • Status changed from Resolved to Feedback wanted

#5 Updated by Mark Abraham over 4 years ago

  • Status changed from Feedback wanted to In Progress

#6 Updated by Teemu Murtola over 4 years ago

  • Status changed from In Progress to Fix uploaded

#7 Updated by Mark Abraham over 4 years ago

  • Status changed from Fix uploaded to Resolved

#8 Updated by Mark Abraham over 4 years ago

  • Status changed from Resolved to Feedback wanted

#9 Updated by Mark Abraham over 4 years ago

  • Status changed from Feedback wanted to In Progress

#10 Updated by Mark Abraham over 4 years ago

  • Target version changed from 4.5.7 to 5.0

#11 Updated by Teemu Murtola over 4 years ago

  • Status changed from In Progress to Resolved

#12 Updated by Teemu Murtola over 4 years ago

  • Status changed from Resolved to Closed

#13 Updated by Teemu Murtola about 4 years ago

  • Category changed from analysis tools to selections

Also available in: Atom PDF