l101.zmat

Implementation level
Type Status
CML extraction template image0
HTML5 representation image1
Template attributes
Attribute Value
source Gaussian log
id l101.zmat
repeat *
pattern .*Symbolic Z-matrix.*$s*Charge.*Multiplici ty.*$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

Output text.

<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>

Template definition.

<record />
<record id="charge">.*Charge ={I,g:charge} Multiplicity ={I,g:mult}</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" />