|
element bond | ||||||||||
| Jump: DOCUMENTATION | SOURCE | FRAMES NO FRAMES | ||||||||||
| Abstract | false (This can be used in an instance) |
|---|---|
| Nillable | false (Instance values cannot use xsi:nil) |
| Target Namespace | http://www.xml-cml.org/schema/cml2/core |
| Declared Namespaces | xmlns:val=http://www.w3.org/1999/XSL/TransformX xmlns:stm=http://www.xml-cml.org/schema/stmml xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:xlink=http://www.w3.org/1999/xlink xmlns:cml=http://www.xml-cml.org/schema/cml2/core xmlns=http://www.xml-cml.org/schema/cml2/core |
bond is a child of bondArray and contains bond information. Bond must refer to at least two atoms (using atomRefs2) but may also refer to more for multicentre bonds. Bond is often EMPTY but may contain electron, length or bondStereo elements.
<cml title="bondArray example">
<bondArray>
<bond id="b1" atomRefs2="a3 a8" order="D">
<electron bondRef="b1"/>
<bondStereo>C</bondStereo>
</bond>
<bond id="b2" atomRefs2="a3 a8" order="S">
<bondStereo convention="MDL" conventionValue="6"/>
</bond>
</bondArray>
</cml>
<cml title="metal-bond example">
<!-- Zeise's salt: [Cl3Pt(CH2=CH2)]- -->
<atomArray>
<atom id="pt1" elementType="Pt"/>
<atom id="cl1" elementType="Cl"/>
<atom id="cl2" elementType="Cl"/>
<atom id="cl3" elementType="Cl"/>
<atom id="c1" elementType="C" hydrogenCount="2"/>
<atom id="c2" elementType="C" hydrogenCount="2"/>
</atomArray>
<bondArray>
<bond id="b1" atomRefs2="c1 c2" order="D"/>
<bond id="b2" atomRefs2="pt1 cl1" order="S"/>
<bond id="b3" atomRefs2="pt1 cl2" order="S"/>
<bond id="b4" atomRefs2="pt1 cl3" order="S"/>
<bond id="b5" atomRefs="pt1" bondRefs="b1"/>
</bondArray>
</cml>
<val:comment>Validate Bonds</val:comment>
<val:template match="bond">
<val:comment>Atom Refs for 2-atom bond</val:comment>
<val:variable name="at1" select="substring-before(normalize-space(@atomRefs2),' ')"/>
<val:variable name="at2" select="substring-after(normalize-space(@atomRefs2),' ')"/>
<val:comment>Do both atoms exist in current molecule context?</val:comment>
<val:if test="not(key('atoms', $at1))">
<val:call-template name="error">
<val:with-param name="error">BOND (<val:value-of select="@id"/>): ATOMREF not found: <val:value-of select="$at1"/></val:with-param>
</val:call-template>
</val:if>
</val:template>
|
element bond | ||||||||||
| Jump: DOCUMENTATION | SOURCE | FRAMES NO FRAMES | ||||||||||
![]() |
||
| Stylus Studio XML Schema Library Home | ||
| Site Map | Privacy Policy | Terms of Use | Trademarks |