Skip to content

thermochemistry ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceTurbomole log
idthermochemistry
nameThermochemistry from free entalphy program
pattern\s*\-{10,}.*$\s*your\s*wishes\s*are\s*:
endPattern\s*tstart=.*
endOffset1
xml:basethermochemistry.xml

Input ​

          ------------------
           your wishes are :
          ------------------

  pstart=  0.1000      pend=  0.1000      nump=   1

  tstart=   298.1      tend=   298.1      numt=   1

Output text ​

xml
<comment class="example.output" id="thermochemistry">
    <module cmlx:templateRef="thermochemistry">
        <scalar dataType="xsd:double" dictRef="t:press.start" units="nonsi:bar">1.0</scalar>
        <scalar dataType="xsd:double" dictRef="t:press.end" units="nonsi:bar">1.0</scalar>
        <scalar dataType="xsd:double" dictRef="t:temp.start" units="si:k">298.1</scalar>
        <scalar dataType="xsd:double" dictRef="t:temp.end" units="si:k">298.1</scalar>
    </module>
  </comment>

Template definition ​

xml
<record repeat="4" />
<record id="press">\s*pstart=&#123;F,t:press.start&#125;pend=&#123;F,t:press.end&#125;.*</record>
<record repeat="1" />
<record id="temp">\s*tstart=&#123;F,t:temp.start&#125;tend=&#123;F,t:temp.end&#125;.*</record>
<transform process="operateScalar" xpath=".//cml:list[@cmlx:templateRef='press']//cml:scalar" args="operator=multiply operand=10" />
<transform process="addUnits" xpath=".//cml:list[@cmlx:templateRef='temp']//cml:scalar" value="si:k" />
<transform process="addUnits" xpath=".//cml:list[@cmlx:templateRef='press']//cml:scalar" value="nonsi:bar" />
<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />