kjappelbaum / moffragmentor

Split a MOF into its building blocks.
https://moffragmentor.readthedocs.io/en/latest/
MIT License
21 stars 0 forks source link
graph materials-science metal-organic-frameworks mof

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

πŸ’ͺ Getting Started

mof = MOF.from_cif('tests/test_files/HKUST-1.cif')

Fragment the MOF

fragments = mof.fragment()

If you are in a Jupyter notebook you can visualize the components.

fragments.linkers[0].show_molecule()
fragments.nodes[0].show_molecule()

You can also search PubChem for the building blocks

fragments.linkers[0].search_pubchem()

To get the RCSR code run

fragments.net_embedding.rcsr_code

πŸš€ Installation

To install the latest release run

pip install moffragmentor

To install the development version run

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

You need to have openbabel installed which you can install with conda install -c conda-forge openbabel.

As a utility, you can also run bash create_conda.sh to create a conda environment with all dependencies. Note that you might want to change the name of the name of the environment (defaults to moffragmentor).

moffragmentor in the MOF decomposition tool landscape

While moffragmentor has some unique features, it might not be the right tool for your task. Due to some design choices (having a pymatgen representation of all fragments and the net) it is relatively slow in the current implementation (though there are obvious ways for fixing this).

Therefore, we encourage you to also consider alternative tools:

πŸ‘ 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.