10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-09-27 12:00:56 +02:00
quantum_package/docs/source/users_guide/qp_plugins.rst
2019-01-10 17:54:30 +01:00

110 lines
2.6 KiB
ReStructuredText

.. _qp_plugins:
==========
qp_plugins
==========
.. program:: qp_plugins
This command deals with all external plugins of |qp|. Plugin repositories can
be downloaded, and the plugins in these repositories can be
installed/uninstalled of created.
Usage
-----
.. code:: bash
qp_plugins list [ -i | -u | -q ]
qp_plugins download <url>
qp_plugins install <name>...
qp_plugins uninstall <name>
qp_plugins create -n <name> [-r <repository>] [<needed_modules>...]
.. option:: list
List all the available plugins.
.. option:: -i
List all the *installed* plugins.
.. option:: -u
List all the *uninstalled* plugins.
.. option:: -q
List all the downloaded repositories.
.. option:: download <url>
Download an external repository. The URL points to a tar.gz file or a
git repository, for example:
* http://example.com/site/example.tar.gz
* git@gitlab.com:user/example_repository
.. option:: install <plugin_name>
Install the plugin ``plugin_name``.
.. option:: uninstall <plugin_name>
Uninstall the plugin ``plugin_name``.
.. option:: -n <plugin_name>
Create a new plugin named ``plugin_name`` (in local repository by default).
.. option:: -r <repository>
Specify in which repository the new plugin will be created.
Example
-------
Let us download, install and compile some specific external plugins from `<https://gitlab.com/eginer/qp_plugins_eginer>`_ .
First, download the git repo associated to these plugins. To do so, first go to the `plugins` directory in the |QP| and execute:
.. code:: bash
qp_plugins download https://gitlab.com/eginer/qp_plugins_eginer
This will create in the directory `plugins` a local copy of the git repo located at the URL you indicated.
Then, go in `qp_plugins_eginer/stable/`
.. code:: bash
cd qp_plugins_eginer/stable/
In the directory `stable`, there are many directories which all correspond to a specific plugin that have been developed
by the person in charge of the git repo. All these plugins might use some global variables and routines contained
in the core modules of the |QP|.
Now let us install the plugin `rsdft_cipsi`:
.. code:: bash
qp_plugins install rsdft_cipsi
This will link this directory to the |QP| which means that when the code will be compiled, this plugin will be compiled to and therefore
all the executables/scripts contained in this module will be available.
Then, to compile the new plugin, just recompile the |QP| as usual by going at the root of the |QP| directory:
.. code:: bash
cd $QP_ROOT
ninja
Then, when executing