Skip to content

header ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceAmber log
idheader
nameAmber header
pattern\s*-{20,}.*$\s*Amber.*$\s*-{20,}.*
endPattern\s*\|\s*Run\son.*
endOffset1
xml:baseheader.xml

Input ​

          -------------------------------------------------------
          Amber 18 PMEMD                              2018
          -------------------------------------------------------

| PMEMD implementation of SANDER, Release 18

| Run on 02/11/2021 at 12:01:11

Output text ​

xml
<comment class="example.output" id="header">   
        <module cmlx:templateRef="header">
           <scalar dataType="xsd:string" dictRef="cc:program">Amber</scalar>
           <scalar dataType="xsd:string" dictRef="cc:programVersion">18</scalar>
           <scalar dataType="xsd:date" dictRef="cc:runDate">2021-11-16T11:14:57.000</scalar>           
        </module>
    </comment>

Template definition ​

xml
<record />
<record>\s*&#123;A,cc:program&#125;&#123;A,cc:programVersion&#125;.*</record>
<templateList>  <template id="rundate" pattern="\s*\|\s*Run\son.*" enPattern=".*" endPattern2="~">    <record>\s*\|\s*Run\son&#123;X,cc:runDate&#125;</record>
        </template>
    </templateList>
<transform process="createDate" xpath=".//cml:scalar[@dictRef='cc:runDate']" format="MM/dd/yyyy 'at' HH:mm:ss" />
<transform process="pullup" xpath=".//cml:scalar" repeat="2" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:molecule[count(*)=0]" />