Does your simulation cell satisfy the minimum-image convention, and if not, along which axis?
cellcheck reads the six lattice parameters from a CIF (or takes them
on the command line), computes the true perpendicular widths of the
cell, and reports the replication each axis needs for a given cutoff,
the total replication m, and the worst-axis replication n_max. No
dependencies beyond the Python standard library.
Grand canonical Monte Carlo and molecular dynamics codes apply a cutoff
r_c under periodic boundaries. The minimum-image convention is exact
only when every perpendicular width of the cell is at least 2 r_c.
Unit cells of porous crystals frequently fall short along one axis, and
running them unreplicated silently biases the result. The bias tracks
the worst-replicated axis, not the total number of cells, and rod-type
frameworks such as the MOF-74 family are the class most affected.
Rule of thumb from the audit this tool accompanies (H2 uptake, 77 K, 85 CoRE MOF 2019 frameworks, 12 A cutoff):
| shortest width | n_max |
single-cell uptake error |
|---|---|---|
>= 2 r_c |
1 | none (compliant) |
r_c to 2 r_c |
2 | under 7 %, rankings intact |
2 r_c / 3 to r_c |
3 | up to 10 % |
r_c / 2 to 2 r_c / 3 |
4 | 10 to 30 % |
One cutoff radius is enough for ranking work; two are needed for absolute capacities.
python cellcheck.py structure.cif
python cellcheck.py *.cif --cutoff 12.8
python cellcheck.py --cell 6.4618 39.8715 39.8715 60.2892 86.9032 93.0968
python cellcheck.py *.cif --raspa # UnitCells lines for RASPA inputs
python cellcheck.py *.cif --format csv # or json
Example, IRMOF-74-V (CCDC 841646) in its primitive setting:
structure w_a w_b w_c cells m nmax wmin/2rc verdict
RAVWOC.cif 6.42 34.48 34.48 4x1x1 4 4 0.27 recompute
Note the widths: the b and c edges are 39.87 A long, but with
alpha = 60.3 degrees the faces stand only 34.5 A apart. Edge lengths
overstate clearance in oblique cells; cellcheck uses the widths.
Copy cellcheck.py anywhere on your path, or
pip install git+https://github.com/turneradam/cellcheck
If cellcheck informs published work, cite the accompanying paper
(reference to follow) and the tool by its Zenodo DOI.
MIT.