def test_fail_without_top(self): # This should fail try: visualize.traj(self.MD_trajectory_files, "unexisting_file", self.Y) except (OSError, IOError): pass # This should pass visualize.traj(self.MD_geoms, "unexisting_file", self.Y)
def test_fail_on_FES(self): try: fake_4D_Ys = [np.hstack((iY, iY)) for iY in self.Ys] visualize.traj(self.MD_trajectories, self.MD_topology, fake_4D_Ys, sharey_traj=True, plot_FES=True, proj_idxs=[0, 1, 2]) except Exception as e: assert isinstance(e, NotImplementedError)
def test_listify_inputs(self): visualize.traj(self.MD_trajectories[0], self.MD_topology, self.Ys[0])
def test_simplest_inputs_memory_FES(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, plot_FES=True)
def test_simplest_inputs_memory_just_one_row(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, traj_selection=0, proj_idxs=0)
def test_simplest_inputs_memory_and_proj_just_matrix(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, projection=self.tica.feature_TIC_correlation)
def test_simplest_inputs_memory_and_proj(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, projection=self.tica)
def test_simplest_inputs_disk(self): visualize.traj(self.MD_trajectory_files, self.MD_topology_file, self.projected_files) visualize.traj( self.MD_trajectory_files, self.MD_topology_file, [ifile.replace('.npy', '.dat') for ifile in self.projected_files])
def test_simplest_inputs_memory_stride(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, stride=2)
def test_fail_on_FES(self): try: visualize.traj(self.MD_geoms, self.MD_top, self.Y, sharey_traj=True, plot_FES=True, proj_idxs=[0,1,2]) except NotImplementedError: pass
def test_plotting_params(self): visualize.traj(self.MD_geoms, self.MD_top, self.Y, sharey_traj=True)
def test_listify_params(self): visualize.traj(self.MD_geoms, self.MD_top, self.Y, proj_idxs=1) visualize.traj(self.MD_geoms, self.MD_top, self.Y, active_traj=1)
def test_listify_inputs(self): visualize.traj(self.MD_geoms[0], self.MD_top, self.Y[0])
def test_listify_params(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, proj_idxs=1)
def test_simplest_inputs_memory_small_max_frames(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, max_frames=3)
def test_plotting_params(self): visualize.traj(self.MD_trajectories, self.MD_topology, self.Ys, sharey_traj=True)
def test_simplest_inputs_memory(self): visualize.traj(self.MD_geoms, self.MD_top, self.Y)