Skip to content

[BUG] OUTCAR transformation #347

@mukui123

Description

@mukui123

Bug summary

I encountered an error converting OUTCAR data using DPData

IndexError: list index out of range

DeePMD-kit Version

2.0.4

TensorFlow Version

2.8.2

How did you download the software?

conda

Input Files, Running Commands, Error Log, etc.

Running Commands:

import dpdata
dsys = dpdata.LabeledSystem('OUTCAR')

Error Log:
Traceback (most recent call last):
File "", line 1, in
File "/home/wangchenyang/anaconda3/envs/deepmd/lib/python3.9/site-packages/dpdata/system.py", line 227, in init
self.from_fmt(file_name, fmt, type_map=type_map, begin= begin, step=step, **kwargs)
File "/home/wangchenyang/anaconda3/envs/deepmd/lib/python3.9/site-packages/dpdata/system.py", line 253, in from_fmt
return self.from_fmt_obj(load_format(fmt), file_name, **kwargs)
File "/home/wangchenyang/anaconda3/envs/deepmd/lib/python3.9/site-packages/dpdata/system.py", line 1013, in from_fmt_obj
data = fmtobj.from_labeled_system(file_name, **kwargs)
File "/home/wangchenyang/anaconda3/envs/deepmd/lib/python3.9/site-packages/dpdata/plugins/vasp.py", line 68, in from_labeled_system
= dpdata.vasp.outcar.get_frames(file_name, begin=begin, step=step, ml=ml)
File "/home/wangchenyang/anaconda3/envs/deepmd/lib/python3.9/site-packages/dpdata/vasp/outcar.py", line 71, in get_frames
coord, cell, energy, force, virial, is_converge = analyze_block(blk, ntot, nelm, ml)
File "/home/wangchenyang/anaconda3/envs/deepmd/lib/python3.9/site-packages/dpdata/vasp/outcar.py", line 134, in analyze_block
virial[0][2] = tmp_v[5]
IndexError: list index out of range

Steps to Reproduce

There is no steps

Further Information, Files, and Links

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions