-
Notifications
You must be signed in to change notification settings - Fork 175
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
Conversation
It seems that dpdata installed in the test does not support abacus/md yet, leading to the failure of the test. |
Could you please merge the recent devel branch? Thanks! |
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
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", | |||
``` | |||
``` |
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.
Please notice that the format is not correct.
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.
Sorry for that... I just fixed the bug.
dpgen/data/tools/hcp.py
Outdated
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 |
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.
Why not using dpdata for converting from POSCAR to STRU? You do not need to write support for abacus for each crystal type.
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.
😯 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.
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.
I've removed the STRU_unit functions and replaced them with poscar_unit and dpdata conversion.
README.md
Outdated
| 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". |
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.
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.
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.
Sorry for the delay. I did not receive the notifications orz. I will solve the two issues as suggested.
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.
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.
dpgen/data/tools/diamond.py
Outdated
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 |
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.
This method should not be needed.
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.
I've removed it.
No description provided.