Is there any way to re-run the same experiment in MPI run? Does somebody know how the random number is tracked in the mpi run?
The random number system works approximately the same in MPI as normal. -constant_seed and -jran take effect on the head node (if you specified no random number, it would have used the same random number as in non-MPI mode).
The slave nodes add their processor rank to the head node. So, head node seed is 10000, node one uses 10001, node 2 uses 10002, etc.
Running a single-processor job on the seed of a slave node should produce the same trajectory as the slave node did, if the inputs match. This is unlikely to work if you have more than one input being distributed by the head node (since only some jobs would have gone to that particular slave).
Does this answer your question?
At fist, thank you for your suggestion.
The answer I am excepting is quite different.
I have already did what you have mentioned.
The anticipation is once slave node gets its own seed from master node that is based on mpi-rank and constant random seed. After that, how would it get random seed for subsequent models in the same slave node?
If we would know it, it will help to re-run the same experiment. It is my thinking.
I'm still not sure I understand your question. I think you're asking, how does the random number generator re-seed between models?
The answer is, it doesn't. The random number generator is not meddled with in any way between structures, in MPI mode or in normal mode. There's no need to; so long as the different slave nodes started at different seeds, their random number trajectories will stay separate.
Another way to think of it is that the "seed" for subsequent models is just the last number produced from the last time the RNG was called for the previous model.
If you want to re-run just a particular MODEL from mid-trajectory (say, pdb_0245 out of 500), there's no way to do that. The random number seed can help you figure out how to reproduce a trajectory, but there's no reporting information to let you regenerate one single model. (This is not to say it isn't possible - just that Rosetta doesn't report the required information, and has no method for setting itself up in this fashion.)
Let me know if I'm still answering the wrong question.
Thank you again.
In this time, your second last paragraph can solve my curiosity.
Is there any other way to regenerate the particular model from pool of models?
As you mentioned, there is no option in rosetta to track the subsequent random seed. Then, how would the experiment rerun to monitor the effect of some options?
I think your question is, "how does one see the effect of a single flag on a single trajectory". The answer is, nobody looks at single trajectories as meaningful until after-the-fact.
Typically we'll run Rosetta for many thousands of trajectories, then scrape off the top handful of models for further analysis. Those models are the outcome of specific trajectories, but the trajectory itself wasn't significant - only its result. Because Rosetta uses Monte Carlo, the trajectory itself is not physically plausible - physics (statistical mechanics) only holds when looking at the modeling as an ensemble.
So, we would include the new flag and rerun the whole experiment, then compare the top fraction of models from the two cases.
Why do you want to preserve a particular RNG trajectory?
I want to regenerate the same structure using same random seed that was used to generate particular structure before which was accurate.
I would describe my problem.
For example: I generated thousands of structure. Among those, a few models are very good assumed that they are below 0.6 Ang. CA-rmsd from native structure. I would like to regenerate those particular models. However, this is not necessary. Is there any option in the reosetta structure prediction protocol to control my purpose?
This is the reason I want to preserve the RND trajectories of those models to gain it again.