Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEApp Documentation #414

Merged
merged 80 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d1e9a56
Initiate sphinx documentation
edan-bainglass May 31, 2023
ad023f6
add tutorial
superstar54 May 31, 2023
d32aa8f
add howto
superstar54 May 31, 2023
d15bbbf
Partial draft of installation guide
edan-bainglass Jun 1, 2023
f3678b7
fix same tag
superstar54 Jun 2, 2023
313759e
update tutorial
superstar54 Jun 2, 2023
ef787b2
update filename and import_structure
superstar54 Jun 2, 2023
f944ef5
Fix page references
edan-bainglass Jun 2, 2023
949b4ea
Fix indentations
edan-bainglass Jun 2, 2023
563a310
Add missing image files
edan-bainglass Jun 2, 2023
7277813
Add `sphinx-panels` dependency
edan-bainglass Jun 2, 2023
747bd9d
Add temporary logo
edan-bainglass Jun 2, 2023
4d4ba4b
Match theme with aiidalab docs
edan-bainglass Jun 2, 2023
a1671e9
Match config to aiidalab
edan-bainglass Jun 2, 2023
3152254
Reduce intro page link depth
edan-bainglass Jun 2, 2023
b9b5591
Add placeholders for necessary sections
edan-bainglass Jun 2, 2023
0615e3f
Update title
edan-bainglass Jun 2, 2023
b25736f
Discard search section
edan-bainglass Jun 2, 2023
8a2a563
Add intro paragraph
edan-bainglass Jun 2, 2023
06c19b1
Update logo
edan-bainglass Jun 2, 2023
987195c
Refactor installation sections
edan-bainglass Jun 2, 2023
00da112
Update aiidalab section introduction
edan-bainglass Jun 2, 2023
1838188
Update the installation introduction paragraph
edan-bainglass Jun 2, 2023
c2971b5
Change to ESPRESSO
edan-bainglass Jun 4, 2023
92d6fb0
Discard redundant formatting
edan-bainglass Jun 4, 2023
172e155
Finalize aiidalab section
edan-bainglass Jun 4, 2023
612260e
Conform to pre-commit
edan-bainglass Jun 4, 2023
d421749
Change note to tip
edan-bainglass Jun 4, 2023
ee3566e
Finalize app installation section
edan-bainglass Jun 4, 2023
65a1c58
Fix aiidalab section
edan-bainglass Jun 4, 2023
99bbdd3
Switch app store and terminal tab order back
edan-bainglass Jun 4, 2023
b058ff7
Finalize app upgrade section
edan-bainglass Jun 4, 2023
ad56d7a
Merge upgrade and uninstall sections
edan-bainglass Jun 4, 2023
16c7563
update howto select structure
superstar54 Jun 5, 2023
561b100
trigger readthedocs build
unkcpz Jun 14, 2023
f515dd1
trigger again 00
unkcpz Jun 14, 2023
ec86187
Add extra doc dependencies
edan-bainglass Jun 16, 2023
946d1b0
Add html context to docs configuration
edan-bainglass Jun 16, 2023
aa1958a
Update .readthedocs.yaml
edan-bainglass Jun 16, 2023
e678c03
fix build
unkcpz Jun 16, 2023
9fd2309
Generate requirements file for docs dependencies
edan-bainglass Jun 16, 2023
33121bd
Point .readthedocs.yaml to new requirements file
edan-bainglass Jun 16, 2023
db4a4cf
Revert "Add extra doc dependencies"
edan-bainglass Jun 16, 2023
3e69a29
Downgrade to `pydata-sphinx-theme 0.8.0`
edan-bainglass Jun 19, 2023
5b84811
Fix typo
edan-bainglass Jun 19, 2023
af837c7
Replace sphinx-panels with sphinx-design
edan-bainglass Jun 20, 2023
fd52bae
Update dependencies
edan-bainglass Jun 20, 2023
d46101b
Add `make rebuild` target
edan-bainglass Jun 20, 2023
65eae95
Add common link definitions
edan-bainglass Jun 20, 2023
030a489
Reduce welcome page title placeholder
edan-bainglass Jun 20, 2023
3691a97
Update docker image reference
edan-bainglass Jun 20, 2023
271812f
Add link to AiiDAlab website
edan-bainglass Jun 20, 2023
f61783c
Move update/uninstall instructions to how-to guides
edan-bainglass Jun 20, 2023
9500971
Restructure AiiDAlab access section
edan-bainglass Jun 20, 2023
b0df162
Change image to PNG (still not great)
edan-bainglass Jun 21, 2023
7de4ec3
Update access option text
edan-bainglass Jun 21, 2023
6b2c5f8
Decouple docker pages
edan-bainglass Jun 21, 2023
1f23018
Update Materials MarketPlace url
edan-bainglass Jun 21, 2023
37cb602
A few minor items
edan-bainglass Jun 21, 2023
8ade9cf
Discard configure section
edan-bainglass Jun 22, 2023
a410d4d
Add note to app installation section
edan-bainglass Jun 22, 2023
d638159
Update aiidalab access sections
edan-bainglass Jun 22, 2023
36f90f3
Add QMobile-based VM section
edan-bainglass Jun 22, 2023
a7a739c
Simplify name
edan-bainglass Jun 22, 2023
651f041
Add citations and acknowledgements
edan-bainglass Jun 22, 2023
ddb4c1a
Add reference to AiiDAlab in the acknowledgements
edan-bainglass Jul 21, 2023
2bc5082
Improve wording in app installation
edan-bainglass Jul 21, 2023
638df69
Add "start the app" step to terminal install guide
edan-bainglass Jul 21, 2023
a8fafd3
Add note on app home page update warnings
edan-bainglass Jul 21, 2023
e0ddc1c
Clean structure import section
edan-bainglass Jul 21, 2023
fc6cf6f
Improve tutorial intro
edan-bainglass Jul 22, 2023
45fbf28
Separate out app start guide
edan-bainglass Jul 22, 2023
9cbaf9f
Rename basic tutorial
edan-bainglass Jul 22, 2023
5953fe0
Modify basic tutorial
edan-bainglass Jul 22, 2023
2cdde70
Rename advanced tutorial
edan-bainglass Jul 23, 2023
32c5df8
Modify advanced tutorial
edan-bainglass Jul 23, 2023
46ea70e
Convert tutorials intro page into cards
edan-bainglass Jul 23, 2023
c475cc8
Update how-to naming convention
edan-bainglass Jul 23, 2023
8dfe177
Modify remote computer setup
edan-bainglass Jul 25, 2023
6012b7f
Fix report issue typo
edan-bainglass Jul 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: '3.11'

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
23 changes: 23 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

rebuild:
@ make -s clean html
3 changes: 3 additions & 0 deletions docs/requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx~=4.5.0
sphinx-design~=0.4.1
pydata-sphinx-theme==0.8.0
61 changes: 61 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile docs/requirements.in
#
alabaster==0.7.13
# via sphinx
babel==2.12.1
# via sphinx
beautifulsoup4==4.12.2
# via pydata-sphinx-theme
certifi==2023.5.7
# via requests
charset-normalizer==3.1.0
# via requests
docutils==0.17.1
# via
# pydata-sphinx-theme
# sphinx
idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.2
# via sphinx
markupsafe==2.1.3
# via jinja2
packaging==23.1
# via sphinx
pydata-sphinx-theme==0.8.0
# via -r docs/requirements.in
pygments==2.15.1
# via sphinx
requests==2.31.0
# via sphinx
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.4.1
# via beautifulsoup4
sphinx==4.5.0
# via
# -r docs/requirements.in
# pydata-sphinx-theme
# sphinx-design
sphinx-design==0.4.1
# via -r docs/requirements.in
sphinxcontrib-applehelp==1.0.4
# via sphinx
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==2.0.1
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
urllib3==2.0.3
# via requests
Binary file added docs/source/_static/images/aiidalab_qe_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/full_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/_static/images/full_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/source/_static/images/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/nav-bar-app-store.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/nav-bar-terminal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/report_issue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/select_new_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/setup_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/setup_computer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/step2_configure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/step3_resources.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/step4_results.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/images/workchain_selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
95 changes: 95 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
import time

# sys.path.insert(0, os.path.abspath('.'))

# -- Project information -----------------------------------------------------

project = "Quantum ESPRESSO App"
copyright_first_year = "2023"
copyright_owners = "The AiiDAlab Team"

current_year = str(time.localtime().tm_year)
copyright_year_string = (
current_year
if current_year == copyright_first_year
else f"{copyright_first_year}-{current_year}"
)
copyright = "{}, {}. All rights reserved".format(
copyright_year_string, copyright_owners
)

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
show_authors = True

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx_design",
]

# The pydata-sphinx-theme already loads the bootstrap css.
panels_add_bootstrap_css = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = ".rst"

# The master toctree document.
# ~ master_doc = 'index'
master_doc = "index"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "pydata_sphinx_theme"

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
html_logo = "_static/images/full_logo.png"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False

# Define common links
rst_epilog = """
.. _AiiDA: https://www.aiida.net
.. _AiiDAlab: https://www.aiidalab.net/
.. _Quantum ESPRESSO: https://www.quantum-espresso.org/
"""
47 changes: 47 additions & 0 deletions docs/source/howto/import_structure.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. _import_structure:

================
Import structure
================

You can select a structure from four sources.

- Upload file
- OPTIMADE
- AiiDA database
- From Examples

.. figure:: /_static/images/howto_select_structure.png
:width: 20cm


Upload
=======

User can upload a structure file directly from the machine. The supported formats are listed in the https://wiki.fysik.dtu.dk/ase/ase/io/io.html#ase.io.read.
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved

From OPTIMADE
=============
`OPTIMADE`_ is a common REST API for accessing structural information of databases that contain calculated properties of existing and hypothetical materials. The OPTIMADE structure importer allows you to search for structures in the a wide range of databases (https://providers.optimade.org/) that support the OPTIMADE API.
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved

In order to select a compound from the OPTIMADE structure importer, you need to

- select the `provider` from the dropdown menu
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved
- select a database for the selected provider (if there are multiple databases available)
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved
- enter the formula of the compound in the search field. Or, select the element from the periodic table.
- click on the `Search` button
- The importer will then search for the compound in the selected database and return a list of structures that match the search criteria. You can then select the structure you want to import from the list.

AiiDA database
==============

Here you can select the structure in your AiiDA database.
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved


From Examples
==============
Here you can select the structure from the examples provided by the `Qeapp` for testing purposes.
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved



.. _OPTIMADE: https://www.optimade.org/
12 changes: 12 additions & 0 deletions docs/source/howto/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _howto:

How-to guides
=============

.. toctree::
:maxdepth: 2
:caption: Contents:

setup_computer_code
import_structure
upgrade_uninstall
78 changes: 78 additions & 0 deletions docs/source/howto/setup_computer_code.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
.. _how_to_setup_computer_code:

Setup remote computer/code
edan-bainglass marked this conversation as resolved.
Show resolved Hide resolved
==========================

The instruction in collapsible text is for CSCS machine.

Now you need set up a new computer (e.g., the CSCS Daint or Eiger machine if you have acount on it) and the codes on this newly setup computer (i.e., you need to tell AiiDA where the executables are, which modules to load etc.).

.. note::

The widget to assist you in the computer/code setup is not very convinient for CSCS machines, because CSCS requires to specify the account and setting up a default one is not currently straightforward in AiiDA; we are working to improve this.


**Setup new code**
- Click the button `Setup new code`.
- In the `Domain` field, please select `daint.cscs.ch`.
- Click `Detailed Setup`, then it will show three steps:

- password-less SSH
- computer in AiiDA
- code in AiiDA

**Set up password-less SSH connection**
- In the `SSH username`, input your username for CSCS.
- Click `Setup ssh`.
- On the textbox above `Detailed Setup`, input your password, and click `Continue`.
- Wait a few seconds, it will ask you to input your password again, and click `Continue`

If you see a message as below:
```
30s timeout ...
```
Please click the `Setup ssh` button again and input the password.


**Setup a computer in AiiDA**

Click the button `Setup computer`, then add one line in the `Prepend text` to specify your account (it is the project account, such as `mr32` or `mrcloud`) at CSCS. Replace the `<account_name>` string with it!
```
#SBATCH --account=<account_name>
```
You can find further parameters in the screenshot below.

.. figure:: /_static/images/setup_computer.png
:width: 12cm


Click the button `test computer`, then wait 1 minute: you will see this log message if everything was setup correctly:

.. code-block:: none

Report: Testing computer<daint-mc> for user<aiida@localhost>...
* Opening connection... [OK]
* Checking for spurious output... [OK]
* Getting number of jobs from scheduler... [OK]: 2255 jobs found in the queue
* Determining remote user name... [OK]: xingwang
* Creating and deleting temporary file... [OK]
Success: all 5 tests succeeded


**Set up a code**

In the field `Select computer`, please select the computer you just setup, in this case `daint-mc`. Check all other options, and then click the button `Setup code` to setup the `pw.x` code.

.. figure:: /_static/images/setup_code.png
:width: 12cm

Similarly, setup the `dos.x` and `projwfc.x` codes, needed by the app to compute DOS and PDOS. You can skip the computer setup step, since it needs to be done only once per comouter, and go to `Set up a code in AiiDA` directly to setup the remaining codes.

After you finishing the codes setup, you can launch a new calculation with the newly setup codes, that should be called:

- pw-7.0@daint-mc
- dos-7.0@daint-mc
- projwfc-7.0@daint-mc

.. figure:: /_static/images/select_new_code.png
:width: 12cm
Loading