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

cp2k.geometry ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceCP2K xyz geometry
idcp2k.geometry
nameCP2K xyz geometry
xml:basetopTemplate.xml

Input

      3

      O          5.00000000     5.00000000     5.29325000
      H          5.00000000     5.75720000     4.70675000
      H          5.00000000     4.24280000     4.70675000

Output text

xml
<comment class="example.output" id="cp2k.geometry">
      <module cmlx:templateRef="coords">
        <molecule id="initial">
          <atomArray>
            <atom elementType="O" id="a1" x3="5.00000000" y3="5.00000000" z3="5.29325000" />
            <atom elementType="H" id="a2" x3="5.00000000" y3="5.75720000" z3="4.70675000" />
            <atom elementType="H" id="a3" x3="5.00000000" y3="4.24280000" z3="4.70675000" />
          </atomArray>
        </molecule>
      </module>
    </comment>

Template definition

xml
<templateList>  <template id="coords" pattern="\s*[0-9]+\s*$" endPattern="\s*[A-Z][a-z]?\s+\S+\s+\S+\s+\S+.*$\s*" endPattern2="~" endOffset="1">    <record repeat="2" />    <record id="atom" repeat="*" makeArray="true">\s*&#123;A,cc:elementType&#125;\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" />
        </template>
    </templateList>
<transform process="delete" xpath=".//cml:molecule/cml:atomArray/cml:atom/cml:scalar" />
<transform process="pullup" xpath=".//cml:molecule" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="3" />
<transform process="delete" xpath=".//cml:module[count(*)=0]" repeat="2" />