Skip to main content

qmpy_rester Build Status

A python wrapper for OQMD API (PyPI). This code is written in python 3.

Installation

pip install qmpy_rester

Usage

1. Get data through omqd-api

1.1 Example

import qmpy_rester as qr

## Return list of data
with qr.QMPYRester() as q:
    kwargs = {
        ‘element_set’: ‘(Fe-Mn),O’,      # composition include (Fe OR Mn) AND O
        ‘stability’: ‘<-0.1’,            # hull distance smaller than -0.1 eV
        ‘natom’: ‘<10’,                  # number of atoms less than 10
        }
    list_of_data = q.get_oqmd_phases(**kwargs)

## Return data of a single oqmd phase
with qr.QMPYRester() as q:
    phase = q.get_oqmd_phase_by_id(fe_id=4061139, fields='!sites') # Default: fields=None

1.2 Allowed attributes

  • composition: compostion of the materials or phase space, e.g. Al2O3, Fe-O
  • element_set: the set of elements that the compound must have, '-' for OR, ',' for AND, e.g. (Fe-Mn),O
  • icsd: whether the structure exists in ICSD, e.g. False, True, F, T
  • prototype: structure prototype of that compound, e.g. Cu, CsCl
  • generic: chemical formula abstract, e.g. AB, AB2
  • spacegroup: the space group of the structure, e.g. Fm-3m
  • natoms: number of atoms in the supercell, e.g. 2, >5
  • volume: volume of the supercell, e.g. >10
  • ntypes: number of elements types in the compound, e.g. 2, <3
  • stability: hull distance of the compound, e.g. 0, <-0.1,
  • delta_e: formation energy of that compound, e.g. <-0.5,
  • band_gap: band gap of the materials, e.g. 0, >2
  • fields: return subset of fields, e.g. 'name,id,delta_e', '!sites'
  • filter: customized filters, e.g. 'element_set=O AND ( stability<-0.1 OR delta_e<-0.5 )'
  • limit: number of data return at once
  • offset: the offset of data return

2. Get data through optimade api format

2.1 Example

import qmpy_rester as qr

## Return list of data
with qr.QMPYRester() as q:
    kwargs = {
        ‘elements’: ‘Fe,Mn’,                    # include element Fe and Mn
        ‘nelements’: ‘<5’,                      # less than 4 element species in the compound
        ‘_oqmd_stability’: ‘<0’,                # stability calculted by oqmd is less than 0
        }
    list_of_data = q.get_optimade_structures(**kwargs)

## Return data of a single structure
with qr.QMPYRester() as q:
    structure = q.get_optimade_structure_by_id(id=4061139, fields='!_oqmd_sites') # Default: fields=None

1.2 Allowed attributes

  • elements: the set of elements that the compound must have, e.g. Si,O
  • nelements: number of elements types in the compound, e.g. 2, <3
  • chemical_formula: compostion of the materials, e.g. Al2O3
  • formula_prototype: chemical formula abstract, e.g. AB, AB2
  • _oqmd_natoms: number of atoms in the supercell, e.g. 2, >5
  • _oqmd_volume: volume of the supercell, e.g. >10
  • _oqmd_spacegroup: the space group of the structure, e.g. Fm-3m
  • _oqmd_prototype: structure prototype of that compound, e.g. Cu, CsCl
  • _oqmd_stability: hull distance of the compound, e.g. 0, <-0.1,
  • _oqmd_delta_e: formation energy of that compound, e.g. <-0.5,
  • _oqmd_band_gap: band gap of the materials, e.g. 0, >2
  • fields: return subset of fields, e.g. 'elements,chemical_formula', '!_oqmd_sites'
  • filter: customized filters, e.g. 'elements=O AND ( _oqmd_stability<-0.1 OR _oqmd_delta_e<-0.5 )'
  • limit: number of data return at once
  • offset: the offset of data return

Metadata

Release files for qmpy-rester 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qmpy-rester 0.2.0
File Size Uploaded Provenance
qmpy_rester-0.2.0.tar.gz 12.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for qmpy-rester 0.2.0
File Interpreter ABI Platform
qmpy_rester-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.3 kB

Release files / qmpy_rester-0.2.0.tar.gz

Download URL qmpy_rester-0.2.0.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9143c39ecc2274ff72dc2e9346a6e44b997d18d015f3364caccf68f83b139394
BLAKE2b-256 checksum
How to use checksums
e4d4573339c3bf957c7c3e353defeed638be7e4eb514eeb84642ffb13dd439df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

Release files / qmpy_rester-0.2.0-py3-none-any.whl

Download URL qmpy_rester-0.2.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f4249895e3cb8f69f5948d13950c3a30fa150d633d0d65a49eff3d6230e7ab5
BLAKE2b-256 checksum
How to use checksums
518853481be68dc75cf28aaee216871f519a11dd3e19a7007bc7a4c2cdb0a99e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.0

Security for qmpy-rester 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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