Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nomad-coe/nomad-parser-msspec
NOMAD parser plugin for MsSpec input/output files.
https://github.com/nomad-coe/nomad-parser-msspec
Last synced: about 1 month ago
JSON representation
NOMAD parser plugin for MsSpec input/output files.
- Host: GitHub
- URL: https://github.com/nomad-coe/nomad-parser-msspec
- Owner: nomad-coe
- License: apache-2.0
- Created: 2024-01-31T15:52:23.000Z (11 months ago)
- Default Branch: develop
- Last Pushed: 2024-02-08T13:06:21.000Z (11 months ago)
- Last Synced: 2024-10-27T20:38:34.317Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 66.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nomad-parser-msspec-plugin
Standalone NOMAD plugin for parsing MsSpec calculation files## Developing the parser
Clone the parser-plugin project and enter the folder
```
git clone https://github.com/nomad-coe/nomad-parser-plugin-msspec.git nomad-parser-plugin-msspec
cd nomad-parser-plugin-msspec
```Create a virtual environment (preferably using Python 3.9):
```
pip install virtualenv
virtualenv -p `which python3` .pyenv
source .pyenv/bin/activate
```Install the parser-plugin in development mode (**this includes the NOMAD's pypi package already**):
```
pip install -e .
```You can debug now the calculations from the parser-plugin.
## Using the parser
You can use NOMAD's parsers and normalizers locally on your computer. You need to install
NOMAD's pypi package (if you didn't do it already)```
pip install nomad-lab
```To parse code input/output from the command line, you can use NOMAD's command line
interface (CLI) and print the processing results output to stdout:```
nomad parse --show-archive
```To parse a file in Python, you can program something like this:
```python
import sys
from nomad.cli.parse import parse, normalize_all# match and run the parser
archive = parse(sys.argv[1])
# run all normalizers
normalize_all(archive)# get the 'main section' section_run as a metainfo object
section_run = archive.section_run[0]# get the same data as JSON serializable Python dict
python_dict = section_run.m_to_dict()
```