Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
321 commits
Select commit Hold shift + click to select a range
ff1fa44
feat: update configs
zhiminzhang0830 Sep 10, 2024
0f77486
update configs
zhiminzhang0830 Sep 10, 2024
cc40b5a
add train.sh
zhiminzhang0830 Sep 10, 2024
0bf23d8
update gitignore
zhiminzhang0830 Sep 10, 2024
7763637
Merge pull request #5 from zhiminzhang0830/gemnet
zhiminzhang0830 Sep 10, 2024
afc6600
feat: add logger (#6)
zhiminzhang0830 Sep 10, 2024
277a7f3
feat: add support for saving checkpoints (#7)
zhiminzhang0830 Sep 10, 2024
a743753
chore: delete duplicate code (#8)
zhiminzhang0830 Sep 10, 2024
b911fc0
feat: add diffusion for lattices (#9)
zhiminzhang0830 Sep 11, 2024
3152da0
add diffcsp_pp model
leeleolay Sep 11, 2024
655efeb
feat: add support for resume training (#11)
zhiminzhang0830 Sep 11, 2024
fa9d748
Lattice diffusion (#12)
zhiminzhang0830 Sep 13, 2024
2b435ec
feat: the first version of MartenGen was implemented through fraction…
zhiminzhang0830 Sep 15, 2024
1d7fcf7
Merge branch 'develop' into develop
leeleolay Sep 26, 2024
222d41a
add diffcsp_pp model (#10)
leeleolay Sep 26, 2024
e11ded4
Mat per (#14)
zhiminzhang0830 Oct 10, 2024
445913a
add reconstruct metrics (#15)
zhiminzhang0830 Oct 11, 2024
8e908cc
docs: add logo (#16)
zhiminzhang0830 Oct 11, 2024
18231e8
Merge branch 'PaddlePaddle:develop' into develop
leeleolay Oct 11, 2024
46777ae
feat: add gen metircts (#17)
zhiminzhang0830 Oct 11, 2024
2f05202
docs: update readme (#18)
zhiminzhang0830 Oct 11, 2024
d5465bb
fix: sparse tensor error (#19)
zhiminzhang0830 Oct 14, 2024
3f47182
fix: sample error when training (#20)
zhiminzhang0830 Oct 14, 2024
5fd9005
feat: add TensorCrystDataset (#21)
zhiminzhang0830 Oct 14, 2024
cbb4685
Merge branch 'PaddlePaddle:develop' into develop
leeleolay Oct 15, 2024
6cbf211
add diffcsp with typel and add the sample function
leeleolay Oct 15, 2024
30bc60c
Merge pull request #22 from leeleolay/develop
leeleolay Oct 15, 2024
8a61d4e
add property metric (#23)
zhiminzhang0830 Oct 15, 2024
b6152d9
fix: spacegroup in SampleDataset (#24)
zhiminzhang0830 Oct 15, 2024
62286f4
feat: add eval code (#25)
zhiminzhang0830 Oct 19, 2024
d08d6bf
update requirements (#26)
zhiminzhang0830 Oct 19, 2024
fa84d38
Chore: modify eval (#27)
zhiminzhang0830 Oct 28, 2024
efeee73
feat: add more num_atoms distributions (#28)
zhiminzhang0830 Oct 28, 2024
7f30015
add evaluation metrics results for diffcsp_mp_20_w_type model (#29)
zhiminzhang0830 Oct 31, 2024
9a76b5e
feat: add evaluation metrics results for diffcsp_mp20 model (#30)
zhiminzhang0830 Oct 31, 2024
b419a1c
feat: add diffcsp d3pm (#31)
zhiminzhang0830 Oct 31, 2024
9261bab
chore: update gitignore
zhiminzhang0830 Nov 6, 2024
d2845e2
feat: add transform for dataset
zhiminzhang0830 Nov 6, 2024
d81edf2
feat: add datasets
zhiminzhang0830 Nov 6, 2024
27577f5
feat: add losses
zhiminzhang0830 Nov 6, 2024
428d3eb
feat: add metrics
zhiminzhang0830 Nov 6, 2024
fa05a4c
feat: add models
zhiminzhang0830 Nov 6, 2024
fe8456c
feat: add optimizer
zhiminzhang0830 Nov 6, 2024
adb846f
feat: add trainer
zhiminzhang0830 Nov 6, 2024
91130e0
feat: add utils
zhiminzhang0830 Nov 6, 2024
2bf605f
feat: add megnet_mp18
zhiminzhang0830 Nov 6, 2024
517a241
feat: update readme
zhiminzhang0830 Nov 6, 2024
5a97fa2
feat: update readme
zhiminzhang0830 Nov 6, 2024
4807afb
Merge pull request #32 from zhiminzhang0830/megnet
leeleolay Nov 6, 2024
654c6c4
feat: support mp20 dataset (#33)
zhiminzhang0830 Nov 11, 2024
f8a6c15
feat: add dimenet model (#34)
zhiminzhang0830 Nov 11, 2024
b0c5858
fix: add property_names params (#35)
zhiminzhang0830 Nov 11, 2024
a69d162
fix: initializer bugs and scale shared grad bugs (#36)
zhiminzhang0830 Nov 12, 2024
5943d27
feat: add gemnet model for property prediction (#37)
zhiminzhang0830 Nov 15, 2024
21a7e7b
feat: add absorbing noise scheduler (#38)
zhiminzhang0830 Nov 21, 2024
0a957cb
feat: add grad clip (#39)
zhiminzhang0830 Nov 22, 2024
2be66a7
feat: add config(gemnet_mp18) (#40)
zhiminzhang0830 Nov 22, 2024
880f144
feat: add code for fix pgl (#41)
zhiminzhang0830 Nov 22, 2024
359e7f7
feat: update readme (#42)
zhiminzhang0830 Nov 25, 2024
74186ed
uploat pictures
leeleolay Nov 27, 2024
ba3cba7
Rename property prediction.png to property_prediction.png
leeleolay Nov 27, 2024
dde6567
Rename strcture generation.png to strcture_generation.png
leeleolay Nov 27, 2024
c26f6bf
Rename strcture_generation.png to structure_generation.png
leeleolay Nov 27, 2024
6e5a2f0
Update README.md
leeleolay Nov 27, 2024
a84dd26
Add files via upload
leeleolay Nov 27, 2024
0f584c2
Delete docs/structure_generation.png
leeleolay Nov 27, 2024
83fe1db
Rename 截屏2024-11-27 14.57.46.png to structure_generation.png
leeleolay Nov 27, 2024
242316c
feat: add support for structure_array (#43)
zhiminzhang0830 Nov 28, 2024
c678b89
feat: add diffcsp in ppmat (#44)
zhiminzhang0830 Nov 28, 2024
efa1ba3
feat: add csp metric (#45)
zhiminzhang0830 Dec 1, 2024
d8836d3
feat: add the complete diffcsp training process to ppmat (#46)
zhiminzhang0830 Dec 2, 2024
7c29d5a
Update README.md with English test
leeleolay Dec 2, 2024
93a8732
feat: add predict code (#47)
zhiminzhang0830 Dec 3, 2024
64291b1
feat: add a feature to merge command-line parameters into the configu…
zhiminzhang0830 Dec 3, 2024
aa6c40a
feat: add predict for property prediction and fix some bugs (#49)
zhiminzhang0830 Dec 3, 2024
bee74a3
feat: update diffcsp_mp20 model (#50)
zhiminzhang0830 Dec 4, 2024
108a6c8
chore: update readme (#51)
zhiminzhang0830 Dec 4, 2024
ebaa9c7
fix: delete duplicate keys in configs (#52)
zhiminzhang0830 Dec 4, 2024
a2ebb8c
feat: add diffcsp_with_type model and generation metrics (#53)
zhiminzhang0830 Dec 5, 2024
073a2f4
feat: add d3pm models and fix some bugs (#54)
zhiminzhang0830 Dec 5, 2024
74ffaf8
feat: add diffcsp absorbing model and fix spelling erros (#55)
zhiminzhang0830 Dec 6, 2024
d7af7a4
feat: add band gap config and results for megnet trained on mp18 (#56)
zhiminzhang0830 Dec 7, 2024
313e634
feat: add band gap config and results for dimenet trained on mp18 (#57)
zhiminzhang0830 Dec 9, 2024
9acf827
feat: update models (#58)
zhiminzhang0830 Dec 11, 2024
8546c7f
Update README.md
zhiminzhang0830 Dec 11, 2024
78a4fa8
feat: add mp2018_train_6k dataset and fix some bugs (#59)
zhiminzhang0830 Dec 12, 2024
c4265af
feat: add megnet config and results on mp2018_train_6k dataset (#60)
zhiminzhang0830 Dec 12, 2024
a9fb264
Update README.md
zhiminzhang0830 Dec 12, 2024
1baaa1f
feat: add comformer graph method (#61)
zhiminzhang0830 Dec 13, 2024
de7bd06
feat: add comformer model (#62)
zhiminzhang0830 Dec 13, 2024
4e28bfc
feat: add comformer configs and results (#63)
zhiminzhang0830 Dec 13, 2024
356a1da
feat: add megnet_mp2018_train_6k_band_gap (#64)
zhiminzhang0830 Dec 16, 2024
c85e960
fix: rename mp2018_train_6k to mp2018_train_60k (#65)
zhiminzhang0830 Dec 17, 2024
b9eaa7b
feat: add configs and result for comformer_mp2018_train_60k_band_gap …
zhiminzhang0830 Dec 17, 2024
539650a
feat: add cif dataset, support 2d data (#67)
zhiminzhang0830 Dec 18, 2024
21cccce
feat: add megnet and comformer configs and results and update predict…
zhiminzhang0830 Dec 18, 2024
2661275
feat: add mp2024 dataset (#69)
zhiminzhang0830 Dec 24, 2024
47970a0
feat: add chgnet (#70)
zhiminzhang0830 Dec 24, 2024
4116ed6
feat: add configs and results of comformer_mp2024_train_130k_e_form (…
zhiminzhang0830 Dec 24, 2024
f46d391
feat: add make_graphs and datasets for chgnet and fix some bugs (#72)
zhiminzhang0830 Dec 25, 2024
af3263a
fix: fix some bugs (#73)
zhiminzhang0830 Dec 26, 2024
51de3b7
feat: add an ugly training demo for chgnet (#74)
zhiminzhang0830 Dec 26, 2024
4ea7b2f
feat: add configs and results of comformer_2d_0621_train_18k_e_form_f…
zhiminzhang0830 Dec 26, 2024
47f64e2
feat: add trainer for chgnet (#76)
zhiminzhang0830 Dec 30, 2024
e509819
feat: add setting_eager_mode (#77)
zhiminzhang0830 Dec 31, 2024
bb4c142
feat: add train chgnet script (#78)
zhiminzhang0830 Dec 31, 2024
2ff5bbb
feat: update chgnet trainer and add chgnet_v2(parallel version) (#79)
zhiminzhang0830 Jan 4, 2025
824496a
add digress model_draft version (#80)
leeleolay Jan 6, 2025
111c52c
Digress revise v1 (#81)
leeleolay Jan 7, 2025
ffd50ea
feat: update chgnet v2 (#82)
zhiminzhang0830 Jan 9, 2025
1652582
feat: support distributed load dataset (#85)
zhiminzhang0830 Jan 9, 2025
7ec04b6
feat: support the use of CPU during structural optimization. (#86)
zhiminzhang0830 Jan 12, 2025
b1b2f66
feat: save trajectory when optimizing the structure (#88)
zhiminzhang0830 Jan 15, 2025
c87ef56
feat: add property_names to dataset (#93)
zhiminzhang0830 Jan 20, 2025
617ba4e
feat: add diffcsp guidance (#100)
zhiminzhang0830 Feb 13, 2025
c2b5848
feat: Add DiffCSP with guidance (supporting type/D3PM), enabling mult…
zhiminzhang0830 Feb 13, 2025
335c188
chore: delete meterials_discovery and remove stability_prediction and…
zhiminzhang0830 Feb 20, 2025
d5e1841
feat: update mattergen (#108)
zhiminzhang0830 Mar 5, 2025
fb0b6ee
feat: updata MP dataset (#109)
zhiminzhang0830 Mar 13, 2025
335ed2e
feat: add config for 2d 30k and add accumulate_grad_batches (#111)
zhiminzhang0830 Mar 18, 2025
7f84784
refactor: refactoring the ppmat project (#110)
zhiminzhang0830 Mar 18, 2025
a3d372b
feat: build-in paddle_scatter (#112)
zhiminzhang0830 Mar 20, 2025
0424c3d
feat: add mean distance input to the mattergen model (#113)
zhiminzhang0830 Mar 25, 2025
2c927e3
feat: support graph without edges (#114)
zhiminzhang0830 Mar 27, 2025
6e44e92
feat: add mean distance v2 (#115)
zhiminzhang0830 Apr 10, 2025
19c54b4
feat: update new ppmat (#117)
zhiminzhang0830 Apr 14, 2025
6f273f4
feat: update experimental and add gemnet config for cifdataset (#118)
zhiminzhang0830 Apr 21, 2025
9f81d54
feat: add prediction script for property prediction task and mp2018 d…
zhiminzhang0830 Apr 21, 2025
8ed314d
feat: add train/sample script, add diffcsp and fix some bugs (#120)
zhiminzhang0830 Apr 23, 2025
969387c
feat: update mp2018/mp20 dataset (#121)
zhiminzhang0830 Apr 23, 2025
2a3bfdc
feat: update documentation for DiffCSP and comformer (#122)
zhiminzhang0830 Apr 23, 2025
992c81c
fix: fix sparse tensor in dimenet and gemnet (#123)
zhiminzhang0830 Apr 25, 2025
54f78ac
fix: fix mp2018/mp20 dataset, fix diffcsp and update optimizer/lr and…
zhiminzhang0830 Apr 25, 2025
cdd4b4a
feat: update trainer, logger and AverageMeter (#125)
zhiminzhang0830 Apr 27, 2025
a7347fb
feat: update ppmat and fix some errors (#126)
zhiminzhang0830 Apr 29, 2025
0cbd0c3
feat: update comformer configs and result on G\K, and fix some module…
zhiminzhang0830 May 6, 2025
ba510f1
feat: Add MEGNet/DiffCSP/Comformer models with config/docs & multiple…
zhiminzhang0830 May 8, 2025
d96ddfc
fix: delete duplicate data (#130)
zhiminzhang0830 May 8, 2025
e95c18d
feat: add LatticePolarDecomposition preprocess (#131)
zhiminzhang0830 May 8, 2025
0234ca2
feat: add mattergen to ppmat (#132)
zhiminzhang0830 May 26, 2025
e241046
feat: add mattergen_mp20_dft_band_gap (#134)
zhiminzhang0830 May 26, 2025
5f557bb
fix: fix StandardScalerPaddle (#135)
zhiminzhang0830 May 26, 2025
2e5fd7a
feat: add mattergen_mp20_dft_bulk_modulus, add mattergen_mp20_dft_mag…
zhiminzhang0830 May 26, 2025
31cddb7
feat: add AlexMP20MatterGenDataset (#137)
zhiminzhang0830 May 26, 2025
089c69d
feat: add mattergen_alex_mp20 (#138)
zhiminzhang0830 May 27, 2025
b17c8ef
fix: move the local scatter to the utlis directory and replace paddle…
zhiminzhang0830 May 27, 2025
44d7785
feat: add mattergen_alex_mp20_dft_band_gap, add mattergen_alex_mp20_c…
zhiminzhang0830 May 27, 2025
2d8355a
fix: correct dataset config, fix bugs (#141)
zhiminzhang0830 May 27, 2025
3f69297
feat: add mattergen_alex_mp20_dft_mag_density (#142)
zhiminzhang0830 May 28, 2025
c7fb4dd
feat: add mattergen_alex_mp20_ml_bulk_modulus, mattergen_alex_mp20_sp…
zhiminzhang0830 May 29, 2025
23e3422
feat: add multi property conditional constraints, fix bugs about val_…
zhiminzhang0830 May 29, 2025
6dde4f4
feat: add chgnet model, fix some bugs (#145)
zhiminzhang0830 Jun 4, 2025
d9ca9cf
feat: add train/prediction for interatomic_potentials, add chgnet con…
zhiminzhang0830 Jun 9, 2025
0499985
fix: verify equivalence of structure/graph configurations with cached…
zhiminzhang0830 Jun 9, 2025
6d36246
Add MP2024 dataset (#149)
JunnHuo Jun 11, 2025
7b38df1
feat: add losses (#151)
zhiminzhang0830 Jun 19, 2025
9369ede
Modify train loop (#152)
JunnHuo Jun 24, 2025
8ac93ec
feat: add 2d_12 dist (#155)
zhiminzhang0830 Jun 27, 2025
80d0ef9
add dimenet++ (#146)
leeleolay Jul 1, 2025
a67c560
feat: add MatterSim (#153)
zhiminzhang0830 Jul 2, 2025
b6d417a
fix: add distributed initialization (#156)
zhiminzhang0830 Jul 2, 2025
9340ef7
fix: fix bugs in downloading files in a distributed environment (#157)
zhiminzhang0830 Jul 2, 2025
db236bf
feat: add installation documentation and license (#159)
zhiminzhang0830 Jul 3, 2025
66ad0c6
feat: update setup and requirements (#160)
zhiminzhang0830 Jul 3, 2025
14cdbc0
Add test task and partial README update (#158)
JunnHuo Jul 3, 2025
fedc6c9
feat: add get started, update install doc (#162)
zhiminzhang0830 Jul 3, 2025
dd6bcf4
feat: add configuration file instruction document (#163)
zhiminzhang0830 Jul 3, 2025
4f3c61a
add BOS linker to model init (#164)
JunnHuo Jul 4, 2025
f0d88e3
fix: update pretrained model, set canocial=False at mattergen, modify…
zhiminzhang0830 Jul 4, 2025
57d4e66
refactor: move experimental/* to home (#166)
zhiminzhang0830 Jul 4, 2025
c7d973f
update install/readme documents (#167)
zhiminzhang0830 Jul 4, 2025
190b937
feat: add the function of automatically finding configuration files, …
zhiminzhang0830 Jul 4, 2025
2a377e9
add readme task (#169)
leeleolay Jul 4, 2025
74a7ec8
feat: update chgnet/mattersim/diffcsp/mattergen doc (#170)
zhiminzhang0830 Jul 4, 2025
de231b0
update readme (#171)
zhiminzhang0830 Jul 4, 2025
9305bb1
Update README.md
leeleolay Jul 4, 2025
e61e912
update readme (#172)
zhiminzhang0830 Jul 5, 2025
7f1f253
Update README.md
leeleolay Jul 5, 2025
4d7ab14
Update Install.md
leeleolay Jul 5, 2025
2d2383a
Update Install_cn.md
leeleolay Jul 5, 2025
ed4ce57
Update README.md
leeleolay Jul 5, 2025
3378177
Update README.md
leeleolay Jul 5, 2025
48c4683
Update README.md
leeleolay Jul 5, 2025
bd21117
feat: add ml2ddb (#173)
zhiminzhang0830 Jul 5, 2025
275515e
feat: add partner (#174)
zhiminzhang0830 Jul 7, 2025
b481ccf
fix: fix chgnet model download link (#175)
zhiminzhang0830 Jul 8, 2025
c466789
fix: set nan to 0 (#177)
zhiminzhang0830 Jul 11, 2025
99a5e2c
update logo (#178)
leeleolay Jul 22, 2025
fd46abb
fix: update reshape (#179)
zhiminzhang0830 Jul 25, 2025
836d6b6
update readme (#180)
leeleolay Jul 28, 2025
c71e50b
update overview (#183)
leeleolay Jul 29, 2025
7c8276d
update name & logo (#185)
leeleolay Jul 29, 2025
cef4cb8
fix words error (#186)
leeleolay Jul 29, 2025
cd3c496
update readme (#187)
leeleolay Aug 11, 2025
6f60730
matbench_dataset适配 (#181)
jiangandhao Aug 13, 2025
96eb2d6
integrate DiffNMR and fix bugs (#189)
leeleolay Sep 22, 2025
54f3648
fix (#192)
zhiminzhang0830 Sep 28, 2025
7c2cfdf
set output data type as 'int32' of paddle.cumsum for CHGNet model. (#…
ShenshenYan Oct 10, 2025
a592397
from metax:fix diffnmr model and config and fix AlexMP20MatterGenData…
ShenshenYan Oct 31, 2025
f9c0ad1
update overview map and metax support info (#201)
leeleolay Oct 31, 2025
a7e5e91
Update jarvis_dataset.py (#203)
scyyh11 Nov 12, 2025
beea9a2
Remove legacy code (#206)
leeleolay Nov 18, 2025
ce0444e
Integrate InfGCN, e3nn, fix errors (#207)
leeleolay Nov 18, 2025
474b30a
【PPMat Dataset No.4】tmQM_MEGNet (#198)
Le-soleile Dec 1, 2025
2768767
Traffic metrics (#208)
leeleolay Dec 5, 2025
6a0f1b1
chore: add traffic metrics workflow (#211)
leeleolay Dec 5, 2025
a961eb4
【PPMat Dataset No.3】Jarvis-DFT2D_MEGNet (#202)
Le-soleile Dec 8, 2025
bc33869
【PPMat Dataset No.9】Omol25_MEGNet (#212)
Le-soleile Dec 8, 2025
ee29f8a
【PPMat Dataset No.6】OC20_CHGNet (#204)
Le-soleile Dec 8, 2025
1f187a7
fix: update infgcn and readme (#215)
leeleolay Dec 15, 2025
1277b63
fix: update omol25 config and deps (#216)
leeleolay Dec 15, 2025
c57ed61
update mateno (#217)
leeleolay Dec 15, 2025
da6a691
fix infgcn error (#218)
leeleolay Dec 16, 2025
8d9a229
Add installation command for paddle_scatter (#219)
wwaawwaaee Dec 16, 2025
55b57d3
【PPMat Dataset No.6】OC20_CHGNet (#213)
Le-soleile Dec 29, 2025
ded240b
Add ase_interface with support for optimization and md (#176)
JunnHuo Dec 31, 2025
3829c37
【PPMat Dataset No.7】QM9_CHGNet (#222)
wwaawwaaee Jan 7, 2026
989bf99
fix: add README (#225)
JunnHuo Jan 9, 2026
eedad7a
fix chgnet readme (#226)
JunnHuo Jan 9, 2026
9757489
docs: tidy mattergen diffcsp infgcn readmes
Jan 11, 2026
595722c
Merge pull request #228 from leeleolay/docs/readme-format
lxw123123 Jan 11, 2026
cba4abf
docs: format metax setup guide
Jan 12, 2026
9a2fb49
docs: update metax benchmarks
Jan 12, 2026
9bc856a
Merge pull request #229 from leeleolay/docs/metax-benchmark
lxw123123 Jan 12, 2026
e6d1ff1
updata doc (#230)
leeleolay Jan 12, 2026
68eb1cf
fix doc (#231)
leeleolay Jan 12, 2026
a0fe8d6
support parallel for infgcn (#220)
leeleolay Jan 12, 2026
4f3c81d
fix bug (#233)
leeleolay Jan 13, 2026
2ad4e11
update infgcn readme (#234)
leeleolay Jan 13, 2026
911c848
fix dimenetpp bug (#235)
leeleolay Jan 26, 2026
c5b75da
add weights of diffnmr
leeleolay Jan 27, 2026
57cebad
Update note on pretrained weights in README.md
leeleolay Jan 27, 2026
fe65d4d
Merge pull request #236 from PaddlePaddle/leeleolay-patch-2
lxw123123 Jan 27, 2026
3dcd97e
Fix DiffNMR H-only encoding and config flag (#237)
leeleolay Jan 28, 2026
459419d
update infgcn configs & diffnmr models (#238)
leeleolay Feb 2, 2026
63c02ef
ES: update infgcn omol25 configs (#239)
leeleolay Feb 2, 2026
7215402
patch infgcn (#240)
leeleolay Feb 2, 2026
8a61074
fix infgcn config (#241)
leeleolay Feb 3, 2026
e07f42a
ES: update infgcn predict and orbital docs (#247)
leeleolay Feb 26, 2026
15d1c2d
Change default config file for training script (#249)
leeleolay Mar 6, 2026
9488d0b
Leeleolay patch 2 (#250)
leeleolay Mar 13, 2026
723a1da
Update README.md (#273)
leeleolay Apr 20, 2026
91e8d40
Update docs: rename MetaX logo and add new partner logos (#274)
leeleolay Apr 20, 2026
5465401
Update logos (#276)
leeleolay Apr 21, 2026
ed28501
【Hackathon 10th Spring No.14】SFIN模型复现 (#244)
ADream-ki Jun 23, 2026
aa1242b
Revise README with new features and examples (#297)
leeleolay Jun 23, 2026
eef058f
update readme (#298)
leeleolay Jun 23, 2026
f3d180a
支持 sgequidiff
learncat163 May 6, 2026
02f039d
optimize sgequidiff
learncat163 Jun 24, 2026
1170b2d
merge: resolve conflicts in datasets/__init__.py and schedulers/__ini…
learncat163 Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .clang_format.hook
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

readonly VERSION="13.0.0"

version=$(clang-format -version)

if ! [[ $(python -V 2>&1 | awk '{print $2}' | awk -F '.' '{print $1$2}') -ge 36 ]]; then
echo "clang-format installation by pip need python version great equal 3.6,
please change the default python to higher version."
exit 1
fi

if ! [[ $version == *"$VERSION"* ]]; then
# low version of pip may not have the source of clang-format whl
pip install --upgrade pip
pip install clang-format==13.0.0
fi

clang-format $@
236 changes: 236 additions & 0 deletions .github/scripts/traffic_metrics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,236 @@
#!/usr/bin/env python3
"""Fetch GitHub traffic stats and build a persistent CSV plus trend chart."""

from __future__ import annotations

import argparse
import csv
import os
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from typing import Dict, Iterable, List, Mapping, Sequence

import matplotlib

matplotlib.use("Agg")

import matplotlib.pyplot as plt
import requests

API_ROOT = "https://api.github.com"


@dataclass
class DailyMetrics:
date: str
views: int
unique_views: int
clones: int
unique_clones: int


def _fetch(endpoint: str, repo: str, token: str) -> Mapping:
url = f"{API_ROOT}/repos/{repo}/{endpoint}"
headers = {"Accept": "application/vnd.github+json"}
if token:
headers["Authorization"] = f"Bearer {token}"
response = requests.get(url, headers=headers, timeout=30)
response.raise_for_status()
return response.json()


def _normalize_daily(items: Iterable[Mapping], count_key: str) -> Dict[str, Dict[str, int]]:
daily: Dict[str, Dict[str, int]] = {}
for item in items:
# GitHub returns timestamps like "2024-12-05T00:00:00Z".
date_key = item["timestamp"][:10]
counts = daily.setdefault(date_key, {"count": 0, "uniques": 0})
counts["count"] = max(counts["count"], int(item[count_key]))
counts["uniques"] = max(counts["uniques"], int(item["uniques"]))
return daily


def _load_existing(path: Path) -> Dict[str, DailyMetrics]:
if not path.exists():
return {}
existing: Dict[str, DailyMetrics] = {}
with path.open(newline="", encoding="utf-8") as handle:
reader = csv.DictReader(handle)
for row in reader:
existing[row["date"]] = DailyMetrics(
date=row["date"],
views=int(row["views"]),
unique_views=int(row["unique_views"]),
clones=int(row["clones"]),
unique_clones=int(row["unique_clones"]),
)
return existing


def _merge(existing: Dict[str, DailyMetrics], updates: Dict[str, DailyMetrics]) -> Dict[str, DailyMetrics]:
merged = existing.copy()
for date_key, metrics in updates.items():
if date_key in merged:
prev = merged[date_key]
merged[date_key] = DailyMetrics(
date=date_key,
views=max(prev.views, metrics.views),
unique_views=max(prev.unique_views, metrics.unique_views),
clones=max(prev.clones, metrics.clones),
unique_clones=max(prev.unique_clones, metrics.unique_clones),
)
else:
merged[date_key] = metrics
return merged


def _write_csv(metrics: Dict[str, DailyMetrics], path: Path) -> None:
ordered_dates = sorted(metrics.keys())
with path.open("w", newline="", encoding="utf-8") as handle:
fieldnames = ["date", "views", "unique_views", "clones", "unique_clones"]
writer = csv.DictWriter(handle, fieldnames=fieldnames)
writer.writeheader()
for date_key in ordered_dates:
record = metrics[date_key]
writer.writerow(
{
"date": record.date,
"views": record.views,
"unique_views": record.unique_views,
"clones": record.clones,
"unique_clones": record.unique_clones,
}
)


def _latest(metrics: Dict[str, DailyMetrics], limit: int = 7) -> Sequence[DailyMetrics]:
if not metrics:
return []
ordered_dates = sorted(metrics.keys())
recent_dates = ordered_dates[-limit:]
return [metrics[date_key] for date_key in recent_dates]


def _render_table(metrics: Dict[str, DailyMetrics], max_rows: int = 7) -> str:
header = "| Date | Views | Unique views | Clones | Unique clones |\n| --- | --- | --- | --- | --- |"
if not metrics:
return header + "\n| - | - | - | - | - |"
rows = [
f"| {item.date} | {item.views} | {item.unique_views} | {item.clones} | {item.unique_clones} |"
for item in _latest(metrics, max_rows)
]
return header + "\n" + "\n".join(rows)


def _update_readme(readme_path: Path, metrics: Dict[str, DailyMetrics], image_path: Path) -> None:
start_marker = "<!-- traffic:start -->"
end_marker = "<!-- traffic:end -->"
block = f"{start_marker}\n{_render_table(metrics)}\n\n![Traffic trend]({image_path.as_posix()})\n{end_marker}"

if not readme_path.exists():
print(f"README not found at {readme_path}, skip embedding metrics.")
return

content = readme_path.read_text(encoding="utf-8")
if start_marker in content and end_marker in content:
pre, rest = content.split(start_marker, 1)
_, post = rest.split(end_marker, 1)
new_content = pre + block + post
else:
new_content = content.rstrip() + "\n\n" + block + "\n"

readme_path.write_text(new_content, encoding="utf-8")


def _plot(metrics: Dict[str, DailyMetrics], output_path: Path) -> None:
if not metrics:
print("No traffic data available to plot.")
return

ordered = [metrics[key] for key in sorted(metrics.keys())]
dates = [datetime.strptime(item.date, "%Y-%m-%d") for item in ordered]
view_counts = [item.views for item in ordered]
view_uniques = [item.unique_views for item in ordered]
clone_counts = [item.clones for item in ordered]
clone_uniques = [item.unique_clones for item in ordered]

plt.figure(figsize=(10, 6))
plt.plot(dates, view_counts, label="Views", linewidth=2)
plt.plot(dates, view_uniques, label="Unique views", linestyle="--", linewidth=1.5)
plt.plot(dates, clone_counts, label="Downloads (clones)", linewidth=2)
plt.plot(dates, clone_uniques, label="Unique downloaders", linestyle="--", linewidth=1.5)
plt.xlabel("Date")
plt.ylabel("Count")
plt.title("PaddleMaterials repository traffic")
plt.grid(True, linestyle="--", alpha=0.3)
plt.legend()
plt.tight_layout()
output_path.parent.mkdir(parents=True, exist_ok=True)
plt.savefig(output_path, dpi=150)
plt.close()


def collect_metrics(repo: str, token: str) -> Dict[str, DailyMetrics]:
views_resp = _fetch("traffic/views?per=day", repo, token)
clones_resp = _fetch("traffic/clones?per=day", repo, token)

view_daily = _normalize_daily(views_resp.get("views", []), count_key="count")
clone_daily = _normalize_daily(clones_resp.get("clones", []), count_key="count")

# Combine the two sources into a consistent DailyMetrics map.
consolidated: Dict[str, DailyMetrics] = {}
all_dates = set(view_daily.keys()) | set(clone_daily.keys())
for date_key in all_dates:
views = view_daily.get(date_key, {"count": 0, "uniques": 0})
clones = clone_daily.get(date_key, {"count": 0, "uniques": 0})
consolidated[date_key] = DailyMetrics(
date=date_key,
views=views["count"],
unique_views=views["uniques"],
clones=clones["count"],
unique_clones=clones["uniques"],
)
return consolidated


def main() -> None:
parser = argparse.ArgumentParser(description="Persist GitHub traffic metrics and draw a trend plot.")
parser.add_argument("--repo", required=True, help="Repository in owner/name format.")
parser.add_argument(
"--output-dir",
default="output/traffic",
help="Directory for CSV and chart outputs (default: output/traffic).",
)
parser.add_argument(
"--token",
default=os.getenv("GITHUB_TOKEN") or os.getenv("GH_TOKEN"),
help="GitHub token with repo access (defaults to GITHUB_TOKEN env).",
)
parser.add_argument(
"--readme",
default=None,
help="Path to README to embed the latest traffic table and chart (optional).",
)
args = parser.parse_args()

if not args.token:
raise SystemExit("Missing GitHub token (set GITHUB_TOKEN or pass --token).")

output_dir = Path(args.output_dir)
output_dir.mkdir(parents=True, exist_ok=True)
csv_path = output_dir / "traffic_metrics.csv"
plot_path = output_dir / "traffic_trend.png"

latest = collect_metrics(repo=args.repo, token=args.token)
existing = _load_existing(csv_path)
merged = _merge(existing, latest)
_write_csv(merged, csv_path)
_plot(merged, plot_path)
if args.readme:
_update_readme(Path(args.readme), merged, plot_path)
print(f"Wrote {csv_path} and {plot_path}")


if __name__ == "__main__":
main()
44 changes: 44 additions & 0 deletions .github/workflows/traffic-metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: traffic-metrics

on:
schedule:
- cron: "0 1 * * *"
workflow_dispatch:

permissions:
contents: write

jobs:
collect:
runs-on: ubuntu-latest
env:
TRAFFIC_TOKEN: ${{ secrets.TRAFFIC_TOKEN || secrets.GITHUB_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install matplotlib requests

- name: Collect traffic metrics
env:
GH_TOKEN: ${{ env.TRAFFIC_TOKEN }}
GITHUB_TOKEN: ${{ env.TRAFFIC_TOKEN }}
REPO_NAME: ${{ github.repository }}
run: |
python .github/scripts/traffic_metrics.py --repo "${REPO_NAME}" --output-dir output/traffic --readme README.md

- name: Commit traffic artifacts
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update traffic metrics"
file_pattern: |
output/traffic/*
README.md
45 changes: 44 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,51 @@ FETCH_HEAD

# auto generated version file by setuptools_scm
ppsci/_version.py
ppmat/_version.py

__pycache__/
stability_prediction/data_bak/*
stability_prediction/log/*
stability_prediction/checkpoints/*
stability_prediction/checkpoints/*

structure_prediction/data/*
structure_prediction/data_bak/*
structure_prediction/log/*
structure_prediction/checkpoints/*

data/*
log/*

output/*
!output/traffic/
!output/traffic/*
experimental/output/*
experimental/output
experimental/data
experimental/log/
experimental/log2/

output/*experimental/data/
experimental/output/
experimental/

ppmat/models/mattersim/threebody_indices.c
pretrained/
result*
spectrum_elucidation/retrival_database
test/samplers
outputs

# codex
AGENTS.md

.baidu-cc/meta.json
.comate/mcp.json
dataset_ES

electronic_structure/configs/omol25_data_split.json
electronic_structure/configs/omol25.json
electronic_structure/configs/qm9_data_split.json
electronic_structure/configs/qm9.json
electronic_structure/configs/crystal_data_split.json
electronic_structure/configs/crystal.json
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "paddle_scatter"]
path = paddle_scatter
url = https://github.com/PFCCLab/paddle_scatter.git
Loading