cp2k.input ​
Implementation level ​
| Type | Status |
|---|---|
| CML extraction template | |
| HTML5 representation |
Template attributes ​
| Attribute | Value |
|---|---|
| source | CP2K input |
| id | cp2k.input |
| name | CP2K input |
| xml:base | topTemplate.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+{A,cp2k:projectName}\s*</record>
</template> <template id="runType" pattern="\s*RUN_TYPE\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*RUN_TYPE\s+{A,cp2k:runType}\s*</record>
</template> <template id="printLevel" pattern="\s*PRINT_LEVEL\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*PRINT_LEVEL\s+{A,cp2k:printLevel}\s*</record>
</template> <template id="method" pattern="\s*METHOD\s+(QUICKSTEP|FIST|QMMM|QS|MM)\s*$" endPattern=".*" endPattern2="~"> <record>\s*METHOD\s+{A,cp2k:method}\s*</record>
</template> <template id="qsMethod" pattern="\s*METHOD\s+(GPW|GAPW|LRGPW|XTB)\s*$" endPattern=".*" endPattern2="~"> <record>\s*METHOD\s+{A,cp2k:qsMethod}\s*</record>
</template> <template id="charge" pattern="\s*CHARGE\s+[+-]?[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*CHARGE\s+{I,cc:charge}\s*</record>
</template> <template id="multiplicity" pattern="\s*MULTIPLICITY\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*MULTIPLICITY\s+{I,cc:multiplicity}\s*</record>
</template> <template id="uks" pattern="\s*UKS\s+.*" endPattern=".*" endPattern2="~"> <record>\s*UKS\s+{A,cp2k:uks}\s*</record>
</template> <template id="xcFunctional" pattern="\s*&XC_FUNCTIONAL\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*&XC_FUNCTIONAL\s+{A,cp2k:xcFunctional}\s*</record>
</template> <template id="dispersion" pattern="\s*PAIR_POTENTIAL_TYPE\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*PAIR_POTENTIAL_TYPE\s+{A,cp2k:dispersion}\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+{A,cp2k:dispersion}\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+{E,cp2k:sccsPermittivity}\s*</record>
</template> <template id="cutoff" pattern="\s*CUTOFF\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*CUTOFF\s+{E,cp2k:cutoff}\s*</record>
</template> <template id="relCutoff" pattern="\s*REL_CUTOFF\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*REL_CUTOFF\s+{E,cp2k:relCutoff}\s*</record>
</template> <template id="scfGuess" pattern="\s*SCF_GUESS\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*SCF_GUESS\s+{A,cp2k:scfGuess}\s*</record>
</template> <template id="epsScf" pattern="\s*EPS_SCF\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*EPS_SCF\s+{E,cp2k:epsScf}\s*</record>
</template> <template id="maxScf" pattern="\s*MAX_SCF\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*MAX_SCF\s+{I,cp2k:maxScf}\s*</record>
</template> <template id="kpointGrid" pattern="\s*SCHEME\s+\S+\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*SCHEME\s+{A,cp2k:kpointScheme}\s+{1_3I,cp2k:kpointGrid}\s*</record>
</template> <template id="kpointScheme" pattern="\s*SCHEME\s+\S+\s*$" endPattern=".*" endPattern2="~"> <record>\s*SCHEME\s+{A,cp2k:kpointScheme}\s*</record>
</template> <template id="nstates" pattern="\s*NSTATES\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*NSTATES\s+{I,cp2k:nstates}\s*</record>
</template> <template id="ensemble" pattern="\s*ENSEMBLE\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*ENSEMBLE\s+{A,cp2k:ensemble}\s*</record>
</template> <template id="mdSteps" pattern="\s*STEPS\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*STEPS\s+{I,cp2k:mdSteps}\s*</record>
</template> <template id="timestep" pattern="\s*TIMESTEP\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*TIMESTEP\s+{E,cp2k:timestep}\s*</record>
</template> <template id="temperature" pattern="\s*TEMPERATURE\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*TEMPERATURE\s+{E,cp2k:mdTemperature}\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+{A,cp2k:thermostatType}\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+{A,cp2k:optimizer}\s*</record>
</template> <template id="maxIter" pattern="\s*MAX_ITER\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*MAX_ITER\s+{I,cp2k:maxIter}\s*</record>
</template> <template id="bandType" pattern="\s*BAND_TYPE\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*BAND_TYPE\s+{A,cp2k:bandType}\s*</record>
</template> <template id="replicas" pattern="\s*NUMBER_OF_REPLICA\s+[0-9]+.*" endPattern=".*" endPattern2="~"> <record>\s*NUMBER_OF_REPLICA\s+{I,cp2k:nreplicas}\s*</record>
</template> <template id="extRestart" pattern="\s*RESTART_FILE_NAME\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*RESTART_FILE_NAME\s+{A,cp2k:extRestartFileName}\s*</record>
</template> <template id="cellABC" pattern="\s*ABC\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*ABC\s+{1_3E,cp2k:cellABC}\s*</record>
</template> <template id="cellAngles" pattern="\s*ANGLES\s+[0-9].*" endPattern=".*" endPattern2="~"> <record>\s*ANGLES\s+{1_3E,cp2k:cellAngles}\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+{A,cp2k:periodicity}\s*</record>
</template> <template id="coordFile" pattern="\s*COORD_FILE_NAME\s+\S+.*" endPattern=".*" endPattern2="~"> <record>\s*COORD_FILE_NAME\s+{A,cp2k:coordFileName}\s*</record>
</template> <template id="kind" pattern="\s*&KIND\s+\S+.*" endPattern="\s*&END.*" endPattern2="~" repeat="*"> <record id="kind">\s*&KIND\s+"?{A,cc:elementType}"?\s*$</record> <record id="element">\s*ELEMENT\s+{A,cc:elementType}\s*</record> <record id="basis">\s*BASIS_SET\s+{A,cp2k:basisSet}\s*</record> <record id="potential">\s*POTENTIAL\s+{A,cp2k:potential}\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*{A,cc:elementType}\s+{E,cc:x3}\s+{E,cc:y3}\s+{E,cc:z3}.*</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" />