Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
407 changes: 407 additions & 0 deletions CONTRIBUTING_ch.md

Large diffs are not rendered by default.

407 changes: 407 additions & 0 deletions CONTRIBUTING_en.md

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions Install.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Generate crystal structures with four atoms using a pretrained MatterGen model:
python structure_generation/sample.py \
--model_name='mattergen_mp20' \
--weights_name='latest.pdparams' \
--save_path='result_mattergen_mp20/' \
--output_dir='result_mattergen_mp20/' \
--mode='by_num_atoms' \
--num_atoms=4
```
Expand All @@ -113,11 +113,12 @@ Predict electron density using a trained InfGCN checkpoint:

```bash
python electronic_structure/predict.py \
--config='electronic_structure/configs/infgcn/infgcn_qm9.yaml' \
--checkpoint='path/to/infgcn_qm9.pdparams' \
--split='validation' \
--index=0 \
--output_dir='output/infgcn_qm9/validation_0' \
--model_name='infgcn_qm9' \
--weights_name='best.pdparams' \
--mol_input='electronic_structure/configs/infgcn/example/methane.mol' \
--atom_file='electronic_structure/configs/qm9.json' \
--mol_grid_shape=8 \
--output_dir='output/infgcn_qm9/methane' \
--save_pred_cube
```

Expand All @@ -130,9 +131,9 @@ Run NMR spectrum elucidation using a trained DiffNMR checkpoint:

```bash
python spectrum_elucidation/sample.py \
--config_path='spectrum_elucidation/configs/diffnmr/DiffNMR.yaml' \
--checkpoint_path='path/to/DiffNMR_nless15_best.pdparams' \
--save_path='result_diffnmr_nless15/'
--model_name='diffnmr_msdnmr_nless15' \
--weights_name='best.pdparams' \
--output_dir='result_diffnmr_nless15/'
```

### 2.6 Spectrum Enhancement
Expand All @@ -142,7 +143,9 @@ Enhance STEM images using a pretrained SFIN model:
```bash
python spectrum_enhancement/predict.py \
--model_name='sfin_haadf_enhance' \
--split='val'
--weights_name='best.pdparams' \
--input_path='path/to/noisy_image.png' \
--output_dir='result_sfin/'
```

For more usage instructions, refer to the task-specific README files or the
Expand Down
23 changes: 13 additions & 10 deletions Install_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ python property_prediction/predict.py \
python structure_generation/sample.py \
--model_name='mattergen_mp20' \
--weights_name='latest.pdparams' \
--save_path='result_mattergen_mp20/' \
--output_dir='result_mattergen_mp20/' \
--mode='by_num_atoms' \
--num_atoms=4
```
Expand All @@ -112,11 +112,12 @@ python interatomic_potentials/predict.py \

```bash
python electronic_structure/predict.py \
--config='electronic_structure/configs/infgcn/infgcn_qm9.yaml' \
--checkpoint='path/to/infgcn_qm9.pdparams' \
--split='validation' \
--index=0 \
--output_dir='output/infgcn_qm9/validation_0' \
--model_name='infgcn_qm9' \
--weights_name='best.pdparams' \
--mol_input='electronic_structure/configs/infgcn/example/methane.mol' \
--atom_file='electronic_structure/configs/qm9.json' \
--mol_grid_shape=8 \
--output_dir='output/infgcn_qm9/methane' \
--save_pred_cube
```

Expand All @@ -129,9 +130,9 @@ python electronic_structure/predict.py \

```bash
python spectrum_elucidation/sample.py \
--config_path='spectrum_elucidation/configs/diffnmr/DiffNMR.yaml' \
--checkpoint_path='path/to/DiffNMR_nless15_best.pdparams' \
--save_path='result_diffnmr_nless15/'
--model_name='diffnmr_msdnmr_nless15' \
--weights_name='best.pdparams' \
--output_dir='result_diffnmr_nless15/'
```

### 2.6 谱图增强
Expand All @@ -141,7 +142,9 @@ python spectrum_elucidation/sample.py \
```bash
python spectrum_enhancement/predict.py \
--model_name='sfin_haadf_enhance' \
--split='val'
--weights_name='best.pdparams' \
--input_path='path/to/noisy_image.png' \
--output_dir='result_sfin/'
```

更多使用说明请参考各任务 README 或 [Get Started](./get_started.md)。
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
</a>
</p>

<p align="center">
<a href="README.md"><img src="https://img.shields.io/badge/English-blue" alt="English"></a>
<a href="README_zh.md"><img src="https://img.shields.io/badge/简体中文-lightgrey" alt="简体中文"></a>
<a href="README_ja.md"><img src="https://img.shields.io/badge/日本語-lightgrey" alt="日本語"></a>
</p>

## 🚀 Introduction

**PaddleMaterials** is an end-to-end AI4Materials toolkit built on the **PaddlePaddle** deep learning framework. Designed as a data-mechanism dual-driven platform for developing and deploying foundation models in materials science, **PPMat** enables researchers to efficiently build AI models and accelerate material discovery using pretrained models.
Expand Down Expand Up @@ -106,7 +112,7 @@ Generate novel crystal structures using a pretrained MatterGen model:
python structure_generation/sample.py \
--model_name='mattergen_mp20' \
--weights_name='latest.pdparams' \
--save_path='result_mattergen_mp20/' \
--output_dir='result_mattergen_mp20/' \
--mode='by_num_atoms' \
--num_atoms=4
```
Expand All @@ -125,29 +131,33 @@ python interatomic_potentials/predict.py \

#### Electronic Structure

Predict electron density using a pretrained InfGCN checkpoint:
Predict electron density from the bundled methane example using a pretrained InfGCN
model:

```bash
python electronic_structure/predict.py \
--config='electronic_structure/configs/infgcn/infgcn_qm9.yaml' \
--checkpoint='path/to/infgcn_qm9.pdparams' \
--split='validation' \
--index=0 \
--output_dir='output/infgcn_qm9/validation_0' \
--model_name='infgcn_qm9' \
--weights_name='best.pdparams' \
--mol_input='electronic_structure/configs/infgcn/example/methane.mol' \
--atom_file='electronic_structure/configs/qm9.json' \
--mol_grid_shape=8 \
--output_dir='output/infgcn_qm9/methane' \
--save_pred_cube
```

See the [InfGCN prediction guide](electronic_structure/configs/infgcn/README.md#prediction) for dataset and checkpoint preparation.
See the [InfGCN prediction guide](electronic_structure/configs/infgcn/README.md#prediction)
for dataset-based and local-checkpoint inference.

#### Spectrum Elucidation

Run NMR spectrum elucidation using a pretrained DiffNMR checkpoint:
Run NMR spectrum elucidation using the bundled example and a pretrained DiffNMR
model:

```bash
python spectrum_elucidation/sample.py \
--config_path='spectrum_elucidation/configs/diffnmr/DiffNMR.yaml' \
--checkpoint_path='path/to/DiffNMR_nless15_best.pdparams' \
--save_path='result_diffnmr_nless15/'
--model_name='diffnmr_msdnmr_nless15' \
--weights_name='best.pdparams' \
--output_dir='result_diffnmr_nless15/'
```

#### Spectrum Enhancement
Expand All @@ -157,7 +167,9 @@ Enhance STEM images using a pretrained SFIN model:
```bash
python spectrum_enhancement/predict.py \
--model_name='sfin_haadf_enhance' \
--split='val'
--weights_name='best.pdparams' \
--input_path='path/to/noisy_image.png' \
--output_dir='result_sfin/'
```

---
Expand Down
32 changes: 19 additions & 13 deletions README_PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Generate novel crystal structures using a pretrained MatterGen model:
python structure_generation/sample.py \
--model_name='mattergen_mp20' \
--weights_name='latest.pdparams' \
--save_path='result_mattergen_mp20/' \
--output_dir='result_mattergen_mp20/' \
--mode='by_num_atoms' \
--num_atoms=4
```
Expand All @@ -127,29 +127,33 @@ python interatomic_potentials/predict.py \

#### Electronic Structure

Predict electron density using a pretrained InfGCN checkpoint:
Predict electron density from the bundled methane example using a pretrained InfGCN
model:

```bash
python electronic_structure/predict.py \
--config='electronic_structure/configs/infgcn/infgcn_qm9.yaml' \
--checkpoint='path/to/infgcn_qm9.pdparams' \
--split='validation' \
--index=0 \
--output_dir='output/infgcn_qm9/validation_0' \
--model_name='infgcn_qm9' \
--weights_name='best.pdparams' \
--mol_input='electronic_structure/configs/infgcn/example/methane.mol' \
--atom_file='electronic_structure/configs/qm9.json' \
--mol_grid_shape=8 \
--output_dir='output/infgcn_qm9/methane' \
--save_pred_cube
```

See the [InfGCN prediction guide](https://github.com/PaddlePaddle/PaddleMaterials/blob/develop/electronic_structure/configs/infgcn/README.md#prediction) for dataset and checkpoint preparation.
See the [InfGCN prediction guide](https://github.com/PaddlePaddle/PaddleMaterials/blob/develop/electronic_structure/configs/infgcn/README.md#prediction)
for dataset-based and local-checkpoint inference.

#### Spectrum Elucidation

Run NMR spectrum elucidation using a pretrained DiffNMR checkpoint:
Run NMR spectrum elucidation using the bundled example and a pretrained DiffNMR
model:

```bash
python spectrum_elucidation/sample.py \
--config_path='spectrum_elucidation/configs/diffnmr/DiffNMR.yaml' \
--checkpoint_path='path/to/DiffNMR_nless15_best.pdparams' \
--save_path='result_diffnmr_nless15/'
--model_name='diffnmr_msdnmr_nless15' \
--weights_name='best.pdparams' \
--output_dir='result_diffnmr_nless15/'
```

#### Spectrum Enhancement
Expand All @@ -159,7 +163,9 @@ Enhance STEM images using a pretrained SFIN model:
```bash
python spectrum_enhancement/predict.py \
--model_name='sfin_haadf_enhance' \
--split='val'
--weights_name='best.pdparams' \
--input_path='path/to/noisy_image.png' \
--output_dir='result_sfin/'
```

---
Expand Down
Loading