This fork attempted to solve an issue in PORMAKE where, when generating Porous materials, linkers would be inserted with random rotation around the axis formed by two connection points. In addition, single metal node building blocks are added as an alternative to cluster building blocks, and corresponding organic linkers and organic node building blocks are added to generate porous materials with small pore sizes. For those who need this functionality, please refer to the README of this fork.
Thank you for your valuable contribution @geonho42 !
Version: 0.2.1
New feature added: Building blocks with partial charge
# From PyPI
uv add pormake
# or from Github repository
uv add git+https://github.com/Sangwon91/PORMAKE.git
# or editable installation
git clone https://github.com/Sangwon91/PORMAKE.git
cd PORMAKE
uv sync
4. Troubleshooting
If you encounter version conflicts with NumPy or other dependencies, try the following installation commands. These examples demonstrate how to specify a NumPy version.
pip install "numpy<2" git+https://github.com/Sangwon91/PORMAKE.git
# or
pip install "numpy<2" pormake
# or
pip install "numpy<2" && pip install -e ./PORMAKE
You can check the information using .describe() method.
tbo.describe()
In this case, there are two node types (0 and 1) and one edge type ((0, 1)). CN in the node information indicates coordination number (number of adjacent nodes).
You can also visualize the topology using .view() method.
tbo.view()
In order to construct HKUST-1, copper paddle-wheel cluster and BTC linker are required. You can load the building blocks from the database. All visual description of the building blocks can be found at here.
You can visualize building blocks using .view() method.
N409.view()
N10.view()
Next, make Builder instance.
builder = pm.Builder()
Make node type to building block dictionary. This dictionary is used for the construction of the MOF. Building blocks have to be assigned to each node type (in this case, 0 and 1).
# N10 is assigned to node type 0 because the coordination number of node type 0 is 3.
# Likewise, N409 is assigned to node type 1.
node_bbs = {
0: N10,
1: N409
}
4. Calculation of RMSD between node and building block
The root-mean-square deviation of atomic positions (RMSD) between node and building block can be used as a criterion for determining whether a particular building block can be located to a particular node.
Load metal cluster of triangular prism shape.
N198 = database.get_bb("N198")
N198.view()
Load two test topologies: pcu and acs. pcu has nodes of octahedron shape and acs has nodes of triangular prism shape. Each topology has single node type (0).
pcu = database.get_topo("pcu")
pcu.describe()
===============================================================================
Topology pcu
Spacegroup: Pm-3m
-------------------------------------------------------------------------------
# of slots: 4 (1 nodes, 3 edges)
# of node types: 1
# of edge types: 1
-------------------------------------------------------------------------------
Node type information
-------------------------------------------------------------------------------
Node type: 0, CN: 6
slot indices: 0
-------------------------------------------------------------------------------
Edge type information (adjacent node types)
-------------------------------------------------------------------------------
Edge type: (0, 0)
slot indices: 1, 2, 3
===============================================================================
acs = database.get_topo("acs")
acs.describe()
===============================================================================
Topology acs
Spacegroup: P63/mmc
-------------------------------------------------------------------------------
# of slots: 8 (2 nodes, 6 edges)
# of node types: 1
# of edge types: 1
-------------------------------------------------------------------------------
Node type information
-------------------------------------------------------------------------------
Node type: 0, CN: 6
slot indices: 0, 1
-------------------------------------------------------------------------------
Edge type information (adjacent node types)
-------------------------------------------------------------------------------
Edge type: (0, 0)
slot indices: 2, 3, 4, 5, 6, 7
===============================================================================
You can check the shape of node via LocalStructure object.
# 0 is the type of node.
# Octahedron shape.
pcu_local_0 = pcu.unique_local_structures[0]
pcu_local_0.view()
# 0 is the type of node.
# Triangular prism shape.
acs_local_0 = acs.unique_local_structures[0]
acs_local_0.view()
Make Locator instance.
locator = pm.Locator()
Calculate RMSD values using the locator. As expected, you can see that the RMSD value of the pcu (0.42) is bigger than that of acs (0.02).
acs_rmsd_0 = locator.calculate_rmsd(acs_local_0, N198)
print("RMSD at acs node type 0: %.2f" % acs_rmsd_0)
RMSD at acs node type 0: 0.02
pcu_rmsd_0 = locator.calculate_rmsd(pcu_local_0, N198)
print("RMSD at pcu node type 0: %.2f" % pcu_rmsd_0)
RMSD at pcu node type 0: 0.42
In general, RMSD < 0.3 is good threshold for the MOF constructions.
5. Simple example of MOF construction using low-symmetry building blocks
PORMAKE can read building blocks from xyz file. In xyz file, all connection points are denoted as symbol X.
Users can assign bond manually as shown below:
N10.xyz:
12
9 10 11
C 0.0000 0.0000 0.0000
C 0.7700 -1.3336 0.0000
C 2.3100 -1.3336 0.0000
C 3.0800 0.0000 0.0000
C 2.3100 1.3336 0.0000
C 0.7700 1.3336 0.0000
H 0.2000 -2.3210 0.0000
H 4.2200 0.0000 0.0000
H 0.2000 2.3210 0.0000
X -0.7500 0.0000 0.0000
X 2.6850 -1.9831 0.0000
X 2.6850 1.9831 0.0000
0 1 A
0 5 A
1 2 A
1 6 S
2 3 A
3 4 A
3 7 S
4 5 A
5 8 S
9 0 S
10 2 S
11 4 S
The first two columns are the indices of atoms consisting the bond and the third term is bond type.
Supported bond types include single (A), double (D), triple (T), and aromatic (A).
If no bond information is fed, bonds are automatically generated by distance threshold but all bond types are assignged to single bond.
You can load building block using BuilingBlock object like below:
bb = pm.BuildingBlock('N10.xyz')
Contributions
This project is managed through uv. It is strongly recommended to use uv for development. Additionally, support for Python versions below 3.10 will be discontinued in the future, so it is recommended to use Python 3.10 or higher. Below are examples of commands used when developing with uv.
1. Install required libraries
git clone [this repository]
cd [this repository]
uv sync