From a028290a797e429f5d9aaae65fdcfcf4279f7dab Mon Sep 17 00:00:00 2001 From: Julian Geiger Date: Thu, 12 Sep 2024 06:11:53 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20DOCS:=20Updates=20for=20compatib?= =?UTF-8?q?ility=20with=20AiiDA=20v2.5.1=20(#469)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes some issues warnings that arose when going through the tutorials with AiiDA v2.5.1, mainly:: - Update the `verdi code setup` to `verdi code create` commands - Update the SSSP version from 1.1 to 1.3 to reflect the change of default in `aiida-pseudo` - Prepend `core` in the `DataFactory` calls where applicable, as well as `query.queryhelp` -> `query.as_dict()` in the `querying` notebook --- docs/sections/creating_plugins/example.md | 2 +- docs/sections/getting_started/basics.md | 4 ++-- docs/sections/managing_data/querying.ipynb | 12 ++++++------ docs/sections/running_processes/basics.md | 16 ++++++++-------- docs/sections/running_processes/errors.md | 2 +- docs/sections/running_processes/workflows.md | 8 ++++---- docs/sections/writing_workflows/errors.md | 2 +- docs/sections/writing_workflows/realworld.md | 10 +++++----- docs/sections/writing_workflows/workchain.md | 2 +- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/sections/creating_plugins/example.md b/docs/sections/creating_plugins/example.md index c011b6a5..db3e9be7 100644 --- a/docs/sections/creating_plugins/example.md +++ b/docs/sections/creating_plugins/example.md @@ -2,7 +2,7 @@ # Interfacing with external codes - Example -**Task:** Follow the instructions on [writing a plugin for an external code](). +**Task:** Follow the instructions on [writing a plugin for an external code](). **Result:** You will write a Python script with your first `CalcJob` and `Parser` plugin, telling AiiDA how to write inputs and parse outputs for a simple external executable. diff --git a/docs/sections/getting_started/basics.md b/docs/sections/getting_started/basics.md index cdc920dd..7737cb0e 100644 --- a/docs/sections/getting_started/basics.md +++ b/docs/sections/getting_started/basics.md @@ -415,7 +415,7 @@ For both commands, the *non-interactive* option (`-n`) is added to not prompt fo Next, let's set up the code we're going to use for the tutorial: ```{code-block} console -$ verdi code setup -L add --on-computer --computer=localhost -P core.arithmetic.add --remote-abs-path=/bin/bash -n +$ verdi code create core.code.installed -L add --computer=localhost -P core.arithmetic.add --filepath-executable=/bin/bash -n ``` This command sets up a code with *label* `add` on the *computer* `localhost`, using the *plugin* `core.arithmetic.add`. @@ -432,7 +432,7 @@ $ verdi code list * pk 1 - add@localhost ``` -In the output above you can see a the code `add@localhost`, with PK = 1, in the printed list. +In the output above you can see the code `add@localhost`, with PK = 1, in the printed list. Again, in your output you may have other codes listed or a different PK depending on your specific setup, but you should still be able to identify the code by its label. The `add@localhost` identifier indicates that the code with label `add` is run on the computer with label `localhost`. To see more details about the computer, you can use the following `verdi` command: diff --git a/docs/sections/managing_data/querying.ipynb b/docs/sections/managing_data/querying.ipynb index a10b8fd6..fb9baa1f 100644 --- a/docs/sections/managing_data/querying.ipynb +++ b/docs/sections/managing_data/querying.ipynb @@ -61,9 +61,9 @@ "from aiida.plugins import CalculationFactory, DataFactory\n", "\n", "PwCalculation = CalculationFactory('quantumespresso.pw')\n", - "StructureData = DataFactory('structure')\n", - "KpointsData = DataFactory('array.kpoints')\n", - "Dict = DataFactory('dict')\n", + "StructureData = DataFactory('core.structure')\n", + "KpointsData = DataFactory('core.array.kpoints')\n", + "Dict = DataFactory('core.dict')\n", "UpfData = DataFactory('core.upf')\n", "\n", "def plot_results(query_res):\n", @@ -1642,7 +1642,7 @@ } ], "source": [ - "generate_query_graph(query.queryhelp, 'query1.png')\n", + "generate_query_graph(query.as_dict(), 'query1.png')\n", "Image(filename='query1.png')" ] }, @@ -1710,7 +1710,7 @@ "source": [ "query = QueryBuilder()\n", "# Visualize what is going on:\n", - "generate_query_graph(query.queryhelp, 'query2.png')\n", + "generate_query_graph(query.as_dict(), 'query2.png')\n", "Image(filename='query2.png')" ] }, @@ -2071,7 +2071,7 @@ ")\n", "# Visualize:\n", "print(\"Groups:\", ', '.join([g for g, in query.all()]))\n", - "generate_query_graph(query.queryhelp, 'query3.png')\n", + "generate_query_graph(query.as_dict(), 'query3.png')\n", "Image(filename='query3.png')" ] }, diff --git a/docs/sections/running_processes/basics.md b/docs/sections/running_processes/basics.md index 4af64648..8a08e3f4 100644 --- a/docs/sections/running_processes/basics.md +++ b/docs/sections/running_processes/basics.md @@ -115,7 +115,7 @@ You will notice that the information that goes into the `test_run.in` input file * the `UpfData` node with link label `pseudos_Si` contains the data for the *ATOMIC_SPECIES* block (including the pseudopotential file to be copied in the `pseudo_dir`). * the `Dict` node with link label `parameters` contains the rest of the data (for the *&CONTROL* and *&SYSTEM* namelists). -Once the inputs files are prepared from these nodes, they are copied into the computer or cluster where the calculation will run. +Once the input files are prepared from these nodes, they are copied into the computer or cluster where the calculation will run. AiiDA immediately generates a `RemoteData` node as part of this submission procedure; this node can be thought as a symbolic link to the remote folder where the files are copied. The other output nodes are created once the calculation has finished, after the retrieval and parsing steps. @@ -160,7 +160,7 @@ However, you will still have to set up the code to run it with AiiDA. This can be done with: ```{code-block} console -$ verdi code setup --label pw --computer localhost --remote-abs-path /opt/conda/bin/pw.x --input-plugin quantumespresso.pw --non-interactive +$ verdi code create core.code.installed --label pw --computer localhost --filepath-executable /opt/conda/bin/pw.x --default-calc-job-plugin quantumespresso.pw --non-interactive Success: Code<2> pw@localhost created ``` @@ -231,10 +231,10 @@ To get a list of all available [pseudopotentials][pseudopotentials], simply run: $ aiida-pseudo list Label Type string Count ----------------------------------- ------------------------- ------- -SSSP/1.1/PBEsol/precision pseudo.family.sssp 85 -SSSP/1.1/PBEsol/efficiency pseudo.family.sssp 85 -SSSP/1.1/PBE/precision pseudo.family.sssp 85 -SSSP/1.1/PBE/efficiency pseudo.family.sssp 85 +SSSP/1.3/PBEsol/precision pseudo.family.sssp 85 +SSSP/1.3/PBEsol/efficiency pseudo.family.sssp 85 +SSSP/1.3/PBE/precision pseudo.family.sssp 85 +SSSP/1.3/PBE/efficiency pseudo.family.sssp 85 ::: The list of pseudopotential families might differ for you, depending on where you are running the tutorial. @@ -250,7 +250,7 @@ $ aiida-pseudo install sssp Info: downloading selected pseudo potentials archive... [OK] Info: downloading selected pseudo potentials metadata... [OK] Info: unpacking archive and parsing pseudos... [OK] -Success: installed `SSSP/1.1/PBE/efficiency` containing 85 pseudo potentials +Success: installed `SSSP/1.3/PBE/efficiency` containing 85 pseudo potentials ``` The output already indicates the process was successful and shows you the label for the new family group. @@ -364,7 +364,7 @@ We will see more on how to use groups in the module on {ref}`Organising your dat :::{code-block} ipython -In [5]: pseudo_family = load_group('SSSP/1.1/PBE/efficiency') +In [5]: pseudo_family = load_group('SSSP/1.3/PBE/efficiency') ::: diff --git a/docs/sections/running_processes/errors.md b/docs/sections/running_processes/errors.md index 9dec4a5b..a9d93657 100644 --- a/docs/sections/running_processes/errors.md +++ b/docs/sections/running_processes/errors.md @@ -54,7 +54,7 @@ For the `structure` you can download the following {download}`silicon crystal pw@localhost created ``` @@ -45,7 +45,7 @@ On the other hand, you can check the pseudopotentials by running: aiida-pseudo list Label Type string Count ----------------------- ------------------ ------- -SSSP/1.1/PBE/efficiency pseudo.family.sssp 85 +SSSP/1.3/PBE/efficiency pseudo.family.sssp 85 ``` And install them with: @@ -219,7 +219,7 @@ To run the workflow, we also have to specify the label of the family of pseudopo ```{code-block} ipython -In [3]: pseudo_family_label = Str('SSSP/1.1/PBE/efficiency') +In [3]: pseudo_family_label = Str('SSSP/1.3/PBE/efficiency') ``` @@ -477,7 +477,7 @@ Once the daemon has been restarted, it is time to *submit* the `EquationOfState` In [1]: from eos_workchain import EquationOfState ...: from aiida.engine import submit - ...: submit(EquationOfState, code=load_code('pw@localhost'), pseudo_family_label=Str('SSSP/1.1/PBE/efficiency'), structure=load_node(pk=)) + ...: submit(EquationOfState, code=load_code('pw@localhost'), pseudo_family_label=Str('SSSP/1.3/PBE/efficiency'), structure=load_node(pk=)) Out[1]: ``` diff --git a/docs/sections/writing_workflows/workchain.md b/docs/sections/writing_workflows/workchain.md index ccad7496..0f2feee9 100644 --- a/docs/sections/writing_workflows/workchain.md +++ b/docs/sections/writing_workflows/workchain.md @@ -736,7 +736,7 @@ If not, you can set it up with the instructions in the dropdown below. Setting up the `add` code on the `localhost` computer can be done with the following command: ```{code-block} console -$ verdi code setup -L add --on-computer --computer=localhost -P core.arithmetic.add --remote-abs-path=/bin/bash -n +$ verdi code create core.code.installed -L add --computer=localhost -P core.arithmetic.add --filepath-executable=/bin/bash -n ``` See the {ref}`calculation jobs section ` in the AiiDA basics module for more details.