/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
if ((sel->flags & SEL_DYNAMIC)
&& sel->v.type != GROUP_VALUE && sel->v.type != POS_VALUE)
{
- sel->v.nr = isize;
+ sel->v.nr = ((sel->flags & SEL_SINGLEVAL) ? 1 : isize);
}
/* If the method is char-valued, pre-allocate the strings. */
if (sel->u.expr.method->flags & SMETH_CHARVAL)
--- /dev/null
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="referencedata.xsl"?>
+<ReferenceData>
+ <ParsedSelections Name="Parsed">
+ <ParsedSelection Name="Selection1">
+ <String Name="Input">x - y of cog of resnr 2 < 0</String>
+ <String Name="Text">x - y of cog of resnr 2 < 0</String>
+ <Bool Name="Dynamic">true</Bool>
+ </ParsedSelection>
+ </ParsedSelections>
+ <CompiledSelections Name="Compiled">
+ <Selection Name="Selection1">
+ <Sequence Name="Atoms">
+ <Int Name="Length">15</Int>
+ <Int>0</Int>
+ <Int>1</Int>
+ <Int>2</Int>
+ <Int>3</Int>
+ <Int>4</Int>
+ <Int>5</Int>
+ <Int>6</Int>
+ <Int>7</Int>
+ <Int>8</Int>
+ <Int>9</Int>
+ <Int>10</Int>
+ <Int>11</Int>
+ <Int>12</Int>
+ <Int>13</Int>
+ <Int>14</Int>
+ </Sequence>
+ </Selection>
+ </CompiledSelections>
+ <EvaluatedSelections Name="Frame1">
+ <Selection Name="Selection1">
+ <Sequence Name="Atoms">
+ <Int Name="Length">8</Int>
+ <Int>0</Int>
+ <Int>1</Int>
+ <Int>2</Int>
+ <Int>3</Int>
+ <Int>4</Int>
+ <Int>5</Int>
+ <Int>6</Int>
+ <Int>7</Int>
+ </Sequence>
+ </Selection>
+ </EvaluatedSelections>
+</ReferenceData>
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
runTest("simple.gro", selections);
}
+TEST_F(SelectionCollectionDataTest, HandlesKeywordOfPositionsInArithmetic)
+{
+ static const char * const selections[] = {
+ "x - y of cog of resnr 2 < 0"
+ };
+ setFlags(TestFlags() | efTestEvaluation);
+ runTest("simple.gro", selections);
+}
+
TEST_F(SelectionCollectionDataTest, HandlesNumericComparisons)
{