Skip to content

l1.keywords ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceGaussian log
idl1.keywords
pattern\s*\-+\s*$.*
endPattern\s*\-+\s*
endOffset1
xml:basel1/l1.keywords.xml

Input ​

 --------------------------
 #N B3LYP/6-31G(d) OPT FREQ
 --------------------------

Output text ​

xml
<comment class="example.output" id="l1.keywords">
    <module cmlx:templateRef="l1.keywords">
      <scalar dataType="xsd:string" dictRef="cc:keyword">#N</scalar>
      <scalar dataType="xsd:string" dictRef="cc:keyword">B3LYP/6-31G(d)</scalar>
      <scalar dataType="xsd:string" dictRef="cc:keyword">OPT</scalar>
      <scalar dataType="xsd:string" dictRef="cc:keyword">FREQ</scalar>
    </module>
  </comment>

Template definition ​

xml
<record />
<record id="prog" repeat="*">&#123;X,cc:keywords&#125;</record>
<transform process="delete" xpath=".//cml:scalar[contains(.,'------')]" />
<transform process="delete" xpath=".//cml:scalar[string-length(.)=0]" />
<transform process="pullup" xpath=".//cml:scalar" />
<transform process="split" xpath="./cml:scalar" dictRef="cc:keyword" />
<transform process="pullup" xpath=".//cml:scalar" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />