Learn
Tutorials for mofography, grouped by level.
Start with the Basic tutorials: together they are a crash course. Move to Advanced for datasets, high throughput, and specialised analyses, and to Deeper knowledge for how the methods work inside and how to tune them. Missing something? Open an issue. Every function is listed in the API reference.
NoteWork in progress
These tutorials are still being updated, and new and better functions and modules are added constantly, so take any single page with a grain of salt. Some pages may lag behind the latest code. For the rigorous treatment of the methods, definitions and validation, refer to the paper and its Supporting Information.
Basic
| Tutorial | What it covers |
|---|---|
| Quick start (new) | CIF to pore graph, pocket types, windows, and textural properties |
| Guide to choosing functions (new) | Quick-reference handbook: the go-to function for each task, and what to avoid |
| Distance grid | Distance grid calculation and visualization |
| Region segmentation | Splitting void space into pockets |
| PBC considerations | How pockets are merged across periodic boundaries |
| Connections and windows | Detecting the windows in a material |
| Pore graph (RAG) | Region adjacency graph |
| Compute pore diameters | LCD, PLD, and LIS |
| Surface area and void volume | MC shell surface area, void volume, per-pocket breakdowns |
| PLD and percolation | Winding-number method |
| Pore size distributions | Gelb–Gubbins global and pocket-wise PSDs, total vs accessible void |
| Pocket type detection (new) | Detecting the types of pockets |
| Three.js plotting (new) | Interactive Three.js scenes in notebooks and as standalone HTML |
| Basic structure visualization using Plotly | First 3D views of atoms and bonds |
CLI
| Tutorial | What it covers |
|---|---|
| CLI quick start | mgrcli: process a CIF and get pore graphs, PSD, RAG, and textural properties in one shot |
Advanced
| Tutorial | What it covers |
|---|---|
| MOFDB example | Large DataFrame from MOFDB |
| High-throughput characterization | Pore graphs for the IZA dataset with Dask |
| PoroNet (new) | Train a graph neural network on pore graphs |
| Advanced geometric and topological pore network properties | LCD, PLD, ASA, percolating volume, window connectivity, and FFV, worked on a hyper-crosslinked polymer |
| Structure analysis | Read structures, bond graphs, and pattern matching |
| Aromatic ring detection | Ring highlights and bond-length tolerances for Plotly and Three.js |
| Functional groups | Detect moieties in a dataset such as CoREMOF |
| Advanced structure visualization | Plotly and Three.js: framework, connections, customization |
| Framework subset visualization | Only a subset of atoms and bonds |
Deeper knowledge
How the methods work inside, what the knobs do, and older or niche approaches.
| Tutorial | What it covers |
|---|---|
| Tuning and safe ranges | Defaults, safe ranges, and symptoms for dgrid_from_atoms_rust and do_periodic_segmentation_rust |
| Distance grid methods | The four distance-grid backends and how to choose |
| Selective smoothing | preserve_threshold, smooth_threshold, max_smooth_radius and h-maxima |
| Watershed backends (new) | rust_det, rust_bucket, rust_det_parallel, skimage: timing, memory, determinism |
| VDW radii and segmentation | How Bondi, CRC, and Alvarez radii change the grid and pore analysis |
| Accessibility methods | Winding vs lattice (Zeo++-style) accessibility, plus a 3D percolating cluster |
| Window fingerprinting | Element-weighted shell fingerprints and accessible-region search |
| Pathfinding on the pore graph | Dijkstra-style path finding; an example only, use the winding method for PLD and percolation |
| Fast Rust CIF reader (new) | read_cif_to_ase: much faster CIF parsing for large structures |