CederGroupHub / chgnet

Pretrained universal neural network potential for charge-informed atomistic modeling https://chgnet.lbl.gov
https://doi.org/10.1038/s42256-023-00716-3
Other
220 stars 60 forks source link

units and format when compared with trajectories (ASE) #75

Closed bkmi closed 11 months ago

bkmi commented 11 months ago

Just going on the README.md, the units and shapes of results from prediction = chgnet.predict_structure(structure) and relaxer = StructOptimizer(); result = relaxer.relax(structure) are different. Energies is easily fixed by multiplying by number of atoms, but the other quantities don't seem to have such a simple relationship.

I figure that you have clear units from predict_structure, but when I look at ASE documentation, the units from their atoms object is not 100% clear to me. Furthermore, the "stresses" prediction prediction["s"] is a completely different shape from the results["trajectory"][-1]. How do I convert between them?

BowenD-UCB commented 11 months ago

ASE uses voigt stress, please read: https://gitlab.com/ase/ase/-/blame/master/ase/atoms.py#L826