GTsR is a graph neural network based tool for solvent identification, solvent removal, and activation-stability prediction in metal-organic frameworks (MOFs).
| 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 |
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- 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.")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}
}This project is released under the MIT License. See LICENSE for details.
