cp2k.geometry ​
Implementation level ​
| Type | Status |
|---|---|
| CML extraction template | |
| HTML5 representation |
Template attributes ​
| Attribute | Value |
|---|---|
| source | CP2K xyz geometry |
| id | cp2k.geometry |
| name | CP2K xyz geometry |
| xml:base | topTemplate.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*{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" />
</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" />