<DIV> </DIV><DIV> </DIV><SPAN>On 11/04/12, <B class=name>Paolo Franz </B><paolo.franz@gmail.com> wrote:</SPAN>
<BLOCKQUOTE style="BORDER-LEFT: #00f 1px solid; PADDING-LEFT: 13px; MARGIN-LEFT: 0px" class=iwcQuote cite=mid:CACeB6wy8=rXhyY_v52fLeeJ4jBwFefpY0ShPuSnXEM4gKSB--A@mail.gmail.com type="cite">Thanks for the answer. Am I correct in saying that if I want to activate two options (say ANA_USE_TOPX and ANA_NOUSER_PBC, which might not make any sense!) for a trajectory, I need to call gmx_ana_traj_create with flags=ANA_USE_TOPX | ANA_NOUSER_PBC?
<DIV><br /></DIV><DIV>Sorry if my questions are silly, I am more familiar with c++ than c and I have used rarely bitwise operations.</DIV></BLOCKQUOTE>
<DIV> </DIV><DIV>Yes, that's the kind of usage expected. For the record, c++ does do this kind of thing too (e.g. stl::bit_vector, which will be replaced with a template specialization eventually) but in a non-HPC C++ context one is less concerned about things like cache footprint.</DIV><DIV> </DIV><BLOCKQUOTE style="BORDER-LEFT: #00f 1px solid; PADDING-LEFT: 13px; MARGIN-LEFT: 0px" class=iwcQuote cite=mid:CACeB6wy8=rXhyY_v52fLeeJ4jBwFefpY0ShPuSnXEM4gKSB--A@mail.gmail.com type="cite">
<DIV> </DIV><DIV>Cheers</DIV><DIV>Paolo<br /><br />
<DIV class=gmail_quote>On 11 April 2012 11:26, Tsjerk Wassenaar <SPAN dir=ltr><<a href="mailto:tsjerkw@gmail.com" >tsjerkw@gmail.com</A>></SPAN> wrote:<br />
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>Hi Paolo,<br /><br />If you use masking and other bitwise operations, it is handy to know<br />which bit is set; the second for ANA_USE_TOPX and the fifth for<br />ANA_NOUSER_PBC. Of course it's equal to 2 and 16, but that notation<br />makes it a bit less obvious what to do with bitwise operations.</BLOCKQUOTE></DIV></DIV></BLOCKQUOTE>
<DIV> </DIV><DIV>And by the time you get to the 13th option people might not know the value of 2^13 - much better to write an equivalent version that suggests how the value is intended to be used. </DIV><DIV> </DIV><DIV>Mark </DIV><DIV> </DIV><BLOCKQUOTE style="BORDER-LEFT: #00f 1px solid; PADDING-LEFT: 13px; MARGIN-LEFT: 0px" class=iwcQuote cite=mid:CACeB6wy8=rXhyY_v52fLeeJ4jBwFefpY0ShPuSnXEM4gKSB--A@mail.gmail.com type="cite">
<DIV class="mimepart text html">
<DIV>
<DIV class=gmail_quote>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote><br /><br />Cheers,<br /><br />Tsjerk<br />
<DIV>
<DIV class=h5><br />On Wed, Apr 11, 2012 at 11:18 AM, Paolo Franz <<a href="mailto:paolo.franz@gmail.com" >paolo.franz@gmail.com</A>> wrote:<br />> Hello everybody,<br />> For sometimes, I have been developing analysis tools for gromacs<br />> trajectories using the gromacs library. I am puzzled about some definitions<br />> in the file trajana.h, which I do not seem to understand completely. Why are<br />> definitions such as<br />><br />> #define ANA_USE_TOPX (1<<1)<br />><br />> #define ANA_NOUSER_PBC (1<<4)<br />><br />> used in the code? What is the purpose of this bitwise shift - why not set<br />> ANA_USE_TOPX and ANA_NOUSER_PBC to 2 and 16 for instance??<br />><br />> Thanks in advance<br />><br />> Paolo<br />><br />><br />><br /></DIV></DIV>> --<br />> gmx-developers mailing list<br />> <a href="mailto:gmx-developers@gromacs.org" >gmx-developers@gromacs.org</A><br />> <a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target=1 >http://lists.gromacs.org/mailman/listinfo/gmx-developers</A><br />> Please don't post (un)subscribe requests to the list. Use the<br />> www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" >gmx-developers-request@gromacs.org</A>.<br /><SPAN class=HOEnZb><FONT color=#888888><br /><br /><br />--<br />Tsjerk A. Wassenaar, Ph.D.<br /><br />post-doctoral researcher<br />Molecular Dynamics Group<br />* Groningen Institute for Biomolecular Research and Biotechnology<br />* Zernike Institute for Advanced Materials<br />University of Groningen<br />The Netherlands<br />--<br />gmx-developers mailing list<br /><a href="mailto:gmx-developers@gromacs.org" >gmx-developers@gromacs.org</A><br /><a href="http://lists.gromacs.org/mailman/listinfo/gmx-developers" target=1 >http://lists.gromacs.org/mailman/listinfo/gmx-developers</A><br />Please don't post (un)subscribe requests to the list. Use the<br />www interface or send it to <a href="mailto:gmx-developers-request@gromacs.org" >gmx-developers-request@gromacs.org</A>.<br /></FONT></SPAN></BLOCKQUOTE></DIV><br /></DIV></DIV></BLOCKQUOTE>
<DIV> </DIV>