Skip to content

dipole ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourcexTB log
iddipole
nameMolecular dipole
pattern\s*molecular\sdipole.*
endPatternmolecular.*
endPattern2\s*
endOffset0
xml:baseproperties/dipole.xml

Input

molecular dipole:
                 x           y           z       tot (Debye)
 q only:        0.000       0.000       0.201
   full:        0.000       0.000       0.255       0.647
molecular quadrupole (traceless):

Output text

xml
<comment class="example.output" id="properties">
        <module cmlx:templateRef="dipole">
            <array dataType="xsd:double" dictRef="xtb:dipoleq" size="3">0.000 0.000 0.201</array>
            <array dataType="xsd:double" dictRef="xtb:dipolef" size="3">0.000 0.000 0.255</array>
            <scalar dataType="xsd:double" dictRef="xtb:dipoletot" units="nonsi2:debye">0.647</scalar>
         </module>
    </comment>

Template definition

xml
<record repeat="2" />
<record>\s*q\sonly:&#123;1_3F, xtb:dipoleq&#125;</record>
<record>\s*full:&#123;1_3F, xtb:dipolef&#125;&#123;F,xtb:dipoletot&#125;</record>
<transform process="addUnits" xpath=".//cml:scalar[@dictRef='xtb:dipoletot']" value="nonsi2:debye" />
<transform process="move" xpath=".//cml:array" to="." />
<transform process="move" xpath=".//cml:scalar" to="." />
<transform process="delete" xpath=".//cml:list" />