header ​
Implementation level ​
Type | Status |
---|---|
CML extraction template | |
HTML5 representation |
Template attributes ​
Attribute | Value |
---|---|
source | Amber log |
id | header |
name | Amber header |
pattern | \s*-{20,}.*$\s*Amber.*$\s*-{20,}.* |
endPattern | \s*\|\s*Run\son.* |
endOffset | 1 |
xml:base | header.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*{A,cc:program}{A,cc:programVersion}.*</record>
<templateList> <template id="rundate" pattern="\s*\|\s*Run\son.*" enPattern=".*" endPattern2="~"> <record>\s*\|\s*Run\son{X,cc:runDate}</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]" />