vibrations ​
Implementation level ​
| Type | Status |
|---|---|
| CML extraction template | |
| HTML5 representation |
Template attributes ​
| Attribute | Value |
|---|---|
| source | CP2K log |
| id | vibrations |
| name | Vibrational frequencies |
| pattern | \s*VIB\|Frequency\s*\(cm\^-1\).* |
| endPattern | \s+\d+\s+[A-Z][a-z]?\s+\S+\s+\S+\s+\S+.*$\s* |
| endOffset | 1 |
| repeat | * |
| xml:base | properties/vibrations.xml |
Input
VIB| NORMAL MODES - CARTESIAN DISPLACEMENTS
VIB|
VIB| 1 2 3
VIB|Frequency (cm^-1) 1.5889737984E+03 3.7765505751E+03 3.8980267061E+03
VIB|IR int (KM/Mole) 7.3576194059E+01 6.9474045481E+00 6.6590093574E+01
VIB|Red.Masses (a.u.) 1.0827833278E+00 1.0452856112E+00 1.0814958307E+00
VIB|Frc consts (a.u.) 1.0345857130E-01 5.6417914360E-01 6.2187903338E-01
ATOM EL X Y Z X Y Z X Y Z
1 O 0.00 0.00 0.07 0.00 0.00 0.05 0.00 -0.07 0.00
2 H 0.00 -0.43 -0.56 0.00 0.58 -0.40 0.00 0.56 -0.43
3 H 0.00 0.43 -0.56 0.00 -0.58 -0.40 0.00 0.56 0.43
Output text
xml
<comment class="example.output" id="vibrations">
<module cmlx:templateRef="vibrations">
<array dataType="xsd:double" dictRef="cc:frequency" size="3">1.5889737984E+03 3.7765505751E+03 3.8980267061E+03</array>
<array dataType="xsd:double" dictRef="cc:irintensity" size="3">7.3576194059E+01 6.9474045481E+00 6.6590093574E+01</array>
<array dataType="xsd:string" dictRef="cc:elementType" delimiter="|" size="3">|O|H|H</array>
<array dataType="xsd:double" dictRef="cc:displacement" size="27">0.00 0.00 0.07 0.00 -0.43 -0.56 0.00 0.43 -0.56 0.00 0.00 0.05 0.00 0.58 -0.40 0.00 -0.58 -0.40 0.00 -0.07 0.00 0.00 0.56 0.43 0.00 0.56 0.43</array>
</module>
</comment>Template definition
xml
<record id="frequency" repeat="*">\s*VIB\|Frequency \(cm\^-1\)\s+{1_3E,cc:frequency}</record>
<record id="intensity">\s*VIB\|IR int \(KM/Mole\)\s+{1_3E,cc:irintensity}</record>
<record repeat="3" />
<record id="atom" repeat="*">\s+\d+\s+{A,cc:elementType}\s+{E,cp2k:d1x}\s+{E,cp2k:d1y}\s+{E,cp2k:d1z}\s+{E,cp2k:d2x}\s+{E,cp2k:d2y}\s+{E,cp2k:d2z}\s+{E,cp2k:d3x}\s+{E,cp2k:d3y}\s+{E,cp2k:d3z}\s*</record>
<transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='cp2k:d1x' or @dictRef='cp2k:d1y' or @dictRef='cp2k:d1z']" dictRef="cc:displacement" />
<transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='cp2k:d2x' or @dictRef='cp2k:d2y' or @dictRef='cp2k:d2z']" dictRef="cc:displacement" />
<transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='cp2k:d3x' or @dictRef='cp2k:d3y' or @dictRef='cp2k:d3z']" dictRef="cc:displacement" />
<transform process="createArray" xpath="." from=".//cml:scalar[@dictRef='cc:elementType']" />
<transform process="pullup" xpath=".//cml:array[@dictRef='cc:displacement' or @dictRef='cc:elementType']" repeat="2" />
<transform process="pullup" xpath=".//cml:array[@dictRef='cc:frequency' or @dictRef='cc:irintensity']" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />