def run_until_decorrelated(self, time_reversal=True):
    'Run until all trajectories are decorrelated.\n\n        This runs until all the replicas in ``self.sample_set`` have\n        decorrelated from their initial conditions. "Decorrelated" here is\n        meant in the sense commonly used in one-way shooting: this runs\n        until no configurations from the original trajectories remain.\n        '
    originals = {s.replica: s.trajectory for s in self.sample_set}
    current = self.sample_set
    original_output_stream = self.output_stream
    self.output_stream = open(os.devnull, 'w')

    def n_correlated(sample_set, originals):
        return sum([originals[r].is_correlated(sample_set[r], time_reversal) for r in originals])
    original_output_stream.write('Decorrelating trajectories....\n')
    to_decorrelate = n_correlated(self.sample_set, originals)
    while to_decorrelate:
        out_str = 'Step {}: {} of {} trajectories still correlated\n'
        paths.tools.refresh_output(out_str.format((self.step + 1), to_decorrelate, len(originals)), refresh=False, output_stream=original_output_stream)
        self.run(1)
        to_decorrelate = n_correlated(self.sample_set, originals)
    paths.tools.refresh_output('Step {}: All trajectories decorrelated!\n'.format((self.step + 1)), refresh=False, output_stream=original_output_stream)
    self.output_stream = original_output_stream
Run until all trajectories are decorrelated.

This runs until all the replicas in ``self.sample_set`` have
decorrelated from their initial conditions. "Decorrelated" here is
meant in the sense commonly used in one-way shooting: this runs
until no configurations from the original trajectories remain.
def run_until_decorrelated(self, time_reversal=True):
    'Run until all trajectories are decorrelated.\n\n        This runs until all the replicas in ``self.sample_set`` have\n        decorrelated from their initial conditions. "Decorrelated" here is\n        meant in the sense commonly used in one-way shooting: this runs\n        until no configurations from the original trajectories remain.\n        '
    originals = {s.replica: s.trajectory for s in self.sample_set}
    current = self.sample_set
    original_output_stream = self.output_stream
    self.output_stream = open(os.devnull, 'w')

    def n_correlated(sample_set, originals):
        return sum([originals[r].is_correlated(sample_set[r], time_reversal) for r in originals])
    original_output_stream.write('Decorrelating trajectories....\n')
    to_decorrelate = n_correlated(self.sample_set, originals)
    while to_decorrelate:
        out_str = 'Step {}: {} of {} trajectories still correlated\n'
        paths.tools.refresh_output(out_str.format((self.step + 1), to_decorrelate, len(originals)), refresh=False, output_stream=original_output_stream)
        self.run(1)
        to_decorrelate = n_correlated(self.sample_set, originals)
    paths.tools.refresh_output('Step {}: All trajectories decorrelated!\n'.format((self.step + 1)), refresh=False, output_stream=original_output_stream)
    self.output_stream = original_output_stream