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] ValueError occurs when doing dpgen autotest + ABACUS for relaxation #1717

Closed
NKJunhongLi opened this issue Feb 14, 2025 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@NKJunhongLi
Copy link

Bug summary

I want to do cell-relax using dpgen autotest + ABACUS. I obey the instructions in the document, prepare confs/STRU file, relaxation.json file, machine.json file. Then I run

dpgen autotest make relaxation.json

Error occured.

DP-GEN Version

0.13.0

Platform, Python Version, Remote Platform, etc

Platform: WSL Ubuntu 22.04
Python Version: 3.10.13
deepmd-kit is installed via conda. dpdata and dpgen is installed by pip

pip3 install dpdata
pip3 install dpgen

dpdata Version: 0.2.22

Input Files, Running Commands, Error Log, etc.

The Error Log is as follows:

DeepModeling

Version: 0.13.0
Path: /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen

Dependency

 numpy     1.26.4   /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/numpy
dpdata     0.2.22   /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpdata

pymatgen unknown version or path
monty 2025.1.9 /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/monty
ase 3.24.0 /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/ase
paramiko 3.5.1 /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/paramiko
custodian 2025.1.24 /home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/custodian

Reference

Please cite:
Yuzhi Zhang, Haidi Wang, Weijie Chen, Jinzhe Zeng, Linfeng Zhang, Han Wang, and Weinan E,
DP-GEN: A concurrent learning platform for the generation of reliable deep learning
based potential energy models, Computer Physics Communications, 2020, 107206.

Description

INFO:dpgen:start auto-testing
Traceback (most recent call last):
File "/home/lijh/anaconda3/envs/deepmd/bin/dpgen", line 8, in
sys.exit(main())
File "/home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen/main.py", line 255, in main
args.func(args)
File "/home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen/auto_test/run.py", line 58, in gen_test
run_task(args.TASK, args.PARAM, args.MACHINE)
File "/home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen/auto_test/run.py", line 24, in run_task
make_equi(confs, inter_parameter, relax_param)
File "/home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen/auto_test/common_equi.py", line 135, in make_equi
inter.make_potential_files(ii)
File "/home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen/auto_test/ABACUS.py", line 30, in make_potential_files
stru_data = abacus_scf.get_abacus_STRU(stru)
File "/home/lijh/anaconda3/envs/deepmd/lib/python3.10/site-packages/dpgen/generator/lib/abacus_scf.py", line 397, in get_abacus_STRU
atom_names, natoms, types, coords = get_coords(celldm, cell, geometry_inlines)
ValueError: too many values to unpack (expected 4)

The input files are also attached.
HfO2.zip

Steps to Reproduce

I attached the input files above. In the folder, directly run

dpgen autotest make relaxation_Fm3m.json

The error could be reproduce, under the environment of conda (deepmd) + pip3 install dpdata + pip3 sintall dpgen

Further Information, Files, and Links

I checked the source code. First, in file abacus.scf.py, line 397, it writes
`

atom_names, natoms, types, coords = get_coords(celldm, cell, geometry_inlines)

`

Then I search the get_coords() function, in file scf.py, line 362, I find the return of the function is
`

return atom_names, atom_numbs, atom_types, coords, move, mags

`

It returns 6 values, which fits the STRU file. But in file abacus.scf.py, line 397 it only receives 4 values, which of cource make a ValueError.
I think this small bug should be revived. I appreciate it if you could manage it quickly.

@NKJunhongLi NKJunhongLi added the bug Something isn't working label Feb 14, 2025
@njzjz
Copy link
Member

njzjz commented Feb 15, 2025

Duplicate of #1711

@njzjz njzjz marked this as a duplicate of #1711 Feb 15, 2025
@njzjz njzjz closed this as completed Feb 15, 2025
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

2 participants