rapodaca / dialect

Documenting a subset of the SMILES language.
MIT License
13 stars 0 forks source link

Table of Atom attributes #34

Closed rapodaca closed 2 years ago

rapodaca commented 2 years ago

A table of Atom attributes should be present. It should use exactly the same terms used elsewhere in the ms.

Attribute Name Description Type Nullable Meaning if null Constraints Default Value
index A unique identifier unsigned integer no N/A - N/A
isotope The sum of proton and neutron counts. unsigned integer yes Natural abundance 0 <= value < 1000 null
element The atom's element. enumeration yes unknown element An IUPAC-approved element symbol. null
virtual_hydrogens The number of virtual hydrogens unsigned integer Yes zero virtual hydrogens 0 <= value < 10 0
algorithmic_hydrogens If true hydrogens are counted algorithmically. boolean No - - true
configuration Configurational descriptor enumeration Yes No configuration tetracoordinate Null
extension Application-specific data integer Yes No extension 0 <= value < 1000 Null
selected Whether the atom is selected. boolean No - element must be one of C, N, O, P, or S. -

... and so on.

rapodaca commented 2 years ago

This table implies that [*] has an isotope value of 1. Does this make sense? Probably, not, but neither does [*] with an isotope of 0. It's an arbitrary convention.

rapodaca commented 2 years ago

An alternative approach:

Data Type Description Values
Index Unsigned integer 0...232
Option<Type> Optional value None, Type
Ten Integer count 0..10
PlusMinusTen Integer count -9...10
Thousand Integer count 0...1000
Element IUPAC-approved element symbol Ac, Ag, Al, ... Zn
HydrogenCount Hydrogen count Implicit, Ten
Configuration Configurational descriptor Clockwise, Counterclockwise
boolean Boolean true, false
Attribute Description Type Default
index A unique identifier Index -
isotope Sum of proton and neutron counts Option<Thousand> None
element Elemental symbol Option<Element> None
hydrogens Hydrogen count HydrogenCount 0
configuration Configurational descriptor Option<Configuration> None
charge Formal charge PlusMinusTen 0
extension Application-specific data Option<Thousand> None
selected Whether the atom is selected boolean false