Python toolkit for building and analyzing 2D COF stacking-energy landscapes.
Project description
COF-Landscaper
COF-Landscaper is a Python package for building and analyzing 2D COFs.
Researchers interested in applying COF-Landscaper to their own systems are welcome to contact me at gjl342@student.bham.ac.uk. Depending on availability and the scope of the project, I may be able to provide support or explore a possible collaboration.
Platform Support
- Tested on macOS and Linux.
- Microsoft Windows is currently not tested.
Installation
COF-Landscaper requires Python 3.12.
Create a virtual environment.
python3.12 -m venv test-coflandscaper
Activate the virtual environment.
source test-coflandscaper/bin/activate
Upgrade pip.
pip install --upgrade pip
Install COF-Landscaper from PyPI.
pip install cof-landscaper
Install PORMAKE, which is required for COF construction.
pip install "pormake @ git+https://github.com/Sangwon91/PORMAKE.git"
Running the Notebooks
Install Jupyter support if you want to run the notebooks.
pip install jupyter ipykernel
Register the environment as a Jupyter kernel.
python -m ipykernel install --user --name test-coflandscaper --display-name "Python (test-coflandscaper)"
In VS Code or Jupyter, select the kernel:
Python (test-coflandscaper)
Run a test cell:
import coflandscaper as cl
Example Files
After installation, COF-Landscaper can be imported and used directly in your own Python scripts or notebooks.
If you want to start from the provided example workflows, run:
cof-landscaper-copy-examples
This copies the example files into the current directory under:
examples/
The copied examples include an executable Python workflow under:
examples/python/
This folder contains the workflow script and a separate cof-landscaper.params.json file where the workflow settings can be configured. It also includes a minimal notebook for plotting simulated PXRD data together with experimental PXRD data after the workflow has finished.
The copied examples also include three notebook versions under:
examples/notebook/
The notebook versions are:
cof-landscaper_configurable.ipynb: full notebook with Markdown explanations for all configurable options.cof-landscaper_default.ipynb: default workflow notebook with explanations for the default settings.cof-landscaper_minimal.ipynb: minimal code-only workflow for running the notebook without extended explanations.
You can then edit the copied Python script, JSON parameter file, notebook, and input .xyz files for your own system.
Developer Setup
Install just.
Install uv.
Clone the repository and enter the source directory.
git clone https://github.com/GregorLauter/COF-Landscaper.git
cd COF-Landscaper
Set up the development environment.
just setup
Run code checks.
just check
Workflow Notes
- The DFT workflow requires additional external HPC infrastructure.
- The MLIP workflow can be executed fully on a local machine.
- Workflow diagram:
Required Input Files
The workflow requires building-block fragments provided as .xyz files.
Supported topologies are:
hcbsqlhcb_abkgm
Input requirements:
hcb,sql, andkgmrequire one node.xyzfile and one linker.xyzfile.hcb_abrequires two node.xyzfiles and no linker file.- By default, node files are read from
0_node/. - By default, linker files are read from
0_linker/when required by the topology. - Explicit paths can be provided with
input_nodes=[...]andinput_linkers=[...].
Input fragments should ideally be pre-optimized with a generic force field, such as UFF, to remove severe steric clashes and obtain reasonable approximate bond lengths.
The subsequent pre-optimization step handles the assembled framework. Therefore, the main requirement at this stage is that the individual fragments are chemically sensible and can be connected cleanly by the builder.
The .xyz files can be prepared using any suitable molecular editor or visualizer, for example Avogadro, Mercury, or DrawMol.
Where To Find Explanations
The full documentation is available on Read the Docs:
Additional stepwise explanations of the computational workflow are provided in the Markdown cells of the example notebooks.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cof_landscaper-2026.5.12.5.tar.gz.
File metadata
- Download URL: cof_landscaper-2026.5.12.5.tar.gz
- Upload date:
- Size: 5.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d96bb41d87ba9ff5809709057772a7b29d90f7472c9408392c3c583b69f403ec
|
|
| MD5 |
97d24cf8508c36c346c69650d41ef729
|
|
| BLAKE2b-256 |
a212cff004938d55c4b3ad17bf1053582107330e9e445660539bbcf0d49cf831
|
File details
Details for the file cof_landscaper-2026.5.12.5-py3-none-any.whl.
File metadata
- Download URL: cof_landscaper-2026.5.12.5-py3-none-any.whl
- Upload date:
- Size: 59.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0ac8fde31df799fa5439b204d7725727c1c452eb4aae04e8622c46e58ebcdcb
|
|
| MD5 |
f55d26fa8112a0561433757930be56fa
|
|
| BLAKE2b-256 |
e4c949f799cec416a0814de14ce75a9cfb95310bb02699571ab3940c2eaaeecb
|