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.restart ​

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

AttributeValue
sourceCP2K restart
idcp2k.restart
nameCP2K restart
xml:basetopTemplate.xml

Input

      &GLOBAL
        PROJECT_NAME "methanol_opt"
        RUN_TYPE GEO_OPT
      &END GLOBAL
      &MOTION
        &GEO_OPT
          OPTIMIZER BFGS
          STEP_START_VAL 13
        &END GEO_OPT
      &END MOTION
      &FORCE_EVAL
        METHOD QS
        &SUBSYS
          &CELL
            A  1.2000000000000000E+001  0.0000000000000000E+000  0.0000000000000000E+000
            B  0.0000000000000000E+000  1.2000000000000000E+001  0.0000000000000000E+000
            C  0.0000000000000000E+000  0.0000000000000000E+000  1.2000000000000000E+001
            PERIODIC NONE
          &END CELL
          &COORD
            C  6.1329810662722677E+000  6.7100170444650482E+000  6.0051468002038053E+000
            O  6.0797519134597193E+000  5.2793631006749973E+000  6.0000190147312367E+000
          &END COORD
        &END SUBSYS
      &END FORCE_EVAL

Output text

xml
<comment class="example.output" id="cp2k.restart">
      <module id="cp2k.restart">
        <module cmlx:templateRef="runType">
          <list><scalar dataType="xsd:string" dictRef="cp2k:runType">GEO_OPT</scalar></list>
        </module>
        <module cmlx:templateRef="stepStartVal">
          <list><scalar dataType="xsd:integer" dictRef="cp2k:stepStartVal">13</scalar></list>
        </module>
        <module cmlx:templateRef="restartCoord">
          <molecule id="final">
            <atomArray>
              <atom elementType="C" id="a1" x3="6.1329810662722677E+000" y3="6.7100170444650482E+000" z3="6.0051468002038053E+000" />
              <atom elementType="O" id="a2" x3="6.0797519134597193E+000" y3="5.2793631006749973E+000" z3="6.0000190147312367E+000" />
            </atomArray>
          </molecule>
        </module>
      </module>
    </comment>

Template definition

xml
<templateList>  <template id="projectName" pattern="\s*PROJECT_NAME\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*PROJECT_NAME\s+"?&#123;A,cp2k:projectName&#125;"?\s*</record>
        </template>  <template id="runType" pattern="\s*RUN_TYPE\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*RUN_TYPE\s+&#123;A,cp2k:runType&#125;\s*</record>
        </template>  <template id="stepStartVal" pattern="\s*STEP_START_VAL\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*STEP_START_VAL\s+&#123;I,cp2k:stepStartVal&#125;\s*</record>
        </template>  <template id="method" pattern="\s*METHOD\s+(QUICKSTEP|FIST|QMMM|QS|MM)\s*$" endPattern=".*" endPattern2="~">    <record>\s*METHOD\s+&#123;A,cp2k:method&#125;\s*</record>
        </template>  <template id="optimizer" pattern="\s*OPTIMIZER\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*OPTIMIZER\s+&#123;A,cp2k:optimizer&#125;\s*</record>
        </template>  <template id="cellABC" pattern="\s*ABC\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*ABC\s+&#123;1_3E,cp2k:cellABC&#125;\s*</record>
        </template>  <template id="vectorA" pattern="\s*A\s+[+-]?[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*A\s+&#123;E,cp2k:cellAx&#125;\s+&#123;E,cp2k:cellAy&#125;\s+&#123;E,cp2k:cellAz&#125;\s*</record>
        </template>  <template id="vectorB" pattern="\s*B\s+[+-]?[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*B\s+&#123;E,cp2k:cellBx&#125;\s+&#123;E,cp2k:cellBy&#125;\s+&#123;E,cp2k:cellBz&#125;\s*</record>
        </template>  <template id="vectorC" pattern="\s*C\s+[+-]?[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*C\s+&#123;E,cp2k:cellCx&#125;\s+&#123;E,cp2k:cellCy&#125;\s+&#123;E,cp2k:cellCz&#125;\s*</record>
        </template>  <template id="periodic" pattern="\s*PERIODIC\s+(NONE|XYZ|XY|XZ|YZ|X|Y|Z)\s*$" endPattern=".*" endPattern2="~">    <record>\s*PERIODIC\s+&#123;A,cp2k:periodicity&#125;\s*</record>
        </template>  <template id="kind" pattern="\s*&KIND\s+\S+.*" endPattern="\s*&END KIND.*" endPattern2="~" repeat="*">    <record id="kind">\s*&KIND\s+"?&#123;A,cc:elementType&#125;"?\s*$</record>    <record id="basis">\s*BASIS_SET\s+&#123;A,cp2k:basisSet&#125;\s*</record>    <record id="potential">\s*POTENTIAL\s+&#123;A,cp2k:potential&#125;\s*</record>    <transform process="pullup" xpath=".//cml:scalar" repeat="2" />    <transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="2" />    <transform process="delete" xpath=".//cml:module[count(*)=0]" />
        </template>  <template id="restartCoord" pattern="\s*&COORD\s*$" endPattern="\s*&END COORD.*" endPattern2="~">    <record repeat="1" />    <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="final" xpath=".//cml:list[@cmlx:templateRef='atom']/cml:array" />    <transform process="pullup" xpath=".//cml:molecule" />    <transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="3" />
        </template>

    </templateList>
<transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="3" />
<transform process="delete" xpath=".//cml:module[count(*)=0]" repeat="2" />