From 4bc0396e3aeea6db4206d112e415c87be6fe9e70 Mon Sep 17 00:00:00 2001 From: Carlo Camilloni Date: Thu, 16 Apr 2026 10:47:13 +0200 Subject: [PATCH 1/5] Apply suggested fix to tools/make_mat/make_mat.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tools/make_mat/make_mat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make_mat/make_mat.py b/tools/make_mat/make_mat.py index eb788da2..b3c0283a 100644 --- a/tools/make_mat/make_mat.py +++ b/tools/make_mat/make_mat.py @@ -347,7 +347,7 @@ def get_col_params(values, weights): The truncated weights of the histogram according to the cutoff """ v = values[:-1] - cutoff = weights[len(weights) - 1] + cutoff = weights[-1] w = weights[:-1] i = np.where(v <= cutoff) if i[0].size == 0: From 5c81de2e73dd26f284107026a1fb37f845bd14d3 Mon Sep 17 00:00:00 2001 From: Carlo Camilloni Date: Thu, 16 Apr 2026 10:47:13 +0200 Subject: [PATCH 2/5] Apply suggested fix to tools/make_mat/make_mat.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tools/make_mat/make_mat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make_mat/make_mat.py b/tools/make_mat/make_mat.py index b3c0283a..82a15c75 100644 --- a/tools/make_mat/make_mat.py +++ b/tools/make_mat/make_mat.py @@ -295,7 +295,7 @@ def read_topologies(mego_top, target_top): n_mol = len(list(topology_mego.molecules.keys())) mol_names = list(topology_mego.molecules.keys()) - mol_list = np.arange(1, n_mol + 1, 1) + mol_list = np.arange(1, n_mol + 1) return topology_mego, topology_ref, n_mol, mol_names, mol_list From 06bc25a13b01bba48fa349a3e3f064f06dcb6a04 Mon Sep 17 00:00:00 2001 From: Carlo Camilloni Date: Thu, 16 Apr 2026 10:47:14 +0200 Subject: [PATCH 3/5] Apply suggested fix to tools/make_mat/make_mat.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tools/make_mat/make_mat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make_mat/make_mat.py b/tools/make_mat/make_mat.py index 82a15c75..f318c9f0 100644 --- a/tools/make_mat/make_mat.py +++ b/tools/make_mat/make_mat.py @@ -182,7 +182,7 @@ def run_mat_(arguments): process = multiprocessing.current_process() df = pd.DataFrame(columns=COLUMNS) # We do not consider old histograms - frac_target_list = [x for x in frac_target_list if x[0] != "#" and x[-1] != "#"] + frac_target_list = [x for x in frac_target_list if len(x) > 0 and x[0] != "#" and x[-1] != "#"] for i, ref_f in enumerate(frac_target_list): print(f"\rProgress: [{i + 1}/{len(frac_target_list)}] {ref_f} ", end="", flush=True) results_df = pd.DataFrame() From 3c84088057900f1358093ee39de08da6abea3a93 Mon Sep 17 00:00:00 2001 From: Carlo Camilloni Date: Thu, 16 Apr 2026 10:47:14 +0200 Subject: [PATCH 4/5] Apply suggested fix to tools/make_mat/make_mat.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tools/make_mat/make_mat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/make_mat/make_mat.py b/tools/make_mat/make_mat.py index f318c9f0..a23871d8 100644 --- a/tools/make_mat/make_mat.py +++ b/tools/make_mat/make_mat.py @@ -81,7 +81,7 @@ def create_matrix_mask( def write_mat(df, output_file): - if df.empty: # Check if the DataFrame is empty + if df.empty: print(f"Warning: The DataFrame is empty. No file will be written to {output_file}.") return From 4032626b6c07d077cc3dc6984de8f2cfd165a9c3 Mon Sep 17 00:00:00 2001 From: Carlo Camilloni Date: Thu, 16 Apr 2026 10:47:15 +0200 Subject: [PATCH 5/5] Apply suggested fix to tools/make_mat/make_mat.py from Copilot Autofix Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com> --- tools/make_mat/make_mat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/make_mat/make_mat.py b/tools/make_mat/make_mat.py index a23871d8..0542c2ee 100644 --- a/tools/make_mat/make_mat.py +++ b/tools/make_mat/make_mat.py @@ -20,8 +20,8 @@ from multiego import fileio as io _DEFAULT_C12 = { - type_definitions.gromos_atp.name[i]: type_definitions.gromos_atp.rc_c12[i] - for i in range(len(type_definitions.gromos_atp.name)) + atom_name: rc_c12 + for atom_name, rc_c12 in zip(type_definitions.gromos_atp.name, type_definitions.gromos_atp.rc_c12) } COLUMNS = ["mi", "ai", "mj", "aj", "c12dist", "p", "cutoff"]