diff --git a/.gitignore b/.gitignore index 20fa8d8f..089b0c31 100644 --- a/.gitignore +++ b/.gitignore @@ -129,4 +129,4 @@ job* .testdata/ !tests/regression/baselines/ -!tests/regression/baselines/*.json +!tests/regression/baselines/*/*.json diff --git a/tests/regression/baselines/benzaldehyde.json b/tests/regression/baselines/benzaldehyde.json deleted file mode 100644 index 9bd42510..00000000 --- a/tests/regression/baselines/benzaldehyde.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/benzaldehyde/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/benzaldehyde/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/benzaldehyde/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli1/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 24.88518233240474, - "united_atom:Rovibrational": 27.950376507672583, - "residue:FTmat-Transvibrational": 71.03412922724692, - "residue:FTmat-Rovibrational": 59.44169664956799, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 59.5156759876787 - }, - "total": 242.82706070457093 - } - } -} diff --git a/tests/regression/baselines/benzaldehyde_rad.json b/tests/regression/baselines/benzaldehyde_rad.json deleted file mode 100644 index 84070952..00000000 --- a/tests/regression/baselines/benzaldehyde_rad.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/benzaldehyde/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/benzaldehyde/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/benzaldehyde/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli1/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 158.90339720185818, - "united_atom:Rovibrational": 143.87250586343512, - "residue:FTmat-Transvibrational": 106.71035236014967, - "residue:FTmat-Rovibrational": 95.07735227595549, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 25.3107189764825 - }, - "total": 529.874326677881 - } - } -} diff --git a/tests/regression/baselines/benzene.json b/tests/regression/baselines/benzene.json deleted file mode 100644 index 488248b5..00000000 --- a/tests/regression/baselines/benzene.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/benzene/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/benzene/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/benzene/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli2/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 9.081853431559052, - "united_atom:Rovibrational": 27.534380126250227, - "residue:FTmat-Transvibrational": 72.66211800013413, - "residue:FTmat-Rovibrational": 59.93761874375924, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 41.237966715197246 - }, - "total": 210.45393701689989 - } - } -} diff --git a/tests/regression/baselines/benzene_rad.json b/tests/regression/baselines/benzene_rad.json deleted file mode 100644 index 7b5e159f..00000000 --- a/tests/regression/baselines/benzene_rad.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/benzene/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/benzene/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/benzene/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli2/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 93.55450341182438, - "united_atom:Rovibrational": 143.68264201362132, - "residue:FTmat-Transvibrational": 108.34125737284016, - "residue:FTmat-Rovibrational": 95.57598285903227, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 12.282076945243183 - }, - "total": 453.43646260256133 - } - } -} diff --git a/tests/regression/baselines/cyclohexane.json b/tests/regression/baselines/cyclohexane.json deleted file mode 100644 index eabf7d83..00000000 --- a/tests/regression/baselines/cyclohexane.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/cyclohexane/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/cyclohexane/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/cyclohexane/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli3/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 11.726471858700231, - "united_atom:Rovibrational": 47.71088602161552, - "residue:FTmat-Transvibrational": 70.3922327806972, - "residue:FTmat-Rovibrational": 63.44920824648768, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 47.30759597445523 - }, - "total": 240.58639488195587 - } - } -} diff --git a/tests/regression/baselines/cylcohexane_rad.json b/tests/regression/baselines/cylcohexane_rad.json deleted file mode 100644 index 928da296..00000000 --- a/tests/regression/baselines/cylcohexane_rad.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/cyclohexane/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/cyclohexane/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/cyclohexane/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli3/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 109.02761125847158, - "united_atom:Rovibrational": 227.2888326629934, - "residue:FTmat-Transvibrational": 106.06698045971194, - "residue:FTmat-Rovibrational": 99.10449330958527, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 13.963860657362106 - }, - "total": 555.4517783481243 - } - } -} diff --git a/tests/regression/baselines/dna/axes_off.json b/tests/regression/baselines/dna/axes_off.json new file mode 100644 index 00000000..abefa2d9 --- /dev/null +++ b/tests/regression/baselines/dna/axes_off.json @@ -0,0 +1,61 @@ +{ + "args": { + "top_traj_file": [ + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna.tpr", + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" + ], + "force_file": null, + "file_format": null, + "kcal_force_units": false, + "selection_string": "all", + "start": 0, + "end": 5, + "step": 2, + "bin_width": 30, + "temperature": 298.0, + "verbose": false, + "output_file": "/tmp/pytest-of-harry-swift/pytest-1/test_regression_matches_baseli0/job001/output_file.json", + "force_partitioning": 0.5, + "water_entropy": true, + "grouping": "molecules", + "combined_forcetorque": true, + "customised_axes": false, + "search_type": "RAD" + }, + "provenance": { + "python": "3.14.3", + "platform": "Linux-6.17.0-19-generic-x86_64-with-glibc2.39", + "codeentropy_version": "2.1.0", + "git_sha": "2cafee04802f1722cf11b29cae202b298274f93f" + }, + "groups": { + "0": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 1.2269044878385265, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 27.45710747332319, + "polymer:FTmat-Transvibrational": 48.62026970762269, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 7.0411434528236345, + "residue:Conformational": 0.0, + "polymer:Orientational": 4.758905336627712 + }, + "total": 89.10433045823575 + }, + "1": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 1.7972774672527945, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 25.287669468441067, + "polymer:FTmat-Transvibrational": 60.47397935339153, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 6.410455987098191, + "residue:Conformational": 0.46183561256411515, + "polymer:Orientational": 4.758905336627712 + }, + "total": 99.1901232253754 + } + } +} diff --git a/tests/regression/baselines/dna/combined_forcetorque_off.json b/tests/regression/baselines/dna/combined_forcetorque_off.json new file mode 100644 index 00000000..ab6af537 --- /dev/null +++ b/tests/regression/baselines/dna/combined_forcetorque_off.json @@ -0,0 +1,61 @@ +{ + "args": { + "top_traj_file": [ + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna.tpr", + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" + ], + "force_file": null, + "file_format": null, + "kcal_force_units": false, + "selection_string": "all", + "start": 0, + "end": 1, + "step": 1, + "bin_width": 30, + "temperature": 298.0, + "verbose": false, + "output_file": "/tmp/pytest-of-harry-swift/pytest-1/test_regression_matches_baseli1/job001/output_file.json", + "force_partitioning": 0.5, + "water_entropy": true, + "grouping": "molecules", + "combined_forcetorque": false, + "customised_axes": true, + "search_type": "RAD" + }, + "provenance": { + "python": "3.14.3", + "platform": "Linux-6.17.0-19-generic-x86_64-with-glibc2.39", + "codeentropy_version": "2.1.0", + "git_sha": "2cafee04802f1722cf11b29cae202b298274f93f" + }, + "groups": { + "0": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 0.002160679012128457, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 3.376800684085249, + "polymer:Transvibrational": 21.18266215491188, + "polymer:Rovibrational": 12.837576042626923, + "united_atom:Conformational": 7.0411434528236345, + "residue:Conformational": 0.0, + "polymer:Orientational": 4.758905336627712 + }, + "total": 49.19924835008753 + }, + "1": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 0.01846427765949586, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 2.3863201082544565, + "polymer:Transvibrational": 16.607667396609116, + "polymer:Rovibrational": 12.304363914795593, + "united_atom:Conformational": 6.410455987098191, + "residue:Conformational": 0.46183561256411515, + "polymer:Orientational": 4.758905336627712 + }, + "total": 42.94801263360868 + } + } +} diff --git a/tests/regression/baselines/dna.json b/tests/regression/baselines/dna/default.json similarity index 77% rename from tests/regression/baselines/dna.json rename to tests/regression/baselines/dna/default.json index 40d0fd35..057f306d 100644 --- a/tests/regression/baselines/dna.json +++ b/tests/regression/baselines/dna/default.json @@ -1,8 +1,8 @@ { "args": { "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/dna/md_A4_dna.tpr", - "/home/ogo12949/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna.tpr", + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" ], "force_file": null, "file_format": null, @@ -14,7 +14,7 @@ "bin_width": 30, "temperature": 298.0, "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli0/job001/output_file.json", + "output_file": "/tmp/pytest-of-harry-swift/pytest-1/test_regression_matches_baseli2/job001/output_file.json", "force_partitioning": 0.5, "water_entropy": true, "grouping": "molecules", @@ -23,10 +23,10 @@ "search_type": "RAD" }, "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" + "python": "3.14.3", + "platform": "Linux-6.17.0-19-generic-x86_64-with-glibc2.39", + "codeentropy_version": "2.1.0", + "git_sha": "2cafee04802f1722cf11b29cae202b298274f93f" }, "groups": { "0": { diff --git a/tests/regression/baselines/dna/frame_window.json b/tests/regression/baselines/dna/frame_window.json new file mode 100644 index 00000000..13a87e51 --- /dev/null +++ b/tests/regression/baselines/dna/frame_window.json @@ -0,0 +1,61 @@ +{ + "args": { + "top_traj_file": [ + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna.tpr", + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" + ], + "force_file": null, + "file_format": null, + "kcal_force_units": false, + "selection_string": "all", + "start": 0, + "end": 5, + "step": 2, + "bin_width": 30, + "temperature": 298.0, + "verbose": false, + "output_file": "/tmp/pytest-of-harry-swift/pytest-1/test_regression_matches_baseli3/job001/output_file.json", + "force_partitioning": 0.5, + "water_entropy": true, + "grouping": "molecules", + "combined_forcetorque": true, + "customised_axes": true, + "search_type": "RAD" + }, + "provenance": { + "python": "3.14.3", + "platform": "Linux-6.17.0-19-generic-x86_64-with-glibc2.39", + "codeentropy_version": "2.1.0", + "git_sha": "2cafee04802f1722cf11b29cae202b298274f93f" + }, + "groups": { + "0": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 1.5821720528374943, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 27.397449238560412, + "polymer:FTmat-Transvibrational": 48.62026970762269, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 7.0411434528236345, + "residue:Conformational": 0.0, + "polymer:Orientational": 4.758905336627712 + }, + "total": 89.39993978847194 + }, + "1": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 2.5277936366208014, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 24.80670067454149, + "polymer:FTmat-Transvibrational": 60.47397935339153, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 6.410455987098191, + "residue:Conformational": 0.46183561256411515, + "polymer:Orientational": 4.758905336627712 + }, + "total": 99.43967060084383 + } + } +} diff --git a/tests/regression/baselines/dna/grouping_each.json b/tests/regression/baselines/dna/grouping_each.json new file mode 100644 index 00000000..36763436 --- /dev/null +++ b/tests/regression/baselines/dna/grouping_each.json @@ -0,0 +1,61 @@ +{ + "args": { + "top_traj_file": [ + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna.tpr", + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" + ], + "force_file": null, + "file_format": null, + "kcal_force_units": false, + "selection_string": "all", + "start": 0, + "end": 1, + "step": 1, + "bin_width": 30, + "temperature": 298.0, + "verbose": false, + "output_file": "/tmp/pytest-of-harry-swift/pytest-1/test_regression_matches_baseli4/job001/output_file.json", + "force_partitioning": 0.5, + "water_entropy": true, + "grouping": "each", + "combined_forcetorque": true, + "customised_axes": true, + "search_type": "RAD" + }, + "provenance": { + "python": "3.14.3", + "platform": "Linux-6.17.0-19-generic-x86_64-with-glibc2.39", + "codeentropy_version": "2.1.0", + "git_sha": "2cafee04802f1722cf11b29cae202b298274f93f" + }, + "groups": { + "0": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 0.002160679012128457, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 3.376800684085249, + "polymer:FTmat-Transvibrational": 12.341104347192612, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 7.0411434528236345, + "residue:Conformational": 0.0, + "polymer:Orientational": 4.758905336627712 + }, + "total": 27.52011449974134 + }, + "1": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 0.01846427765949586, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 2.3863201082544565, + "polymer:FTmat-Transvibrational": 11.11037253388596, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 6.410455987098191, + "residue:Conformational": 0.46183561256411515, + "polymer:Orientational": 4.758905336627712 + }, + "total": 25.14635385608993 + } + } +} diff --git a/tests/regression/baselines/dna/selection_subset.json b/tests/regression/baselines/dna/selection_subset.json new file mode 100644 index 00000000..eea98843 --- /dev/null +++ b/tests/regression/baselines/dna/selection_subset.json @@ -0,0 +1,47 @@ +{ + "args": { + "top_traj_file": [ + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna.tpr", + "/home/harry-swift/BioSim/software/CodeEntropy/.testdata/dna/md_A4_dna_xf.trr" + ], + "force_file": null, + "file_format": null, + "kcal_force_units": false, + "selection_string": "resname DA", + "start": 0, + "end": 1, + "step": 1, + "bin_width": 30, + "temperature": 298.0, + "verbose": false, + "output_file": "/tmp/pytest-of-harry-swift/pytest-1/test_regression_matches_baseli5/job001/output_file.json", + "force_partitioning": 0.5, + "water_entropy": true, + "grouping": "molecules", + "combined_forcetorque": true, + "customised_axes": true, + "search_type": "RAD" + }, + "provenance": { + "python": "3.14.3", + "platform": "Linux-6.17.0-19-generic-x86_64-with-glibc2.39", + "codeentropy_version": "2.1.0", + "git_sha": "2cafee04802f1722cf11b29cae202b298274f93f" + }, + "groups": { + "0": { + "components": { + "united_atom:Transvibrational": 0.0, + "united_atom:Rovibrational": 0.002160679012128457, + "residue:Transvibrational": 0.0, + "residue:Rovibrational": 3.376800684085249, + "polymer:FTmat-Transvibrational": 12.341104347192612, + "polymer:FTmat-Rovibrational": 0.0, + "united_atom:Conformational": 7.0411434528236345, + "residue:Conformational": 0.0, + "polymer:Orientational": 0.0 + }, + "total": 22.761209163113627 + } + } +} diff --git a/tests/regression/baselines/ethyl-acetate.json b/tests/regression/baselines/ethyl-acetate.json deleted file mode 100644 index 99886497..00000000 --- a/tests/regression/baselines/ethyl-acetate.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/ethyl-acetate/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/ethyl-acetate/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/ethyl-acetate/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli4/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 20.24374894231227, - "united_atom:Rovibrational": 49.35007067210558, - "residue:FTmat-Transvibrational": 67.91350627765567, - "residue:FTmat-Rovibrational": 60.042233035077246, - "united_atom:Conformational": 8.140778318198597, - "residue:Conformational": 0.0, - "residue:Orientational": 65.3684992300889 - }, - "total": 271.0588364754383 - } - } -} diff --git a/tests/regression/baselines/ethyl-acetate_rad.json b/tests/regression/baselines/ethyl-acetate_rad.json deleted file mode 100644 index 269a24d4..00000000 --- a/tests/regression/baselines/ethyl-acetate_rad.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/ethyl-acetate/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/ethyl-acetate/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/ethyl-acetate/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli4/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 124.52960172835098, - "united_atom:Rovibrational": 144.2366436580796, - "residue:FTmat-Transvibrational": 103.5819666889598, - "residue:FTmat-Rovibrational": 95.68311953660015, - "united_atom:Conformational": 8.140778318198597, - "residue:Conformational": 0.0, - "residue:Orientational": 30.894081870911737 - }, - "total": 507.0661918011009 - } - } -} diff --git a/tests/regression/baselines/methane.json b/tests/regression/baselines/methane.json deleted file mode 100644 index 6d1bbce5..00000000 --- a/tests/regression/baselines/methane.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/methane/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/methane/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/methane/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 112.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli5/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 40.3239711717637, - "united_atom:Rovibrational": 33.60582165153992, - "united_atom:Conformational": 0.0, - "united_atom:Orientational": 3.6608703176607116 - }, - "total": 77.59066314096432 - } - } -} diff --git a/tests/regression/baselines/methane_rad.json b/tests/regression/baselines/methane_rad.json deleted file mode 100644 index 7891d7af..00000000 --- a/tests/regression/baselines/methane_rad.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/methane/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/methane/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/methane/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 112.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli5/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 75.73291215434239, - "united_atom:Rovibrational": 68.80103728327107, - "united_atom:Conformational": 0.0, - "united_atom:Orientational": 6.742734054179628 - }, - "total": 151.27668349179308 - } - } -} diff --git a/tests/regression/baselines/methanol.json b/tests/regression/baselines/methanol.json deleted file mode 100644 index 782d9ef0..00000000 --- a/tests/regression/baselines/methanol.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/methanol/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/methanol/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/methanol/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli6/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 0.0, - "united_atom:Rovibrational": 31.71683454772323, - "residue:FTmat-Transvibrational": 57.967437606219264, - "residue:FTmat-Rovibrational": 32.05829756161347, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 31.476329452223162 - }, - "total": 153.2188991677791 - } - } -} diff --git a/tests/regression/baselines/methanol_rad.json b/tests/regression/baselines/methanol_rad.json deleted file mode 100644 index 63881816..00000000 --- a/tests/regression/baselines/methanol_rad.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/methanol/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/methanol/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/methanol/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli6/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 0.0, - "united_atom:Rovibrational": 85.74870264018092, - "residue:FTmat-Transvibrational": 93.59616431728384, - "residue:FTmat-Rovibrational": 59.61417719536213, - "united_atom:Conformational": 0.0, - "residue:Conformational": 0.0, - "residue:Orientational": 17.099561921032407 - }, - "total": 256.0586060738593 - } - } -} diff --git a/tests/regression/baselines/octonal_rad.json b/tests/regression/baselines/octonal_rad.json deleted file mode 100644 index 3be148b0..00000000 --- a/tests/regression/baselines/octonal_rad.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/octonol/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/octonol/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/octonol/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-1/test_regression_matches_baseli7/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 254.7961136639108, - "united_atom:Rovibrational": 345.86413400118744, - "residue:FTmat-Transvibrational": 101.79847675768119, - "residue:FTmat-Rovibrational": 92.71423842383722, - "united_atom:Conformational": 20.4159084259166, - "residue:Conformational": 0.0, - "residue:Orientational": 28.13775462144063 - }, - "total": 843.726625893974 - } - } -} diff --git a/tests/regression/baselines/octonol.json b/tests/regression/baselines/octonol.json deleted file mode 100644 index b0cb7171..00000000 --- a/tests/regression/baselines/octonol.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/octonol/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/octonol/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/octonol/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli7/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 50.77228933028987, - "united_atom:Rovibrational": 84.2608785308744, - "residue:FTmat-Transvibrational": 66.13571365167344, - "residue:FTmat-Rovibrational": 57.090651827515686, - "united_atom:Conformational": 20.4159084259166, - "residue:Conformational": 0.0, - "residue:Orientational": 74.85579414765692 - }, - "total": 353.5312359139269 - } - } -} diff --git a/tests/regression/baselines/water.json b/tests/regression/baselines/water.json deleted file mode 100644 index a74acd58..00000000 --- a/tests/regression/baselines/water.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/water/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/water/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/water/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": true, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-5/test_regression_matches_baseli8/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "grid" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "697cc5da0af766f2f69b0fa31254f2ce7b2b1141" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 43.725393337304425, - "united_atom:Rovibrational": 17.28911070147887, - "united_atom:Conformational": 0.0, - "united_atom:Orientational": 32.00715225476484 - }, - "total": 93.02165629354813 - } - } -} diff --git a/tests/regression/baselines/water_rad.json b/tests/regression/baselines/water_rad.json deleted file mode 100644 index 7e03e61d..00000000 --- a/tests/regression/baselines/water_rad.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "args": { - "top_traj_file": [ - "/home/ogo12949/CodeEntropy/.testdata/water/molecules.top", - "/home/ogo12949/CodeEntropy/.testdata/water/trajectory.crd" - ], - "force_file": "/home/ogo12949/CodeEntropy/.testdata/water/forces.frc", - "file_format": "MDCRD", - "kcal_force_units": false, - "selection_string": "all", - "start": 0, - "end": 1, - "step": 1, - "bin_width": 30, - "temperature": 298.0, - "verbose": false, - "output_file": "/tmp/pytest-of-ogo12949/pytest-2/test_regression_matches_baseli0/job001/output_file.json", - "force_partitioning": 0.5, - "water_entropy": true, - "grouping": "molecules", - "combined_forcetorque": true, - "customised_axes": true, - "search_type": "RAD" - }, - "provenance": { - "python": "3.13.5", - "platform": "Linux-6.17.0-1012-oem-x86_64-with-glibc2.39", - "codeentropy_version": "2.0.0", - "git_sha": "3143bcbea9717e13135f61c00e6a0efa7814f82f" - }, - "groups": { - "0": { - "components": { - "united_atom:Transvibrational": 79.20298312418278, - "united_atom:Rovibrational": 50.90260688502127, - "united_atom:Conformational": 0.0, - "united_atom:Orientational": 22.599402683404527 - }, - "total": 152.70499269260856 - } - } -} diff --git a/tests/regression/cases.py b/tests/regression/cases.py new file mode 100644 index 00000000..39cd7461 --- /dev/null +++ b/tests/regression/cases.py @@ -0,0 +1,79 @@ +from dataclasses import dataclass +from pathlib import Path + +import pytest + + +@dataclass(frozen=True) +class RegressionCase: + """ + Represents a single regression test case. + + A regression case corresponds to a specific system and a specific YAML + configuration file, along with its associated baseline file. + + Attributes: + system (str): Name of the system (e.g. "dna", "benzene"). + config_path (Path): Path to the YAML configuration file defining the scenario. + baseline_path (Path): Path to the expected baseline JSON output. + """ + + system: str + config_path: Path + baseline_path: Path + + +def repo_root() -> Path: + """ + Return the repository root directory. + + Returns: + Path: Absolute path to the repository root. + """ + return Path(__file__).resolve().parents[2] + + +def discover_cases(): + """ + Discover all regression test cases from the configs directory. + + Iterates over each system directory under `tests/regression/configs`, + and collects all YAML configuration files. Each configuration file is + paired with a corresponding baseline JSON file. + + Returns: + list[pytest.Param]: A list of parametrized pytest cases, each wrapping + a RegressionCase instance. + + Notes: + - Cases are automatically marked as slow unless the system is "dna". + - Baseline files are not required to exist at discovery time. + """ + base_dir = Path(__file__).resolve().parent + + configs_root = base_dir / "configs" + baselines_root = base_dir / "baselines" + + cases = [] + + for system_dir in sorted(configs_root.iterdir()): + if not system_dir.is_dir(): + continue + + system = system_dir.name + + for config_path in sorted(system_dir.glob("*.yaml")): + case_name = config_path.stem + + baseline_path = baselines_root / system / f"{case_name}.json" + + # DO NOT skip if baseline is missing + cases.append( + pytest.param( + RegressionCase(system, config_path, baseline_path), + id=f"{system}-{case_name}", + marks=pytest.mark.slow if system != "dna" else (), + ) + ) + + return cases diff --git a/tests/regression/configs/benzaldehyde/axes_off.yaml b/tests/regression/configs/benzaldehyde/axes_off.yaml new file mode 100644 index 00000000..3b29c9c7 --- /dev/null +++ b/tests/regression/configs/benzaldehyde/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzaldehyde/forces.frc" + top_traj_file: + - ".testdata/benzaldehyde/molecules.top" + - ".testdata/benzaldehyde/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/benzaldehyde/combined_forcetorque_false.yaml b/tests/regression/configs/benzaldehyde/combined_forcetorque_false.yaml new file mode 100644 index 00000000..99ba8513 --- /dev/null +++ b/tests/regression/configs/benzaldehyde/combined_forcetorque_false.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzaldehyde/forces.frc" + top_traj_file: + - ".testdata/benzaldehyde/molecules.top" + - ".testdata/benzaldehyde/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/benzaldehyde/config.yaml b/tests/regression/configs/benzaldehyde/default.yaml similarity index 100% rename from tests/regression/configs/benzaldehyde/config.yaml rename to tests/regression/configs/benzaldehyde/default.yaml diff --git a/tests/regression/configs/benzaldehyde/frame_window.yaml b/tests/regression/configs/benzaldehyde/frame_window.yaml new file mode 100644 index 00000000..f608b0af --- /dev/null +++ b/tests/regression/configs/benzaldehyde/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/benzaldehyde/forces.frc" + top_traj_file: + - ".testdata/benzaldehyde/molecules.top" + - ".testdata/benzaldehyde/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/benzaldehyde/grouping_each.yaml b/tests/regression/configs/benzaldehyde/grouping_each.yaml new file mode 100644 index 00000000..4cb27c58 --- /dev/null +++ b/tests/regression/configs/benzaldehyde/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzaldehyde/forces.frc" + top_traj_file: + - ".testdata/benzaldehyde/molecules.top" + - ".testdata/benzaldehyde/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/benzaldehyde_rad/config.yaml b/tests/regression/configs/benzaldehyde/rad.yaml similarity index 91% rename from tests/regression/configs/benzaldehyde_rad/config.yaml rename to tests/regression/configs/benzaldehyde/rad.yaml index 455599b0..ab7b3c2f 100644 --- a/tests/regression/configs/benzaldehyde_rad/config.yaml +++ b/tests/regression/configs/benzaldehyde/rad.yaml @@ -10,5 +10,5 @@ run1: end: 1 step: 1 file_format: "MDCRD" -# kcal_force_units: True + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/benzaldehyde/selection_subset.yaml b/tests/regression/configs/benzaldehyde/selection_subset.yaml new file mode 100644 index 00000000..576c4bac --- /dev/null +++ b/tests/regression/configs/benzaldehyde/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/benzaldehyde/forces.frc" + top_traj_file: + - ".testdata/benzaldehyde/molecules.top" + - ".testdata/benzaldehyde/trajectory.crd" + selection_string: "resname BENZ and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/benzene/axes_off.yaml b/tests/regression/configs/benzene/axes_off.yaml new file mode 100644 index 00000000..97a1e9f0 --- /dev/null +++ b/tests/regression/configs/benzene/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzene/forces.frc" + top_traj_file: + - ".testdata/benzene/molecules.top" + - ".testdata/benzene/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/benzene/combined_forcetorque_off.yaml b/tests/regression/configs/benzene/combined_forcetorque_off.yaml new file mode 100644 index 00000000..e567d07a --- /dev/null +++ b/tests/regression/configs/benzene/combined_forcetorque_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzene/forces.frc" + top_traj_file: + - ".testdata/benzene/molecules.top" + - ".testdata/benzene/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/benzene/config.yaml b/tests/regression/configs/benzene/default.yaml similarity index 82% rename from tests/regression/configs/benzene/config.yaml rename to tests/regression/configs/benzene/default.yaml index 611e6934..a3f10191 100644 --- a/tests/regression/configs/benzene/config.yaml +++ b/tests/regression/configs/benzene/default.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/benzene/molecules.top" - ".testdata/benzene/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' + file_format: "MDCRD" kcal_force_units: True search_type: "grid" diff --git a/tests/regression/configs/benzene/frame_window.yaml b/tests/regression/configs/benzene/frame_window.yaml new file mode 100644 index 00000000..cb0f5a6d --- /dev/null +++ b/tests/regression/configs/benzene/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/benzene/forces.frc" + top_traj_file: + - ".testdata/benzene/molecules.top" + - ".testdata/benzene/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/benzene/grouping_each.yaml b/tests/regression/configs/benzene/grouping_each.yaml new file mode 100644 index 00000000..f748906e --- /dev/null +++ b/tests/regression/configs/benzene/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzene/forces.frc" + top_traj_file: + - ".testdata/benzene/molecules.top" + - ".testdata/benzene/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/benzene_rad/config.yaml b/tests/regression/configs/benzene/rad.yaml similarity index 73% rename from tests/regression/configs/benzene_rad/config.yaml rename to tests/regression/configs/benzene/rad.yaml index e3862947..8474bf2d 100644 --- a/tests/regression/configs/benzene_rad/config.yaml +++ b/tests/regression/configs/benzene/rad.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/benzene/molecules.top" - ".testdata/benzene/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' -# kcal_force_units: True + file_format: "MDCRD" + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/benzene/selection_subset.yaml b/tests/regression/configs/benzene/selection_subset.yaml new file mode 100644 index 00000000..20fa2304 --- /dev/null +++ b/tests/regression/configs/benzene/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/benzene/forces.frc" + top_traj_file: + - ".testdata/benzene/molecules.top" + - ".testdata/benzene/trajectory.crd" + selection_string: "resname BEN and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/cyclohexane/axes_off.yaml b/tests/regression/configs/cyclohexane/axes_off.yaml new file mode 100644 index 00000000..ba16e52d --- /dev/null +++ b/tests/regression/configs/cyclohexane/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/cyclohexane/forces.frc" + top_traj_file: + - ".testdata/cyclohexane/molecules.top" + - ".testdata/cyclohexane/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/cyclohexane/combined_forcetorque_off.yaml b/tests/regression/configs/cyclohexane/combined_forcetorque_off.yaml new file mode 100644 index 00000000..9ec1302f --- /dev/null +++ b/tests/regression/configs/cyclohexane/combined_forcetorque_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/cyclohexane/forces.frc" + top_traj_file: + - ".testdata/cyclohexane/molecules.top" + - ".testdata/cyclohexane/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/cyclohexane/config.yaml b/tests/regression/configs/cyclohexane/default.yaml similarity index 83% rename from tests/regression/configs/cyclohexane/config.yaml rename to tests/regression/configs/cyclohexane/default.yaml index 8c8560f1..b70a05ea 100644 --- a/tests/regression/configs/cyclohexane/config.yaml +++ b/tests/regression/configs/cyclohexane/default.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/cyclohexane/molecules.top" - ".testdata/cyclohexane/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' + file_format: "MDCRD" kcal_force_units: True search_type: "grid" diff --git a/tests/regression/configs/cyclohexane/frame_window.yaml b/tests/regression/configs/cyclohexane/frame_window.yaml new file mode 100644 index 00000000..93ac1b4d --- /dev/null +++ b/tests/regression/configs/cyclohexane/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/cyclohexane/forces.frc" + top_traj_file: + - ".testdata/cyclohexane/molecules.top" + - ".testdata/cyclohexane/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/cyclohexane/grouping_each.yaml b/tests/regression/configs/cyclohexane/grouping_each.yaml new file mode 100644 index 00000000..eff6bf77 --- /dev/null +++ b/tests/regression/configs/cyclohexane/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/cyclohexane/forces.frc" + top_traj_file: + - ".testdata/cyclohexane/molecules.top" + - ".testdata/cyclohexane/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/cyclohexane_rad/config.yaml b/tests/regression/configs/cyclohexane/rad.yaml similarity index 74% rename from tests/regression/configs/cyclohexane_rad/config.yaml rename to tests/regression/configs/cyclohexane/rad.yaml index 1fa78cbe..bd9cb2f4 100644 --- a/tests/regression/configs/cyclohexane_rad/config.yaml +++ b/tests/regression/configs/cyclohexane/rad.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/cyclohexane/molecules.top" - ".testdata/cyclohexane/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' -# kcal_force_units: True + file_format: "MDCRD" + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/cyclohexane/selection_subset.yaml b/tests/regression/configs/cyclohexane/selection_subset.yaml new file mode 100644 index 00000000..18837f87 --- /dev/null +++ b/tests/regression/configs/cyclohexane/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/cyclohexane/forces.frc" + top_traj_file: + - ".testdata/cyclohexane/molecules.top" + - ".testdata/cyclohexane/trajectory.crd" + selection_string: "resname CHX and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/dna/axes_off.yaml b/tests/regression/configs/dna/axes_off.yaml new file mode 100644 index 00000000..5583ef15 --- /dev/null +++ b/tests/regression/configs/dna/axes_off.yaml @@ -0,0 +1,11 @@ +--- + +run1: + top_traj_file: + - ".testdata/dna/md_A4_dna.tpr" + - ".testdata/dna/md_A4_dna_xf.trr" + selection_string: "all" + start: 0 + end: 5 + step: 2 + customised_axes: false diff --git a/tests/regression/configs/dna/combined_forcetorque_off.yaml b/tests/regression/configs/dna/combined_forcetorque_off.yaml new file mode 100644 index 00000000..8718682a --- /dev/null +++ b/tests/regression/configs/dna/combined_forcetorque_off.yaml @@ -0,0 +1,11 @@ +--- + +run1: + top_traj_file: + - ".testdata/dna/md_A4_dna.tpr" + - ".testdata/dna/md_A4_dna_xf.trr" + selection_string: "all" + start: 0 + end: 1 + step: 1 + combined_forcetorque: False diff --git a/tests/regression/configs/dna/config.yaml b/tests/regression/configs/dna/default.yaml similarity index 83% rename from tests/regression/configs/dna/config.yaml rename to tests/regression/configs/dna/default.yaml index 854dc148..e1567c7d 100644 --- a/tests/regression/configs/dna/config.yaml +++ b/tests/regression/configs/dna/default.yaml @@ -4,7 +4,7 @@ run1: top_traj_file: - ".testdata/dna/md_A4_dna.tpr" - ".testdata/dna/md_A4_dna_xf.trr" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 diff --git a/tests/regression/configs/dna/frame_window.yaml b/tests/regression/configs/dna/frame_window.yaml new file mode 100644 index 00000000..5a0e4516 --- /dev/null +++ b/tests/regression/configs/dna/frame_window.yaml @@ -0,0 +1,10 @@ +--- + +run1: + top_traj_file: + - ".testdata/dna/md_A4_dna.tpr" + - ".testdata/dna/md_A4_dna_xf.trr" + selection_string: "all" + start: 0 + end: 5 + step: 2 diff --git a/tests/regression/configs/dna/grouping_each.yaml b/tests/regression/configs/dna/grouping_each.yaml new file mode 100644 index 00000000..a9e7117c --- /dev/null +++ b/tests/regression/configs/dna/grouping_each.yaml @@ -0,0 +1,11 @@ +--- + +run1: + top_traj_file: + - ".testdata/dna/md_A4_dna.tpr" + - ".testdata/dna/md_A4_dna_xf.trr" + selection_string: "all" + start: 0 + end: 1 + step: 1 + grouping: "each" diff --git a/tests/regression/configs/dna/selection_subset.yaml b/tests/regression/configs/dna/selection_subset.yaml new file mode 100644 index 00000000..cb6b294c --- /dev/null +++ b/tests/regression/configs/dna/selection_subset.yaml @@ -0,0 +1,10 @@ +--- + +run1: + top_traj_file: + - ".testdata/dna/md_A4_dna.tpr" + - ".testdata/dna/md_A4_dna_xf.trr" + selection_string: "resname DA" + start: 0 + end: 1 + step: 1 diff --git a/tests/regression/configs/ethyl-acetate/axes_off.yaml b/tests/regression/configs/ethyl-acetate/axes_off.yaml new file mode 100644 index 00000000..3b29c9c7 --- /dev/null +++ b/tests/regression/configs/ethyl-acetate/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/benzaldehyde/forces.frc" + top_traj_file: + - ".testdata/benzaldehyde/molecules.top" + - ".testdata/benzaldehyde/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/ethyl-acetate/combined_forcetorque_off.yaml b/tests/regression/configs/ethyl-acetate/combined_forcetorque_off.yaml new file mode 100644 index 00000000..db9f851a --- /dev/null +++ b/tests/regression/configs/ethyl-acetate/combined_forcetorque_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/ethyl-acetate/forces.frc" + top_traj_file: + - ".testdata/ethyl-acetate/molecules.top" + - ".testdata/ethyl-acetate/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/ethyl-acetate/config.yaml b/tests/regression/configs/ethyl-acetate/default.yaml similarity index 83% rename from tests/regression/configs/ethyl-acetate/config.yaml rename to tests/regression/configs/ethyl-acetate/default.yaml index d6d29694..4e0c9bc4 100644 --- a/tests/regression/configs/ethyl-acetate/config.yaml +++ b/tests/regression/configs/ethyl-acetate/default.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/ethyl-acetate/molecules.top" - ".testdata/ethyl-acetate/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' + file_format: "MDCRD" kcal_force_units: True search_type: "grid" diff --git a/tests/regression/configs/ethyl-acetate/frame_window.yaml b/tests/regression/configs/ethyl-acetate/frame_window.yaml new file mode 100644 index 00000000..abd8a395 --- /dev/null +++ b/tests/regression/configs/ethyl-acetate/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/ethyl-acetate/forces.frc" + top_traj_file: + - ".testdata/ethyl-acetate/molecules.top" + - ".testdata/ethyl-acetate/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/ethyl-acetate/grouping_each.yaml b/tests/regression/configs/ethyl-acetate/grouping_each.yaml new file mode 100644 index 00000000..84e6eaa0 --- /dev/null +++ b/tests/regression/configs/ethyl-acetate/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/ethyl-acetate/forces.frc" + top_traj_file: + - ".testdata/ethyl-acetate/molecules.top" + - ".testdata/ethyl-acetate/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/ethyl-acetate_rad/config.yaml b/tests/regression/configs/ethyl-acetate/rad.yaml similarity index 75% rename from tests/regression/configs/ethyl-acetate_rad/config.yaml rename to tests/regression/configs/ethyl-acetate/rad.yaml index df09dfe4..47c04aec 100644 --- a/tests/regression/configs/ethyl-acetate_rad/config.yaml +++ b/tests/regression/configs/ethyl-acetate/rad.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/ethyl-acetate/molecules.top" - ".testdata/ethyl-acetate/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' -# kcal_force_units: True + file_format: "MDCRD" + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/ethyl-acetate/selection_subset.yaml b/tests/regression/configs/ethyl-acetate/selection_subset.yaml new file mode 100644 index 00000000..e238d1d1 --- /dev/null +++ b/tests/regression/configs/ethyl-acetate/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/ethyl-acetate/forces.frc" + top_traj_file: + - ".testdata/ethyl-acetate/molecules.top" + - ".testdata/ethyl-acetate/trajectory.crd" + selection_string: "resname EA and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/methane/axes_off.yaml b/tests/regression/configs/methane/axes_off.yaml new file mode 100644 index 00000000..e1b79a8e --- /dev/null +++ b/tests/regression/configs/methane/axes_off.yaml @@ -0,0 +1,16 @@ +--- + +run1: + force_file: ".testdata/methane/forces.frc" + top_traj_file: + - ".testdata/methane/molecules.top" + - ".testdata/methane/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + temperature: 112.0 + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/methane/combined_forcetorque_off.yaml b/tests/regression/configs/methane/combined_forcetorque_off.yaml new file mode 100644 index 00000000..5e0844be --- /dev/null +++ b/tests/regression/configs/methane/combined_forcetorque_off.yaml @@ -0,0 +1,16 @@ +--- + +run1: + force_file: ".testdata/methane/forces.frc" + top_traj_file: + - ".testdata/methane/molecules.top" + - ".testdata/methane/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + temperature: 112.0 + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/methane/config.yaml b/tests/regression/configs/methane/default.yaml similarity index 100% rename from tests/regression/configs/methane/config.yaml rename to tests/regression/configs/methane/default.yaml diff --git a/tests/regression/configs/methane/frame_window.yaml b/tests/regression/configs/methane/frame_window.yaml new file mode 100644 index 00000000..57de494f --- /dev/null +++ b/tests/regression/configs/methane/frame_window.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/methane/forces.frc" + top_traj_file: + - ".testdata/methane/molecules.top" + - ".testdata/methane/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + temperature: 112.0 + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/methane/grouping_each.yaml b/tests/regression/configs/methane/grouping_each.yaml new file mode 100644 index 00000000..c46f0fbf --- /dev/null +++ b/tests/regression/configs/methane/grouping_each.yaml @@ -0,0 +1,16 @@ +--- + +run1: + force_file: ".testdata/methane/forces.frc" + top_traj_file: + - ".testdata/methane/molecules.top" + - ".testdata/methane/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + temperature: 112.0 + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/methane_rad/config.yaml b/tests/regression/configs/methane/rad.yaml similarity index 84% rename from tests/regression/configs/methane_rad/config.yaml rename to tests/regression/configs/methane/rad.yaml index 10e3ea39..353bed7a 100644 --- a/tests/regression/configs/methane_rad/config.yaml +++ b/tests/regression/configs/methane/rad.yaml @@ -10,5 +10,6 @@ run1: step: 1 end: 1 file_format: "MDCRD" -# kcal_force_units: True + temperature: 112.0 + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/methane/selection_subset.yaml b/tests/regression/configs/methane/selection_subset.yaml new file mode 100644 index 00000000..b2225708 --- /dev/null +++ b/tests/regression/configs/methane/selection_subset.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/methane/forces.frc" + top_traj_file: + - ".testdata/methane/molecules.top" + - ".testdata/methane/trajectory.crd" + selection_string: "resname MET and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + temperature: 112.0 + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/methanol/axes_off.yaml b/tests/regression/configs/methanol/axes_off.yaml new file mode 100644 index 00000000..92cb21f5 --- /dev/null +++ b/tests/regression/configs/methanol/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/methanol/forces.frc" + top_traj_file: + - ".testdata/methanol/molecules.top" + - ".testdata/methanol/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/methanol/combined_forcetorque_off.yaml b/tests/regression/configs/methanol/combined_forcetorque_off.yaml new file mode 100644 index 00000000..0015be5a --- /dev/null +++ b/tests/regression/configs/methanol/combined_forcetorque_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/methanol/forces.frc" + top_traj_file: + - ".testdata/methanol/molecules.top" + - ".testdata/methanol/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/methanol/config.yaml b/tests/regression/configs/methanol/default.yaml similarity index 82% rename from tests/regression/configs/methanol/config.yaml rename to tests/regression/configs/methanol/default.yaml index 9b7ee6f9..d27f7068 100644 --- a/tests/regression/configs/methanol/config.yaml +++ b/tests/regression/configs/methanol/default.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/methanol/molecules.top" - ".testdata/methanol/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' + file_format: "MDCRD" kcal_force_units: True search_type: "grid" diff --git a/tests/regression/configs/methanol/frame_window.yaml b/tests/regression/configs/methanol/frame_window.yaml new file mode 100644 index 00000000..3266624d --- /dev/null +++ b/tests/regression/configs/methanol/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/methanol/forces.frc" + top_traj_file: + - ".testdata/methanol/molecules.top" + - ".testdata/methanol/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/methanol/grouping_each.yaml b/tests/regression/configs/methanol/grouping_each.yaml new file mode 100644 index 00000000..acf952b8 --- /dev/null +++ b/tests/regression/configs/methanol/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/methanol/forces.frc" + top_traj_file: + - ".testdata/methanol/molecules.top" + - ".testdata/methanol/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/methanol_rad/config.yaml b/tests/regression/configs/methanol/rad.yaml similarity index 73% rename from tests/regression/configs/methanol_rad/config.yaml rename to tests/regression/configs/methanol/rad.yaml index 1629654a..ef0d1b62 100644 --- a/tests/regression/configs/methanol_rad/config.yaml +++ b/tests/regression/configs/methanol/rad.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/methanol/molecules.top" - ".testdata/methanol/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' -# kcal_force_units: True + file_format: "MDCRD" + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/methanol/selection_subset.yaml b/tests/regression/configs/methanol/selection_subset.yaml new file mode 100644 index 00000000..6ab616fd --- /dev/null +++ b/tests/regression/configs/methanol/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/methanol/forces.frc" + top_traj_file: + - ".testdata/methanol/molecules.top" + - ".testdata/methanol/trajectory.crd" + selection_string: "resname MOH and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/octonol/axes_off.yaml b/tests/regression/configs/octonol/axes_off.yaml new file mode 100644 index 00000000..4317805c --- /dev/null +++ b/tests/regression/configs/octonol/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/octonol/forces.frc" + top_traj_file: + - ".testdata/octonol/molecules.top" + - ".testdata/octonol/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/octonol/combined_forcetorque_off.yaml b/tests/regression/configs/octonol/combined_forcetorque_off.yaml new file mode 100644 index 00000000..b3f2d51e --- /dev/null +++ b/tests/regression/configs/octonol/combined_forcetorque_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/octonol/forces.frc" + top_traj_file: + - ".testdata/octonol/molecules.top" + - ".testdata/octonol/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/octonol/config.yaml b/tests/regression/configs/octonol/default.yaml similarity index 82% rename from tests/regression/configs/octonol/config.yaml rename to tests/regression/configs/octonol/default.yaml index 926d03f1..8ee5ee8b 100644 --- a/tests/regression/configs/octonol/config.yaml +++ b/tests/regression/configs/octonol/default.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/octonol/molecules.top" - ".testdata/octonol/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' + file_format: "MDCRD" kcal_force_units: True search_type: "grid" diff --git a/tests/regression/configs/octonol/frame_window.yaml b/tests/regression/configs/octonol/frame_window.yaml new file mode 100644 index 00000000..9643ee3d --- /dev/null +++ b/tests/regression/configs/octonol/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/octonol/forces.frc" + top_traj_file: + - ".testdata/octonol/molecules.top" + - ".testdata/octonol/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/octonol/grouping_each.yaml b/tests/regression/configs/octonol/grouping_each.yaml new file mode 100644 index 00000000..2d981af3 --- /dev/null +++ b/tests/regression/configs/octonol/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/octonol/forces.frc" + top_traj_file: + - ".testdata/octonol/molecules.top" + - ".testdata/octonol/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/octonol_rad/config.yaml b/tests/regression/configs/octonol/rad.yaml similarity index 73% rename from tests/regression/configs/octonol_rad/config.yaml rename to tests/regression/configs/octonol/rad.yaml index 918f8c25..ae2bd232 100644 --- a/tests/regression/configs/octonol_rad/config.yaml +++ b/tests/regression/configs/octonol/rad.yaml @@ -5,10 +5,10 @@ run1: top_traj_file: - ".testdata/octonol/molecules.top" - ".testdata/octonol/trajectory.crd" - selection_string: 'all' + selection_string: "all" start: 0 end: 1 step: 1 - file_format: 'MDCRD' -# kcal_force_units: True + file_format: "MDCRD" + kcal_force_units: True search_type: "RAD" diff --git a/tests/regression/configs/octonol/selection_subset.yaml b/tests/regression/configs/octonol/selection_subset.yaml new file mode 100644 index 00000000..2f2587fa --- /dev/null +++ b/tests/regression/configs/octonol/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/octonol/forces.frc" + top_traj_file: + - ".testdata/octonol/molecules.top" + - ".testdata/octonol/trajectory.crd" + selection_string: "resname OCT and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/water/axes_off.yaml b/tests/regression/configs/water/axes_off.yaml new file mode 100644 index 00000000..028a32d5 --- /dev/null +++ b/tests/regression/configs/water/axes_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/water/forces.frc" + top_traj_file: + - ".testdata/water/molecules.top" + - ".testdata/water/trajectory.crd" + selection_string: "all" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + customised_axes: false diff --git a/tests/regression/configs/water/combined_forcetorque_off.yaml b/tests/regression/configs/water/combined_forcetorque_off.yaml new file mode 100644 index 00000000..4a1419fd --- /dev/null +++ b/tests/regression/configs/water/combined_forcetorque_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/water/forces.frc" + top_traj_file: + - ".testdata/water/molecules.top" + - ".testdata/water/trajectory.crd" + selection_string: "all" + start: 0 + step: 1 + end: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + combined_forcetorque: False diff --git a/tests/regression/configs/water/config.yaml b/tests/regression/configs/water/default.yaml similarity index 100% rename from tests/regression/configs/water/config.yaml rename to tests/regression/configs/water/default.yaml diff --git a/tests/regression/configs/water/frame_window.yaml b/tests/regression/configs/water/frame_window.yaml new file mode 100644 index 00000000..fb313b83 --- /dev/null +++ b/tests/regression/configs/water/frame_window.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/water/forces.frc" + top_traj_file: + - ".testdata/water/molecules.top" + - ".testdata/water/trajectory.crd" + selection_string: "all" + start: 0 + end: 5 + step: 2 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/water/grouping_each.yaml b/tests/regression/configs/water/grouping_each.yaml new file mode 100644 index 00000000..31502301 --- /dev/null +++ b/tests/regression/configs/water/grouping_each.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/water/forces.frc" + top_traj_file: + - ".testdata/water/molecules.top" + - ".testdata/water/trajectory.crd" + selection_string: "all" + start: 0 + step: 1 + end: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + grouping: "each" diff --git a/tests/regression/configs/water_rad/config.yaml b/tests/regression/configs/water/rad.yaml similarity index 100% rename from tests/regression/configs/water_rad/config.yaml rename to tests/regression/configs/water/rad.yaml diff --git a/tests/regression/configs/water/selection_subset.yaml b/tests/regression/configs/water/selection_subset.yaml new file mode 100644 index 00000000..1429202f --- /dev/null +++ b/tests/regression/configs/water/selection_subset.yaml @@ -0,0 +1,14 @@ +--- + +run1: + force_file: ".testdata/water/forces.frc" + top_traj_file: + - ".testdata/water/molecules.top" + - ".testdata/water/trajectory.crd" + selection_string: "resname SOL and resid 1:10" + start: 0 + end: 1 + step: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" diff --git a/tests/regression/configs/water/water_off.yaml b/tests/regression/configs/water/water_off.yaml new file mode 100644 index 00000000..322e51f7 --- /dev/null +++ b/tests/regression/configs/water/water_off.yaml @@ -0,0 +1,15 @@ +--- + +run1: + force_file: ".testdata/water/forces.frc" + top_traj_file: + - ".testdata/water/molecules.top" + - ".testdata/water/trajectory.crd" + selection_string: "all" + start: 0 + step: 1 + end: 1 + file_format: "MDCRD" + kcal_force_units: True + search_type: "grid" + water_entropy: False diff --git a/tests/regression/conftest.py b/tests/regression/conftest.py index 6693f568..58249369 100644 --- a/tests/regression/conftest.py +++ b/tests/regression/conftest.py @@ -4,6 +4,15 @@ def pytest_addoption(parser: pytest.Parser) -> None: + """ + Register custom command-line options for pytest. + + Adds options to control regression test execution, baseline updates, + and debugging output. + + Args: + parser (pytest.Parser): Pytest CLI parser. + """ parser.addoption( "--run-slow", action="store_true", @@ -25,6 +34,12 @@ def pytest_addoption(parser: pytest.Parser) -> None: def pytest_configure(config: pytest.Config) -> None: + """ + Register custom pytest markers. + + Args: + config (pytest.Config): Pytest configuration object. + """ config.addinivalue_line("markers", "regression: end-to-end regression tests") config.addinivalue_line("markers", "slow: long-running tests (20-30+ minutes)") @@ -33,9 +48,14 @@ def pytest_collection_modifyitems( config: pytest.Config, items: list[pytest.Item] ) -> None: """ - Regression tests are collected and runnable by default. + Modify collected test items to skip slow tests unless explicitly enabled. + + Only tests marked with `@pytest.mark.slow` are skipped when the + `--run-slow` flag is not provided. - Only @pytest.mark.slow tests are skipped unless you pass --run-slow. + Args: + config (pytest.Config): Pytest configuration object. + items (list[pytest.Item]): Collected test items. """ if config.getoption("--run-slow"): return diff --git a/tests/regression/test_regression.py b/tests/regression/test_regression.py index 8eecd052..99f70df1 100644 --- a/tests/regression/test_regression.py +++ b/tests/regression/test_regression.py @@ -7,20 +7,22 @@ import numpy as np import pytest +from tests.regression.cases import discover_cases from tests.regression.helpers import run_codeentropy_with_config def _group_index(payload: dict[str, Any]) -> dict[str, dict[str, Any]]: - """Return the groups mapping from a regression payload. + """ + Extract the grouped structure from a regression output payload. Args: - payload: Parsed JSON payload. + payload (dict[str, Any]): The full output payload produced by CodeEntropy. Returns: - Mapping of group id to group data. + dict[str, dict[str, Any]]: Mapping of group IDs to group data. Raises: - TypeError: If payload["groups"] is not a dict. + TypeError: If the 'groups' field is not a dictionary. """ groups = payload.get("groups", {}) if not isinstance(groups, dict): @@ -35,16 +37,20 @@ def _compare_grouped( rtol: float, atol: float, ) -> None: - """Compare grouped regression outputs against baseline values. + """ + Compare grouped regression outputs against baseline data. + + Performs a structured comparison of group components and totals, + using numerical tolerances for floating-point comparisons. Args: - got_payload: Newly produced payload. - baseline_payload: Baseline payload. - rtol: Relative tolerance. - atol: Absolute tolerance. + got_payload (dict[str, Any]): Output generated by the test run. + baseline_payload (dict[str, Any]): Reference baseline output. + rtol (float): Relative tolerance for numeric comparisons. + atol (float): Absolute tolerance for numeric comparisons. Raises: - AssertionError: If any required group/component differs from baseline. + AssertionError: If any mismatches are found between outputs and baseline. """ got_groups = _group_index(got_payload) base_groups = _group_index(baseline_payload) @@ -100,52 +106,55 @@ def _compare_grouped( @pytest.mark.regression -@pytest.mark.parametrize( - "system", - [ - "dna", - pytest.param("benzaldehyde", marks=pytest.mark.slow), - pytest.param("benzene", marks=pytest.mark.slow), - pytest.param("cyclohexane", marks=pytest.mark.slow), - pytest.param("ethyl-acetate", marks=pytest.mark.slow), - pytest.param("methane", marks=pytest.mark.slow), - pytest.param("methanol", marks=pytest.mark.slow), - pytest.param("octonol", marks=pytest.mark.slow), - pytest.param("water", marks=pytest.mark.slow), - ], -) +@pytest.mark.parametrize("case", discover_cases()) def test_regression_matches_baseline( - tmp_path: Path, system: str, request: pytest.FixtureRequest + tmp_path: Path, case, request: pytest.FixtureRequest ) -> None: - """Run a regression test for one system and compare to its baseline. + """ + Execute a regression test for a single scenario and compare against baseline. + + This test: + 1. Loads a YAML configuration for a given system/scenario + 2. Runs CodeEntropy using that configuration + 3. Compares the output payload against a stored baseline JSON + 4. Optionally updates the baseline if --update-baselines is set Args: - tmp_path: Pytest-provided temporary directory. - system: System name parameter. - request: Pytest request fixture for reading CLI options. + tmp_path (Path): Temporary directory provided by pytest. + case (RegressionCase): Parameterized regression case. + request (pytest.FixtureRequest): Pytest request object for accessing CLI options + + Raises: + AssertionError: If the output does not match the baseline or baseline is missing """ - repo_root = Path(__file__).resolve().parents[2] - config_path = ( - repo_root / "tests" / "regression" / "configs" / system / "config.yaml" + system = case.system + config_path = case.config_path + baseline_path = case.baseline_path + + update_mode = request.config.getoption("--update-baselines") + + if not baseline_path.exists(): + if not update_mode: + raise AssertionError(f"Missing baseline: {baseline_path}") + baseline_payload = {} + else: + baseline_payload = json.loads(baseline_path.read_text()) + + run = run_codeentropy_with_config( + workdir=tmp_path, + config_src=config_path, ) - baseline_path = repo_root / "tests" / "regression" / "baselines" / f"{system}.json" - - assert config_path.exists(), f"Missing config: {config_path}" - assert baseline_path.exists(), f"Missing baseline: {baseline_path}" - - baseline_payload = json.loads(baseline_path.read_text()) - run = run_codeentropy_with_config(workdir=tmp_path, config_src=config_path) if request.config.getoption("--codeentropy-debug"): - print("\n[CodeEntropy regression debug]") - print("workdir:", run.workdir) - print("job_dir:", run.job_dir) - print("output_json:", run.output_json) - print("payload copy saved:", run.workdir / "codeentropy_output.json") + print("\n[DEBUG]") + print("system:", system) + print("config:", config_path) + print("baseline:", baseline_path) if request.config.getoption("--update-baselines"): + baseline_path.parent.mkdir(parents=True, exist_ok=True) baseline_path.write_text(json.dumps(run.payload, indent=2)) - pytest.skip(f"Baseline updated for {system}: {baseline_path}") + pytest.skip(f"Updated baseline for {system}") _compare_grouped( got_payload=run.payload, diff --git a/tests/unit/CodeEntropy/levels/test_search.py b/tests/unit/CodeEntropy/levels/test_search.py index 2e970212..51b15e0c 100644 --- a/tests/unit/CodeEntropy/levels/test_search.py +++ b/tests/unit/CodeEntropy/levels/test_search.py @@ -31,7 +31,7 @@ def test_get_RAD_neighbors(tmp_path: Path): system = "methane" repo_root = Path(__file__).resolve().parents[4] config_path = ( - repo_root / "tests" / "regression" / "configs" / system / "config.yaml" + repo_root / "tests" / "regression" / "configs" / system / "default.yaml" ) tmp_path.mkdir(parents=True, exist_ok=True) @@ -82,7 +82,7 @@ def test_get_grid_neighbors(tmp_path: Path): system = "methane" repo_root = Path(__file__).resolve().parents[4] config_path = ( - repo_root / "tests" / "regression" / "configs" / system / "config.yaml" + repo_root / "tests" / "regression" / "configs" / system / "default.yaml" ) tmp_path.mkdir(parents=True, exist_ok=True)