# How to set up options in rosetta

4 posts / 0 new
How to set up options in rosetta
#1

Good morning,

I'm quite new to Rosetta software and I'm developing an application that uses Rosetta features. My application works fine but I'm quite annoyed with the output of Rosetta. Is there a way to set verbosity level in the shell to 0? I guess this feature exists but I've been unable to make it work so far. I tried

core::options::option.add_relevant(core::options::OptionKeys::run::silent);

but this doesn't seem to have effect.

Can anyone point me to the right direction?

Thanks a lot
Alejandro

PS: If it can help, I'm using MAC OS X 10.6.7.

Post Situation:
Wed, 2011-04-06 02:08
alejandro

The first thing to notice is that most lines of Rosetta output are prepended with a string matching where the result came from:

core.init: Constant seed mode, seed=1111111 seed_offset=0 real_seed=1111111
protocols.jd2.PDBJobInputter: Instantiate PDBJobInputter
protocols.jd2.PDBJobInputter: PDBJobInputter::fill_jobs
protocols.jd2.PDBJobInputter: pushing complex_readytail_final_nozn.pdb nstruct index 1
basic.io.database: Database file opened: /users/smlewis/minirosetta_database/env_log.txt

You can mute these individually or in groups with the mute and unmute command line flags:
-mute protocols
will mute all of protocols' tracers, including subchannels like protocols.jd2.PDBJobInputter
-mute protocols.jd2.PDBJobInputter
will mute only PDBJobInputter
-mute all
will mute all mutable output in the program (which is nearly all of it).

Second, if you want to modify the value of options from within the code, the add_relevant function is not quite the right one. add_relevant reorganizes the -help option in the option system but does not change values. You want to do this:

core::options::option[core::options::OptionKeys::whatever_option].value(argument)
where whatever_option is the option you want to modify (probably mute, but you can try run::silent), and argument is the value you want to give it. Note that this is the same syntax as ACCESSING the value of an option, but .value() now receives an argument instead of returning the argument.

Wed, 2011-04-06 08:01
smlewis

I used -mute all and it works fine. However, I'd prefer modifying this option within the code but I've been unable to find a correct value to argument with the second possibility :

core::options::option[core::options::OptionKeys::whatever_option].value(argument)

I tried integers, booleans and silent constant that is defined in some header but it doesn't seem to work. What are the possible values for argument?

Thank you very much.
Alejandro

Thu, 2011-04-07 02:49
alejandro

"whatever_option" is metasyntactic here, not an actual option - I meant for you to replace it with the option you wanted to set the value of. For example, core::options::option[core::options::OptionKeys::run::silent].value(true)

The argument to value() is then whatever argument it would take on command line - integer, real number, string, whatever. You can look up the types to the options in src/core/options/options.py or the keys/ subdirectory.

Thu, 2011-04-07 07:34
smlewis