Skip to content

cell ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceCASTEP log
idcell
pattern\s*\-{10,}.*$\s*Unit\sCell.*
endPattern\s*$\s*\-{10,}
endPattern2\s*LBFGS:\sFinal\sEnthalpy.*
endOffset0
xml:basesetup/cell.xml

Input ​

                           -------------------------------
                                      Unit Cell
                           -------------------------------
        Real Lattice(A)                      Reciprocal Lattice(1/A)
     5.5064821     0.0000000     0.0000000        1.141052528  -0.000000000  -0.000000000
     0.0000000     5.5064821     0.0000000       -0.000000000   1.141052528  -0.000000000
     0.0000000     0.0000000     5.5064821       -0.000000000  -0.000000000   1.141052528
 
                       Lattice parameters(A)       Cell Angles
                    a =      5.506482          alpha =   90.000000
                    b =      5.506482          beta  =   90.000000
                    c =      5.506482          gamma =   90.000000
 
                       Current cell volume =           166.963943       A**3
                                   density =             1.345680   AMU/A**3
                                           =             2.234554     g/cm^3
 
                           -------------------------------

Output text ​

xml
<comment class="example.output" id="cell">>
        <module cmlx:templateRef="cell">
            <module cmlx:templateRef="lattice">
               <list dictRef="ca:axis" id="axis">
                  <array dataType="xsd:double" dictRef="cc:latticeA" size="3" units="nonsi:angstrom">5.5064821 0.0000000 0.0000000</array>
                  <array dataType="xsd:double" dictRef="cc:latticeB" size="3" units="nonsi:angstrom">0.0000000 5.5064821 0.0000000</array>
                  <array dataType="xsd:double" dictRef="cc:latticeC" size="3" units="nonsi:angstrom">0.0000000 0.0000000 5.5064821</array>
               </list>
               <list id="abc">
                  <scalar dataType="xsd:double" dictRef="cc:cell.a" units="nonsi:angstrom">5.506482</scalar>
                  <scalar dataType="xsd:double" dictRef="cc:cell.b" units="nonsi:angstrom">5.506482</scalar>
                  <scalar dataType="xsd:double" dictRef="cc:cell.c" units="nonsi:angstrom">5.506482</scalar>
               </list>
               <list id="alphabeta">
                  <scalar dataType="xsd:double" dictRef="cc:cell.alpha">90.000000</scalar>
                  <scalar dataType="xsd:double" dictRef="cc:cell.beta">90.000000</scalar>
                  <scalar dataType="xsd:double" dictRef="cc:cell.gamma">90.000000</scalar>
               </list>
            </module>
        </module>     
    </comment>

Template definition ​

xml
<templateList>  <template id="lattice" pattern="\s*Unit\sCell.*" endPattern="\s*$\s*\-&#123;10,&#125;.*" endPattern2="~">    <record repeat="3" />    <record>&#123;3F,cc:latticeA&#125;.*</record>    <record>&#123;3F,cc:latticeB&#125;.*</record>    <record>&#123;3F,cc:latticeC&#125;.*</record>    <record repeat="1" />    <record>\s*a\s*=&#123;F,cc:cell.a&#125;alpha\s*=&#123;F,cc:cell.alpha&#125;</record>    <record>\s*b\s*=&#123;F,cc:cell.b&#125;beta\s*=&#123;F,cc:cell.beta&#125;</record>    <record>\s*c\s*=&#123;F,cc:cell.c&#125;gamma\s*=&#123;F,cc:cell.gamma&#125;</record>    <transform process="addChild" xpath="." elementName="cml:list" id="axis" />    <transform process="addChild" xpath="." elementName="cml:list" id="abc" />    <transform process="addChild" xpath="." elementName="cml:list" id="alphabeta" />    <transform process="addAttribute" xpath=".//cml:list[@id='axis']" name="dictRef" value="ca:axis" />    <transform process="move" xpath=".//cml:array[@dictRef='cc:latticeA']" to=".//cml:list[@id='axis']" />    <transform process="move" xpath=".//cml:array[@dictRef='cc:latticeB']" to=".//cml:list[@id='axis']" />    <transform process="move" xpath=".//cml:array[@dictRef='cc:latticeC']" to=".//cml:list[@id='axis']" />    <transform process="move" xpath=".//cml:scalar[@dictRef='cc:cell.a']" to=".//cml:list[@id='abc']" />    <transform process="move" xpath=".//cml:scalar[@dictRef='cc:cell.b']" to=".//cml:list[@id='abc']" />    <transform process="move" xpath=".//cml:scalar[@dictRef='cc:cell.c']" to=".//cml:list[@id='abc']" />    <transform process="move" xpath=".//cml:scalar[@dictRef='cc:cell.alpha']" to=".//cml:list[@id='alphabeta']" />    <transform process="move" xpath=".//cml:scalar[@dictRef='cc:cell.beta']" to=".//cml:list[@id='alphabeta']" />    <transform process="move" xpath=".//cml:scalar[@dictRef='cc:cell.gamma']" to=".//cml:list[@id='alphabeta']" />    <transform process="delete" xpath=".//cml:list[count(*) = 0]" />    <transform process="delete" xpath=".//cml:list[count(*) = 0]" />    <transform process="addUnits" xpath=".//cml:list[@id='abc']/cml:scalar" value="nonsi:angstrom" />    <transform process="addUnits" xpath=".//cml:array" value="nonsi:angstrom" />
        </template>
        
    </templateList>