From 292b3dd15bd89cc5559fb836415a26f1b44a3986 Mon Sep 17 00:00:00 2001 From: Jade Shi Date: Thu, 16 May 2013 15:52:59 -0600 Subject: [PATCH] Fixed a bug in msmbuilder/Extras/parallel_assign/lib/remote.py regarding application of AtomIndices.dat Generators were mistakenly screened with AtomIndices.dat, when all atoms from generators should be used. This fix sets the atom indices attribute to the 'metric' object to None when computing the generators and then restores it afterwards. I've tried this on the ala2 system and it produced correct results. --- Extras/parallel_assign/lib/remote.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Extras/parallel_assign/lib/remote.py b/Extras/parallel_assign/lib/remote.py index 3e6eb5c7..43e2b361 100644 --- a/Extras/parallel_assign/lib/remote.py +++ b/Extras/parallel_assign/lib/remote.py @@ -23,7 +23,14 @@ def load_gens(gens_fn, conf_fn, metric): METRIC = metric CONF = Trajectory.load_trajectory_file(conf_fn) gens = Trajectory.load_trajectory_file(gens_fn) + # Make sure the atom indices are not used when processing the generators. (There has to be a less ugly way to do this...) + # Create a copy of atomindices. + atom_indices = metric.atomindices + # Then set atomindices attribute temporarily to None when computing PGENS + metric.atomindices = None PGENS = metric.prepare_trajectory(gens) + # Restore atomindices after PGENS is created. + metric.atomindices = atom_indices PREPARED = True