pyCOSMOS partitions the unit cell of a MOF into distinct pore compartments. The unit cell is subdivided into cubelets, which are then classified into a pore types. For instance, PCN-224 comprises two pore types. Through the use of pyCOSMOS, the cubelets within the unit cell are designated as green or yellow, representing the channel and interaction pores, respectively.
- cython:
pip install cython
- mayavi (for visualization):
pip install mayavi
- openbabel (for converting cif to pdb):
sudo snap install openbabel
- Python libraries: pandas, numpy, plotly, sklearn, matplotlib, os, glob.
python3 setup_periodic_distance.py build_ext --inplace
It will generate a folder build
and the file periodic_distance.cpython-311-x86_64-linux-gnu.so
- Install Zeo++ from: http://zeoplusplus.org/. After successful installation,
network
executable is generated. - Perform psd calculation using:
./network -ha -vpsd 1.657 1.657 50000 Structure.cif
. This will generate *vpsdpts files. Here 1.657 is the probe radius and 50,000 monte carlo insertions are attempted to calculate the pore size distribution.
input.txt
vpsdpts file.vpsdpts
lx 38.8050
ly 38.8050
lz 38.8050
alpha 90.0000
beta 90.0000
gamma 90.0000
npore 2
eps 2.500
nmin 25
- vpsdpts: pore size distribution file from Zeo++
- npore: Number of pore types. (If you don't know this, run this code with guess value of 1, 2, and 3 in this order)
- lx, ly, lz, alpha, beta, gamma are unit cell dimensions.
- eps and nmin are the parameters of the DBSCAN clustering algorithm.
To run pycosmos:
python pyCOSMOS/src/main.py input.txt
The results of the algorithm is in the form of a pore type matrix of size
csv files:
pore_type_matrix_with_cluster_labels.csv
pore_type_matrix_with_pore_type_labels.csv
html file (can be viewed on browser)-
pore_type_matrix_with_cluster_center_labels.html
pore_type_matrix_with_pore_type_labels.html
geometric_points_with_cluster_labels_for_pore_type_*Npores.html
xyz files: for each primary bin in the pore size distribution. Additional xyz files for each cluster within a bin.
png files: characteristic snapshots of the framework with pores visualized as cages or channels.
- Pore Structure Compartmentalization for Advanced Characterization of Metal–Organic Framework Materials
Shivam Parashar and Alexander V. Neimark
Journal of Chemical Information and Modeling
DOI: 10.1021/acs.jcim.3c01872