Skip to main content

A package for Covalent Organic Frameworks sturcture creation based on the reticular approach.

Project description

pyCOFBuilder

puCOFBuilder

image Pyversions PyPI Downloads GitHub release Paper Paper GitHub license

What is pyCOFBuilder?

pyCOFBuilder is a simple and powerful python package to automatically assembly COF structures with specifics building blocks, topologies, and functionalizations following the reticular approach to build and represent COF structures. The project was developed to address the need for the generation of COFs structures in a high-throughput style, based on a nomenclature tha allows direct sctructural feature interpretation from a simple name. The package uses pymatgen to create the structures.

This package is still under development, but it is already possible to create a large number of COF structures.

Learn more at the Documentation

[!TIP]

Simple usage

In case you want to use pyCOFBuilder without installing it, you can use the Google Colab notebook available here.

Requirements

  1. Python >= 3.10
  2. pymatgen >= 2022.0.0
  3. numpy >= 1.2
  4. scipy >= 1.6.3
  5. simplejson
  6. ase
  7. gemmi

The Python dependencies are most easily satisfied using a conda (anaconda/miniconda) installation by running

conda env create --file environment.yml

Installation

You can install pyCOFBuilder using pip:

pip install pycofbuilder

Alternatively, you can use pyCOFBuilder by manually importing it using the sys module, as exemplified below:

# importing module
import sys
 
# appending a path
sys.path.append('{PATH_TO_PYCOFBUILDER}/pyCOFBuilder/src')

import pycofbuilder as pcb

Just remember to change the {PATH_TO_PYCOFBUILDER} to the directory where you downloaded the pyCOFBuilder package.

Basic Usage

To create a specific COF, such as T3_BENZ_NH2_OH-L2_BENZ_CHO_H-HCB_A-AA:

# importing module
import sys
 
# appending a path
sys.path.append('{PATH_TO_PYCOFBUILDER}/pyCOFBuilder/src')

import pycofbuilder as pcb

cof = pcb.Framework('T3_BENZ_CHO_OH-L2_BENZ_NH2_H-HCB_A-AA')
cof.save(fmt='cif', supercell = [1, 1, 2], save_dir = '.')

You should see an output such as:

T3_BENZ_NH2_OH-L2_BENZ_CHO_H_H-HCB_A-AA                       hexagonal   P    P6/m # 175    12 sym. op.

A .cif file (the default save format is CIF, but it can be easily changed by setting another value on the fmt option) will be created in the out folder. The code will print out some information about the structure created.

Currently, it is possible to select the following formats:

  • cif
  • xsf
  • pdb
  • cjson
  • vasp
  • turbomole
  • pqr
  • qe
  • gjf
  • xyz

Besides, the variable structure is now a Framework object. This object has some attributes that can be accessed:

>>> cof.name
'T3_BENZ_NH2_OH-L2_BENZ_CHO_H-HCB_A-AA'
>>> cof.smiles
'(N)C1=C(O)C((N))=C(O)C((N))=C1O.(C([H])=O)C1=C([H])C([H])=C((C([H])=O))C([H])=C1[H]'
>>> cof.lattice
array([[ 22.49540055,   0.        ,   0.        ],
       [-11.24770028,  19.48158835,   0.        ],
       [  0.        ,   0.        ,   3.6       ]])
>>> cof.n_atoms
72
>>> cof.space_group
'P6/m'

COFs and Building Blocks nomenclature

To ensure greater reproducibility as well as quick and easy access to relevant information from the COFs, I've developed a simple nomenclature to name the structure. Generally speaking, a COF can be described as

Building_Block_1-Building_Block_2-Net-Stacking

where:

  • Building_Block_1: The building block with the greater connectivity.
  • Building_Block_2: The building block with the smaller connectivity.
  • Net: The net describing the reticular structure.
  • Stacking: The stacking (for 2D structures) or interpenetrating degree (for 3D structures)

To name the building blocks, I also developed a set of rules. The building block can be described as

Symmetry_Core_Connector_RadicalGroupR1_RadicalGroupR2_RadicalGroupR3_...

where:

  • Symmetry: The general symmetry of the building block. Also represents the connectivity of the building block. For 2D building blocks can be L2, T3, or S4, and for 3D building blocks can be D4.
  • Core: The 4-letter code referring to the building block core.
  • Connector: The type of functional group that will be used to assembly the COF structure. Ex.: NH2, CHO, CONHNH2, etc.
  • RadicalGroupRN: The Nth radical group in the structure. The number of Radical groups will change according to the availability of the core.

Note that every "card" for the building block name is separated by an underline (_) and every "card" for the COF name is separated by a dash (-). This makes it easy to split the COF name into useful information.

Current available Building Blocks

Ditopic Ditopic Tritopic Tetratopic Hexatopic

Current available Connector Groups

Connection groups

Current available R Groups

Functional Groups

Citation

If you find pyCOFBuilder useful in your research, please consider citing the following paper:

F. L. Oliveira and P. M. Esteves, pyCOFBuilder: A Python package for automated creation of Covalent Organic Framework models based on the reticular approach J. Chem. Inf. Model. 2024, 64, 8, 3278–3289 10.1021/acs.jcim.3c01918 DOI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycofbuilder-0.0.9.4.tar.gz (118.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycofbuilder-0.0.9.4-py3-none-any.whl (180.8 kB view details)

Uploaded Python 3

File details

Details for the file pycofbuilder-0.0.9.4.tar.gz.

File metadata

  • Download URL: pycofbuilder-0.0.9.4.tar.gz
  • Upload date:
  • Size: 118.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for pycofbuilder-0.0.9.4.tar.gz
Algorithm Hash digest
SHA256 74b93597f3fce57aedc6f1599a29aa985c0f5c66c67607a444d9e38019196b19
MD5 b4be77dbfe38af5aec3ce1f9efd8122a
BLAKE2b-256 2bcf31ca935c037d2cb75c12882b77d26cceabcd072ddb5acb5672faab6f8b4f

See more details on using hashes here.

File details

Details for the file pycofbuilder-0.0.9.4-py3-none-any.whl.

File metadata

  • Download URL: pycofbuilder-0.0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 180.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for pycofbuilder-0.0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 788cedb22470c4e539c3dfc1c657bc539fdd901a801d3bd1e596702faee82a97
MD5 0cb115a3f1d7985b7591a2618ef769d2
BLAKE2b-256 844ee073dc7741d109bf8cc97f2b0475b9feba3d32a5e8f59a824a192616743d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page