l101.zmatfragment ​
Implementation level ​
Type | Status |
---|---|
CML extraction template | |
HTML5 representation |
Template attributes ​
Attribute | Value |
---|---|
source | Gaussian log |
id | l101.zmatfragment |
repeat | * |
pattern | .*Symbolic\sZ\-matrix.*$\s*Charge.*Multiplicity.*in\ssupermolecule\s*$\s*Charge.*Multiplicity.*in\sfragment.* |
endPattern | \s* |
xml:base | l101/l101.zmatfragment.xml |
Input ​
Symbolic Z-matrix:
Charge = 0 Multiplicity = 1 in supermolecule
Charge = 0 Multiplicity = 1 in fragment 1.
Charge = 0 Multiplicity = 1 in fragment 2.
H(Fragment=1) 10.95684 0.52181 5.17636
N(Fragment=1) 10.78265 -0.14558 6.33644
H(Fragment=1) 11.65274 -0.43711 6.75966
C(Fragment=1) 9.545 -0.78436 6.74173
H(Fragment=2) 19.67428 -3.80756 -5.09505
H(Fragment=2) 18.43108 -7.54832 -1.03918
Output text ​
xml
<comment class="example.output" id="l101.zmatfragment">
<module cmlx:templateRef="l101.zmatfragment">
<list cmlx:templateRef="chargefragment">
<array dataType="xsd:integer" dictRef="g:charge" size="2">0 0</array>
<array dataType="xsd:integer" dictRef="g:mult" size="2">1 1</array>
<array dataType="xsd:integer" dictRef="g:fragment" size="2">1 2</array>
</list>
<molecule cmlx:templateRef="mol" formalCharge="0" id="zmatfragment" spinMultiplicity="1">
<atomArray>
<atom elementType="H" id="a1" x3="10.95684" y3="0.52181" z3="5.17636">
<scalar dataType="xsd:integer" dictRef="g:fragment">1</scalar>
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
</atom>
<atom elementType="N" id="a2" x3="10.78265" y3="-0.14558" z3="6.33644">
<scalar dataType="xsd:integer" dictRef="g:fragment">1</scalar>
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">7</scalar>
</atom>
<atom elementType="H" id="a3" x3="11.65274" y3="-0.43711" z3="6.75966">
<scalar dataType="xsd:integer" dictRef="g:fragment">1</scalar>
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
</atom>
<atom elementType="C" id="a4" x3="9.5450" y3="-0.78436" z3="6.74173">
<scalar dataType="xsd:integer" dictRef="g:fragment">1</scalar>
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">6</scalar>
</atom>
<atom elementType="H" id="a203" x3="19.67428" y3="-3.80756" z3="-5.09505">
<scalar dataType="xsd:integer" dictRef="g:fragment">2</scalar>
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
</atom>
<atom elementType="H" id="a204" x3="18.43108" y3="-7.54832" z3="-1.03918">
<scalar dataType="xsd:integer" dictRef="g:fragment">2</scalar>
<scalar dataType="xsd:integer" dictRef="cc:atomicNumber">1</scalar>
</atom>
</atomArray>
<bondArray>
<bond atomRefs2="a1 a2" order="S" />
<bond atomRefs2="a2 a4" order="S" />
<bond atomRefs2="a2 a3" order="S" />
<bond atomRefs2="a4 a17" order="S" />
</bondArray>
<formula concise="C84H90N14O14Zn2">
<atomArray count="84 90 14 14 2" elementType="C H N O Zn" />
</formula>
<property dictRef="cml:molmass">
<scalar units="unit:dalton">1559.8022000000024</scalar>
</property>
</molecule>
</module>
</comment>
Template definition ​
xml
<record />
<record id="charge">.*Charge ={I,g:charge} Multiplicity ={I,g:mult}\s*in\s*supermolecule</record>
<record id="chargefragment" repeat="*">.*Charge ={I,g:charge} Multiplicity ={I,g:mult}\sin\sfragment{I,g:fragment}\.\s*</record>
<record id="mol" repeat="*" makeArray="true">{I,gau:elementType}\(Fragment={I,g:fragment}\){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}\(Fragment={I,g:fragment}\){F,gau:x3,unit:angstrom}{F,gau:y3,unit:angstrom}{F,gau:z3,unit:angstrom}</record>
<transform process="createMolecule" id="zmatfragment" xpath=".//cml:array" />
<transform process="move" xpath="./cml:list[@cmlx:templateRef='charge']" to=".//cml:molecule" />
<transform process="addAttribute" xpath=".//cml:molecule[@id='zmatfragment']" name="formalCharge" value="$string(.//cml:scalar[@dictRef='g:charge'])" />
<transform process="addAttribute" xpath=".//cml:molecule[@id='zmatfragment']" name="spinMultiplicity" value="$string(.//cml:scalar[@dictRef='g:mult'])" />
<transform process="delete" xpath="./cml:list[@cmlx:templateRef='charge']" />
<transform process="createArray" xpath="." from="./cml:list[@cmlx:templateRef='chargefragment']//cml:scalar[@dictRef='g:charge']" />
<transform process="createArray" xpath="./cml:list[@cmlx:templateRef='chargefragment']" from=".//cml:scalar[@dictRef='g:mult']" />
<transform process="createArray" xpath="./cml:list[@cmlx:templateRef='chargefragment']" from=".//cml:scalar[@dictRef='g:fragment']" />
<transform process="pullupSingleton" xpath="./cml:list" />
<transform process="pullup" xpath=".//cml:list/cml:array" />
<transform process="delete" xpath=".//cml:list[@cmlx:templateRef='charge']" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />
<transform process="delete" xpath=".//cml:list[count(*)=0]" />