Giter Club home page Giter Club logo

mofchecker's Introduction

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.

mofchecker's People

Contributors

kjappelbaum avatar github-actions[bot] avatar ltalirz avatar dependabot[bot] avatar deepsource-autofix[bot] avatar bkilian15 avatar deepsourcebot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.