Graph neural network tool for solvent removal from MOF structures
Project description
GTsR
GTsR is a graph neural network based tool for solvent identification, solvent removal, and activation-stability prediction in metal-organic frameworks (MOFs).
Pretrained Models
| Checkpoint | File | Purpose |
|---|---|---|
free |
ckpt/free_best.pth |
Remove free solvent |
all |
ckpt/all_best.pth |
Remove all solvent |
stability |
ckpt/stability_best.pkl |
Predict activation stability |
Installation
git clone https://github.com/coollkr/GTsR.git
cd GTsR
conda env create -f environment.yml
conda activate gtsr
pip install -e .
or
conda install -c conda-forge zeopp-lsmo
pip install gtsr
Usage
- Remove solvent
from gtsr import GTsRunner
runner = GTsRunner(checkpoint="free")
result = runner.clean(
cif="input.cif",
output="prediction",
threshold=0.5,
)
You can also use:
runner = GTsRunner(checkpoint="all")
runner = GTsRunner(checkpoint="path/to/ckpt.pth", device="cpu")
runner.clean() returns a dictionary with the following fields:
| Field | Description |
|---|---|
input |
Absolute path to the input CIF |
output |
Output directory |
framework |
Path to the cleaned framework CIF |
solvent |
Path to the solvent CIF, or None if not generated |
checkpoint |
Path to the checkpoint used for prediction |
task |
Task name stored in the checkpoint |
threshold |
Atom classification threshold |
num_atoms |
Total number of atoms |
num_framework_atoms |
Number of framework atoms |
num_solvent_atoms |
Number of solvent atoms |
probabilities |
Solvent probability for each atom |
labels |
Predicted class label for each atom |
solvent_smiles |
SMILES strings of identified solvents |
- Predict activation stability
from gtsr import GTsRunner
runner = GTsRunner(checkpoint="stability")
score = runner.stability(cif="cleaned_framework.cif")
if score == 1:
print("The cleaned structure is stable.")
else:
print("The cleaned structure is not stable.")
Web Interface
Citation
Update the following entry when the associated publication becomes available:
@article{gtsr-xyl-group,
title = {GTSR: A GNN Based Tool for Solvent Removal from MOF with Stability Check},
author = {Liang, Kairui and Zhao, Guobin and Li, Xiao-Yan},
year = {2026}
}
License
This project is released under the MIT License. See LICENSE for details.
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
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 gtsr-0.0.2.tar.gz.
File metadata
- Download URL: gtsr-0.0.2.tar.gz
- Upload date:
- Size: 31.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
297f25bbd4fcd60e0d46bd8ece2757c5295873b1ed788910bbd4bfeb5d7236f5
|
|
| MD5 |
d266252631300778ac11c5067ebf2fb6
|
|
| BLAKE2b-256 |
5867dcd25c8bfec9c29deb91384d858fd9a2c6670ca878aaa809684a23a2ec6d
|
File details
Details for the file gtsr-0.0.2-py3-none-any.whl.
File metadata
- Download URL: gtsr-0.0.2-py3-none-any.whl
- Upload date:
- Size: 32.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8915ed2a6ef223a5dfc3c04ba11a42254b0975d9d4cf81f79944beabc49efc39
|
|
| MD5 |
9c30bc9dd80742996e666272c624531e
|
|
| BLAKE2b-256 |
5b63beba27401e11b3687004b772abb25ffc3b41c4eac9c252d77bf83efb860e
|