CurlySMILES class Notation: method aaa_entries_compnt

Method aaa_entries_compnt belongs to class Notation, the core class for managing a CurlySMILES notation.

Module: csm_notation.py
Method: aaa_entries_compnt(iCompnt,iAtom)
Argument: iCompnt (index of component);
type: integer; values: 1, 2,..., or nCompnt;
iAtom (index of atom)
type: integer; values: 1, 2,..., or nAtoms;
Hint: the indices of annotated atoms are obtained with method aaa_indices_compnt
Return: lstEntries, a list of pairs, where each pair has the form [sAM,dict]. The string sAM holds the two-character annotation marker or a one-character descriptor. The dictionary contains the key/value pairs of the annotation dictionary; dict = None, if no annotation dictionary is provided of if sAM is a one-character descriptor, which cannot be followed by an annotation dictionary.
Example-1: For the one-component CurlySMILES notation of (2R,3R)-2,3,4-trihydroxybutanal (D-erythrose)

___ sNotation = 'O=CC{R}(O)C{R}(O)CO'

the call with iAtom = 3 and iAtom = 5

___ lstEntries = oNotation.aaa_entries_compnt(1,iAtom)

both make the assignment

___ lstEntries = [ ['R',None] ]
Example-2: For the CurlySMILES notation of a hydrogen-bond benzoic acid dimer

___ sNotation = \
___ 'c1ccccc1C(=O)O{!Hi=2#3}.O{!Hi=8#1}C(=O)c1ccccc1'

the call

___ lstEntries = oNotation.aaa_entries_compnt(1,9)

makes the assignment

___ lstEntries = [ ['!H',{'i':'2#3'}] ]

and the call

___ lstEntries = oNotation.aaa_entries_compnt(2,1)

makes the assignment

___ lstEntries = [ ['!H',{'i':'8#1'}] ]

Example-3: For the CurlySMILES notation of (E)-1-n-alkylpropenes, also named (E)-2-alkenes or (trans)-2-alkenes,

___ sNotation = 'CC=C{E}{+Rbra=0}'

the call

___ lstEntries = oNotation.aaa_entries_compnt(1,3)

makes the assignment

___ lstEntries = [ ['E',None], ['+R',{'bra':'0'}] ]


Please, email comments and suggestions to axeleratio@yahoo.com
Custom Search