ndruns and nstruct in fixbb

Member Site Forums Rosetta 3 Rosetta 3 – Applications ndruns and nstruct in fixbb

Viewing 3 reply threads
  • Author
    Posts
    • #1368
      Anonymous

        In manual for fixbb in Rosetta 2.x, ndruns is used to specify the number of iterations. In the manual for fixbb in Rosetta 3.x, the parameter ndruns is not introduced anymore. Rather, nstruct is used to specify “The number of iterations to perform per input structure”. Does it mean nstruct has replaced ndruns? Or is ndruns the same as nstruct but only one decoy (the best scoring decoy) is returned?

      • #7538
        Anonymous

          I’m not too familiar with the fixbb protocol, but in general the nstruct parameter is used to control the number of times you run the full protocol on the input structure. That is, a run with -nstruct 10 is (almost) functionally equivalent of running the program twice with -nstruct 5 each time, or ten times with -nstruct 1. (The “almost” comes in because there is better handling of file naming and resource conflicts if you do it in a single run versus multiple runs – but that’s about the only difference.)

          If you get one output structure with the default -nstruct of 1, in general you should get ten output structures with -nstruct 10, fifty with -nstruct 50, etc. Because of the way the internal job handling is done (each job is handled independently of the rest), if you want to filter decoys based on the parameters of the entire run (e.g. “best scoring”) rather than absolute metrics (e.g. total energy less than X) you need to do it in two steps – one run to generate all the structures, and then a second run to do the population metric-based filtering.

        • #7540
          Anonymous

            Wow, great question! (I wish Rocco hadn’t beaten me to it, it took me 2 hours to finish typing this simple answer due to interruptions…)

            In Rosetta++, nothing was well centralized. ndruns did sort of the same thing as nstruct, but for different sorts of operations (design/packing versus relax/abinitio/docking).

            In 3.x, we made it so that Rosetta always uses nstruct for “number of structures to output”. So, fixbb takes nstruct, and nstruct has replaced ndruns for “output this many structures”. However, ndruns still has its meaning of “do X jobs, and only return the best 1”. So if you do:

            fixbb -nstruct 10

            You’ll get 10 results

            fixbb -ndruns 10

            You’ll get 1 result, but Rosetta will run 10 trajectories and only return the best one.

            ndruns is strictly faster than nstruct for a given amount of work, because some score calculations (rotamers and rotamer pair energies) are shared between independent packing trajectories using ndruns. So, -ndruns 10 will take less time than -nstruct 10. However, -ndruns only affects things that run through PackRotamersMover, and only at the level of PackRotamersMover. fixbb is just a wrapper around PackRotamersMover so it, it works immediately as expected.

            For other things that use PackRotamersMover (which is generally any thing that does packing), ndruns will still work. If you pass -ndruns 10, every time it packs, it will pack 10 times and return the best. This can add a lot of time to a trajectory, as it occurs each time PackRotamersMover runs, so be careful.

          • #7543
            attesor

              Thank you very much for the clear answer!

              I guess I can use both -ndruns 10 and -nstruct 10 to get the 10 best decoys out of 100 runs and also save some runtime.

            • #7547
              Anonymous

                “Thank you very much for the clear answer! “

                You finally asked one where I know *exactly* how it works.

              • #7549
                attesor

                  Well, I used a Monte Carlo procedure and an in-house energy function to help me choose what question to ask. Since I have asked a lot (-nstruct 10000), I should eventually get some right ;)
                  Thanks again!

              Viewing 3 reply threads
              • You must be logged in to reply to this topic.