Open floatingCatty opened 1 month ago
The function may need a better error message. LabeledSystem
always needs the force as it's designed for machine learning.
Yeah, but not all machine learning task using DFT data are dependent on force and energy. Therefore, this error may prohibit people who using dpdata as a post processing tool of structure information.
Jinzhe Zeng @.***> 于2024年5月31日周五 13:44写道:
The function may need a better error message. LabeledSystem always needs the force as it's designed for machine learning.
— Reply to this email directly, view it on GitHub https://github.com/deepmodeling/dpdata/issues/662#issuecomment-2141271516, or unsubscribe https://github.com/notifications/unsubscribe-auth/APKG4TOZCDOWX3BCWAHWAPTZFAE2TAVCNFSM6AAAAABIHNLT46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBRGI3TCNJRGY . You are receiving this because you authored the thread.Message ID: @.***>
This bug will fixed in https://github.com/deepmodeling/dpdata/pull/669
Bug summary
This is caused by the get_force function in
would return an empty list [[]] if the log does not contain force data. Then, calling np.newaxis would raise an error.
dpdata Version
0.2.17
Input Files, Running Commands, Error Log, etc.
Steps to Reproduce
Just calling LabledSystem on abacus scf output without setting the cal_force tag would do.
Further Information, Files, and Links
No response