@@ -44,18 +44,18 @@ Running Calculations
44442. Write a script that will run the MLIP calculations of interest for each model being tested.
4545
4646The file should be named ``calc_[benchmark_name].py ``,
47- and placed in ``mlip_testing/calcs/[benchmark_name] ``.
47+ and placed in ``mlip_testing/calcs/[category]/[ benchmark_name] ``.
4848
4949While not a requirement, we recommend placing input files in
50- ``mlip_testing/calcs/[benchmark_name]/data ``, and output files in
51- ``mlip_testing/calcs/[benchmark_name]/outputs ``, for consistency.
50+ ``mlip_testing/calcs/[category]/[ benchmark_name]/data ``, and output files in
51+ ``mlip_testing/calcs/[category]/[ benchmark_name]/outputs ``, for consistency.
5252
5353The test contained in this file may be runnable as a standalone script,
5454but it should also be possible to run with ``pytest ``, e.g.:
5555
5656.. code-block :: bash
5757
58- pytest -v -s mlip_testing/calcs/[benchmark_name]/calc_[benchmark_name].py
58+ pytest -v -s mlip_testing/calcs/[category]/[ benchmark_name]/calc_[benchmark_name].py
5959
6060
6161 .. note ::
@@ -121,7 +121,7 @@ b. Defining a ``ZnTrack`` node to run via ``mlipx``:
121121
122122The process of running these is largely as
123123`described by mlipx <https://mlipx.readthedocs.io/en/latest/quickstart/cli.html >`_,
124- including running ``dvc init `` in ``mlip_testing/calcs/[benchmark_name] ``.
124+ including running ``dvc init `` in ``mlip_testing/calcs/[category]/[ benchmark_name] ``.
125125
126126.. note ::
127127
@@ -229,12 +229,13 @@ directory to be accessed by the app.
229229As with the script created in :ref: `calculations `, we create a new file to be run by ``pytest ``,
230230containing a function beginning with ``test_ `` to launch the analysis.
231231
232- In this case, we name the file ``mlip_testing/analysis/[benchmark_name]/analyse_[benchmark_name].py ``,
232+ In this case, we name the file
233+ ``mlip_testing/analysis/[category]/[benchmark_name]/analyse_[benchmark_name].py ``,
233234such that it can be run using:
234235
235236.. code-block :: bash
236237
237- pytest -v -s mlip_testing/analysis/[benchmark_name]/analyse_[benchmark_name].py
238+ pytest -v -s mlip_testing/analysis/[category]/[ benchmark_name]/analyse_[benchmark_name].py
238239
239240
240241 In order to automatically generate the components for our application, we will make use
@@ -256,7 +257,7 @@ For ``@build_table``, the value returned should be of the form:
256257 This will generate a table with columns for each metric, as well as "MLIP", "Score",
257258and "Rank" columns. Tooltips for each column header can also be set by the decorator,
258259as well as the location to save the JSON file to be loaded when building the app,
259- which typically would be placed in ``mlip_testing/app/data/[benchmark_name] ``.
260+ which typically would be placed in ``mlip_testing/app/data/[category]/[ benchmark_name] ``.
260261
261262Every benchmark should have at least one of these tables, which includes
262263the score for each metric, and allowing the table to calculate an overall score for the
@@ -308,8 +309,11 @@ which allows the value returned by a function to be used directly as a parameter
308309for other functions.
309310
310311If your benchmark contains structures to be visualised, or images to be loaded, these
311- should be saved to ``mlip_testing/app/data/[benchmark_name] ``, as they must be added as
312- ``assets `` to be loaded into the app.
312+ should be saved to ``mlip_testing/app/data/[category]/[benchmark_name] ``, as they must
313+ be added as ``assets `` to be loaded into the app.
314+
315+ Absolute paths to ``mlip_testing/app `` and ``mlip_testing/calcs `` can be imported for
316+ convenience.
313317
314318.. note ::
315319
@@ -320,10 +324,12 @@ should be saved to ``mlip_testing/app/data/[benchmark_name]``, as they must be a
320324
321325 from mlip_testing.analysis.utils.decorators import build_table, plot_parity
322326 from mlip_testing.analysis.utils.utils import mae
327+ from mlip_testing.app import APP_ROOT
328+ from mlip_testing.calcs import CALCS_ROOT
323329 from mlip_testing.calcs.models.models import MODELS
324330
325- CALC_PATH = Path(__file__).parent.parent.parent / "calcs" / [benchmark_name] / "outputs"
326- OUT_PATH = Path(__file__).parent.parent.parent / "app " / "data" / [benchmark_name]
331+ CALC_PATH = CALCS_ROOT / [category] / [benchmark_name] / "outputs"
332+ OUT_PATH = APP_ROOT / "data " / [category] / [benchmark_name]
327333
328334 REF_VALUES = {"path_b": 0.27, "path_c": 2.5}
329335
0 commit comments