Avatar for the deepmodeling user
deepmodeling
dpdata
BlogDocsChangelog

Performance History

Latest Results

fix(deepmd/hdf5): skip empty optional frame arrays on dump (#996) The deepmd/hdf5 writer reshaped and wrote optional frame arrays (e.g. forces or virials that are empty when cal_force/cal_stress is disabled) as a (nframes, 0) dataset, which the loader then failed to reshape back to the full shape, raising 'cannot reshape array of size 0'. Skip empty optional arrays on dump, matching the existing deepmd/raw and deepmd/npy writers. Non-empty arrays are unaffected.
CedricConday:fix/hdf5-empty-optional-arrays
13 hours ago
fix: build pymatgen Molecule species from atom_types order (#994) (#1010) Fixes #994. ## Summary `PyMatgenMoleculeFormat.to_system()` built the `species` list by expanding grouped `atom_names`/`atom_numbs` (e.g. `H, H, O`), but passed `coords` in their `atom_types` order (e.g. `H, O, H`). When atoms are **not** grouped by type, the resulting `pymatgen.core.Molecule` assigns species to the wrong coordinates. ## Change Build `species` per-atom from `atom_types`, matching the coordinate order — the same construction the sibling Structure exporter already uses in this file: ```python species = [data["atom_names"][tt] for tt in data["atom_types"]] ``` This is the fix suggested in the issue. ## Testing - Added a regression test (`test_ungrouped_atom_types_species_match_coords`) using the reporter's reproducer: species now follow the coordinate order (`H, O, H`) and each site sits on its original coordinate. It **fails on master** and passes with this change. - All 50 pymatgen-related tests pass; `ruff check` and `ruff format --check` clean. --- *Disclosure: authored with AI assistance (Claude Code); reviewed by me and I'll shepherd it through review.* <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed molecule conversion so atom species now follow the actual per-atom type order. * Ensured converted molecule coordinates continue to match the source structure for each frame. * **Tests** * Added a regression test covering ungrouped atom types to verify species ordering and coordinate mapping during molecule conversion. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
master
3 days ago

Latest Branches

CodSpeed Performance Gauge
+1%
fix(deepmd/hdf5): skip empty optional frame arrays on dump (#996)#1011
13 hours ago
642a745
CedricConday:fix/hdf5-empty-optional-arrays
CodSpeed Performance Gauge
+3%
fix: build pymatgen Molecule species from atom_types order (#994)#1010
3 days ago
7e073a4
CedricConday:fix/pymatgen-molecule-species-order-994
CodSpeed Performance Gauge
0%
4 days ago
a52b3e9
SchrodingersCattt:devel
© 2026 CodSpeed Technology
Home Terms Privacy Docs