Skip to content

mulliken ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceCASTEP log
idmulliken
nameMulliken atomic population
pattern\s*Atomic\sPopulations\s\(Mulliken\).*
endPattern\s*
endPattern2~
xml:basegeomopt/mulliken.xml

Input ​

     Atomic Populations (Mulliken)
     -----------------------------
Species          Ion Spin      s       p       d       f      Total   Charge(e)   Spin(hbar/2)
==============================================================================================
  Si              1   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  1   dn:     0.691   1.309   0.000   0.000   2.000
  Si              2   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  2   dn:     0.691   1.309   0.000   0.000   2.000
  Si              3   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  3   dn:     0.691   1.309   0.000   0.000   2.000
  Si              4   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  4   dn:     0.691   1.309   0.000   0.000   2.000
  Si              5   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  5   dn:     0.691   1.309   0.000   0.000   2.000
  Si              6   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  6   dn:     0.691   1.309   0.000   0.000   2.000
  Si              7   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  7   dn:     0.691   1.309   0.000   0.000   2.000
  Si              8   up:     0.691   1.309   0.000   0.000   2.000     0.000        0.000
                  8   dn:     0.691   1.309   0.000   0.000   2.000
==============================================================================================  

Output text ​

xml
<comment class="example.output" id="mulliken">
      <module cmlx:templateRef="mulliken">
         <list cmlx:templateRef="row" id="row">
            <array dataType="xsd:string" dictRef="cc:elementType" size="8">Si Si Si Si Si Si Si Si</array>
            <array dataType="xsd:integer" dictRef="cc:serial" size="16">1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8</array>
            <array dataType="xsd:string" dictRef="ca:spin" size="16">up dn up dn up dn up dn up dn up dn up dn up dn</array>
            <array dataType="xsd:double" dictRef="ca:orbitalS" size="16">0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691 0.691</array>
            <array dataType="xsd:double" dictRef="ca:orbitalP" size="16">1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309 1.309</array>
            <array dataType="xsd:double" dictRef="ca:orbitalD" size="16">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000</array>
            <array dataType="xsd:double" dictRef="ca:orbitalF" size="16">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000</array>
            <array dataType="xsd:double" dictRef="x:total" size="16">2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000 2.000</array>
            <array dataType="xsd:double" dictRef="x:charge" size="8">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000</array>
            <array dataType="xsd:double" dictRef="x:spin" size="8">0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000</array>
         </list>
      </module>
    </comment>

Template definition ​

xml
<record repeat="4" />
<templateList>  <template pattern=".*up:.*" endPattern=".*dn:.*" endPattern2="~" endOffset="1" repeat="*">    <record>&#123;A,cc:elementType&#125;&#123;I,cc:serial&#125;&#123;A,ca:spin&#125;:&#123;F,ca:orbitalS&#125;&#123;F,ca:orbitalP&#125;&#123;F,ca:orbitalD&#125;&#123;F,ca:orbitalF&#125;&#123;F,x:total&#125;&#123;F,x:charge&#125;&#123;F,x:spin&#125;</record>    <record>&#123;I,cc:serial&#125;&#123;A,ca:spin&#125;:&#123;F,ca:orbitalS&#125;&#123;F,ca:orbitalP&#125;&#123;F,ca:orbitalD&#125;&#123;F,ca:orbitalF&#125;&#123;F,x:total&#125;</record>
        </template>  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='cc:serial']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='cc:elementType']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='ca:spin']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='ca:orbitalS']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='ca:orbitalP']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='ca:orbitalD']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='ca:orbitalF']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='x:total']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='x:charge']" />  <transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='x:spin']" />  <transform process="pullup" repeat="3" xpath=".//cml:scalar" />  <transform process="pullup" repeat="3" xpath=".//cml:array" />  <transform process="delete" xpath=".//cml:array[@dictRef='spin']" />  <transform process="delete" xpath=".//cml:list[count(*)=0]" />  <transform process="delete" xpath=".//cml:list[count(*)=0]" />  <transform process="delete" xpath=".//cml:module[count(*)=0]" />  <transform process="addChild" xpath="." elementName="cml:list" id="row" />  <transform process="addAttribute" xpath=".//cml:list[@id='row']" name="cmlx:templateRef" value="row" />  <transform process="move" xpath=".//cml:array" to=".//cml:list[@cmlx:templateRef='row']" />  <transform process="move" xpath=".//cml:scalar" to=".//cml:list[@cmlx:templateRef='row']" />

    </templateList>