Skip to content

header ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceMOPAC log
idheader
nameMOPAC header
pattern\s?\*+\s?$\s?\*+\s?Site#.*
endPattern\s*
endOffset0
repeat*
xml:baseheader.xml

Input ​

 *******************************************************************************
 ** Site#: 24836        For non-commercial use only     Version 16.093L 64BITS**
 *******************************************************************************
 ** Cite this program as: MOPAC2016, Version: 16.093L, James J. P. Stewart,   **
 ** Stewart Computational Chemistry, web: HTTP://OpenMOPAC.net. Days left:  87**
 *******************************************************************************
 **                                                                           **
 **                                MOPAC2016                                  **
 **                                                                           **
 *******************************************************************************

Output text ​

xml
<comment class="example.output" id="header">
        <module cmlx:templateRef="header">
          <scalar dataType="xsd:string" dictRef="cc:programSubversion">16.093L 64BITS</scalar>
          <scalar dataType="xsd:string" dictRef="cc:programVersion">2016</scalar>
       </module>     
    </comment>

Template definition ​

xml
<templateList>  <template id="programLine1" pattern=".*Version.*" endPattern=".*">    <record>.*Version\s+&#123;X,cc:programSubversion&#125;\*\*</record>         
        </template>  <template id="programLine2" pattern="\s?\*\*\s+MOPAC.*" endPattern=".*">    <record>\s?\*\*\s+MOPAC&#123;X,cc:programVersion&#125;\s*\*\*</record>           
        </template>
    </templateList>
<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
<transform process="delete" xpath=".//cml:list" />
<transform process="delete" xpath=".//cml:module" />