|
1 | 1 | # MOFid
|
2 | 2 | A system for rapid identification and analysis of metal-organic frameworks.
|
3 | 3 |
|
4 |
| -Check out [https://snurr-group.github.io/web-mofid/](https://snurr-group.github.io/web-mofid/) to quickly and easily run these tools in your browser! No programming skills required. If you wish to generate the MOFid for a large number of structures, see the Python-based interface described below. |
5 |
| - |
6 | 4 | Please cite [DOI: 10.1021/acs.cgd.9b01050](https://pubs.acs.org/doi/abs/10.1021/acs.cgd.9b01050) if you use MOFid in your work.
|
7 | 5 |
|
8 | 6 | ## Objective
|
9 | 7 | Supplement the current MOF naming conventions with a canonical, machine-readable identifier to facilitate data mining and searches. Accomplish this goal by representing MOFs according to their nodes + linkers + topology
|
10 | 8 |
|
11 |
| -## Installation |
12 |
| -If you have access to a Linux system or high performance computing cluster, it may be possible to run the MOFid code via [singularity](https://apptainer.org/user-docs/master/quick_start.html), which packages the mofid installer into a portable, reproducible environment. To get started, refer to documentation from your university or computing center ([example](https://kb.northwestern.edu/page.php?id=85614)) for help on singularity. There may be setup instructions specific to your compute environment. (For example, you may need to load modules or bind paths to set up singularity.) |
13 |
| - |
14 |
| -1. Set up singularity and test your installation, e.g. `singularity exec library://ubuntu cat /etc/lsb-release` |
15 |
| -2. Download the pre-compiled singularity container from GitHub, e.g. via `wget -O mofid.sif https://github.com/snurr-group/mofid/releases/download/v1.1.0/mofid.sif` |
16 |
| -3. Test your installation using `singularity test mofid.sif` |
17 |
| - |
18 |
| -See [additional details](https://github.com/snurr-group/mofid/blob/master/containers.md) about alternate installation methods, such as using [Docker](https://www.docker.com/resources/what-container) or compiling the Python package yourself. |
19 |
| - |
20 |
| -## Usage |
21 |
| -The singularity container wraps all of the MOFid software into a single package. |
22 |
| - |
23 |
| -As a command line tool: |
24 |
| - |
25 |
| -```{bash} |
26 |
| -# Analyzing a single MOF crystal structure |
27 |
| -./mofid.sif file path_to_mof.cif |
28 |
| -# alternatively: singularity run mofid.sif file path_to_mof.cif |
29 |
| -
|
30 |
| -# Analyzing a folder |
31 |
| -./mofid.sif folder path_to_input_cif_folder path_to_mofid_output |
32 |
| -# By default, path_to_mofid_output is set to "Output/" in your current directory |
33 |
| -``` |
34 |
| - |
35 |
| -Or, as part of a Python script: |
36 |
| - |
37 |
| -```{python} |
38 |
| -import json |
39 |
| -import sys |
| 9 | +## Usage and Installation Instructions |
| 10 | +There are three main ways in which you can use MOFid: |
| 11 | +1. From your browser. |
| 12 | +2. By compiling the MOFid source code and running it locally. |
| 13 | +3. By using Singularity or Docker to run a pre-built image of the MOFid code locally. |
40 | 14 |
|
41 |
| -import subprocess |
42 |
| -# If using Python 2, you may need to install subprocess32 and import via: |
43 |
| -# import subprocess32 as subprocess |
| 15 | +### Browser-Based MOFid |
| 16 | +Visit [https://snurr-group.github.io/web-mofid](https://snurr-group.github.io/web-mofid/) to quickly and easily run MOFid in your browser! No programming skills are required. |
44 | 17 |
|
45 |
| -MOFID_SIF = "path_to_mofid.sif" |
46 |
| -MOF_CIF_TO_ANALYZE = "path_to_mof.cif" |
47 |
| -mofid_cmd = ["singularity", "run", MOFID_SIF, "file", MOF_CIF_TO_ANALYZE] |
48 |
| -mofid_run = subprocess.run(mofid_cmd, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
49 |
| -sys.stderr.write(mofid_run.stderr) # Re-forwarding C++ errors |
50 |
| -mofid_output = json.loads(mofid_run.stdout) |
51 |
| -``` |
| 18 | +### Compiling from Source |
| 19 | +See [compiling.md](compiling.md) for how to compile and run MOFid from source. |
52 | 20 |
|
53 |
| -The `mofid_output` variable above is a dictionary containing eight entries: the MOFid (`mofid`), MOFkey (`mofkey`), SMILES string (`smiles`, `smiles_nodes`, or `smiles_linkers`), topology (`topology`), catenation (`cat`), and basename of the CIF (`cifname`). |
| 21 | +### Containerized MOFid |
| 22 | +See [singularity.md](singularity.md) for how to run MOFid via a Singularity container. |
54 | 23 |
|
55 | 24 | ## Background and Troubleshooting
|
56 | 25 | Please read the page [here](https://github.com/snurr-group/web-mofid/blob/master/README.md) for a detailed background and for important tips/tricks to help troubleshoot any problematic scenarios.
|
|
0 commit comments