You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/user_guide/calculations.rst
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,27 @@
1
-
==============================
1
+
============
2
2
Calculations
3
-
==============================
3
+
============
4
4
5
-
In these examples, we will assume that the `janus-core <https://github.com/stfc/janus-core>`_ package is installed and saved in the AiiDA database as an `InstalledCode` instance named 'janus@localhost'.
5
+
In these examples, we will assume that the `janus-core <https://github.com/stfc/janus-core>`_ package is installed and saved in the AiiDA database as an ``InstalledCode`` instance named 'janus@localhost'.
6
6
7
-
The structure should be a path to a file. Here, the structure file is specified as `path/to/structure`.
7
+
The structure should be a path to a file. Here, the structure file is specified as ``path/to/structure``.
8
8
9
9
.. note::
10
-
Any format that `ASE <https://wiki.fysik.dtu.dk/ase/>`_ can read is a valid structure file for a calculation.
10
+
Any format that `ASE <https://ase-lib.org>`_ can read is a valid structure file for a calculation.
11
11
12
-
The model file determines the specific MLIP to be used. It can be a local file or a URI to a file to download. In these examples, it is assumed to be a local file located at `path/to/model`.
12
+
The model file determines the specific MLIP to be used. It can be a local file or a URI to a file to download. In these examples, it is assumed to be a local file located at ``path/to/model``.
13
13
14
14
15
15
SinglePoint Calculation
16
16
-----------------------
17
17
18
-
A `Singlepoint` Calculation represents a `Calcjob` object within the AiiDA framework.
18
+
A ``Singlepoint`` Calculation represents a ``Calcjob`` object within the AiiDA framework.
19
19
20
20
21
21
Usage
22
22
^^^^^
23
23
24
-
This calculation can be executed using either the `run` or `submit` AiiDA commands.
24
+
This calculation can be executed using either the ``run`` or ``submit`` AiiDA commands.
25
25
Below is a usage example with the minimum required parameters. These parameters must be AiiDA data types.
26
26
27
27
@@ -86,7 +86,7 @@ And it is used as shown below. Note that some parameters, which are specific to
86
86
)
87
87
88
88
If a parameter is defined twice, in the config file and manually, the manually defined one will overwrite the config one.
89
-
If for example the same config file as before is used, but this time the parameter "struct" is added to the launch function, the code would look like this:
89
+
If for example the same config file as before is used, but this time the parameter ``struct`` is added to the launch function, the code would look like this:
90
90
91
91
.. code-block:: python
92
92
@@ -99,11 +99,11 @@ If for example the same config file as before is used, but this time the paramet
99
99
config=config,
100
100
)
101
101
102
-
In this case the structure used is going to be "path/to/structure2.xyz" rather than ""path/to/structure.cif", which was defined in the config file.
102
+
In this case the structure used is going to be ``path/to/structure2.xyz`` rather than ``path/to/structure.cif``, which was defined in the config file.
103
103
104
104
Refer to the API documentation for additional parameters that can be passed.
105
-
Some parameters are not required and don't have a default value set in aiida-mlip. In that case the default values will be the same as `janus <https://stfc.github.io/janus-core/>`_
106
-
The only default parameters defined in aiida-mlip are the names of the input and output files, as they do not affect the results of the calculation itself, and are needed in AiiDA to parse the results.
105
+
Some parameters are not required and don't have a default value set in ``aiida-mlip``. In that case the default values will be the same as `janus-core<https://github.com/stfc/janus-core>`_
106
+
The only default parameters defined in ``aiida-mlip`` are the names of the input and output files, as they do not affect the results of the calculation itself, and are needed in AiiDA to parse the results.
107
107
108
108
109
109
Submission
@@ -112,29 +112,29 @@ Submission
112
112
To facilitate the submission process and prepare inputs as AiiDA data types, example scripts are provided.
113
113
The submit_singlepoint.py script can be used as is, submitted to verdi, and the parameters passed as strings to the CLI.
114
114
They will be converted to AiiDA data types by the script itself.
115
-
.. note::
116
115
116
+
.. note::
117
117
118
118
The example files are set up with default values, ensuring that calculations runs even if no input is provided via the cli.
119
-
However, the aiida-mlip code itself does require certain parameters, (e.g. the structure on which to perform the calculation).
119
+
However, the ``aiida-mlip`` code itself does require certain parameters, (e.g. the structure on which to perform the calculation).
120
120
121
121
122
122
.. code-block:: python
123
123
124
124
verdi run submit_singlepoint.py "janus@localhost"--structure "path/to/structure"--model "path/to/model"--device "cpu"
125
125
126
-
The submit_using_config.py script can be used to facilitate submission using a config file.
126
+
The ``submit_using_config.py`` script can be used to facilitate submission using a config file.
127
127
128
128
Geometry Optimisation calculation
129
129
---------------------------------
130
130
131
-
A `GeomOpt` Calculation represents a `Calcjob` object within the AiiDA framework.
131
+
A ``GeomOpt`` Calculation represents a ``Calcjob`` object within the AiiDA framework.
132
132
133
133
134
134
Usage
135
135
^^^^^
136
136
137
-
This calculation can be executed using either the `run` or `submit` AiiDA commands.
137
+
This calculation can be executed using either the ``run`` or ``submit`` AiiDA commands.
138
138
Below is a usage example with some additional geometry optimisation parameters. These parameters must be AiiDA data types.
139
139
140
140
@@ -165,13 +165,13 @@ They will be converted to AiiDA data types by the script itself.
165
165
Molecular Dynamics calculation
166
166
------------------------------
167
167
168
-
An `MD` Calculation represents a `Calcjob` object within the AiiDA framework.
168
+
An ``MD`` Calculation represents a ``Calcjob`` object within the AiiDA framework.
169
169
170
170
171
171
Usage
172
172
^^^^^
173
173
174
-
This calculation can be executed using either the `run` or `submit` AiiDA commands.
174
+
This calculation can be executed using either the ``run`` or ``submit`` AiiDA commands.
175
175
Below is a usage example with some additional geometry optimisation parameters. These parameters must be AiiDA data types.
Copy file name to clipboardExpand all lines: docs/source/user_guide/data.rst
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,88 +4,88 @@ Data types
4
4
5
5
ModelData
6
6
---------
7
-
Defines a custom data type called `ModelData` in AiiDA, which is a subclass of the `SinglefileData` type. `ModelData` is used to handle model files and provides functionalities for handling local files and downloading files from URIs.
8
-
Additional features compared to `SinglefileData`:
7
+
Defines a custom data type called ``ModelData`` in AiiDA, which is a subclass of the ``SinglefileData`` type. ``ModelData`` is used to handle model files and provides functionalities for handling local files and downloading files from URIs.
8
+
Additional features compared to ``SinglefileData``:
9
9
10
10
- It can take a relative path as an argument
11
11
12
-
- It takes the argument "architecture" which is specifically related to the mlip model and it is added to the node attributes.
12
+
- It takes the argument ``architecture`` which is specifically related to the MLIP model and it is added to the node attributes.
13
13
14
14
- Download functionality:
15
-
- When provided with a URI, `ModelData` automatically downloads the file.
16
-
- Saves the downloaded file in a specified folder (default: `./cache/mlips`), creating a subfolder if the architecture, and stores it as an AiiDA data type.
17
-
- Handles duplicate files: if the file is downloaded twice, duplicates within the same folder are canceled, unless `force_download=True` is stated.
15
+
- When provided with a URI, ``ModelData`` automatically downloads the file.
16
+
- Saves the downloaded file in a specified folder (default: ``./cache/mlips``), creating a subfolder if the architecture, and stores it as an AiiDA data type.
17
+
- Handles duplicate files: if the file is downloaded twice, duplicates within the same folder are canceled, unless ``force_download=True`` is stated.
18
18
19
19
Usage
20
20
^^^^^
21
21
22
-
- To create a `ModelData` object from a local file:
22
+
- To create a ``ModelData`` object from a local file:
23
23
24
24
.. code-block:: python
25
25
26
26
model = ModelData.from_local('/path/to/file', filename='model', architecture='mace')
27
27
28
-
- To download a file and save it as a `ModelData` object:
28
+
- To download a file and save it as a ``ModelData`` object:
29
29
30
30
.. code-block:: python
31
31
32
32
model = ModelData.from_uri('http://yoururl.test/model', architecture='mace', filename='model', cache_dir='/home/mlip/', force_download=False)
33
33
34
-
- The architecture of the model file can be accessed using the `architecture` property:
34
+
- The architecture of the model file can be accessed using the ``architecture`` property:
35
35
36
36
.. code-block:: python
37
37
38
38
model_arch = model.architecture
39
39
40
-
As for a `SinglefileData`, the content of the model file can be accessed using the function `get_content()`
40
+
As for a ``SinglefileData``, the content of the model file can be accessed using the function ``get_content()``
41
41
42
42
43
43
JanusConfigfile
44
44
---------------
45
45
46
-
The `JanusConfigfile` class is designed to handle config files written for janus-core in YAML format within the AiiDA framework.
47
-
This class inherits from `SinglefileData` in the AiiDA, and extends it to support YAML config files.
46
+
The ``JanusConfigfile`` class is designed to handle config files written for ``janus-core`` in YAML format within the AiiDA framework.
47
+
This class inherits from ``SinglefileData`` in the AiiDA, and extends it to support YAML config files.
48
48
It provides methods for reading, storing, and accessing the content of the config file.
The `store_content()` method accepts the following parameters:
73
+
The ``store_content()`` method accepts the following parameters:
74
74
75
-
- `store_all` (bool):
75
+
- ``store_all`` (bool):
76
76
Determines whether to store all parameters or only specific ones.
77
-
By default, it's set to `False`.
78
-
When set to `False`, only the key parameters relevant for the provenance graph are stored: `code`, `structure`, `model`, `architecture`, `opt_cell_fully` (for GeomOpt), and `ensemble` (for MD).
77
+
By default, it's set to ``False``.
78
+
When set to ``False``, only the key parameters relevant for the provenance graph are stored: ``code``, ``structure``, ``model``, ``architecture``, ``opt_cell_fully`` (for GeomOpt), and ``ensemble`` (for MD).
79
79
However, all inputs can be accessed in the config file at any time (just the config file will appear in the provenance graph as JanusConfigfile).
80
-
If `store_all` is set to `True`, all inputs are stored, either as specific data types (e.g. the input 'struct' is recognised as a StructureData type) or as Str.
80
+
If ``store_all`` is set to ``True``, all inputs are stored, either as specific data types (e.g. the input 'struct' is recognised as a StructureData type) or as Str.
81
81
82
-
- `skip` (list):
82
+
- ``skip`` (list):
83
83
Specifies a list of parameters that should not be stored.
84
84
In the source code of the calcjobs, when the same parameter is provided both as an AiiDA input and within the config file, the parameter from the config file is ignored and not stored.
85
-
These parameters are added to the `skip` list to ensure they are excluded from storage.
85
+
These parameters are added to the ``skip`` list to ensure they are excluded from storage.
86
86
87
87
88
-
- The filepath of the config file can be accessed using the `filepath` property:
88
+
- The filepath of the config file can be accessed using the ``filepath`` property:
89
89
90
90
.. code-block:: python
91
91
@@ -99,7 +99,7 @@ The `store_content()` method accepts the following parameters:
99
99
A more robust solution to this problem is going to be implemented.
100
100
101
101
102
-
- The content of the config file can be accessed as a dictionary using the `as_dictionary` property:
102
+
- The content of the config file can be accessed as a dictionary using the ``as_dictionary`` property:
Copy file name to clipboardExpand all lines: docs/source/user_guide/get_started.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Once ``aiida-mlip`` and the desired MLIP calculators are installed, run::
41
41
verdi plugin list aiida.calculations # should now show your calculation plugins
42
42
43
43
Then, use ``verdi code setup`` with the ``janus`` input plugin
44
-
to set up an AiiDA code for aiida-mlip. The `aiida docs <https://aiida.readthedocs.io/projects/aiida-core/en/stable/howto/run_codes.html#how-to-create-a-code>`_ go over how to create a code.
44
+
to set up an AiiDA code for ``aiida-mlip``. The `aiida docs <https://aiida.readthedocs.io/projects/aiida-core/en/stable/howto/run_codes.html#how-to-create-a-code>`_ go over how to create a code.
A model to fine-tune has to be provided as an input, either as a `ModelData` type (in which case it has to be a model file), or in the config file at the keyword `foundation_model`.
97
-
If the keyword `fine_tune` is True but no model is given either way, it will return an error.
96
+
A model to fine-tune has to be provided as an input, either as a ``ModelData`` type (in which case it has to be a model file), or in the config file at the keyword ``foundation_model``.
97
+
If the keyword ``fine_tune`` is True but no model is given either way, it will return an error.
98
98
99
99
.. note::
100
100
@@ -107,7 +107,7 @@ Submission
107
107
^^^^^^^^^^
108
108
109
109
To facilitate the submission process and prepare inputs as AiiDA data types, an example script is provided.
110
-
This script can be used as is or by changing, in the file, the path to the config file, then submitted to `verdi` as shown
110
+
This script can be used as is or by changing, in the file, the path to the config file, then submitted to ``verdi`` as shown
0 commit comments