Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 2.79 KB

code_overview.md

File metadata and controls

12 lines (8 loc) · 2.79 KB

Code overview

The Resources/ directory contains data files, including a set of CIFs for software testing and continuous integration using Travis CI. The Python code in the project serves as a wrapper for the C++ code and Systre to assemble the MOFid and MOFkey as a single step, in addition to interpreting the results for the testing suite. The Scripts/ directory provides additional utilities for studying folders of several structures, and Analysis/ contains the source code for many of the figures in the paper and supporting information.

By default, the MOFid executable and utility scripts write several files to a user-specified Output/ directory to facilitate analysis. The base directory contains the original adjacency matrix of single bonds for the MOF in orig_mol.txt. If a single structure is analyzed in Python by invoking Python/run_mofid.py or the Python API, two files containing the MOFid and MOFkey are written to this directory. Similar files are written for an entire folder of CIFs by Scripts/run_folder.sh. The results of four MOF deconstruction algorithms are written to labeled subdirectories. These contain information breaking up the MOF into the building blocks identified (nodes, linkers), removing solvents (bound/free solvent, the MOF structure with only free solvent removed (FSR) or all solvent removed (ASR) including bound solvent molecules), the simplified net (a topology.cgd file for Systre and simplified topology CIF), and statistics about linkers in the MOF. The directory for the "single node" and "all node" simplification algorithms additionally contain the crystal structures of the node SBUs (including carboxylates or bound heterocycles), and the "all node" directory contains the identities of branch points in the simplified net. Results from the "standard simplification" algorithm are written to Output/StandardIsolated/ but otherwise have not been analyzed for the paper.

Behind the scenes, some of the classes of the original Open Babel library are abstracted into new classes to facilitate analysis of complex MOF structures. We list the most important classes here as a primer for the code.

  • OBMol, OBAtom, OBBond: Open Babel's built-in classes to represent molecules, atoms, and bonds
  • VirtualMol: A set of OBAtom pointers which also includes consistency checks. Used as a lightweight alternative to a standard OBMol to store collections of atoms without copying them
  • Topology: A simplified network topology of connected pseudoatoms and their mapping back to a parent OBMol (the original CIF)
  • Deconstructor: Base class that defines the template for deconstructing MOFs into their building blocks and simplifying the network topology. Uses polymorphic code in C++ to allow derived classes to specify different simplification algorithms, such as SBU detection