Closed Amitcuhp closed 1 year ago
Very thankful to you in advance
This is a general python question, no specific to extxyz or libAtoms.
More or less:
python -c 'import ase.iohttp://ase.io; ase.iohttp://ase.io.write("outfile.xyzhttp://outfile.xyz", sorted(ase.iohttp://ase.io.read("infile.xyzhttp://infile.xyz", ":"), key=lambda at: at.infohttp://at.info["energy"]))'
(assuming the energy is in the info key "energy")
Thanks Noam. I tried to edit out the bogus links above, but it seems email replies don't support Markdown. Here's a copy-pastable version
python -c 'import ase.io; ase.io.write("outfile.xyz", sorted(ase.io.read("infile.xyz", ":"), key=lambda at: at.info["energy"]))'
Thanks for your help. I am very thankful to you.
Can you tell me one think more please:
How to add values to all the energies . in simple words , i want to add 200 to all energies values...can u help
How to sort ase xyz file in ascending order of energies