You are viewing the documentation of a previous ioChem-BD version (v4, legacy).ioChem-BD v4 legacy docs.Visit the current documentationCurrent docs
Skip to content

coordinates ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceCP2K log
idcoordinates
nameAtomic coordinates in angstrom
pattern\s+MODULE \w+: ATOMIC COORDINATES IN ANGSTROM.*
endPattern\s+\d+\s+\d+\s+[A-Z][a-z]?\s+\d+\s+\S+\s+\S+\s+\S+.*$\s*
endOffset1
repeat*
keepfirst
xml:basesystem/coordinates.xml

Input

      MODULE QUICKSTEP: ATOMIC COORDINATES IN ANGSTROM

        Atom Kind Element         X             Y             Z       Z(eff)     Mass
           1    1 O     8      5.000000      5.000000      5.293250   6.0000  15.9994
           2    2 H     1      5.000000      5.757200      4.706750   1.0000   1.0079
           3    2 H     1      5.000000      4.242800      4.706750   1.0000   1.0079

Input

      MODULE FIST: ATOMIC COORDINATES IN ANGSTROM

        Atom Kind Name            X             Y             Z       q(eff)     Mass
           1    1 O            1.492726      1.628840      1.618519  -0.8200  15.9994
           2    2 H            2.194766      1.816823      0.994712   0.4100   1.0079
           3    2 H            1.388425      0.677456      1.582133   0.4100   1.0079
           4    1 O            1.567725      1.554542      4.773790  -0.8200  15.9994

Output text

xml
<comment class="example.output" id="coordinates">
      <module cmlx:templateRef="coordinates">
        <list cmlx:templateRef="missingID" />
        <molecule id="initial">
          <atomArray>
            <atom elementType="O" id="a1" x3="5.0000" y3="5.0000" z3="5.29325">
              <scalar dataType="xsd:integer" dictRef="cc:atomicNumber">8</scalar>
            </atom>
            <atom elementType="H" id="a2" x3="5.0000" y3="5.7572" z3="4.70675">
              <scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
            </atom>
            <atom elementType="H" id="a3" x3="5.0000" y3="4.2428" z3="4.70675">
              <scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
            </atom>
          </atomArray>
          <bondArray>
            <bond atomRefs2="a1 a2" order="S" />
            <bond atomRefs2="a1 a3" order="S" />
          </bondArray>
          <formula concise="H2O">
            <atomArray count="2 1" elementType="H O" />
          </formula>
          <property dictRef="cml:molmass">
            <scalar units="unit:dalton">15.9994</scalar>
          </property>
        </molecule>
      </module>
    </comment>

Template definition

xml
<record repeat="3" />
<record id="atom" repeat="*" makeArray="true">\s+\d+\s+\d+\s+&#123;A,cc:elementType&#125;\s+\d+\s+&#123;E,cc:x3&#125;\s+&#123;E,cc:y3&#125;\s+&#123;E,cc:z3&#125;.*</record>
<transform process="createMolecule" id="initial" xpath=".//cml:list[@cmlx:templateRef='atom']/cml:array" />
<transform process="pullup" xpath=".//cml:molecule" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="3" />