totals ​
Implementation level ​
| Type | Status |
|---|---|
| CML extraction template | |
| HTML5 representation |
Template attributes ​
| Attribute | Value |
|---|---|
| source | xTB log |
| id | totals |
| name | Total energies box |
| pattern | \s*-{10,}\s*$\s*\|\s*TOTAL\sENERGY\s.* |
| endPattern | \s*-{10,}\s* |
| endOffset | 1 |
| repeat | * |
| xml:base | totals.xml |
Input
-------------------------------------------------
| TOTAL ENERGY -5.070201851499 Eh |
| TOTAL ENTHALPY -5.046994809530 Eh |
| TOTAL FREE ENERGY -5.068414209106 Eh |
| GRADIENT NORM 0.016847435283 Eh/a |
| HOMO-LUMO GAP 13.764660320819 eV |
-------------------------------------------------
Output text
xml
<comment class="example.output" id="totals">
<module cmlx:templateRef="totals">
<scalar dataType="xsd:double" dictRef="xtb:energy" units="nonsi:hartree">-5.070201851499</scalar>
<scalar dataType="xsd:double" dictRef="xtb:totalenthalpy" units="nonsi:hartree">-5.046994809530</scalar>
<scalar dataType="xsd:double" dictRef="xtb:totalfreeenergy" units="nonsi:hartree">-5.068414209106</scalar>
<scalar dataType="xsd:double" dictRef="xtb:gradientnorm" units="nonsi2:hartree.bohr-1">0.016847435283</scalar>
<scalar dataType="xsd:double" dictRef="xtb:homolumogap" units="nonsi:electronvolt">13.764660320819</scalar>
</module>
</comment>Template definition
xml
<template id="totalEnergy" pattern="\s*\|\s*TOTAL\sENERGY\s.*" endPattern=".*"> <record>\s*\|\s*TOTAL\sENERGY{F,xtb:energy}.*</record> <transform process="addUnits" xpath=".//cml:scalar" value="nonsi:hartree" />
</template>
<template id="totalEnthalpy" pattern="\s*\|\s*TOTAL\sENTHALPY\s.*" endPattern=".*"> <record>\s*\|\s*TOTAL\sENTHALPY{F,xtb:totalenthalpy}.*</record> <transform process="addUnits" xpath=".//cml:scalar" value="nonsi:hartree" />
</template>
<template id="totalFreeEnergy" pattern="\s*\|\s*TOTAL\sFREE\sENERGY\s.*" endPattern=".*"> <record>\s*\|\s*TOTAL\sFREE\sENERGY{F,xtb:totalfreeenergy}.*</record> <transform process="addUnits" xpath=".//cml:scalar" value="nonsi:hartree" />
</template>
<template id="gradientNorm" pattern="\s*\|\s*GRADIENT\sNORM\s.*" endPattern=".*"> <record>\s*\|\s*GRADIENT\sNORM{F,xtb:gradientnorm}.*</record> <transform process="addUnits" xpath=".//cml:scalar" value="nonsi2:hartree.bohr-1" />
</template>
<template id="homolumo" pattern="\s*\|\s*HOMO-LUMO\sGAP\s.*" endPattern=".*"> <record>\s*\|\s*HOMO-LUMO\sGAP{F,xtb:homolumogap}.*</record> <transform process="addUnits" xpath=".//cml:scalar" value="nonsi:electronvolt" />
</template>
<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:module[count(*)=0]" />