Given a scaffold structure with attached R1, R2, ... nodes as query, RGroupDecomposition determines all hits in the given target molecule: the matching scaffold and the R1, R2, ... ligands with attachment points in all p[ossible ways.
RGroupDecomposition includes methods to set the query and the target and finding the search hits by extending MolSearch. The query can be modified to allow ligands at R-group attachments only (by hydorgenization: addHydrogens(Molecule)) or to set different R-group attachments in place of each implicit H attachment (addRgroups(Molecule)). Ligand attachments can be represented in different ways (by any-atoms, attachment points, atom maps or in atom labels), this can be set by setAttachmentType(int type).
To get the R-group decomposition results for a given search hit, it provides different methods to ask for the scaffold and ligands, for ligand IDs corresponding to specific R-groups, or else to get a complete scaffold and ligand table ready for display, as shown in the API usage examples.
A list of API usage examples can be found in the RGroupDecomposition class header.