Format shape of virial stresses in training set #294
-
Dear developers, I am encountering difficulties while training MACE on energy, force, and virial stress due to the required format of the stress tensor, which should be (1,3,3) when interpreted by mace_run_train. I have been utilizing my training set in the extended XYZ format, where the virial data is saved as follows, for instance: Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Dear @yonghyuklee, Is your property stress or virials (not normalized by the volume of the cell)? In the case of a virial quantity, you need to input them as a 3x3 matrix. So, in your case, you would need to have |
Beta Was this translation helpful? Give feedback.
-
The quotes are definitely needed if it's in the xyz comment line. There's also some magic that happens when reading xyz files with 9-long vectors in the comment line being transformed into 3x3 matrices. @jameskermode may remember how that works - it may be some special field names hardwired. If so, the MACE training code might need to reshape the virials field into a matrix if it has length 9. |
Beta Was this translation helpful? Give feedback.
The quotes are definitely needed if it's in the xyz comment line. There's also some magic that happens when reading xyz files with 9-long vectors in the comment line being transformed into 3x3 matrices. @jameskermode may remember how that works - it may be some special field names hardwired. If so, the MACE training code might need to reshape the virials field into a matrix if it has length 9.