Skip to content

Implementation of "TransPolymer: a Transformer-based language model for polymer property predictions" in PyTorch

License

Notifications You must be signed in to change notification settings

keremcebi/TransPolymer

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

46 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

title emoji colorFrom colorTo sdk sdk_version app_file pinned license short_description
TransPolymer - Polymer Property Predictor
๐Ÿงช
blue
purple
streamlit
1.28.0
app.py
false
mit
AI-powered polymer property predictions using Transformer architecture

๐Ÿงช TransPolymer: Polymer Property Predictor

TransPolymer is a Transformer-based language model for polymer property predictions, deployed as an interactive web application on Hugging Face Spaces.

๐Ÿš€ Features

  • 10+ Property Predictions: Support for various polymer properties including:

    • Polymer Electrolyte Conductivity (PE_I, PE_II)
    • Organic Photovoltaic Efficiency (OPV)
    • Band Gap (Egc, Egb)
    • Electron Affinity (Eea)
    • Ionization Energy (Ei)
    • Crystallization Tendency (Xc)
    • Dielectric Constant (EPS)
    • Refractive Index (Nc)
  • SMILES Input: Easy polymer structure input using SMILES notation

  • Batch Predictions: Upload CSV files for bulk predictions

  • Interactive Interface: User-friendly Streamlit interface

๐Ÿ”ฌ Model Architecture

  • Base Model: 6-layer RoBERTa architecture with 768 hidden dimensions
  • Training: Pretrained on ~5 million polymer SMILES sequences
  • Tokenization: Custom chemical-aware tokenization for polymers
  • Framework: PyTorch + Transformers

๐Ÿ“– How to Use

  1. Single Prediction:

    • Enter a polymer SMILES string (e.g., CC(C)(C)OC(=O)NC1=CC=CC=C1)
    • Select the property you want to predict
    • Click "Predict Property"
  2. Batch Prediction:

    • Upload a CSV file with a 'smiles' column
    • Select the property type
    • Download results with predictions

โš ๏ธ Important Notes

  • Demo Version: This Space runs with random weights for demonstration purposes
  • Research Tool: Results should be validated experimentally
  • Educational Use: Intended for research and educational applications

๐Ÿ“š Citation

If you use TransPolymer in your research, please cite:

@article{xu2023transpolymer,
  title={TransPolymer: a Transformer-based language model for polymer property predictions},
  author={Xu, Changwen and Wang, Yuyang and Barati Farimani, Amir},
  journal={npj Computational Materials},
  volume={9},
  number={1},
  pages={64},
  year={2023},
  publisher={Nature Publishing Group UK London}
}

๐Ÿ”— Links

๐Ÿ› ๏ธ Technical Details

The application uses:

  • Streamlit for the web interface
  • PyTorch for model inference
  • Transformers library for model architecture
  • Custom tokenization for chemical SMILES processing

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


Developed by researchers at Carnegie Mellon University

About

Implementation of "TransPolymer: a Transformer-based language model for polymer property predictions" in PyTorch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.1%
  • Svelte 8.1%
  • JavaScript 1.2%
  • CSS 1.2%
  • Dockerfile 0.6%
  • Shell 0.5%
  • Other 0.3%