https://github.com/tilde-lab/quantum_esperanto

Very fast parser for the XML logs produced with the VASP, Vienna Ab initio Simulation Package

https://github.com/tilde-lab/quantum_esperanto

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.0%) to scientific vocabulary

Keywords

ab-initio dft material-design materials materials-informatics materials-science vasp xml-files

Keywords from Contributors

ontologies
Last synced: 5 months ago · JSON representation ·

Repository

Very fast parser for the XML logs produced with the VASP, Vienna Ab initio Simulation Package

Basic Info
  • Host: GitHub
  • Owner: tilde-lab
  • License: mit
  • Language: Cython
  • Default Branch: master
  • Homepage:
  • Size: 723 KB
Statistics
  • Stars: 5
  • Watchers: 2
  • Forks: 1
  • Open Issues: 8
  • Releases: 1
Archived
Topics
ab-initio dft material-design materials materials-informatics materials-science vasp xml-files
Created over 8 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

Quantum Esperanto

DOI PyPI Build Status

Quantum Esperanto is a fast parser of XML files output by DFT codes (such as VASP) written in Cython. It takes advantage of lxml, a Python wrapper around libxml2 library, and its Cython interface. XML files are parsed to a Python dictionary in a transparent way. It is really fast, up to 10 times faster than the parser used by pymatgen project.

Installation

The development versions of libraries libxml2 and libxslt must be present in the system. Check with the command:

$ xslt-config

Also, a C-compiler such as gcc must be present. The recommended way of installing Quantum Esperanto is with pip from PyPI:

$ pip install quantum_esperanto

If one is interested in obtaining latest versions of the package, it can be installed using the source code from GitHub:

$ git clone https://github.com/tilde-lab/quantum_esperanto $ cd quantum_esperanto $ pip install .

The Python prerequisites for the package are numpy and lxml (should be installed automatically with pip). It is possible to install the package in development mode. This will install Cython as well as nose test suite. To do it issue the following command after cloning the repository and changing the directory:

$ cd quantum_esperanto $ pip install -e .[dev]

After installation run several tests to check if the procedure was completed successfully. It can be done with the following commands in quantum_esperanto directory:

$ python setup.py test

If everything is OK, you're all set to start using the package.

Usage

The parser can be used in a very simple way. First, the parser has to be instantiated, and then the parse_file method of the parser returns the dictionary of parsed values:

from quantum_esperanto.vasp import VaspParser parser = VaspParser() d = parser.parse_file('vasprun.xml')

The possible arguments for the parser are:

recover (boolean, default: True) a flag that allows recovering broken XML. It is very useful in case of unfinished calculations; however, it exits on the first XML error and the returned dictionary contains parsed values up to the first XML error only. When XML recovery is needed, a warning is printed to stderr.

whitelist (list, default: None) the list of parent tag names that are only needed to parsed. If None, then all tags are parsed.

Parsing result

The result of parsing is a dictionary that follows the structure of vasprun.xml. The keys of the dictionary are either tag names (for i, v, varray tags), or tag:tag name construction (for tags that do have name attribute), or just tags themselves. The values are either tag contents converted to the right type (specified by type tag attribute) or (in case of varrays and sets) Numpy arrays. Fortran overflows (denoted by *****) are converted to NaNs in case of float values and to MAXINT in case of integer values.

Example

xml <structure name="primitive_cell" > <crystal> <varray name="basis" > <v> 1.43300000 1.43300000 1.43300000 </v> <v> 1.43300000 -1.43300000 -1.43300000 </v> <v> -1.43300000 1.43300000 -1.43300000 </v> </varray> <i name="volume"> 11.77059895 </i> <varray name="rec_basis" > <v> 0.34891835 0.34891835 0.00000000 </v> <v> 0.34891835 -0.00000000 -0.34891835 </v> <v> -0.00000000 0.34891835 -0.34891835 </v> </varray> </crystal> <varray name="positions" > <v> 0.00000000 0.00000000 0.00000000 </v> </varray> </structure>

The resulting dictionary reads (printed with pprint):

{'structure:primitive_cell': {'crystal': {'basis': array([[ 1.433, 1.433, 1.433], [ 1.433, -1.433, -1.433], [-1.433, 1.433, -1.433]]), 'rec_basis': array([[ 0.34891835, 0.34891835, 0. ], [ 0.34891835, -0. , -0.34891835], [-0. , 0.34891835, -0.34891835]]), 'volume': 11.77059895}, 'positions': array([[ 0., 0., 0.]])}}

License

MIT © Andrey Sobolev, Tilde Materials Informatics

Owner

  • Name: Tilde
  • Login: tilde-lab
  • Kind: organization
  • Email: support@tilde.pro
  • Location: The Internet

Tilde Materials Informatics Virtual Lab

Citation (CITATION.cff)

cff-version: 1.2.0
title: quantum_esperanto
type: software
license: MIT
authors:
  - given-names: Andrey
    family-names: Sobolev
    orcid: 'https://orcid.org/0000-0001-5086-6601'
  - given-names: Evgeny
    family-names: Blokhin
    orcid: 'https://orcid.org/0000-0002-5333-3947'
doi: 10.5281/zenodo.7693601
url: 'https://github.com/tilde-lab/quantum_esperanto'
repository-artifact: 'https://pypi.org/project/quantum_esperanto'
keywords:
  - crystal structure
  - VASP
  - Vienna Ab initio Simulation Package
  - first-principles
  - crystallography
  - computational chemistry
  - materials science
  - atomistic simulations
  - computational materials

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 42
  • Total Committers: 4
  • Avg Commits per committer: 10.5
  • Development Distribution Score (DDS): 0.214
Top Committers
Name Email Commits
Andrey Sobolev a****v@g****m 33
Evgeny Blokhin eb@t****o 7
whitesource-bolt-for-github[bot] w****]@u****m 1
whitesource-bolt-for-github[bot] 4****]@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 11
  • Total pull requests: 0
  • Average time to close issues: 4 months
  • Average time to close pull requests: N/A
  • Total issue authors: 3
  • Total pull request authors: 0
  • Average comments per issue: 0.45
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 7
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • mend-bolt-for-github[bot] (7)
  • blokhin (3)
  • pyup-bot (1)
Pull Request Authors
Top Labels
Issue Labels
Mend: dependency security vulnerability (6) question (1) security vulnerability (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 21 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 2
  • Total maintainers: 2
pypi.org: quantum-esperanto

A fast parser of XML files output by VASP DFT code written in Cython.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 21 Last month
Rankings
Dependent packages count: 10.1%
Downloads: 16.9%
Average: 18.3%
Stargazers count: 20.3%
Dependent repos count: 21.6%
Forks count: 22.6%
Maintainers (2)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • lxml *
  • numpy >=1.10