How to find an atom ID by its energy?

Hello scholars!
I’m trying to insert (create_atoms) a self interstitial atom (SIA) next to an SIA-cluster in a perfect and pure structure. For this purpose, I want to define a spherical region around my cluster in which the new SIA is added, so it can combine and relax. I believe the best method is to find the atom with the highest energy (which must be in the cluster!) and create the region around it. The question is, how can you find the ID of the atom which has highest energy in system?
any idea?
yours
Amir

You can use compute reduce with the replace keyword.

@akohlmey Thanks for your comment. can you elaborate? I’m a bit confused!

Please study the documentation of the compute reduce command, learn how you can use it to find the minimum or maximum energy across all or a group of atoms and then learn how to use the replace option to have it return a different property (like the atom ID) of the same atom instead. Everything you need to know is there.

If you have questions, please ask about specific details and provide an input example of how you used it. For simplicity and expediency I would start my modifying the melt example instead of your actual research simulation.