-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Miki Bonacci
authored and
Miki Bonacci
committed
Dec 12, 2023
1 parent
a9e5169
commit db4e729
Showing
26 changed files
with
2,559 additions
and
1 deletion.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
docs/source/reference/api/auto/aiida_atomistic/calculations/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
:py:mod:`aiida_atomistic.calculations` | ||
====================================== | ||
|
||
.. py:module:: aiida_atomistic.calculations | ||
.. autoapi-nested-parse:: | ||
|
||
Calculations provided by aiida_atomistic. | ||
|
||
Register calculations via the "aiida.calculations" entry point in setup.json. | ||
|
||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.calculations.DiffCalculation | ||
|
||
|
||
|
||
|
||
Attributes | ||
~~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.calculations.DiffParameters | ||
|
||
|
||
.. py:data:: DiffParameters | ||
.. py:class:: DiffCalculation(*args, **kwargs) | ||
Bases: :py:obj:`aiida.engine.CalcJob` | ||
|
||
AiiDA calculation plugin wrapping the diff executable. | ||
|
||
Simple AiiDA plugin wrapper for 'diffing' two files. | ||
|
||
.. py:method:: define(spec) | ||
:classmethod: | ||
|
||
Define inputs and outputs of the calculation. | ||
|
||
|
||
.. py:method:: prepare_for_submission(folder) | ||
Create input files. | ||
|
||
:param folder: an `aiida.common.folders.Folder` where the plugin should temporarily place all files | ||
needed by the calculation. | ||
:return: `aiida.common.datastructures.CalcInfo` instance | ||
|
||
|
||
|
90 changes: 90 additions & 0 deletions
90
docs/source/reference/api/auto/aiida_atomistic/data/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
:py:mod:`aiida_atomistic.data` | ||
============================== | ||
|
||
.. py:module:: aiida_atomistic.data | ||
.. autoapi-nested-parse:: | ||
|
||
Data types provided by plugin | ||
|
||
Register data types via the "aiida.data" entry point in setup.json. | ||
|
||
|
||
|
||
Package Contents | ||
---------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.data.DiffParameters | ||
|
||
|
||
|
||
|
||
Attributes | ||
~~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.data.cmdline_options | ||
|
||
|
||
.. py:data:: cmdline_options | ||
.. py:class:: DiffParameters(dict=None, **kwargs) | ||
Bases: :py:obj:`aiida.orm.Dict` | ||
|
||
Command line options for diff. | ||
|
||
This class represents a python dictionary used to | ||
pass command line options to the executable. | ||
|
||
.. py:attribute:: schema | ||
.. py:method:: validate(parameters_dict) | ||
Validate command line options. | ||
|
||
Uses the voluptuous package for validation. Find out about allowed keys using:: | ||
|
||
print(DiffParameters).schema.schema | ||
|
||
:param parameters_dict: dictionary with commandline parameters | ||
:param type parameters_dict: dict | ||
:returns: validated dictionary | ||
|
||
|
||
.. py:method:: cmdline_params(file1_name, file2_name) | ||
Synthesize command line parameters. | ||
|
||
e.g. [ '--ignore-case', 'filename1', 'filename2'] | ||
|
||
:param file_name1: Name of first file | ||
:param type file_name1: str | ||
:param file_name2: Name of second file | ||
:param type file_name2: str | ||
|
||
|
||
|
||
.. py:method:: __str__() | ||
String representation of node. | ||
|
||
Append values of dictionary to usual representation. E.g.:: | ||
|
||
uuid: b416cbee-24e8-47a8-8c11-6d668770158b (pk: 590) | ||
{'ignore-case': True} | ||
|
||
|
||
|
||
|
84 changes: 84 additions & 0 deletions
84
docs/source/reference/api/auto/aiida_atomistic/helpers/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
:py:mod:`aiida_atomistic.helpers` | ||
================================= | ||
|
||
.. py:module:: aiida_atomistic.helpers | ||
.. autoapi-nested-parse:: | ||
|
||
Helper functions for automatically setting up computer & code. | ||
Helper functions for setting up | ||
|
||
1. An AiiDA localhost computer | ||
2. A "diff" code on localhost | ||
|
||
Note: Point 2 is made possible by the fact that the ``diff`` executable is | ||
available in the PATH on almost any UNIX system. | ||
|
||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
|
||
Functions | ||
~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.helpers.get_path_to_executable | ||
aiida_atomistic.helpers.get_computer | ||
aiida_atomistic.helpers.get_code | ||
|
||
|
||
|
||
Attributes | ||
~~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.helpers.LOCALHOST_NAME | ||
aiida_atomistic.helpers.executables | ||
|
||
|
||
.. py:data:: LOCALHOST_NAME | ||
:value: 'localhost-test' | ||
|
||
|
||
|
||
.. py:data:: executables | ||
.. py:function:: get_path_to_executable(executable) | ||
Get path to local executable. | ||
:param executable: Name of executable in the $PATH variable | ||
:type executable: str | ||
:return: path to executable | ||
:rtype: str | ||
|
||
|
||
.. py:function:: get_computer(name=LOCALHOST_NAME, workdir=None) | ||
Get AiiDA computer. | ||
Loads computer 'name' from the database, if exists. | ||
Sets up local computer 'name', if it isn't found in the DB. | ||
|
||
:param name: Name of computer to load or set up. | ||
:param workdir: path to work directory | ||
Used only when creating a new computer. | ||
:return: The computer node | ||
:rtype: :py:class:`aiida.orm.computers.Computer` | ||
|
||
|
||
.. py:function:: get_code(entry_point, computer) | ||
Get local code. | ||
Sets up code for given entry point on given computer. | ||
|
||
:param entry_point: Entry point of calculation plugin | ||
:param computer: (local) AiiDA computer | ||
:return: The code node | ||
:rtype: :py:class:`aiida.orm.nodes.data.code.installed.InstalledCode` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
:py:mod:`aiida_atomistic` | ||
========================= | ||
|
||
.. py:module:: aiida_atomistic | ||
.. autoapi-nested-parse:: | ||
|
||
aiida_atomistic | ||
|
||
AiiDA plugin which contains data and methods for atomistic simulations | ||
|
||
|
||
|
||
Subpackages | ||
----------- | ||
.. toctree:: | ||
:titlesonly: | ||
:maxdepth: 3 | ||
|
||
data/index.rst | ||
|
||
|
||
Submodules | ||
---------- | ||
.. toctree:: | ||
:titlesonly: | ||
:maxdepth: 1 | ||
|
||
calculations/index.rst | ||
helpers/index.rst | ||
parsers/index.rst | ||
|
||
|
||
Package Contents | ||
---------------- | ||
|
||
.. py:data:: __version__ | ||
:value: '0.1.0a0' | ||
|
||
|
||
|
53 changes: 53 additions & 0 deletions
53
docs/source/reference/api/auto/aiida_atomistic/parsers/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
:py:mod:`aiida_atomistic.parsers` | ||
================================= | ||
|
||
.. py:module:: aiida_atomistic.parsers | ||
.. autoapi-nested-parse:: | ||
|
||
Parsers provided by aiida_atomistic. | ||
|
||
Register parsers via the "aiida.parsers" entry point in setup.json. | ||
|
||
|
||
|
||
Module Contents | ||
--------------- | ||
|
||
Classes | ||
~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.parsers.DiffParser | ||
|
||
|
||
|
||
|
||
Attributes | ||
~~~~~~~~~~ | ||
|
||
.. autoapisummary:: | ||
|
||
aiida_atomistic.parsers.DiffCalculation | ||
|
||
|
||
.. py:data:: DiffCalculation | ||
.. py:class:: DiffParser(node) | ||
Bases: :py:obj:`aiida.parsers.parser.Parser` | ||
|
||
Parser class for parsing output of calculation. | ||
|
||
.. py:method:: parse(**kwargs) | ||
Parse outputs, store results in database. | ||
|
||
:returns: an exit code, if parsing fails (or nothing if parsing succeeds) | ||
|
||
|
||
|
Oops, something went wrong.