-
Notifications
You must be signed in to change notification settings - Fork 15
Add ase_interface with support for optimization and md #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JunnHuo
wants to merge
30
commits into
PaddlePaddle:develop
Choose a base branch
from
JunnHuo:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 20 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
69aa46b
Add ase_interface with support for optimization and md
JunnHuo deea169
Keep the from_structures func in base_calculator
JunnHuo 37ed942
Add predict and tasks modules; update ASE interface and property pred…
JunnHuo 1c75f1d
Add example usage
JunnHuo 06c3c3e
WIP: save local changes
JunnHuo ee55f16
modify err
JunnHuo 0226096
Remove tests from tracking
JunnHuo c32fabd
Save local changes before rebase
JunnHuo 6023fe5
Sync missing files from upstream/develop
JunnHuo 0d3354f
modify train config
JunnHuo 9a2dc78
revise train config (2nd version)
JunnHuo f8b5710
revise train config (3rd version)
JunnHuo 24d6b70
Update training config (4th version)
JunnHuo a34fef1
Update training config (5th version)
JunnHuo 59614f5
Update training config
JunnHuo 6eeafb6
small fix
JunnHuo ab05190
small fix: correct structure generation
JunnHuo 52f050a
save local changes before merge upstream
JunnHuo d841f0d
merge upstream develop
JunnHuo 77d164f
change configs and README
JunnHuo e8ce0be
resolve config bug in predict.py
JunnHuo 3ddeb0c
keep previous content
JunnHuo a83c8c4
keep previous content
JunnHuo e2ea426
keep previous content
JunnHuo 578522a
keep previous content
JunnHuo b556ff1
fix: correct commit message for ppmatSim README
JunnHuo 623ffc0
revert
JunnHuo 70bca7f
remove experiments directory for PR review
JunnHuo d713a86
correct
JunnHuo 743d006
correct
JunnHuo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个地方还原吧 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
experiments/interatomic_potentials/configs/Dataset/alex_mp20.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # ========================================================= | ||
| # Base dataset parameters (shared by train/val/test) | ||
| # ========================================================= | ||
| dataset_base_params: &dataset_base_params | ||
| build_structure_cfg: | ||
| format: cif_str | ||
| primitive: True | ||
| niggli: True | ||
| canocial: False | ||
| num_cpus: 10 | ||
| transforms: | ||
| - __class_name__: LatticePolarDecomposition | ||
| __init_params__: {} | ||
|
|
||
| # ========================================================= | ||
| # Sampler configuration (reusable aliases) | ||
| # ========================================================= | ||
| train_sampler: &train_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: True | ||
| drop_last: False | ||
| batch_size: 64 # 16 for 4 GPUs, total batch size = 16 * 4 = 64 | ||
|
|
||
| val_sampler: &val_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 32 | ||
|
|
||
|
|
||
| # ========================================================= | ||
| # Train / Validation / Test dataset configuration | ||
| # ========================================================= | ||
| train: | ||
| dataset: | ||
| __class_name__: AlexMP20MatterGenDataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/alex_mp_20/train.csv" | ||
| cache_path: "${Run.data_dir}/alex_mp_20_chemical_system_cache/train" | ||
| loader: | ||
| num_workers: 0 | ||
| use_shared_memory: False | ||
| sampler: *train_sampler | ||
|
|
||
| val: | ||
| dataset: | ||
| __class_name__: AlexMP20MatterGenDataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/alex_mp_20/val.csv" | ||
| cache_path: "${Run.data_dir}/alex_mp_20_chemical_system_cache/val" | ||
| sampler: *val_sampler |
71 changes: 71 additions & 0 deletions
71
experiments/interatomic_potentials/configs/Dataset/high_level_water.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # ========================================================= | ||
| # Base dataset parameters (shared by train/val/test) | ||
| # ========================================================= | ||
| dataset_base_params: &dataset_base_params | ||
| energy_key: ${Experiment.energy_key} | ||
| force_key: ${Experiment.force_key} | ||
| stress_key: ${Experiment.stress_key} | ||
| build_structure_cfg: | ||
| format: ase_atoms | ||
| primitive: False | ||
| niggli: False | ||
| num_cpus: 10 | ||
| build_graph_cfg: ${Graph_converter} | ||
| filter_unvalid: False | ||
|
|
||
| # ========================================================= | ||
| # Sampler configuration (reusable aliases) | ||
| # ========================================================= | ||
| train_sampler: &train_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: True | ||
| drop_last: True | ||
| batch_size: 2 # 16 for 4 GPUs, total batch size = 16 * 4 = 64 | ||
|
|
||
| val_sampler: &val_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 16 | ||
|
|
||
| test_sampler: &test_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 16 | ||
|
|
||
| # ========================================================= | ||
| # Train / Validation / Test dataset configuration | ||
| # ========================================================= | ||
| train: | ||
| dataset: | ||
| __class_name__: HighLevelWaterDataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/high_level_water/high_level_water.xyz" | ||
| num_workers: 0 | ||
| use_shared_memory: False | ||
| sampler: *train_sampler | ||
|
|
||
| val: | ||
| dataset: | ||
| __class_name__: HighLevelWaterDataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/high_level_water/high_level_water.xyz" | ||
| num_workers: 0 | ||
| use_shared_memory: False | ||
| sampler: *val_sampler | ||
|
|
||
| test: | ||
| dataset: | ||
| __class_name__: HighLevelWaterDataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/high_level_water/high_level_water.xyz" | ||
| num_workers: 0 | ||
| use_shared_memory: False | ||
| sampler: *test_sampler |
48 changes: 48 additions & 0 deletions
48
experiments/interatomic_potentials/configs/Dataset/jarvis.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # ========================================================= | ||
| # Dataset configuration | ||
| # ========================================================= | ||
| dataset: | ||
| __class_name__: JarvisDataset | ||
| __init_params__: | ||
| path: "${Run.data_dir}/jarvis" | ||
| jarvis_data_name: ${Experiment.jarvis_data_name} | ||
| property_names: ${Global.label_names} | ||
| build_structure_cfg: | ||
| format: jarvis | ||
| num_cpus: 10 | ||
| build_graph_cfg: ${Graph_converter} | ||
| cache_path: "${Run.data_dir}/jarvis" | ||
| num_workers: 4 | ||
| use_shared_memory: False | ||
|
|
||
| # ========================================================= | ||
| # Dataset splitting ratios | ||
| # ========================================================= | ||
| split_dataset_ratio: | ||
| train: 0.8 | ||
| val: 0.1 | ||
| test: 0.1 | ||
|
|
||
| # ========================================================= | ||
| # Data samplers for batching | ||
| # ========================================================= | ||
| train_sampler: | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: True | ||
| drop_last: False | ||
| batch_size: 128 | ||
|
|
||
| val_sampler: | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 128 | ||
|
|
||
| test_sampler: | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 128 |
61 changes: 61 additions & 0 deletions
61
experiments/interatomic_potentials/configs/Dataset/mp20.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # ========================================================= | ||
| # Base dataset parameters (shared by train/val/test) | ||
| # ========================================================= | ||
| dataset_base_params: &dataset_base_params | ||
| build_structure_cfg: | ||
| format: cif_str | ||
| num_cpus: 10 | ||
|
|
||
| # ========================================================= | ||
| # Sampler configuration (reusable aliases) | ||
| # ========================================================= | ||
| train_sampler: &train_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: True | ||
| drop_last: False | ||
| batch_size: 256 # 16 for 4 GPUs, total batch size = 16 * 4 = 64 | ||
|
|
||
| val_sampler: &val_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 128 | ||
|
|
||
| test_sampler: &test_sampler | ||
| __class_name__: DistributedBatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 128 | ||
|
|
||
| # ========================================================= | ||
| # Train / Validation / Test dataset configuration | ||
| # ========================================================= | ||
| train: | ||
| dataset: | ||
| __class_name__: MP20Dataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/mp_20/train.csv" | ||
| loader: | ||
| num_workers: 0 | ||
| use_shared_memory: False | ||
| sampler: *train_sampler | ||
|
|
||
| val: | ||
| dataset: | ||
| __class_name__: MP20Dataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/mp_20/val.csv" | ||
| sampler: *val_sampler | ||
|
|
||
| test: | ||
| dataset: | ||
| __class_name__: MP20Dataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/mp_20/test.csv" | ||
| sampler: *test_sampler |
65 changes: 65 additions & 0 deletions
65
experiments/interatomic_potentials/configs/Dataset/mp2018.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| # ========================================================= | ||
| # Base dataset parameters (shared by train/val/test) | ||
| # ========================================================= | ||
| dataset_base_params: &dataset_base_params | ||
| property_names: ${Global.label_names} | ||
| build_structure_cfg: | ||
| format: cif_str | ||
| num_cpus: 10 | ||
| build_graph_cfg: ${Graph_converter} | ||
|
|
||
| # ========================================================= | ||
| # Sampler configuration (reusable aliases) | ||
| # ========================================================= | ||
| train_sampler: &train_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: True | ||
| drop_last: False | ||
| batch_size: 16 # 16 for 4 GPUs, total batch size = 16 * 4 = 64 | ||
|
|
||
| val_sampler: &val_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 32 | ||
|
|
||
| test_sampler: &test_sampler | ||
| __class_name__: BatchSampler | ||
| __init_params__: | ||
| shuffle: False | ||
| drop_last: False | ||
| batch_size: 64 | ||
|
|
||
| # ========================================================= | ||
| # Train / Validation / Test dataset configuration | ||
| # ========================================================= | ||
| train: | ||
| dataset: | ||
| __class_name__: MP2018Dataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/mp2018_train_60k/mp.2018.6.1_train.json" | ||
| cache_path: "${Run.data_dir}/mp2018_train_60k/mp.2018.6.1_train" | ||
| num_workers: 4 | ||
| use_shared_memory: False | ||
| sampler: *train_sampler | ||
|
|
||
| val: | ||
| dataset: | ||
| __class_name__: MP2018Dataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/mp2018_train_60k/mp.2018.6.1_val.json" | ||
| cache_path: "${Run.data_dir}/mp2018_train_60k/mp.2018.6.1_val" | ||
| sampler: *val_sampler | ||
|
|
||
| test: | ||
| dataset: | ||
| __class_name__: MP2018Dataset | ||
| __init_params__: | ||
| <<: *dataset_base_params | ||
| path: "${Run.data_dir}/mp2018_train_60k/mp.2018.6.1_test.json" | ||
| cache_path: "${Run.data_dir}/mp2018_train_60k/mp.2018.6.1_test" | ||
| sampler: *test_sampler |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里请还原