Skip to main content

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).

GTsR logo

GitHub repo sizePyPIRequires Python 3.10GitHub license

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

Streamlit demo

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

gtsr-0.0.4.tar.gz (31.9 MB view details)

Uploaded Source

Built Distribution

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

gtsr-0.0.4-py3-none-any.whl (32.2 MB view details)

Uploaded Python 3

File details

Details for the file gtsr-0.0.4.tar.gz.

File metadata

  • Download URL: gtsr-0.0.4.tar.gz
  • Upload date:
  • Size: 31.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for gtsr-0.0.4.tar.gz
Algorithm Hash digest
SHA256 f57a94f702a1264c2f173018d173a61e578fcd55be9c398a8edc57ea2fc44a2e
MD5 8eb3829191b7f36b3cd62de296e90955
BLAKE2b-256 0faf560abd17ae7d639a0818b34f4a092b7e9c277a8cc3b2e35506f5408ddd18

See more details on using hashes here.

File details

Details for the file gtsr-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: gtsr-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 32.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for gtsr-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8257fe24b1deb2ff1e95a331d01e28b1ceb87f6688ea1f45498622f80c6e9211
MD5 f617efbb5a0ac3aecf7d8a8543cfbadd
BLAKE2b-256 6e5173cb85e17b6f314262209053fe1f1f9a89eb6c61cb816bc9d9b0245efccb

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