You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When read ABACUS output calculated by spin-polarized (nspin=2) SCF, error occurs:
>>> dpdata.MultiSystems.from_dir(".","fe*c*/*", fmt='abacus/lcao/scf')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/softwares/miniconda3/envs/deepmd-3b4/lib/python3.11/site-packages/dpdata/system.py", line 1483, in from_dir
LabeledSystem(file_name=target_file, fmt=fmt, type_map=type_map)
File "/data/softwares/miniconda3/envs/deepmd-3b4/lib/python3.11/site-packages/dpdata/system.py", line 202, in __init__
self.from_fmt(
File "/data/softwares/miniconda3/envs/deepmd-3b4/lib/python3.11/site-packages/dpdata/system.py", line 239, in from_fmt
return self.from_fmt_obj(load_format(fmt), file_name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/softwares/miniconda3/envs/deepmd-3b4/lib/python3.11/site-packages/dpdata/system.py", line 1233, in from_fmt_obj
self.check_data()
File "/data/softwares/miniconda3/envs/deepmd-3b4/lib/python3.11/site-packages/dpdata/system.py", line 226, in check_data
dd.check(self)
File "/data/softwares/miniconda3/envs/deepmd-3b4/lib/python3.11/site-packages/dpdata/data_type.py", line 119, in check
raise DataError(
dpdata.data_type.DataError: Shape of spins is (1, 396, 1), but expected (1, 396, 3)
fix#757
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Enhanced handling of magnetic moments and forces to ensure consistent
three-dimensional vector representation.
- Updated input parameters for calculation configuration to reflect
changes in naming conventions and spin configurations.
- **Tests**
- Introduced a new test method to validate behavior with the updated
input file, improving test coverage and ensuring accuracy in results.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: root <pxlxingliang>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bug summary
When read ABACUS output calculated by spin-polarized (nspin=2) SCF, error occurs:
dpdata Version
dpdata v0.2.21
Input Files, Running Commands, Error Log, etc.
fe2c-111-1.tar.gz
Steps to Reproduce
By using
dpdata.MultiSystems.from_dir(".","fe*c*/*", fmt='abacus/lcao/scf')
command ordpdata.LabeledSystem("fe2c/1", fmt='abacus/lcao/scf')
commandFurther Information, Files, and Links
This issue may related to #718
The text was updated successfully, but these errors were encountered: