Skip to content
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

Added ABACUS pw interface for dpgen init_bulk #590

Merged
merged 20 commits into from
Jan 4, 2022
Merged

Added ABACUS pw interface for dpgen init_bulk #590

merged 20 commits into from
Jan 4, 2022

Conversation

Liu-RX
Copy link
Collaborator

@Liu-RX Liu-RX commented Nov 13, 2021

No description provided.

@Liu-RX Liu-RX changed the title Devel Added ABACUS pw interface for dpgen init_bulk Nov 13, 2021
@Liu-RX
Copy link
Collaborator Author

Liu-RX commented Nov 14, 2021

It seems that dpdata installed in the test does not support abacus/md yet, leading to the failure of the test.

@wanghan-iapcm
Copy link
Contributor

Could you please merge the recent devel branch? Thanks!

@codecov-commenter
Copy link

codecov-commenter commented Nov 30, 2021

Codecov Report

Merging #590 (a7d11ce) into devel (7a8ae82) will increase coverage by 0.74%.
The diff coverage is 51.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel     #590      +/-   ##
==========================================
+ Coverage   33.16%   33.91%   +0.74%     
==========================================
  Files          86       86              
  Lines       14837    15425     +588     
==========================================
+ Hits         4921     5231     +310     
- Misses       9916    10194     +278     
Impacted Files Coverage Δ
dpgen/data/tools/bcc.py 21.05% <ø> (ø)
dpgen/data/tools/create_random_disturb.py 0.00% <0.00%> (ø)
dpgen/data/tools/diamond.py 20.00% <ø> (ø)
dpgen/data/tools/fcc.py 100.00% <ø> (ø)
dpgen/data/tools/hcp.py 20.00% <ø> (ø)
dpgen/data/tools/sc.py 22.22% <ø> (ø)
dpgen/data/gen.py 50.85% <48.25%> (+0.05%) ⬆️
dpgen/generator/lib/abacus_scf.py 83.54% <78.40%> (-4.99%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7a8ae82...a7d11ce. Read the comment docs.

@Liu-RX
Copy link
Collaborator Author

Liu-RX commented Nov 30, 2021

Could you please merge the recent devel branch? Thanks!

Thank you for reminding me of this! I've already merged the pr with devel branch.

README.md Outdated
@@ -188,7 +188,12 @@ If you want to specify a structure as starting point for `init_bulk`, you may se
```json
"from_poscar": true,
"from_poscar_path": "....../C_mp-47_conventional.POSCAR",
```
``` 
Copy link
Contributor

Choose a reason for hiding this comment

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

Please notice that the format is not correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for that... I just fixed the bug.

Comment on lines 27 to 35
def STRU_unit(latt):

box = gen_box() * latt/np.sqrt(2)
stru_data = {}
stru_data['cells'] = box
stru_data['atom_numbs'] = [2]
stru_data['coords'] = np.matmul(np.array([[0.0, 0.0, 0.0], [1./3, 1./3, 1./2]]), box)
stru_data['types'] = [0, 0]
return stru_data
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not using dpdata for converting from POSCAR to STRU? You do not need to write support for abacus for each crystal type.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

😯 Sorry I did not realize it when I was writing the code. I will remove the STRU_unit codes and use the dpdata conversion code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've removed the STRU_unit functions and replaced them with poscar_unit and dpdata conversion.

README.md Outdated
Comment on lines 219 to 220
| relax_kpt | String | "....../KPT" | Path of `KPT` file for relaxation in stage 1. Only useful if `init_fp_style` is "ABACUS".
| md_kpt | String | "....../KPT" | Path of `KPT` file for MD simulations in stage 3. Only useful if `init_fp_style` is "ABACUS".
Copy link
Contributor

Choose a reason for hiding this comment

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

It is not good idea to explicitly set the number of kpoint, because the k-mesh should be adjusted according to the size of the system. For example different super_cell settings needs different number of kpoints.

A better and recommended way of setting kmesh is to set kspacing. you can check auto_test.lib.vasp.make_kspacing_kpoints to make a kmesh from a given kspacing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for the delay. I did not receive the notifications orz. I will solve the two issues as suggested.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have added relax_kspacing and md_kspacing in param.json for dpgen to generate the KPT files. I also reserved the previous relax_kpt and md_kpt parameters. Both methods are available.

Comment on lines 28 to 36
def STRU_unit(latt):

box = gen_box() * latt
stru_data = {}
stru_data['cells'] = box
stru_data['atom_numbs'] = [2]
stru_data['coords'] = np.matmul(np.array([[0.125, 0.125, 0.125], [0.875, 0.875, 0.875]]), box)
stru_data['types'] = [0, 0]
return stru_data
Copy link
Contributor

Choose a reason for hiding this comment

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

This method should not be needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've removed it.

@wanghan-iapcm wanghan-iapcm merged commit b3db59d into deepmodeling:devel Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants