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%