Closed M9JS closed 1 year ago
This is shown in the documentation:
from chgnet.model import StructOptimizer
relaxer = StructOptimizer()
result = relaxer.relax(structure)
print("CHGNet relaxed structure", result["final_structure"])
print("relaxed total energy =", result["trajectory"][-1].get_potential_energy())
Thank you, I have tried to call the total energy by result["trajectory"][-1].get_potential_energy()
but failed.
I think the right form should be result["trajectory"].energies[-1])
:)
Thanks for the correction!
Recently I have been using CHGNet for structure optimization for some high throughput screening. I wonder if there is a way to extract the final total energy, which lies at the last line of the output of FIRE optimization. And also, the structure in the form of pymatgen.Structure or Ase.atoms is needed I have wrote some functions for parsing that energy and structure in the output log. But I think it's a low efficient way to do so. Is there any way to get those energy and structure object by calling the attribute?