PaddleMaterials icon indicating copy to clipboard operation
PaddleMaterials copied to clipboard

Add LSTMDoubleFit model for low-dimensional perovskite design

Open Wei-jie-Wu opened this issue 1 month ago β€’ 3 comments

βœ… Description

πŸ“˜ Overview

This PR contributes the Feature-Guided Inverse Design (LSTMDoubleFit) model for the inverse design of organic A-site cations in low-dimensional perovskites.
The project integrates descriptor calculation, LSTM-based generative learning, and feature-constrained molecular optimization into a unified Paddle-based workflow.

This work reproduces and extends the study:

Feature-Guided Inverse Design of Organic A-Site Cations for Perovskite Dimensional Engineering, Wei-jie Wu et al., 2025.


🧠 Model Workflow

  1. Descriptor Calculation (Cal.py)

    • Calculates molecular descriptors (e.g., ATSC1pe, MATS2c, SlogP_VSA2) from input SMILES.
    • Results are stored in CSV files under Modeldata/.
  2. Dataset Preparation

    • Before training, merge all CSV files under the Modeldata/ directory into a single dataset:
      cat Modeldata/*.csv > Modeldata.csv
      
      The merged file Modeldata.csv will serve as the unified training dataset.
  3. Model Training and Generation (Best_Seq2seq.py)

    • Implements an LSTM-based sequence-to-sequence model for SMILES reconstruction and generation.
    • Inputs: one-hot encoded SMILES sequences + three physicochemical descriptors.
    • Outputs: property-conditioned SMILES sequences (new organic cations).
  4. Feature-Guided DoubleFit Model (MolecularDoubleFitting.py)

    • Performs secondary regression to enforce property–structure consistency.
    • Refines generated molecules according to target perovskite dimensional features.
  5. Postprocessing

    • Generated molecules are filtered, ranked, and optionally validated through structural optimization workflows.

πŸ“ Directory Structure

project/ └── Feature-Guided Inverse Design of LDPs/ β”œβ”€β”€ Best_Seq2seq.py # Main LSTM model: training & molecular generation β”œβ”€β”€ Cal_ATSC1pe_MATS2c.py # Descriptor calculator (ATSC1pe, MATS2c) β”œβ”€β”€ Cal_SlogP_VSA2.py # Descriptor calculator (SlogP_VSA2) β”œβ”€β”€ MolecularDoubleFitting.py # Feature-guided molecular fitting model β”œβ”€β”€ MSEcalculation.py # Evaluation metrics β”œβ”€β”€ ModelandDataAnalysis.py # Dataset statistics & analysis β”œβ”€β”€ Modeldata/ # Folder containing split CSV datasets β”œβ”€β”€ GreatMolecular.xlsx # High-quality generated molecules β”œβ”€β”€ NewMolecules.xlsx # Newly generated candidates β”œβ”€β”€ README.md # Project documentation └── data_parts/ # (Optional) Split dataset parts (<100 MB each)


βš™οΈ How to Run

1. Environment

pip install paddlepaddle scikit-learn pandas numpy tqdm rdkit
2. Prepare dataset
Merge CSV files in Modeldata/ into a single file:
cat Modeldata/*.csv > Modeldata.csv
3. Train and generate molecules
python Best_Seq2seq.py
4. Feature-guided molecular refinement
python MolecularDoubleFitting.py
πŸ“Š Dataset Note
The full dataset (~200 MB) was split into smaller CSV files under Modeldata/
to comply with GitHub’s 100MB per-file limit.
They must be merged before training as described above.
πŸš€ Results
LSTM reconstruction accuracy: >95%
Enhanced novelty and property diversity in generated cations
Generated organic A-site cations exhibit favorable dimensional preferences for RP- and DJ-type perovskites.
πŸ’‘ Key Contributions
DoubleFit Learning Mechanism: Joint optimization of molecular structure and descriptor features.
Feature-Constrained Generation: Enables directionally controlled molecular design.
Descriptor-Integrated Workflow: Fully compatible with PaddlePaddle for training and inference.
πŸ§‘β€πŸ’» Author
Weijie Wu
South China Normal University

Wei-jie-Wu avatar Nov 13 '25 12:11 Wei-jie-Wu

Thanks for your contribution!

paddle-bot[bot] avatar Nov 13 '25 12:11 paddle-bot[bot]

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 13 '25 12:11 CLAassistant

Thanks for your contribution! Please fetch the newest version repo codes and pull your codes.We recommend to use the ppmat architecture to fit your model. If these is some problem of adaption, please contact us!

leeleolay avatar Nov 18 '25 02:11 leeleolay