Skip to content

l716.forces ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceGaussian log
idl716.forces
repeat*
pattern\s*\-+\s*$\s*Center\s+Atomic\s+Forces \(Hartrees/Bohr\)\s*
endPattern\s*Cartesian Forces:.*
endOffset1
xml:basel716/l716.forces.xml

Input ​

 -------------------------------------------------------------------
 Center     Atomic                   Forces (Hartrees/Bohr)
 Number     Number              X              Y              Z
 -------------------------------------------------------------------
    1          6           0.000000000    0.000000000    0.000000000
    2          1          -0.000000001   -0.000000002   -0.012566491
    3          1          -0.011847801   -0.000000001    0.004188832
    4          1           0.005923900    0.010260499    0.004188828
    5          1           0.005923903   -0.010260496    0.004188832
 -------------------------------------------------------------------
 Cartesian Forces:  Max     0.012566491 RMS     0.006489308

Output text ​

xml
<comment class="example.output" id="l716.forces">
    <module cmlx:templateRef="l716.forces">
      <list cmlx:lineCount="5" cmlx:templateRef="force">
        <array dataType="xsd:integer" dictRef="x:serial" size="5">1 2 3 4 5</array>
        <array dataType="xsd:integer" dictRef="x:elementType" size="5">6 1 1 1 1</array>
        <list>
          <array dataType="xsd:double" size="3" dictRef="cc:force">0.0 0.0 0.0</array>
          <array dataType="xsd:double" size="3" dictRef="cc:force">-1.0E-9 -2.0E-9 -0.012566491</array>
          <array dataType="xsd:double" size="3" dictRef="cc:force">-0.011847801 -1.0E-9 0.004188832</array>
          <array dataType="xsd:double" size="3" dictRef="cc:force">0.0059239 0.010260499 0.004188828</array>
          <array dataType="xsd:double" size="3" dictRef="cc:force">0.005923903 -0.010260496 0.004188832</array>
        </list>
      </list>
      <list cmlx:templateRef="cartesianforce">
        <scalar dataType="xsd:double" dictRef="cc:maxforce">0.012566491</scalar>
        <scalar dataType="xsd:double" dictRef="cc:rmsforce">0.006489308</scalar>
      </list>
    </module>
  </comment>

Template definition ​

xml
<record repeat="4" />
<record repeat="*" id="force" makeArray="true">\s*&#123;I,x:serial&#125;&#123;I,x:elementType&#125;&#123;3F,cc:force&#125;\s*</record>
<record />
<record id="cartesianforce">\s*Cartesian Forces:\s+Max&#123;F,cc:maxforce&#125;\s*RMS&#123;F,cc:rmsforce&#125;\s*</record>
<transform process="split" xpath=".//cml:array[@dictRef='cc:force']" cols="3" />
<transform process="pullupSingleton" xpath=".//cml:list" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />