<div dir="ltr"><p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">Hi</span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">I have some questions and
answers!  </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"></span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">The purpose of the option is to always get all
the coordinates (from a pdf or a trajectory file). </span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">So are there any other options that will behave in the
same whey where there is a default option? </span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">If there aren’t will I try to implement an option
like: </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">defaultSelectionText</span>(“…”);
if there is does it depend how much time I got (I am working here as a summer job
) and what my supervisors wants. </p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">If I implement it isn’t
smarter to make it “universal” so it works for every option instead of only
Selection, it might come handy for other types of options?</span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> </span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> </span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">I don’t rely know how it shod behave </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">with or without
required()</span>, nevertheless I guess it shod work like the rest of the default
options.  </p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> </span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> –select</span> without a value shod probably
work as before, (triggers an interactive prompt<span class=""> </span>)  even if there is a default text. </p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> </span></p>

<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">//Anders </span></p></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/5 Teemu Murtola <span dir="ltr">&lt;<a href="mailto:teemu.murtola@gmail.com" target="_blank">teemu.murtola@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote"><div class="im">On Mon, Aug 5, 2013 at 7:06 PM, Anders Gärdenäs <span dir="ltr">&lt;<a href="mailto:anders.gardenas@gmail.com" target="_blank">anders.gardenas@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p style="margin-bottom:0.0001pt"><span style="font-family:&#39;Times New Roman&#39;,serif;font-size:12pt">The problem is that I want &quot;all&quot; to be default
options and I don’t know how to implement it. </span><br></p>

<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">.defaultValue</span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">(all).  
Won’t work (the input need to be of type </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">gmx::selection</span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">);</span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"> </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">where running the program and type “–select all” will
work.</span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif"></span></p>

<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">So in sort how do you use </span><span lang="EN-US" style="font-size:12pt;font-family:&#39;Times New Roman&#39;,serif">SelectionOption to select “all” by default?</span></p>

</div></blockquote><div><br></div></div><div>This is not possible to achieve with the current implementation. But it should be relatively straightforward to add such a mechanism (e.g., that you can use .defaultSelectionText(&quot;all&quot;) for SelectionOption, and get that string parsed behind the scenes if the user doesn&#39;t provide anything else). Let me know if you want to implement such a thing and contribute it back; I&#39;m happy to review the change in gerrit. I can also do that at some point, but don&#39;t expect immediate progress.</div>

<div><br></div><div>It will work somewhat differently from defaultValue(), though, since it is not possible to construct the default gmx::Selection object at the time the option is declared. So you can&#39;t immediately access the default selection, like you can with &quot;normal&quot; values. And it may interact in surprising ways with .required() (or its absence). I&#39;d be happy to hear how you would expect it to behave in the different cases (with or without required(), and with only the option -select provided on the command line without any value, which normally triggers an interactive prompt for that selection).</div>

<div><br></div><div>Best regards,</div><div>Teemu</div></div></div></div>
<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="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-developers</a><br>
Please don&#39;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></blockquote></div><br></div>