Skip to main content

NOMAD

nomad-simulations schema plugin

This is a plugin for NOMAD which contains the base sections schema definitions for materials science simulations.

Getting started

Install the dependencies

Clone the project and in the workspace folder, create a virtual environment (note this project uses Python 3.9):

git clone https://github.com/nomad-coe/nomad-simulations.git
cd nomad-simulations
python3.9 -m venv .pyenv
. .pyenv/bin/activate

Make sure to have pip upgraded:

pip install --upgrade pip

We recommend installing uv for fast pip installation of the packages:

pip install uv

Install the nomad-lab package:

uv pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple

Note! Until we have an official pypi NOMAD release with the plugins functionality. Make sure to include NOMAD's internal package registry (via --index-url in the above command).

The plugin is still under development. If you would like to contribute, install the package in editable mode (with the added -e flag) with the development dependencies:

uv pip install -e '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple

Run the tests

You can run local tests using the pytest package:

python -m pytest -sv tests

where the -s and -v options toggle the output verbosity.

Our CI/CD pipeline produces a more comprehensive test report using coverage and coveralls packages. We suggest you to generate your own coverage reports locally by doing:

uv pip install pytest-cov
python -m pytest --cov=src tests

You can also run the script to generate a local file coverage.txt with the same information by doing:

./scripts/generate_coverage_txt.sh

Setting up plugin on your local installation

Read the NOMAD plugin documentation for all details on how to deploy the plugin on your NOMAD instance.

Run linting and auto-formatting

ruff check .
ruff format . --check

Ruff auto-formatting is also a part of the GitHub workflow actions. Make sure that before you make a Pull Request, ruff format . --check runs in your local without any errors otherwise the workflow action will fail.

Debugging

For interactive debugging of the tests, use pytest with the --pdb flag. We recommend using an IDE for debugging, e.g., VSCode. If using VSCode, you can add the following snippet to your .vscode/launch.json:

{
  "configurations": [
      {
        "name": "<descriptive tag>",
        "type": "debugpy",
        "request": "launch",
        "cwd": "${workspaceFolder}",
        "program": "${workspaceFolder}/.pyenv/bin/pytest",
        "justMyCode": true,
        "env": {
            "_PYTEST_RAISE": "1"
        },
        "args": [
            "-sv",
            "--pdb",
            "<path to plugin tests>",
        ]
    }
  ]
}

where ${workspaceFolder} refers to the NOMAD root.

The settings configuration file .vscode/settings.json performs automatically applies the linting upon saving the file progress.

Build the python package

The pyproject.toml file contains everything that is necessary to turn the project into a pip installable python package. Run the python build tool to create a package distribution:

uv pip install build
python -m build --sdist

You can install the package with pip:

uv pip install dist/nomad-simulations-0.1.0

Read more about python packages, pyproject.toml, and how to upload packages to PyPI on the PyPI documentation.

Documentation on Github pages

To deploy documentation on Github pages, make sure to enable GitHub pages via the repo settings.

To view the documentation locally, install the documentation related packages using:

uv pip install -r requirements_docs.txt

Run the documentation server:

mkdocs serve

Main contributors

Name E-mail Topics Github profiles
Dr. Nathan Daelman nathan.daelman@physik.hu-berlin.de DFT, Precision @ndaelman-hu
Dr. Bernadette Mohr mohrbern@physik.hu-berlin.de MD, FF @Bernadette-Mohr
Dr. José M. Pizarro jose.pizarro@physik.hu-berlin.de GW, DMFT, BSE @JosePizarro3
Dr. Joseph F. Rudzinski (Coordinator) joseph.rudzinski@physik.hu-berlin.de General @JFRudzinski

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nomad_simulations-0.0.0.tar.gz (577.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nomad_simulations-0.0.0-py3-none-any.whl (83.9 kB view details)

Uploaded Python 3

File details

Details for the file nomad_simulations-0.0.0.tar.gz.

File metadata

  • Download URL: nomad_simulations-0.0.0.tar.gz
  • Upload date:
  • Size: 577.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for nomad_simulations-0.0.0.tar.gz
Algorithm Hash digest
SHA256 41623f8b8abc35723b01ef25d4c5c445f2eac64e1864228feaecf34c70695dd6
MD5 3c14018e814bb64c1ecce1f36a1e2bbe
BLAKE2b-256 18e538579bebf1e12e433f62b7bfec206232e2226088ddf7d0418b907b9bf40a

See more details on using hashes here.

File details

Details for the file nomad_simulations-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nomad_simulations-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75612908d4684c60ce88495fe90fd0caa81439d5bbf61681c735886ee332650f
MD5 d44955ab4c01b2192b515cc21d13e752
BLAKE2b-256 14039a6487caf268e4a1006aa4ac32409086d7b01de3d6f58f386ee02c1710d7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

This release

0.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page