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.5.tar.gz (24.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.5-py3-none-any.whl (25.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gtsr-0.0.5.tar.gz
Algorithm Hash digest
SHA256 d3349040755683e298d1329c49ca8e09d9e6f2bbb66a543e07c4d021d70da3d7
MD5 daaa8445d6153df32120c3ddf447881a
BLAKE2b-256 a7f309ea1878aa3aea2a34ad4fc21a2b0b804c46966236728e3a71b1edc410ab

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gtsr-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3cc362c151c9d153713baee62d0411ac2fb6dae110d63fa87257604e3142ae7c
MD5 15f9be14c22b0df4f68703ae119f3314
BLAKE2b-256 e347fd688f8d374722cc3aa2057591567250b8b1898e75caee8a656c3308e2ce

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