Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

cellcheck

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.

Why

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.

Use

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.

Install

Copy cellcheck.py anywhere on your path, or

pip install git+https://github.com/turneradam/cellcheck

Citing

If cellcheck informs published work, cite the accompanying paper (reference to follow) and the tool by its Zenodo DOI.

Licence

MIT.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages