Skip to content

build_nep_traj is unusable: --test-ratio divides by zero and write_from_trajectory misplaces its arguments #196

Description

@galjos

Two independent bugs, each fatal:

NEPWriter("out.xyz").write_from_files(["md"], test_ratio=0.25)
# ZeroDivisionError: float division by zero        (nep_writer.py:472)
NEPWriter("o.xyz").write_from_trajectory(traj)
# PQTypeError: Argument 'file' ... but got <class 'bool'>   (nep_writer.py:818)

The splitting setup only derives ratios from total_ratios and never uses test_ratio; the trajectory path omits the file argument so use_forces lands in the file slot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions