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

How to deal with this error [dpgen autotest make ... self.data['atom_types'] = np.argsort(idx)[self.data['atom_types']] IndexError: index 2 is out of bounds for axis 0 with size 2] #364

Closed
baoqinfu opened this issue Apr 3, 2021 · 2 comments
Labels
awaiting response bug Something isn't working

Comments

@baoqinfu
Copy link

baoqinfu commented Apr 3, 2021

Summary

I am run “dpgen autotest make ...”
but I get the below information in my screen:

(base) [bqfu@node01 ea05]$ /home/share/dp/bin/dpgen autotest make property3c.json
DeepModeling

Version: 0.9.1.dev0+g769ccf4.d20210311
Date: Mar-11-2021
Path: /home/bqfu/.local/lib/python3.7/site-packages/dpgen

Dependency

 numpy     1.16.3   /home/bqfu/anaconda3/lib/python3.7/site-packages/numpy
dpdata     0.1.19   /home/bqfu/.local/lib/python3.7/site-packages/dpdata

pymatgen 2019.4.11 /home/bqfu/anaconda3/lib/python3.7/site-packages/pymatgen
monty 2021.3.3 /home/bqfu/.local/lib/python3.7/site-packages/monty
ase 3.21.1 /home/bqfu/.local/lib/python3.7/site-packages/ase
paramiko 2.7.2 /home/bqfu/.local/lib/python3.7/site-packages/paramiko
custodian 2021.2.8 /home/bqfu/.local/lib/python3.7/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

----------------------------------3c----------------------------------
gen eos from 0.85 to 1.15 by every 0.01
gen with norm [-0.002, -0.001, 0.001, 0.002]
gen with shear [-0.005, -0.0025, 0.0025, 0.005]
gen vacancy with supercell [3, 3, 3]
gen interstitial with supercell [6, 6, 6] with element ['Si', 'C']
Traceback (most recent call last):
File "/home/share/dp/bin/dpgen", line 11, in
sys.exit(main())
File "/home/bqfu/.local/lib/python3.7/site-packages/dpgen/main.py", line 175, in main
args.func(args)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpgen/auto_test/run.py", line 57, in gen_test
run_task(args.TASK, args.PARAM, args.MACHINE)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpgen/auto_test/run.py", line 28, in run_task
make_property(confs, inter_parameter, property_list)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpgen/auto_test/common_prop.py", line 91, in make_property
inter.make_input_file(kk, prop.task_type(), prop.task_param())
File "/home/bqfu/.local/lib/python3.7/site-packages/dpgen/auto_test/Lammps.py", line 119, in make_input_file
lammps.cvt_lammps_conf(os.path.join(output_dir, 'POSCAR'), os.path.join(output_dir, 'conf.lmp'), lammps.element_list(self.type_map))
File "/home/bqfu/.local/lib/python3.7/site-packages/dpgen/auto_test/lib/lammps.py", line 29, in cvt_lammps_conf
d_poscar = dpdata.System(fin, fmt='vasp/poscar', type_map=type_map)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpdata/system.py", line 123, in init
self.apply_type_map(type_map)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpdata/system.py", line 405, in apply_type_map
self.check_type_map(type_map)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpdata/system.py", line 401, in check_type_map
self.sort_atom_names(type_map=type_map)
File "/home/bqfu/.local/lib/python3.7/site-packages/dpdata/system.py", line 388, in sort_atom_names
self.data['atom_types'] = np.argsort(idx)[self.data['atom_types']]
IndexError: index 2 is out of bounds for axis 0 with size 2


@baoqinfu baoqinfu added the bug Something isn't working label Apr 3, 2021
@AnguseZhang
Copy link
Collaborator

Please provide your input files to help locate and reproduce the problem.

@njzjz
Copy link
Member

njzjz commented Nov 2, 2023

It is probably fixed by deepmodeling/dpdata#250

@njzjz njzjz closed this as completed Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants