CurlySMILES class Notation: method dmat_compnt

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

Module: csm_notation.py
Method: dmat_compnt(iCompnt)
Argument: iCompnt (index of component);
type: integer;
values: 1, 2,..., or nCompnt
Return: lstDmat, a list of integers representing topologocal atom-to-atom distances. The list contains the integers of the right upper triangle above the main diagonal, row after row from the top downwards, of the distance matrix.
Hint: The adjacency matrix is obtained from the distance matrix by changing each entry that differs from one to zero.
Example: For the one-component CurlySMILES notation

___ sNotation = 'CC(C)CO[SiH]{-X}C'

the call

___ lstDmat = oNotation.dmat_compnt(1)

makes the assignment

___ lstDmat = [ 1, 2, 2, 3, 4, 5,
__________________ 1, 1, 2, 3, 4,
_____________________ 2, 3, 4, 5,
________________________ 1, 2, 3,
___________________________ 1, 2,
______________________________ 1
_____________ ]
The list is here presented in a form that makes recognition of the upper triangle of the distance matrix easy.


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