diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ddbf7bf..aac479e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,6 @@ jobs: # run: | # pip install --upgrade pip # pip install -e .[testing] -# reentry scan -r aiida # # - name: Run test suite # env: @@ -54,30 +53,29 @@ jobs: # # run: py.test --cov qp2 --cov-append . - docs: - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install python dependencies - run: | - pip install --upgrade pip - pip install --force-reinstall MarkupSafe==2.0.1 - pip install -e .[docs] - reentry scan -r aiida - - name: Build docs - run: cd docs && make - - name: Add nojekyll file - run: touch docs/build/html/.nojekyll - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/build/html + # docs: + # runs-on: ubuntu-latest + # timeout-minutes: 15 + # steps: + # - uses: actions/checkout@v2 + # - name: Set up Python 3.8 + # uses: actions/setup-python@v2 + # with: + # python-version: 3.8 + # - name: Install python dependencies + # run: | + # pip install --upgrade pip + # pip install --force-reinstall MarkupSafe==2.0.1 + # pip install -e .[docs] + # - name: Build docs + # run: cd docs && make + # - name: Add nojekyll file + # run: touch docs/build/html/.nojekyll + # - name: Deploy + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./docs/build/html pre-commit: runs-on: ubuntu-latest @@ -92,7 +90,6 @@ jobs: run: | pip install --upgrade pip pip install -e .[pre-commit,docs,testing] - reentry scan -r aiida - name: Run pre-commit run: | pre-commit install diff --git a/.gitignore b/.gitignore index 4a15c6e..c72d1ed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,13 +3,14 @@ *.swp ~* *~ -.project *.egg* -.DS_Store .coverage +.DS_Store +.project .pytest_cache .vscode build/ +configs/ dist/ -pip-wheel-metadata/ examples/*.pdf +pip-wheel-metadata/ diff --git a/README.md b/README.md index f416892..87bf966 100644 --- a/README.md +++ b/README.md @@ -1,82 +1,142 @@ -[![Build Status](https://github.com/TREX-CoE/aiida-qp2/workflows/ci/badge.svg?branch=master)](https://github.com/TREX-CoE/aiida-qp2/actions) -[![PyPI version](https://badge.fury.io/py/aiida-qp2.svg)](https://badge.fury.io/py/aiida-qp2) -# aiida-qp2 +# AiiDA-qp2 -AiiDA plugin for [Quantum Package 2.0](https://github.com/QuantumPackage/qp2) (QP2). +## Installation + +This is a brief installation guide fo aiida-qp2. First one needs to setup properly `aiida` it should be installed when package is installed. Also RabbitMQ is importat to run `aiida`. -This plugin is the modified output of the -[AiiDA plugin cutter](https://github.com/aiidateam/aiida-plugin-cutter), -intended to help developers get started with their AiiDA plugins. +``` +# It is better to run it in some kind of virtual environment. + +$ pip install aiida-qp2 +``` -## Repository contents +Command line code completion with `TAB` is very usefull, dont hesitate to activate it and use it: -* [`aiida_qp2/`](aiida_qp2/): The main source code of the plugin package - * [`calculations.py`](aiida_qp2/calculations.py): A new `QP2Calculation` `CalcJob` class - * [`parsers.py`](aiida_qp2/parsers.py): A new `Parser` for the `QP2Calculation` -* [`docs/`](docs/): A documentation template. The [ReadTheDocs documentation](https://trex-coe.github.io/aiida-qp2/) is built and deployed on the `gh-pages` branch. -* [`examples/`](examples/): Examples of how to submit a calculation using this plugin -* [`LICENSE`](LICENSE): License for your plugin -* [`MANIFEST.in`](MANIFEST.in): Configure non-Python files to be included for publication on [PyPI](https://pypi.org/) -* [`README.md`](README.md): This file -* [`setup.json`](setup.json): Plugin metadata for registration on [PyPI](https://pypi.org/) and the [AiiDA plugin registry](https://aiidateam.github.io/aiida-registry/) (including entry points) -* [`setup.py`](setup.py): Installation script for pip / [PyPI](https://pypi.org/) -* [`.pre-commit-config.yaml`](.pre-commit-config.yaml): Configuration of [pre-commit hooks](https://pre-commit.com/) that sanitize coding style and check for syntax errors. Enable via `pip install -e .[pre-commit] && pre-commit install` -* [`.github/`](.github/): [Github Actions](https://github.com/features/actions) configuration - * [`ci.yml`](.github/workflows/ci.yml): runs tests and builds documentation at every new commit - * [`publish-on-pypi.yml`](.github/workflows/publish-on-pypi.yml): automatically deploy git tags to PyPI +``` +eval "$(_VERDI_COMPLETE=bash_source verdi)" +``` +### AiiDA profile -## Features +First we need to setup profile. One can use `postgreSQL` as a db backend but for simplicity we will show you SQLite setup: -* Initialize a wave function file (EZFIO) based on `StructureData` instance and `qp_create_ezfio` dictionary. -This step can optionally use `BasisSet` and/or `Pseudopotential` nodes produced by the -[`aiida-gaussian-datatypes`](https://github.com/addman2/aiida-gaussian-datatypes/tree/development_trvb) plugin. -* Run calculations (e.g. HF, CIPSI) in a given order according to the `qp_commands` list. Some pre- or post-processing (e.g. `shell` scripting) is also possible by providing a list of commands in `qp_prepend` or `qp_append` keys of the `parameters` Dict, respectively. -* Export TREXIO file from the QP-native EZFIO format. +``` +$ verdi profile setup core.sqlite_dos +``` +You will be promted some questions but answering them is very easy. Setting up PostgreSQL more challenging, however, it is recomended for larger projects. -## Installation +### AiiDA computer -```shell -pip install aiida-qp2 -verdi quicksetup # better to set up a new profile -verdi plugin list aiida.calculations # should now show your calclulation plugins +Now you need to specify computer where you want to run your calculations. Here is the setup for your local computer. First setup a `yaml` file with setting called `localhost.yaml` and then setup the code. + +``` +$ cat > localhost.yaml +--- +label: "localhost" +hostname: "localhost" +transport: "core.local" +scheduler: "core.direct" +work_dir: "/var/tmp/aiida" +use_double_quotes: true +mpirun_command: "mpirun -np {tot_num_mpiprocs}" +mpiprocs_per_machine: "8" +prepend_text: " " +append_text: " " + +$ verdi computer setup --config localhost.yaml ``` -## Usage +One can test the computer via `verdi computer test