Description: A module that contains function to detect r-groups. The 
  core is determined either from CombiGlide results, a user-submitted 
  SMARTS pattern, or a Canvas Maximum Common Substructure. These functions 
  were split from python/scripts/r_group_analysis.py
  Copyright Schrodinger, LLC. All rights reserved.
    |  | 
        
          | add_methyl_ring(ct,
        principal_bond,
        bond_list,
        attachment_positions,
        output,
        grow=True) Add capping methyls to ring like r_groups
 |  |  | 
    |  | 
        
          | add_methyl_standard(ct,
        core_atom,
        side_atom,
        output,
        grow=True) Breaks bond between core and side atom Grows Carbon off of side-atom,
      maintaining bond order of core_atom - side_atom bond
 |  |  | 
    |  | 
        
          | add_to_data(data,
        fragment,
        from_atom,
        to_atom,
        to_atom_chirality,
        j,
        ct_index) |  |  | 
    | tuple | 
        
          | checkMultipleMappings(fragment,
        smiles,
        from_atom,
        to_atom) This function checks whether a given fragment may match SMILES string
      multiple times.
 |  |  | 
    |  | 
        
          | determine_attachments(core,
        ct,
        ct_index,
        data) |  |  | 
    |  | 
        
          | get_atom_chirality(ct,
        atom) |  |  | 
    |  | 
        
          | determine_rings_in_attachments(functional_rings,
        r_group_attachment_bonds) |  |  | 
    |  |  | 
    |  | 
        
          | conglomerate_rings(rings,
        core) This function takes the mmssr and combines rings if they are entirely
      part of the core structure.
 |  |  | 
    |  |  | 
    |  | 
        
          | get_connected_ring_bonds(ct_rings,
        ring) This function returns any other rings that are also connected to any 
      attachment bonds that are part of the ring fed to the function.
 |  |  | 
    |  | 
        
          | get_rgroup_DEE(input_file,
        SMARTS,
        temp_dir=None,
        thread=None,
        use_mm=1,
        use_fp_sim=False,
        sa_seed=None,
        t_factor=None,
        tmax_mult=None) |  |  | 
    |  | 
        
          | get_rgroup_SMARTS(input_file,
        SMARTS,
        temp_dir=None,
        thread=None) Takes input_file and SMARTS_pattern and defines r-groups input_file -
      input .mae file SMARTS_pattern defining core
 |  |  | 
    |  | 
        
          | get_rgroup_combgen(input_file,
        temp_dir=None) Takes an input_file and creates instance of Data class That stores 
      r_groups as SMILE patterns
 |  |  | 
    |  | 
        
          | get_rgroup_MCS(input_file,
        MCS_index,
        temp_dir=None,
        thread=None,
        use_mm=0,
        use_fp_sim=False,
        sa_seed=None,
        t_factor=None,
        tmax_mult=None) Determines the core and r-groups using the canvasMCS method.
 |  |  | 
    | list | 
        
          | getMCSMatches(input_file,
        MCS_index,
        temp_dir=None,
        thread=None) This function is used to setup and run MCS calculation on a given 
      input file.
 |  |  | 
    |  | 
        
          | find_best_core_match(ct,
        cores,
        ref_ct=None,
        ref_core=None) |  |  | 
    |  | 
        
          | write_core_only(structure,
        attachment_points,
        core_indexes,
        core_bonds,
        temp_dir=None) |  |  | 
    |  | 
        
          | add_ct_data(data,
        core,
        ct,
        ct_index) Add to the determine the rings and r-groups per atom for each ct and 
      add the following data structures: data.add_functional_rings 
      data.add_rings data.add_r_groups_to_atom
 |  |  | 
    | Settings | 
        
          | write_output(data,
        input_file,
        smarts,
        cli=False,
        temp_dir=None,
        thread=None,
        settings=None) This function writes RGA results to output files.
 |  |  | 
    |  | 
        
          | determine_rgroup_indexes(ct,
        number_of_groups) |  |  | 
    | list | 
        
          | evaluate_smarts_ex(structure,
        smarts,
        stereo= 'annotation_and_geom',
        start_index=1,
        uniqueFilter=False,
        allowRelativeStereo=False,
        rigorousValidationOfSource=False,
        hydrogensInterchangeable=True)Evaluate SMARTS patterns using the Canvas libraries.
 |  |  | 
    |  | 
        
          | import_canvas() Perform a lazy import of canvas libraries to speed up loading time.
 |  |  | 
    |  |  |