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

Implementation level ​

TypeStatus
CML extraction template
HTML5 representation

Template attributes ​

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

Input

      &GLOBAL
        PROJECT water_energy
        RUN_TYPE ENERGY
        PRINT_LEVEL MEDIUM
      &END GLOBAL

      &FORCE_EVAL
        METHOD QUICKSTEP
        &DFT
          CHARGE 0
          MULTIPLICITY 1
          &XC_FUNCTIONAL PBE
          &END XC_FUNCTIONAL
          &SCCS
            DIELECTRIC_CONSTANT 78.36
          &END SCCS
        &END DFT
        &SUBSYS
          &CELL
            ABC 10.0 10.0 10.0
            PERIODIC NONE
          &END CELL
          &COORD
            O      0.00000000     0.00000000     0.11730000
            H      0.00000000     0.75720000    -0.46920000
            H      0.00000000    -0.75720000    -0.46920000
          &END COORD
          &KIND O
            BASIS_SET DZVP-MOLOPT-GTH
            POTENTIAL GTH-PBE-q6
          &END KIND
        &END SUBSYS
      &END FORCE_EVAL

Output text

xml
<comment class="example.output" id="cp2k.input">
      <module id="cp2k.input">
        <module cmlx:templateRef="project">
          <list><scalar dataType="xsd:string" dictRef="cp2k:projectName">water_energy</scalar></list>
        </module>
        <module cmlx:templateRef="runType">
          <list><scalar dataType="xsd:string" dictRef="cp2k:runType">ENERGY</scalar></list>
        </module>
        <module cmlx:templateRef="charge">
          <list><scalar dataType="xsd:integer" dictRef="cc:charge">0</scalar></list>
        </module>
        <module cmlx:templateRef="xcFunctional">
          <list><scalar dataType="xsd:string" dictRef="cp2k:xcFunctional">PBE</scalar></list>
        </module>
        <module cmlx:templateRef="sccs">
          <list><scalar dataType="xsd:double" dictRef="cp2k:sccsPermittivity">78.36</scalar></list>
        </module>
        <module cmlx:templateRef="kind">
          <list><scalar dataType="xsd:string" dictRef="cc:elementType">O</scalar></list>
          <list><scalar dataType="xsd:string" dictRef="cp2k:basisSet">DZVP-MOLOPT-GTH</scalar></list>
          <list><scalar dataType="xsd:string" dictRef="cp2k:potential">GTH-PBE-q6</scalar></list>
        </module>
      </module>
    </comment>

Template definition

xml
<templateList>  <template id="project" pattern="\s*PROJECT\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*PROJECT\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="printLevel" pattern="\s*PRINT_LEVEL\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*PRINT_LEVEL\s+&#123;A,cp2k:printLevel&#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="qsMethod" pattern="\s*METHOD\s+(GPW|GAPW|LRGPW|XTB)\s*$" endPattern=".*" endPattern2="~">    <record>\s*METHOD\s+&#123;A,cp2k:qsMethod&#125;\s*</record>
        </template>  <template id="charge" pattern="\s*CHARGE\s+[+-]?[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*CHARGE\s+&#123;I,cc:charge&#125;\s*</record>
        </template>  <template id="multiplicity" pattern="\s*MULTIPLICITY\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*MULTIPLICITY\s+&#123;I,cc:multiplicity&#125;\s*</record>
        </template>  <template id="uks" pattern="\s*UKS\s+.*" endPattern=".*" endPattern2="~">    <record>\s*UKS\s+&#123;A,cp2k:uks&#125;\s*</record>
        </template>  <template id="xcFunctional" pattern="\s*&XC_FUNCTIONAL\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*&XC_FUNCTIONAL\s+&#123;A,cp2k:xcFunctional&#125;\s*</record>
        </template>  <template id="dispersion" pattern="\s*PAIR_POTENTIAL_TYPE\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*PAIR_POTENTIAL_TYPE\s+&#123;A,cp2k:dispersion&#125;\s*</record>
        </template>  <template id="pairPotential" pattern="\s*&PAIR_POTENTIAL\s*$" endPattern="\s*&END.*" endPattern2="~" repeat="*" keep="first">    <comment class="example.input" id="pairPotential">
              &PAIR_POTENTIAL
                TYPE DFTD3
                PARAMETER_FILE_NAME dftd3.dat
                REFERENCE_FUNCTIONAL PBE
              &END PAIR_POTENTIAL
            </comment>    <record id="type">\s*TYPE\s+&#123;A,cp2k:dispersion&#125;\s*</record>    <transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="2" />    <transform process="delete" xpath=".//cml:module[count(*)=0]" />    <comment class="example.output" id="pairPotential">      <module cmlx:templateRef="pairPotential">        <list cmlx:templateRef="type">          <scalar dataType="xsd:string" dictRef="cp2k:dispersion">DFTD3</scalar>
                </list>
              </module>
            </comment>
        </template>  <template id="sccs" pattern="\s*DIELECTRIC_CONSTANT\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*DIELECTRIC_CONSTANT\s+&#123;E,cp2k:sccsPermittivity&#125;\s*</record>
        </template>  <template id="cutoff" pattern="\s*CUTOFF\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*CUTOFF\s+&#123;E,cp2k:cutoff&#125;\s*</record>
        </template>  <template id="relCutoff" pattern="\s*REL_CUTOFF\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*REL_CUTOFF\s+&#123;E,cp2k:relCutoff&#125;\s*</record>
        </template>  <template id="scfGuess" pattern="\s*SCF_GUESS\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*SCF_GUESS\s+&#123;A,cp2k:scfGuess&#125;\s*</record>
        </template>  <template id="epsScf" pattern="\s*EPS_SCF\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*EPS_SCF\s+&#123;E,cp2k:epsScf&#125;\s*</record>
        </template>  <template id="maxScf" pattern="\s*MAX_SCF\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*MAX_SCF\s+&#123;I,cp2k:maxScf&#125;\s*</record>
        </template>  <template id="kpointGrid" pattern="\s*SCHEME\s+\S+\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*SCHEME\s+&#123;A,cp2k:kpointScheme&#125;\s+&#123;1_3I,cp2k:kpointGrid&#125;\s*</record>
        </template>  <template id="kpointScheme" pattern="\s*SCHEME\s+\S+\s*$" endPattern=".*" endPattern2="~">    <record>\s*SCHEME\s+&#123;A,cp2k:kpointScheme&#125;\s*</record>
        </template>  <template id="nstates" pattern="\s*NSTATES\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*NSTATES\s+&#123;I,cp2k:nstates&#125;\s*</record>
        </template>  <template id="ensemble" pattern="\s*ENSEMBLE\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*ENSEMBLE\s+&#123;A,cp2k:ensemble&#125;\s*</record>
        </template>  <template id="mdSteps" pattern="\s*STEPS\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*STEPS\s+&#123;I,cp2k:mdSteps&#125;\s*</record>
        </template>  <template id="timestep" pattern="\s*TIMESTEP\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*TIMESTEP\s+&#123;E,cp2k:timestep&#125;\s*</record>
        </template>  <template id="temperature" pattern="\s*TEMPERATURE\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*TEMPERATURE\s+&#123;E,cp2k:mdTemperature&#125;\s*</record>
        </template>  <template id="thermostatType" pattern="\s*&THERMOSTAT\s*$" endPattern="\s*&END.*" endPattern2="~" repeat="*" keep="first">    <comment class="example.input" id="thermostatType">
              &THERMOSTAT
                TYPE CSVR
                TIMECON 50.0
              &END THERMOSTAT
            </comment>    <record id="type">\s*TYPE\s+&#123;A,cp2k:thermostatType&#125;\s*</record>    <transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="2" />    <transform process="delete" xpath=".//cml:module[count(*)=0]" />    <comment class="example.output" id="thermostatType">      <module cmlx:templateRef="thermostatType">        <list cmlx:templateRef="type">          <scalar dataType="xsd:string" dictRef="cp2k:thermostatType">CSVR</scalar>
                </list>
              </module>
            </comment>
        </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="maxIter" pattern="\s*MAX_ITER\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*MAX_ITER\s+&#123;I,cp2k:maxIter&#125;\s*</record>
        </template>  <template id="bandType" pattern="\s*BAND_TYPE\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*BAND_TYPE\s+&#123;A,cp2k:bandType&#125;\s*</record>
        </template>  <template id="replicas" pattern="\s*NUMBER_OF_REPLICA\s+[0-9]+.*" endPattern=".*" endPattern2="~">    <record>\s*NUMBER_OF_REPLICA\s+&#123;I,cp2k:nreplicas&#125;\s*</record>
        </template>  <template id="extRestart" pattern="\s*RESTART_FILE_NAME\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*RESTART_FILE_NAME\s+&#123;A,cp2k:extRestartFileName&#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="cellAngles" pattern="\s*ANGLES\s+[0-9].*" endPattern=".*" endPattern2="~">    <record>\s*ANGLES\s+&#123;1_3E,cp2k:cellAngles&#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="coordFile" pattern="\s*COORD_FILE_NAME\s+\S+.*" endPattern=".*" endPattern2="~">    <record>\s*COORD_FILE_NAME\s+&#123;A,cp2k:coordFileName&#125;\s*</record>
        </template>  <template id="kind" pattern="\s*&KIND\s+\S+.*" endPattern="\s*&END.*" endPattern2="~" repeat="*">    <record id="kind">\s*&KIND\s+"?&#123;A,cc:elementType&#125;"?\s*$</record>    <record id="element">\s*ELEMENT\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="inputCoord" pattern="\s*&COORD\s*$" endPattern="\s*&END.*" 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="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" />
        </template>

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