Skip to contents

Returns the element of each atom, whether it was written aromatic, its formal charge, its explicit hydrogen count if one was given, and the bonds as index triples with the order. Ring-closure bonds are reported separately because the ring perception starts from them.

Usage

morie_avalon_parse(smiles)

Arguments

smiles

The molecule, in the subset the parser accepts.

Value

A list with el, arom, chg, hexp, bonds and closures.

Examples

p <- morie_avalon_parse("c1ccccc1O")
str(p, max.level = 1)
#> List of 6
#>  $ el      : chr [1:7] "C" "C" "C" "C" ...
#>  $ arom    : int [1:7] 1 1 1 1 1 1 0
#>  $ chg     : int [1:7] 0 0 0 0 0 0 0
#>  $ hexp    : int [1:7] -1 -1 -1 -1 -1 -1 -1
#>  $ bonds   :List of 7
#>  $ closures: int 6