Skip to content

fix(lammps): tolerate incomplete and commented dump frames #2496

fix(lammps): tolerate incomplete and commented dump frames

fix(lammps): tolerate incomplete and commented dump frames #2496

Workflow file for this run

name: test Python import
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.10'
architecture: 'x64'
- run: python -m pip install uv
- run: python -m uv pip install --system .
- name: Test core import and YAML serialization
run: |
python - <<'PY'
import tempfile
from pathlib import Path
import dpdata
system = dpdata.System(
"tests/poscars/POSCAR.h2o.md", fmt="vasp/poscar"
)
with tempfile.TemporaryDirectory() as tmpdir:
filename = Path(tmpdir) / "system.yaml"
system.dump(filename)
loaded = dpdata.System.load(filename)
assert loaded.formula == system.formula
assert loaded.get_nframes() == system.get_nframes()
PY