Skip to content

forces ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceQuantumEspresso log
idforces
nameforces
pattern^\s+Total\s(Dispersion\s)?[Ff]orce.*
endPattern\s*
endOffset0
repeat*
xml:baseforces.xml

Input ​

     Total force =     0.013129     Total SCF correction =     0.000094

Input ​

     Total Dispersion Force =     0.067387

Output text ​

xml
<comment class="example.output" id="force">
        <module cmlx:templateRef="forces">        
            <scalar dataType="xsd:double" dictRef="cc:force" units="nonsi2:ev.angstrom-1">0.3375602847997187</scalar>
            <scalar dataType="xsd:double" dictRef="qex:scfCorrection" units="nonsi2:ev.angstrom-1">0.002416838050969119</scalar>                        
        </module>
    </comment>

Output text ​

xml
<comment class="example.output" id="force2">
        <module cmlx:templateRef="forces">
            <scalar dataType="xsd:double" dictRef="qex:dispenergy" units="nonsi2:ev.angstrom-1">1.7325900610708087</scalar>
        </module>
    </comment>

Template definition ​

xml
<template pattern="\s*Total\sforce.*" endPattern="~">  <record>\s*Total\sforce\s=&#123;F,cc:force&#125;Total SCF correction =&#123;F,qex:scfCorrection&#125;</record>  <transform process="pullup" xpath=".//cml:scalar" repeat="1" />  <transform process="operateScalar" xpath=".//cml:scalar" args="operator=multiply operand=25.71104309541616" />  <transform process="addUnits" xpath=".//cml:scalar" value="nonsi2:ev.angstrom-1" />         
    </template>
<template pattern="\s*Total\sDispersion\sForce.*" endPattern="~">  <record>\s*Total\sDispersion\sForce\s*=&#123;F,qex:dispenergy&#125;</record>  <transform process="operateScalar" xpath=".//cml:scalar" args="operator=multiply operand=25.71104309541616" />  <transform process="addUnits" xpath=".//cml:scalar" value="nonsi2:ev.angstrom-1" />
    </template>
<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
<transform process="delete" xpath=".//cml:module" />