Since there is very little use of electrons in current chemical information this is a fluid concept. I expect it to be used for electron counting, input and output of theochem operations, descriptions of orbitals, spin states, oxidation states, etc. Electrons can be associated with atoms, bonds and combinations of these. At present there is no hardcoded semantics. However, atomRef and similar attributes can be used to associate electrons with atoms or bonds
<molecule id="m1">
<atomArray atomID="a1 a2 a3 a4 a5 a6"/>
<bondArray
order="A A A A A A"
bondID="b1 b2 b3 b4 b5 b6"
atomRef1="a1 a2 a3 a4 a5 a6"
atomRef2="a6 a1 a2 a3 a4 a5"/>
<electron count="6"
bondRefs="b1 b2 b3 b4 b5 b6"
atomRefs="a1 a2 a3 a4 a5 a6"/>
</molecule>
This is not formally of type ID (an XML NAME which must start with a letter and contain only letters, digits and .-_:). It is recommended that IDs start with a letter, and contain no punctuation or whitespace. The function generate-id() in XSLT will generate semantically void unique IDs.
It is difficult to ensure uniqueness when documents are merged. We suggest namespacing IDs, perhaps using the containing elements as the base. Thus mol3:a1 could be a useful unique ID. However this is still experimental.
<action title="turn on heat" start="T09:00:00" convention="xsd"/>
The namespace is optional but recommended where possible
Note: this convention is only used within STMML and related languages; it is NOT a generic URI.
<list>
<!-- dictRef is of namespaceRefType -->
<scalar dictRef="chem:mpt">123</scalar>
<!-- error -->
<scalar dictRef="mpt23">123</scalar>
</list>
There is no controlled vocabulary for conventions, but the author must ensure that the semantics are openly available and that there are mechanisms for implementation. The convention is inherited by all the subelements, so that a convention for molecule would by default extend to its bond and atom children. This can be overwritten if necessary by an explicit convention.
It may be useful to create conventions with namespaces (e.g. iupac:name). Use of convention will normally require non-STMML semantics, and should be used with caution. We would expect that conventions prefixed with "ISO" would be useful, such as ISO8601 for dateTimes.
There is no default, but the conventions of STMML or the related language (e.g. CML) will be assumed.
<bond convention="fooChem" order="-5" xmlns:fooChem="http://www.fooChem/conventions"/>
The namespace is optional but recommended where possible
Note: this convention is only used within STMML and related languages; it is NOT a generic URI.
<list>
<!-- dictRef is of namespaceRefType -->
<scalar dictRef="chem:mpt">123</scalar>
<!-- error -->
<scalar dictRef="mpt23">123</scalar>
</list>
A reference to a dictionary entry.
Elements in data instances such as scalar may have a dictRef attribute to point to an entry in a dictionary. To avoid excessive use of (mutable) filenames and URIs we recommend a namespace prefix, mapped to a namespace URI in the normal manner. In this case, of course, the namespace URI must point to a real XML document containing entry elements and validated against STMML Schema.
Where there is concern about the dictionary becoming separated from the document the dictionary entries can be physically included as part of the data instance and the normal XPointer addressing mechanism can be used.
This attribute can also be used on dictionary elements to define the namespace prefix
<scalar dataType="xsd:float" title="surfaceArea"
dictRef="cmlPhys:surfArea"
xmlns:cmlPhys="http://www.xml-cml.org/dict/physical"
units="units:cm2">50</scalar>
<stm:list xmlns:stm="http://www.xml-cml.org/schema/stmml">
<stm:observation>
<p>We observed <object count="3" dictRef="#p1"/>
constructing dwellings of different material</p>
</stm:observation>
<stm:entry id="p1" term="pig">
<stm:definition>A domesticated animal.</stm:definition>
<stm:description>Predators include wolves</stm:description>
<stm:description class="scientificName">Sus scrofa</stm:description>
</stm:entry>
</stm:list>
<molecule id="m1">
<atomArray>
<atom id="a1"/>
</atomArray>
<electron id="e1" atomRef="a1"/>
</molecule>
The atomRefs cannot be schema- or schematron-validated. Instances of this type will be used in array-style representation of bonds and atomParitys. It can also be used for arrays of atomIDTypes such as in complex setereochemistry, geometrical definitions, atom groupings, etc.
<molecule id="m1">
<atomArray atomID="a2 a4 a6"
elementType="O N S"/>
</molecule>
<molecule id="m1">
<atomArray>
<atom id="a1"/>
</atomArray>
<electron id="e1" atomRef="a1"/>
</molecule>
A reference to a bond may be made by atoms (e.g. for multicentre or pi-bonds), electrons (for annotating reactions or describing electronic properties) or possibly other bonds (no examples yet). The semantics are relatively flexible.
<bondArray>
<bond id="b1" atomRefs2="a3 a8" order="D">
<electron bondRef="b1"/>
<stereo>C</stereo>
</bond>
<bond id="b2" atomRefs2="a3 a8" order="S">
<stereo convention="MDL" conventionValue="6"/>
</bond>
</bondArray>
The refences cannot (yet) cannot be schema- or schematron-validated. Instances of this type will be used in array-style representation of electron counts, etc. It can also be used for arrays of bondIDTypes such as in complex setereochemistry, geometrical definitions, bond groupings, etc.
A reference to a bond may be made by atoms (e.g. for multicentre or pi-bonds), electrons (for annotating reactions or describing electronic properties) or possibly other bonds (no examples yet). The semantics are relatively flexible.
<bondArray>
<bond id="b1" atomRefs2="a3 a8" order="D">
<electron bondRef="b1"/>
<stereo>C</stereo>
</bond>
<bond id="b2" atomRefs2="a3 a8" order="S">
<stereo convention="MDL" conventionValue="6"/>
</bond>
</bondArray>
A reference to an existing element in the document. The target of the ref attribute must exist. The test for validity will normally occur in the element's appinfo
Any DOM Node created from this element will normally be a reference to another Node, so that if the target node is modified a the dereferenced content is modified. At present there are no deep copy semantics hardcoded into the schema.
This is not formally of type ID (an XML NAME which must start with a letter and contain only letters, digits and .-_:). It is recommended that IDs start with a letter, and contain no punctuation or whitespace. The function generate-id() in XSLT will generate semantically void unique IDs.
It is difficult to ensure uniqueness when documents are merged. We suggest namespacing IDs, perhaps using the containing elements as the base. Thus mol3:a1 could be a useful unique ID. However this is still experimental.
ref modifies an element into a reference to an existing element of that type within the document. This is similar to a pointer and it can be thought of a strongly typed hyperlink. It may also be used for "subclassing" or "overriding" elements.
<cml>
<molecule id="m1">
<atomArray>
<atom elementType="N"/>
<atom elementType="O"/>
</atomArray>
</molecule>
<html:p>The action of <molecule ref="#m1"/> on cardiac muscle ...</html:p>
</cml>