diff --git a/testsuite/MDAnalysisTests/analysis/test_encore.py b/testsuite/MDAnalysisTests/analysis/test_encore.py index 9204352f48..3e9cda17f5 100644 --- a/testsuite/MDAnalysisTests/analysis/test_encore.py +++ b/testsuite/MDAnalysisTests/analysis/test_encore.py @@ -157,7 +157,7 @@ def test_parallel_calculation(self): arguments = [tuple([i]) for i in np.arange(0, 100)] parallel_calculation = encore.utils.ParallelCalculation( - function=function, n_jobs=4, args=arguments + function=function, n_jobs=2, args=arguments ) results = parallel_calculation.run() @@ -173,14 +173,14 @@ def test_rmsd_matrix_with_superimposition(self, ens1): encore.confdistmatrix.conformational_distance_matrix( ens1, encore.confdistmatrix.set_rmsd_matrix_elements, - select="name CA", + select="name CA and resnum 1:3", pairwise_align=True, weights="mass", n_jobs=1, ) ) - reference = rms.RMSD(ens1, select="name CA") + reference = rms.RMSD(ens1, select="name CA and resnum 1:3") reference.run() err_msg = ( "Calculated RMSD values differ from " @@ -200,7 +200,7 @@ def test_rmsd_matrix_with_superimposition_custom_weights(self, ens1): encore.confdistmatrix.conformational_distance_matrix( ens1, encore.confdistmatrix.set_rmsd_matrix_elements, - select="name CA", + select="name CA and resnum 1:3", pairwise_align=True, weights="mass", n_jobs=1, @@ -211,11 +211,11 @@ def test_rmsd_matrix_with_superimposition_custom_weights(self, ens1): encore.confdistmatrix.conformational_distance_matrix( ens1, encore.confdistmatrix.set_rmsd_matrix_elements, - select="name CA", + select="name CA and resnum 1:3", pairwise_align=True, weights=( - ens1.select_atoms("name CA").masses, - ens1.select_atoms("name CA").masses, + ens1.select_atoms("name CA and resnum 1:3").masses, + ens1.select_atoms("name CA and resnum 1:3").masses, ), n_jobs=1, ) @@ -230,7 +230,7 @@ def test_rmsd_matrix_with_superimposition_custom_weights(self, ens1): ) def test_rmsd_matrix_without_superimposition(self, ens1): - selection_string = "name CA" + selection_string = "name CA and resnum 1:3" selection = ens1.select_atoms(selection_string) reference_rmsd = [] coordinates = ens1.trajectory.timeseries(selection, order="fac") diff --git a/testsuite/MDAnalysisTests/parallelism/test_multiprocessing.py b/testsuite/MDAnalysisTests/parallelism/test_multiprocessing.py index b4648d16bc..572bd1fffd 100644 --- a/testsuite/MDAnalysisTests/parallelism/test_multiprocessing.py +++ b/testsuite/MDAnalysisTests/parallelism/test_multiprocessing.py @@ -89,8 +89,8 @@ ), (NCDF,), (np.arange(150).reshape(5, 10, 3).astype(np.float64),), - (GRO, [GRO, GRO, GRO, GRO, GRO]), - (PDB, [PDB, PDB, PDB, PDB, PDB]), + (GRO, [GRO, GRO]), + (PDB, [PDB, PDB]), (GRO, [XTC, XTC]), (TRC_PDB_VAC, TRC_TRAJ1_VAC), (TRC_PDB_VAC, [TRC_TRAJ1_VAC, TRC_TRAJ2_VAC]), @@ -130,10 +130,10 @@ def cog(u, ag, frame_id): def test_multiprocess_COG(u): ag = u.atoms[2:5] - ref = np.array([cog(u, ag, i) for i in range(3)]) + ref = np.array([cog(u, ag, i) for i in range(2)]) p = multiprocessing.Pool(2) - res = np.array([p.apply(cog, args=(u, ag, i)) for i in range(3)]) + res = np.array([p.apply(cog, args=(u, ag, i)) for i in range(2)]) p.close() assert_equal(ref, res) @@ -145,10 +145,10 @@ def getnames(u, ix): def test_universe_unpickle_in_new_process(): u = mda.Universe(GRO, XTC) - ref = [getnames(u, i) for i in range(3)] + ref = [getnames(u, i) for i in range(2)] p = multiprocessing.Pool(2) - res = [p.apply(getnames, args=(u, i)) for i in range(3)] + res = [p.apply(getnames, args=(u, i)) for i in range(2)] p.close() assert_equal(ref, res) @@ -206,9 +206,9 @@ def test_creating_multiple_universe_without_offset(temp_xtc, ncopies=3): ("memory", np.arange(60).reshape(2, 10, 3).astype(np.float64), dict()), ("TRC", TRC_TRAJ1_VAC, dict()), ("CHAIN", [TRC_TRAJ1_VAC, TRC_TRAJ2_VAC], dict()), - ("CHAIN", [GRO, GRO, GRO], dict()), - ("CHAIN", [PDB, PDB, PDB], dict()), - ("CHAIN", [XTC, XTC, XTC], dict()), + ("CHAIN", [GRO, GRO], dict()), + ("CHAIN", [PDB, PDB], dict()), + ("CHAIN", [XTC, XTC], dict()), ] ) def ref_reader(request):