R-group structures

Root structure

An R-group structure describes a set of derivatives in one structure (substitution variation). An R-group query structure consists of three components, a root structure (often referred to as scaffold), a set of R-groups and R-group conditions. The root structure contains the portion of the query structure that does not vary among the structures retrieved. R-groups (or R-groups) are attached as substituents to the root and their sites are marked with R1, R2, R3, etc. symbols respectively. It is possible to attach multiple R-groups to one root, even to a single atom of the structure. One R-group can be attached multiple times to the same root, but it does not mean that all these attachments should be filled by the same definition (see occurrence conditions below for further information).

R-group definitions

R-group definitions are variable lists of ligands connected to specific positions of the root structure by their attachment points.

The core representation of R-group structures is the RgMolecule class. The example below shows how to access the root and the R-group definitions in an R-group structure:

	//get the root structure and enumerate the atoms, find R-Atoms.
        Molecule root = rgmol.getRoot();
        for (int i = root.getAtomCount() - 1; i >= 0; --i){
            MolAtom atom = root.getAtom(i);
            if (atom.getAtno() == MolAtom.RGROUP){
               ....
            }
        }
     
        //enumerate the R-group definitions and its fragments
        int nr = rgmol.getRgroupCount();
        for(int i = 0; i < nr; ++i) {
            int nrm = rgmol.getRgroupMemberCount(i);
            for(int j = 0; j < nrm; ++j) {
            	.... do something with rgmol.getRgroupMember(i, j)  
            }
        }