Skip to content

xtb.input ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourcexTB input
idxtb.input
namexTB input
xml:basetopTemplate.xml

Input

$chrg 0

$spin 1

$gfn 2

Output text

xml
<comment class="example.output" id="xtb.input">
        <module id="xtb.input">
            <module cmlx:templateRef="charge">
                <scalar dataType="xsd:integer" dictRef="cc:charge">0</scalar>
            </module>
            <module cmlx:templateRef="spin">
                <scalar dataType="xsd:integer" dictRef="xtb:spinPolarization">1</scalar>
            </module>
        </module>
    </comment>

Template definition

xml
<templateList>  <template id="charge" pattern="\s*\u0024chrg.*" endPattern=".*">    <record>\s*\u0024chrg&#123;I,cc:charge&#125;</record>
        </template>  <template id="spin" pattern="\s*\u0024spin.*" endPattern=".*">    <record>\s*\u0024spin&#123;I,xtb:spinPolarization&#125;</record>
        </template>
    </templateList>
<transform process="pullup" xpath=".//cml:scalar" />
<transform process="delete" xpath=".//cml:list" />