v1thesource / CASTEP

Little programs that help with data manipulation of files in the CASTEP density functional theory code.
2 stars 0 forks source link

Extracting final energy from .castep #1

Closed v1thesource closed 6 years ago

v1thesource commented 7 years ago

We need a way to grab the energy values from the .castep file so that we can use them as inputs for other programs.

v1thesource commented 7 years ago

One step closer to a complete solution:

for i in 'find . -name "output_*"'; do echo -ne $i; grep -i 'final energy' ${i}/*.castep | tail -1; done | sort

This descends from the current directory and prints the last line instance of 'final energy' in any .castep files. Improvement: 1) Check that the simulation has finished so we know its the 'true' final energy. 2) Pull the energy value itself to be used as a float in other programs (BIG NUMBERS, WATCH OUT FOR OVERFLOW)