private boolean hasMacromoleculeChain() {
   final StructureModel model = LigandExplorer.sgetModel();
   final Structure structure = model.getStructures().get(0);
   for (Chain chain : structure.getStructureMap().getChains()) {
     if (chain.getClassification() == Residue.Classification.AMINO_ACID
         || chain.getClassification() == Residue.Classification.NUCLEIC_ACID) {
       return true;
     }
   }
   return false;
 }
  private Vector<Chain> getLigandList(final Structure structure) {
    final Vector<Chain> ligandList = new Vector<Chain>();

    for (Chain chain : structure.getStructureMap().getChains())
      if (chain.getClassification() == Residue.Classification.LIGAND
          || chain.getClassification() == Residue.Classification.BIRD
          || chain.hasModifiedResidues()) ligandList.add(chain);

    return ligandList;
  }
  /**
   * Returns all residues relate to a BIRD molecule. Since BIRD molecules can span multiple internal
   * chains, we need to search all chains with a particular BIRD instance
   *
   * @param structure
   * @param chain
   * @return
   */
  private Residue[] getBirdResidues(Structure structure, Chain chain) {
    List<Residue> residues = new ArrayList<Residue>();
    Bird bird = chain.getBird();

    for (Chain c : structure.getStructureMap().getChains()) {
      Bird b = c.getBird();
      if (b != null && b.isSameInstance(bird)) {
        residues.addAll(c.getResidues());
      }
    }
    return residues.toArray(new Residue[residues.size()]);
  }