l101.zmat ​
Implementation level ​
Type | Status |
---|---|
CML extraction template | |
HTML5 representation |
Template attributes ​
Attribute | Value |
---|---|
source | Gaussian log |
id | l101.zmat |
repeat | * |
pattern | .*Symbolic Z\-matrix.*$\s*Charge.*Multiplicity.*$\s*\S+\s+\S+\s+\S+\s+\S+\s* |
endPattern | \s* |
xml:base | l101/l101.zmat.xml |
Input ​
Symbolic Z-matrix:
Charge = 0 Multiplicity = 1
H 2.67317 -0.69436 1.17604
C 1.98961 -0.3388 0.40746
H 0.63164 1.77722 -0.58197
Input ​
Symbolic Z-matrix:
Charge = 0 Multiplicity = 1
1 -4.02766 0.28369 0.
1 -4.62766 0.28369 0.
Output text ​
xml
<comment class="example.output" id="l1.zmat">
<module cmlx:templateRef="l101.zmat">
<molecule id="zmat" formalCharge="0" spinMultiplicity="1" cmlx:templateRef="mol">
<atomArray>
<atom id="a1" elementType="H" x3="2.67317" y3="-0.69436" z3="1.17604">
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
</atom>
<atom id="a2" elementType="C" x3="1.98961" y3="-0.3388" z3="0.40746">
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">6</scalar>
</atom>
<atom id="a3" elementType="H" x3="0.63164" y3="1.77722" z3="-0.58197">
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
</atom>
</atomArray>
<formula formalCharge="0" concise="C 1 H 2">
<atomArray elementType="C H" count="1.0 2.0" />
</formula>
<bondArray>
<bond atomRefs2="a1 a2" id="a1_a2" order="S" />
</bondArray>
<property dictRef="cml:molmass">
<scalar dataType="xsd:double" units="unit:dalton">13.01864</scalar>
</property>
</molecule>
</module>
</comment>
Output text ​
xml
<comment class="example.output" id="l101.zmat2">
<module cmlx:templateRef="l101.zmat">
<molecule cmlx:templateRef="mol" formalCharge="0" id="zmat" spinMultiplicity="1">
<atomArray>
<atom elementType="H" id="a1" x3="-4.02766" y3="0.28369" z3="0.0000" />
<atom elementType="H" id="a2" x3="-4.62766" y3="0.28369" z3="0.0000" />
</atomArray>
<bondArray />
<formula concise="H2" />
<property dictRef="cml:molmass">
<scalar units="unit:dalton">0.0</scalar>
</property>
<list cmlx:templateRef="charge">
<list>
<scalar dataType="xsd:integer" dictRef="g:charge">0</scalar>
<scalar dataType="xsd:integer" dictRef="g:mult">1</scalar>
</list>
</list>
</molecule>
</module>
</comment>
Template definition ​
xml
<record />
<record id="charge">.*Charge ={I,g:charge} Multiplicity ={I,g:mult}</record>
<record id="mol" repeat="*" makeArray="true">{I,gau:elementType} {F,gau:x3,unit:angstrom} {F,gau:y3,unit:angstrom} {F,gau:z3,unit:angstrom}</record>
<record id="mol" repeat="*" makeArray="true">{A,gau:elementType} {F,gau:x3,unit:angstrom} {F,gau:y3,unit:angstrom} {F,gau:z3,unit:angstrom}</record>
<transform process="createMolecule" id="zmat" xpath=".//cml:array" />
<transform process="move" to=".//cml:molecule" xpath="./cml:list[@cmlx:templateRef='charge']" />
<transform process="addAttribute" xpath=".//cml:molecule[@id='zmat']" name="formalCharge" value="$string(.//cml:scalar[@dictRef='g:charge'])" />
<transform process="addAttribute" xpath=".//cml:molecule[@id='zmat']" name="spinMultiplicity" value="$string(.//cml:scalar[@dictRef='g:mult'])" />
<transform process="delete" xpath="./cml:list[@cmlx:templateRef='charge']" />
<transform process="pullupSingleton" xpath="./cml:list" />