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

[BUG] 'get_abacus_STRU' is not consistent with 'get_coords' in 'dpdata/abacus/scf.py' #1711

Open
AsymmetryChou opened this issue Jan 27, 2025 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@AsymmetryChou
Copy link

AsymmetryChou commented Jan 27, 2025

Bug summary

When I run DP-GEN using abacus for fp, an error exits:
File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/lib/abacus_scf.py", line 364, in get_abacus_STRU atom_names, natoms, types, coords = get_coords(celldm, cell, geometry_inlines) ValueError: too many values to unpack (expected 4)

get_coords, the function in dpdata, output the following variables(corresponding to the version in Github-Master ):
return atom_names, atom_numbs, atom_types, coords, move, mags

Evidently, they are not consistent. 4 variables in DPGEN, but 6 variables in dpdata.

It seems that there is a Version Conflict?

The version info:

Image

DP-GEN Version

0.11.1

Platform, Python Version, Remote Platform, etc

No response

Input Files, Running Commands, Error Log, etc.

Error Log:
Traceback (most recent call last): File "/opt/deepmd-kit-2.2.1/envs/dpmd/bin/dpgen", line 8, in <module> sys.exit(main()) File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/main.py", line 233, in main args.func(args) File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/run.py", line 5109, in gen_run run_iter(args.PARAM, args.MACHINE) File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/run.py", line 4458, in run_iter make_fp(ii, jdata, mdata) File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/run.py", line 3520, in make_fp make_fp_abacus_scf(iter_index, jdata) File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/run.py", line 3298, in make_fp_abacus_scf _link_fp_abacus_pporb_descript(iter_index, jdata) File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/run.py", line 3052, in _link_fp_abacus_pporb_descript stru_param = get_abacus_STRU("STRU") File "/opt/deepmd-kit-2.2.1/envs/dpmd/lib/python3.8/site-packages/dpgen/generator/lib/abacus_scf.py", line 364, in get_abacus_STRU atom_names, natoms, types, coords = get_coords(celldm, cell, geometry_inlines) ValueError: too many values to unpack (expected 4)

Steps to Reproduce

run DP-GEN in Bohrium notebook 从 DFT 到 MD|超详细「深度势能」材料计算上手指南.

In charpter 4 : dpgen run param_abacus.json machine.json

Further Information, Files, and Links

No response

@AsymmetryChou AsymmetryChou added the bug Something isn't working label Jan 27, 2025
@njzjz
Copy link
Member

njzjz commented Jan 27, 2025

@pxlxingliang It seems to me that the private API should not be used. Or if it is a public API, there should be no breaking change.

@pxlxingliang
Copy link
Contributor

@pxlxingliang It seems to me that the private API should not be used. Or if it is a public API, there should be no breaking change.

We should not use this dpdata API, I will fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants