spin ​
Implementation level ​
| Type | Status |
|---|---|
| CML extraction template | |
| HTML5 representation |
Template attributes ​
| Attribute | Value |
|---|---|
| source | CP2K log |
| id | spin |
| name | Spin analysis |
| pattern | \s+Integrated spin density:.* |
| endPattern | \s+Ideal and single determinant S\*\*2.* |
| endOffset | 1 |
| repeat | * |
| keep | last |
| xml:base | properties/spin.xml |
Input
Integrated spin density: 2.0000000040
Integrated absolute spin density: 2.0354740748
Ideal and single determinant S**2 : 2.000000 2.005592
Output text
xml
<comment class="example.output" id="spin">
<module cmlx:templateRef="spin">
<list cmlx:templateRef="integrated">
<scalar dataType="xsd:double" dictRef="cp2k:integratedSpinDensity">2.0000000040</scalar>
</list>
<list cmlx:templateRef="s2">
<list>
<scalar dataType="xsd:double" dictRef="cp2k:idealS2">2.000000</scalar>
<scalar dataType="xsd:double" dictRef="cp2k:s2">2.005592</scalar>
</list>
</list>
</module>
</comment>Template definition
xml
<record id="integrated">\s+Integrated spin density:\s+{E,cp2k:integratedSpinDensity}\s*</record>
<record id="s2">\s+Ideal and single determinant S\*\*2 :\s+{E,cp2k:idealS2}\s+{E,cp2k:s2}\s*</record>
<transform process="delete" xpath=".//cml:list[count(*)=0]" repeat="2" />