Skip to content

[Code scan] LAMMPS dump box parser crashes on orthogonal boxes #141

Description

@njzjz

Source: Codex global repository scan of deepmodeling/dpti at commit b719828.
Project: DeepModeling Agent Code Scan

Problem
dump.get_dumpbox() always reads a third value from each BOX BOUNDS line as a tilt factor. Standard orthogonal LAMMPS dump boxes use only lo hi per axis, so this parser raises IndexError for valid dump files.

Code references

def get_dumpbox(lines) :

info = [float(jj) for jj in blk[dd].split()]

tilt[dd] = info[2]

Reproduction
Parse a dump block with:

ITEM: BOX BOUNDS pp pp pp
0 10
0 10
0 10

Expected result
Orthogonal boxes should parse with zero tilt factors instead of crashing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions