Class Consensus
Access the atoms, residues, and molecules (or just their indices) that
  are considered to be consensus objects for a template structure and query
  structure. All properties are returned as an OrderedDict that maps the 
  template objects to their consensus objects from the query structure.
  Here is an example of how to get all the consensus waters between two 
  protein structures. We define the cutoff here at 2 Angstroms:
 from schrodinger.structure import StructureReader
 from schrodinger.application.bioluminate import protein
 pt = maestro.project_table_get()
 # Create an ASL map for all ligands in the WS
 asl_map = []
 for row in pt.included_rows:
     st = row.getStructure()
     ligands = analyze.find_ligands(st)
     if not ligands:
         continue
     indices = []
     for ligand in ligands:
         indices.extend([str(i) for i in ligand.atom_indexes])
     asl = 'atom.n %s' % ','.join(indices)
     asl_map.append((st, asl))
 # Create a consensus of all ligands, specifying that at least three
 # structures must have a ligand atom within 2A from one another.
 consensus = protein.Consensus(asl_map, 3, dist_cutoff=2)
 # To get the atom objects
 consensus_atoms = consensus.atoms
 # To get the molecule objects
 molecules = consensus.molecules
    |  | 
        
          | __init__(self,
        asl_map,
        minimum_number,
        dist_cutoff=2.0) |  |  | 
    |  |  | 
    |  | 
        
          | getClosest(self,
        ref_atom,
        mob_atoms) Gets the closest atom to the
 ref_atomfrommob_atoms. |  |  | 
    | list of lists |  | 
    |  | ASL_WATER = 'water and NOT (atom.ele H)' | 
    |  | ASL_IONS = 'ions' | 
    |  | ASL_LIGAND = '(((m.atoms 5-130)) and not ((ions) or (res.pt AC... | 
    |  | _consensus_atoms Atom indices mapping template and query consensus
 | 
    | OrderedDict of atom objects where the keys are the 
      template atoms and their values are the consensus atoms from the 
      query. | atoms Get the map of atom objects of consensus atoms.
 | 
    | OrderedDict of ints where the keys are the template atom indices and 
      their values are the consensus atom indices from the query. | atom_indices Get the map of atom indices of consensus atoms.
 | 
    | list of unique consensus residue objects for each structure in self.asl_map. (Order is maintained) | residues Get the list of residue objects of 
      consensus atoms for each structure in
 self.asl_map. | 
    | list of unique consensus residue indices for each structure in self.asl_map. (Order is maintained) | residue_indices Get the map of residue indices of consensus atoms.
 | 
    | list of unique consensus molecule objects for each structure in self.asl_map. (Order is maintained) | molecules Get the map of molecule objects of 
      consensus atoms.
 | 
    | list of unique consensus molecule indices for each structure in self.asl_map. (Order is maintained) | molecule_indices Get the map of molecule indices of consensus atoms.
 | 
| 
  | __init__(self,
        asl_map,
        minimum_number,
        dist_cutoff=2.0)
    (Constructor)
 |  |  
    Parameters:
        asl_map(tuple of (structure, ASL)) - List of structures and the ASL used to limit the atoms used when 
          calculating the consensusminimum_number(int) - The minimum number of matches within structures. An atom will be 
          considered a "consensus" atom if it is within thedist_cutoffof at leastminimum_numberof structures in the list of passed in structures.dist_cutoff(float) - Distance in Angstroms used to define a consensus match       Attention:
        The list of consensus atoms (or molecules, residues, indices, etc. 
        depending on the property called, i.e. self.molecules) will all be unique and will depend
        on the ASL passed in. If the ASL is not specific enough you may end
        up with poor results.
       | 
 
| Private method called in __init__. Finds the consensus atom indices 
  between the template and query. 
   | 
 
| 
  | _createByAtomProperty(self,
        attr,
        is_callable=False)
   |  |  Private method to get an atom property. 
    Parameters:
        attr(str) - The attribute to get from the consensus atomsis_callable(bool) - Whether the prop arg is a callableReturns: list of listsA list of lists of the new entities created from the properties | 
 
| ASL_LIGAND
   
    Value:| 
'(((m.atoms 5-130)) and not ((ions) or (res.pt ACE ACT ACY BCT BME BOG   CAC CIT CO3 DMS EDO EGL EPE FES FMT FS3 FS4 GOL HEC HED HEM IOD IPA M  ES MO6 MPD MYR NAG NCO NH2 NH3 NO3 PG4 PO4 POP SEO SO4 SPD SPM SUC SUL   TRS )))' | 
 | 
 
| atomsGet the map of atom objects of consensus atoms. 
    Get Method:unreachable.atoms(self)
        - Get the map of atom objects of consensus atoms.
    Type:OrderedDict of atom objects where the keys are the 
      template atoms and their values are the consensus atoms from the 
      query. | 
 
| atom_indicesGet the map of atom indices of consensus atoms. 
    Get Method:unreachable.atom_indices(self)
        - Get the map of atom indices of consensus atoms.
    Type:OrderedDict of ints where the keys are the template atom indices and 
      their values are the consensus atom indices from the query. | 
 
| residuesGet the list of residue objects of consensus 
  atoms for each structure in self.asl_map. 
    Get Method:unreachable.residues(self)
        - Get the list of residue objects of consensus 
atoms for each structure in self.asl_map.Type:list of unique consensus residue objects for each structure in 
      self.asl_map. (Order is maintained) | 
 
| residue_indicesGet the map of residue indices of consensus atoms. 
    Get Method:unreachable.residue_indices(self)
        - Get the map of residue indices of consensus atoms.
    Type:list of unique consensus residue indices for each structure in 
      self.asl_map. (Order is maintained) | 
 
| moleculesGet the map of molecule objects of consensus 
  atoms. 
    Get Method:unreachable.molecules(self)
        - Get the map of molecule objects of consensus 
atoms.
    Type:list of unique consensus molecule objects for each structure in 
      self.asl_map. (Order is maintained) | 
 
| molecule_indicesGet the map of molecule indices of consensus atoms. 
    Get Method:unreachable.molecule_indices(self)
        - Get the map of molecule indices of consensus atoms.
    Type:list of unique consensus molecule indices for each structure in 
      self.asl_map. (Order is maintained) |