dpdata: RuntimeError: system has virials, but this does not #1851
Replies: 1 comment
-
|
The error happens because some of your systems have virials (stress tensor data) and others do not, and dpdata requires all systems in a MultiSystems object to have the same set of data fields. This usually occurs if some OUTCAR files are missing virial data, often due to VASP INCAR settings like To fix:
Best practice: always ensure all systems you append have the same set of data fields (virials, forces, energies, etc.) to avoid this and similar errors. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I used dpdata to prepare training_data and validation_data from a series OUTCAR of AIMD. However, the dpdata stopped due to the error:
RuntimeError Traceback (most recent call last)
Cell In[1], line 50
48 data.append(data_6ring1)
49 data.append(data_6ring2)
---> 50 data.append(data_10ring1_shxy01)
51 data.append(data_10ring1_shxz01)
52 data.append(data_10ring1_shyx01)
File /opt/deepmd-kit-3.1.0/lib/python3.12/site-packages/dpdata/system.py:1509, in MultiSystems.append(self, *systems)
1507 for system in systems:
1508 if isinstance(system, System):
-> 1509 self.__append(system)
1510 elif isinstance(system, MultiSystems):
1511 for sys in system:
File /opt/deepmd-kit-3.1.0/lib/python3.12/site-packages/dpdata/system.py:1524, in MultiSystems.__append(self, system)
1522 formula = system.formula
1523 if formula in self.systems:
-> 1524 self.systems[formula].append(system)
1525 else:
1526 self.systems[formula] = system.copy()
File /opt/deepmd-kit-3.1.0/lib/python3.12/site-packages/dpdata/system.py:507, in System.append(self, system)
505 if tt.shape is not None and Axis.NFRAMES in tt.shape:
506 if tt.name not in self.data and tt.name in system.data:
--> 507 raise RuntimeError(f"system has {tt.name}, but this does not")
508 elif tt.name in self.data and tt.name not in system.data:
509 raise RuntimeError(f"this has {tt.name}, but system does not")
RuntimeError: system has virials, but this does not
How to fix it?
Beta Was this translation helpful? Give feedback.
All reactions