From b68fabcfcc31802860fccdc20bcfd46f14775008 Mon Sep 17 00:00:00 2001 From: Christoph Wehmeyer Date: Mon, 13 Jun 2016 16:42:36 +0200 Subject: [PATCH] [thermo] adding type check for md_trajs --- pyemma/thermo/util/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyemma/thermo/util/util.py b/pyemma/thermo/util/util.py index d0a0e3c17..ec7143078 100644 --- a/pyemma/thermo/util/util.py +++ b/pyemma/thermo/util/util.py @@ -144,6 +144,9 @@ def _get_umbrella_sampling_parameters( raise ValueError( "Unmatching number of umbrella sampling trajectories and force constants: %d!=%d" \ % (len(us_trajs), len(us_force_constants))) + if md_trajs is not None: + if not isinstance(md_trajs, (list, tuple)): + raise ValueError("The parameter md_trajs must be a list of numpy.ndarray objects") for i, traj in enumerate(us_trajs): state = None try: