Skip to content

【MIIT program】Add GMTNet for dielectric tensor prediction - #295

Open
cjywahaha-oss wants to merge 6 commits into
PaddlePaddle:developfrom
cjywahaha-oss:add_gmtnet_model
Open

【MIIT program】Add GMTNet for dielectric tensor prediction#295
cjywahaha-oss wants to merge 6 commits into
PaddlePaddle:developfrom
cjywahaha-oss:add_gmtnet_model

Conversation

@cjywahaha-oss

@cjywahaha-oss cjywahaha-oss commented Jun 16, 2026

Copy link
Copy Markdown

Summary

This PR adds GMTNet support for dielectric tensor prediction in PaddleMaterials.

Main changes

  • Add the Paddle implementation of GMTNet under ppmat/models/gmtnet/
  • Add GMTNet dataset, graph conversion, collate, and dataset preparation support
  • Register GMTNet in the public model and dataset APIs
  • Add canonical train/validation/test split metadata
  • Integrate GMTNet with the public training and evaluation workflows
  • Add PropertyPredictor support for:
    • Mapping inputs
    • Single and multiple pymatgen.Structure inputs
    • Single CIF files
    • CIF directories
  • Add GMTNet-specific precision-preserving CIF parsing:
    • primitive=False
    • sort=False
    • merge_tol=0.0
    • frac_tolerance=0.0
  • Ensure CIF directories are fully parsed before prediction starts, avoiding partial prediction when one file is invalid
  • Add packaging support for GMTNet configuration and split resources
  • Delay optional paddle_scatter imports for models that require it, so GMTNet can be imported and installed independently
  • Remove the obsolete standalone GMTNet training script in favor of the public Trainer workflow

Validation

The following validations were completed:

  • Converted checkpoint strict loading
  • Full public training workflow
  • Validation and test evaluation for converted, best, and final checkpoints
  • PropertyPredictor acceptance tests: 31/31 passed
  • Mapping, Structure, CIF, and CIF-directory prediction
  • Invalid input and checkpoint error handling
  • CIF-directory atomic failure behavior
  • Non-GMTNet CIF loader regression
  • CPU-only inference with forward gradients enabled
  • Wheel and sdist build
  • Clean wheel and sdist installation from site-packages
  • Package-content and sensitive-path audit

No checkpoint, training dataset, generated logs, or local paddle_scatter sources are included in the package.

Known limitations

  • A deterministic edge-ordering candidate was evaluated but not adopted because equivalent edge permutations caused widespread float32 reduction-order differences.
  • A deterministic rotation canonicalization candidate was evaluated but not adopted because it changed the existing constraint baseline across the canonical test set.
  • Dielectric tensors predicted from CIF inputs are expressed in the Cartesian frame of the parsed structure.
  • Low-precision CIF files cannot recover floating-point information that was not encoded in the file.
  • GMTNet evaluation and prediction require forward gradients to remain enabled because the model evaluates an analytical gradient block.

Related issue: #194

@leeleolay

Copy link
Copy Markdown
Collaborator

辛苦参考 #258 和套件内已有代码和实现的规范,并提交数据和权重 给出精度对齐结果

@leeleolay

Copy link
Copy Markdown
Collaborator

参考已有规范:#258

@cjywahaha-oss

Copy link
Copy Markdown
Author

Update on GMTNet Paddle reproduction validation:

I have pushed a new commit 36a99ba to update the Paddle GMTNet implementation, checkpoint, and smoke test.

Final local validation on the full test split:

  • tested: 472
  • success: 472
  • failed: 0
  • Paddle Test MAE_sum style: 2.7317654939399936
  • Paddle Test Fnorm: 1.7541764742355415

This matches the PyTorch reference result:

  • PyTorch Test MAE: about 2.7318
  • PyTorch Test Fnorm: about 1.7542

Additional checks completed:

  • Layer-by-layer Paddle/PyTorch forward alignment was verified.
  • The final Paddle checkpoint has been updated.
  • property_prediction/configs/gmtnet/test.py now loads the official checkpoint and passes a CPU smoke test.
  • The smoke test output shape is [1, 3, 3].

Note:

The full dielectric dataset is not included in this PR. The full validation was performed locally using the available preprocessed data.

@leeleolay

Copy link
Copy Markdown
Collaborator

辛苦人工确认

Comment thread property_prediction/configs/gmtnet/paddle_model.pdparams Outdated
Comment thread property_prediction/configs/gmtnet/test.py Outdated
Comment thread property_prediction/configs/gmtnet/train.py Outdated
Comment thread property_prediction/configs/gmtnet/gmtnet_jarvis_dielectric.yaml
Integrate GMTNet model and data support, public prediction paths, precision-preserving CIF parsing, and atomic CIF directory validation.
@cjywahaha-oss

Copy link
Copy Markdown
Author

The GMTNet integration has been updated in commit 2767499.

The implementation, PropertyPredictor integration, CIF handling, packaging, clean installation, and final CPU regression have been completed. The PR description has also been updated to reflect the final implementation and validation results.

Please review it when convenient. Thank you.

@leeleolay leeleolay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请认真参考意见进行修改

Comment thread setup.py
Comment thread MANIFEST.in
Comment thread property_prediction/predict.py
Comment thread property_prediction/configs/gmtnet/test.py Outdated
Comment thread property_prediction/configs/gmtnet/README.md
Comment thread ppmat/models/gmtnet/gmtnet_graph_converter.py
Comment thread ppmat/datasets/prepare_gmtnet_dataset.py Outdated
Comment thread ppmat/datasets/gmtnet_dataset.py
Comment thread ppmat/datasets/collate_fn.py Outdated

@leeleolay leeleolay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants