Open thangckt opened 3 days ago
It is likely to be the consequence of sevenn.train.dataload::atoms_to_graph
. The routine tries to load stress from the atoms
object but does not ensure whether the shape and types of loaded stress are correct.
Could you share the version and minimal data to reproduce the error?
hi @YutackPark I attach few frames of extxyz data. Please use this
data_format_args:
energy_key: 'ref_energy'
force_key: 'ref_forces'
stress_key: 'ref_stress'
atoms.info['y_stress'] = atoms.info[stress_key]
When 'stress' data is loaded via custom key, in your case ref_stress
, current code does not check whether it has (1, 6) shapes. 7net has to ensure the stress to have (1, 6) shape. This is a bug and will be patched.
For now, you may preprocess your ref_stress
to have (1, 6) shape to avoid the problem. Sorry for the inconvenience. To prevent this kind of bugs, I'm writing pytest codes to have best practice... but not merged yet.
hi @YutackPark Thank you for your explain.
you may preprocess your ref_stress to have (1, 6) shape to avoid the problem
ref_stress already has shape (1,6) what preprocess did you mean?
@thangckt, I copy pasted the data you gave to me and read it using ase.io.read
and it gives (6,) shaped array. Maybe ASE automatically converts it to have plain (6,) shape before writing a file. Seems only available bypass is storing the results using SinglePointCalculator
as I mentioned in previous issue #61.
Plus, I looked more closely and seems the feature is broken, due to the difference between stress notation inside the SevenNet -1 * (xx, yy, zz, xy, yz, zx) and ASE (Voigt: xx, yy, zz, yz, zx, xy). I recommend to not use it before the patch, unless you're very confident of it.
hi @YutackPark Thank you for your guide.
About the stress component order, it will be serious misleading. Can I know why you don't follow the well-known Voigt notation?
hi @thangckt
It is another side-effect of following our groups's previous MLIP package SIMPLE-NN
, or VASP itself.
VASP uses xx, yy, zz, xy, yz, zx notation in its OUTCAR file, and so does SIMPLE-NN
.
I'm trying my best to hide this cumbersomeness to users, but it failed in this case. I may refactor this to follow Voigt notation ALWAYS after stabilizing the code.
hi @YutackPark Thank you so much for your information. I will follow your updates.
About stress notation, I think It should better follow Voigt notation. Any output from a specific software should be converted to this convention. Otherwise, it will be serious misleading for users.
It was supposed to follow voigt notation for this recently introduced EFS key feature, and what happened here is simply my fault, and I agree with you. Anyway, thanks for the bug report. I'll notify you with closing the issue after the fix. The mixed notation inside the code is really confusing (even for me).
Dear Deverlopers,
I get the below error when set
is_train_stress: True
This error disapears when set
is_train_stress: False
Can you have a little help? Thanks.