cgsmiles.cgsmiles_utils module¶
- cgsmiles.cgsmiles_utils.find_complementary_bonding_descriptor(bonding_descriptor, ellegible_descriptors=None)[source]¶
Given a bonding descriptor find the complementary match. In the case of ‘$’ prefixed descriptors this is just the same and ‘>’ or ‘<’ get flipped to the other symbol.
- cgsmiles.cgsmiles_utils.find_open_bonds(molecule, target_nodes=None)[source]¶
Collect all nodes which have an open bonding descriptor and store them as keys with a list of nodes as values.
- Parameters:
molecule (networkx.Graph)
target_nodes (list[collections.abc.Hashable]) – a list of node keys matching molecule
- Return type:
- cgsmiles.cgsmiles_utils.read_fragment_cgsmiles(cgsmiles_str, fragname, bonding_descrpt={}, attributes={})[source]¶
Read a smiles_str corresponding to a CGSmiles fragment and annotate bonding descriptors, isomers, as well as any other attributes.
- Parameters:
- Returns:
the graph of the molecular fragment
- Return type: