Energies: Difference between revisions

From Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:




{if ($3 == "E(RB+HF-LYP)"){ b3lyp =$5
<nowiki>{if ($3 == "E(RB+HF-LYP)"){ b3lyp =$5
 
</nowiki>
}
}


Line 23: Line 23:




{if ($5 == "zero-point"){ zero=$7
<nowiki>{if ($5 == "zero-point"){ zero=$7</nowiki>


}
}
Line 30: Line 30:




{if ($6 == "Free"){ free=$8
<nowiki>{if ($6 == "Free"){ free=$8</nowiki>


}
}
Line 37: Line 37:




{if (($1 == "Normal") && ($2 == "termination")){
<nowiki>{if (($1 == "Normal") && ($2 == "termination")){</nowiki>


print "Normal termination"
<nowiki>print "Normal termination"</nowiki>


}
}
Line 47: Line 47:




{if (($1 == "Error") && ($2 == "termination")){
<nowiki>{if (($1 == "Error") && ($2 == "termination")){</nowiki>


print "Error termination"
<nowiki>print "Error termination"</nowiki>


print "Error termination"
<nowiki>print "Error termination"</nowiki>


print "Error termination"
<nowiki>print "Error termination"</nowiki>


print "Error termination"
<nowiki>print "Error termination"</nowiki>


print "Error termination"
<nowiki>print "Error termination"</nowiki>


}
}
Line 66: Line 66:




END{
<nowiki>END{</nowiki>


print "    b3lyp  ", " zpe corrected ", " Free energy "
<nowiki>print "    b3lyp  ", " zpe corrected ", " Free energy "</nowiki>


print b3lyp, zero, free
<nowiki>print b3lyp, zero, free</nowiki>


}</nowiki>
}
----
----

Revision as of 14:34, 22 July 2009

go back to Main Page, Computational Resources, Scripts

This is an AWK script.

The following script will go through a Gaussian output looking for the b3lyp energy (written in the output line where E(RB+HF-LYP) appears), the zero point corrected energy (it is written in the same line as zero-point) and Free energy (written in the output line containing Free). If the calculation finished correctly Normal termination will appear on the screen, if not Error termination will be printed 4 times.


#!/bin/awk -f

BEGIN {

}


{


{if ($3 == "E(RB+HF-LYP)"){ b3lyp =$5 }

}


{if ($5 == "zero-point"){ zero=$7

}

}


{if ($6 == "Free"){ free=$8

}

}


{if (($1 == "Normal") && ($2 == "termination")){

print "Normal termination"

}

}


{if (($1 == "Error") && ($2 == "termination")){

print "Error termination"

print "Error termination"

print "Error termination"

print "Error termination"

print "Error termination"

}

}

}


END{

print " b3lyp ", " zpe corrected ", " Free energy "

print b3lyp, zero, free

}