Skip to main content

mofchecker

Tests PyPI PyPI - Python Version PyPI - License Documentation Status Code style: black

What does it do?

mofchecker performs quick sanity checks on crystal structures of metal-organic frameworks (MOFs).

Try the live web app at https://github.com/kjappelbaum/webmofchecker !

Sanity checks:

  • Presence of at least one metal, carbon and hydrogen atom
  • Overlapping atoms (distance between atoms above covalent radius of the smaller atom)
  • Overvalent carbons (coordination number above 4), nitrogens (heuristics), or hydrogens (CN > 1)
  • Missing hydrogen on common coordination geometries of C and N (heuristics)
  • Atoms with excessive EQeq partial charge

Basic analysis:

  • Presence of floating atoms or molecules
  • Hash of the atomic structure graph (useful to identify duplicates)

The sanity checks can be used to weed out really unreasonable structures (nothing too fancy). The code is a rewrite of similar tools in structure_comp.

🚀 Installation

Development version:

pip install git+https://github.com/kjappelbaum/mofchecker.git

Latest stable release

pip install mofchecker

Note that you need to install zeopp if you want to use the porosity features.

conda install -c conda-forge zeopp-lsmo

A web app is currently being developed in another repository and deployed on MatCloud.

💪 Getting Started

Command line interface

mofchecker --help # list options
mofchecker structure1.cif structure2.cif  # prints JSON output
mofchecker -d has_metal -d has_atomic_overlaps *.cif  # compute only selected descriptors

In Python

from mofchecker import MOFChecker
mofchecker = MOFChecker.from_cif(<path_to_cif>)
# or: MOFChecker(structure=my_pymatgen_structure)

# Test for OMS
mofchecker.has_oms

# Test for clashing atoms
mofchecker.has_atomic_overlaps

# Run basic checks on a list of cif paths (sample_structures)
results = []

for structure in sample_structures:
    mofchecker = MOFChecker.from_cif(structure)
    results.append(mofchecker.get_mof_descriptors())

👐 Contributing

Contributions, whether filing an issue, making a pull request, or forking, are appreciated. See CONTRIBUTING.rst for more information on getting involved.

⚖️ License

The code in this package is licensed under the MIT License.

💰 Funding

The research was supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement 666983, MaGic), by the NCCR-MARVEL, funded by the Swiss National Science Foundation, and by the Swiss National Science Foundation (SNSF) under Grant 200021_172759.

Metadata

Release files for mofchecker 0.9.6

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

Source distribution (sdist)

Source distribution for mofchecker 0.9.6
File Size Uploaded
mofchecker-0.9.6.tar.gz 8.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mofchecker 0.9.6
File Interpreter ABI Platform
mofchecker-0.9.6-py3-none-any.whl Python 3 none any Details

Total release size: 13.9 MB

Release files / mofchecker-0.9.6.tar.gz

Download URL mofchecker-0.9.6.tar.gz
Size 8.8 MB
Tags Source
SHA-256 checksum
How to use checksums
cc97b9a4a9ce04220759a3918e9a4600c6f00d7e81fdf7e4219f44e782371325
BLAKE2b-256 checksum
How to use checksums
70e182b266ff16469847be52653f57b19bb6e7b7b4d1188223bf669687166b33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / mofchecker-0.9.6-py3-none-any.whl

Download URL mofchecker-0.9.6-py3-none-any.whl
Size 5.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b86eca0f29cc8649689c04d5798a60e1340e927b8f5ce7e8ab1f6e74178eae20
BLAKE2b-256 checksum
How to use checksums
5a63c1f6ef02e3809048cfefba0b99f966f5f8f6b2b556d1d059c78f34884130
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.9.6 This release

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.7.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.1.0

2 release 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