<div dir="ltr"><p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">Hi</span></p>
<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">I have some questions and
answers! </span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif"></span></p>
<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',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:'Times New Roman',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:'Times New Roman',serif">If there aren’t will I try to implement an option
like: </span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',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:'Times New Roman',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:'Times New Roman',serif"> </span></p>
<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif"> </span></p>
<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">I don’t rely know how it shod behave </span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',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:'Times New Roman',serif"> </span></p>
<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',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:'Times New Roman',serif"> </span></p>
<p class="" style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">//Anders </span></p></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/5 Teemu Murtola <span dir="ltr"><<a href="mailto:teemu.murtola@gmail.com" target="_blank">teemu.murtola@gmail.com</a>></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"><<a href="mailto:anders.gardenas@gmail.com" target="_blank">anders.gardenas@gmail.com</a>></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:'Times New Roman',serif;font-size:12pt">The problem is that I want "all" 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:'Times New Roman',serif">.defaultValue</span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">(all).
Won’t work (the input need to be of type </span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">gmx::selection</span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">);</span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif"> </span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">where running the program and type “–select all” will
work.</span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif"></span></p>
<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',serif">So in sort how do you use </span><span lang="EN-US" style="font-size:12pt;font-family:'Times New Roman',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("all") for SelectionOption, and get that string parsed behind the scenes if the user doesn't provide anything else). Let me know if you want to implement such a thing and contribute it back; I'm happy to review the change in gerrit. I can also do that at some point, but don'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't immediately access the default selection, like you can with "normal" values. And it may interact in surprising ways with .required() (or its absence). I'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'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>