[gmx-developers] Selection default options

Anders Gärdenäs anders.gardenas at gmail.com
Tue Aug 13 16:31:22 CEST 2013


I have some questions and answers!

The purpose of the option is to always get all the coordinates (from a pdf
or a trajectory file).

So are there any other options that will behave in the same whey where
there is a default option?

If there aren’t will I try to implement an option like:
if there is does it depend how much time I got (I am working here as a
summer job ) and what my supervisors wants.

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?

I don’t rely know how it shod behave with or without required(),
nevertheless I guess it shod work like the rest of the default options.

 –select without a value shod probably work as before, (triggers an
interactive prompt )  even if there is a default text.


2013/8/5 Teemu Murtola <teemu.murtola at gmail.com>

> Hi,
> On Mon, Aug 5, 2013 at 7:06 PM, Anders Gärdenäs <anders.gardenas at gmail.com
> > wrote:
>> The problem is that I want "all" to be default options and I don’t know
>> how to implement it.
>> .defaultValue(all).   Won’t work (the input need to be of type
>> gmx::selection); where running the program and type “–select all” will
>> work.
>> So in sort how do you use SelectionOption to select “all” by default?
> 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.
> 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).
> Best regards,
> Teemu
> --
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-developers-request at gromacs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20130813/5331f518/attachment.html>

More information about the gromacs.org_gmx-developers mailing list