The following describes how to convert a relax log file into a relax script.
Grep the log file for commands
First we find which commands relax has performed, and separate into the different fitting models.
We also just make some line space and important points.
Then we replace instances of relax> with empty, and comment out the model line.
Put this into a file: relax_log_to_py.sh
<source lang="bash">
- !/bin/tcsh -f
set LOGS=`ls -v -d -1 *.log`
foreach LOG ( ${LOGS} )
set BNAME=`basename $LOG .log`
set OUT="grep_${BNAME}.py"
egrep -wi --color 'relax>| model -' $LOG > $OUT ;
sed -i "s/relax> //" $OUT ;
sed -i 's/^- /\n#- /' $OUT ;
sed -i 's/^minimise(/\nminimise(/' $OUT ;
sed -i 's/^script(/\n#script(/' $OUT ;
sed -i 's/^results.write(/\nresults.write(/' $OUT ;
sed -i 's/^model_selection(/\nmodel_selection(/' $OUT ..→