public static void HEMStatic() throws IOException, StructureException {
        MysqlDBService.LoadConnection();
        //Get all PDB
        SortedSet<String> ss = getAllIDs();
        // Create a queue
        LinkedList<String> queue = new LinkedList<String>();
        //Put all the PDB IDs in a queue
        for (String ID : ss) {
            queue.add(ID);
        }
        ExecutorService executor = Executors.newFixedThreadPool(4);
        //Run the Analysis
        for (int i = 1; i <= 20; i++) {
            ProteinWorkerThread worker = new ProteinWorkerThread(queue.get(i));
            worker.run();
            System.out.println("I count: "+i);
        }
//        FileOutputStream fileOut =
//         new FileOutputStream("D:\\BioJava\\serialized\\pdbout110000.ser");
//         ObjectOutputStream out = new ObjectOutputStream(fileOut);
//         out.writeObject(LgLigandResults);
//         out.close();
//         fileOut.close();
//         System.out.printf("Serialized data is saved in /tmp/employee.ser");
        
        
        
        
        
        
//        Iterator<String> ProteinIDs = ss.iterator();
//        Hashtable<String, Integer> inside = new Hashtable<String, Integer>();
//        Hashtable<String, Hashtable<String, Integer>> outside = new Hashtable<>();
//        int counter = 0;
//        inside = new Hashtable<String, Integer>();
//        while (ProteinIDs.hasNext()) {
//            String ProteinID = ProteinIDs.next();
//            Structure st = getStructure(ProteinID);
//            LinkedList<Group> HEMs = getAllHEM(st);
//            for (int i = 0; i < HEMs.size(); i++) {
//                Group HEM = HEMs.get(i);
//                //get HEM atoms
//                List<Atom> HEMAtoms = HEM.getAtoms();
//                for (Atom HEMAtom : HEMAtoms) {
//                    //Iterate through chains
//                    for (Chain c : st.getChains()) {
//                        //Iterate through groups
//                        for (Group g : c.getAtomGroups()) {
//                            //If group is HEM ignore
//                            if (!(g.getPDBName().equalsIgnoreCase("HEM"))) {
//                                for (Atom a : g.getAtoms()) {
//                                    double distance = Calc.getDistance(a, HEMAtom);
//                                    if (distance < 4) {
//                                        if (!(g.getType().equals("amino"))) {
//                                            continue;
//                                        }
//                                        ///////get elements names
////                                        inside = new Hashtable<String, Integer>();
////                                        System.out.println(g.getPDBName());
////                                        //Check if the HEM atom is in the 
////                                        if (outside.containsKey(HEMAtom.getFullName())) {
////                                            inside = outside.get(HEMAtom.getFullName());
////                                            //Check if the element being bonded to.
////                                            if (inside.containsKey(a.getElement().toString())) {
////                                                inside.put(a.getElement().toString(), inside.get(a.getElement().toString()) + 1);
////                                            } else {
////                                                inside.put(a.getElement().toString(), 1);
////                                                outside.put(HEMAtom.getFullName(), inside);
////                                            }
////
////                                        } else {
////                                            inside = new Hashtable<String, Integer>();
////                                            inside.put(a.getElement().toString(), 1);
////                                            outside.put(HEMAtom.getFullName(), inside);
////                                        }
//                                        ///////get group name
//                                        inside = new Hashtable<String, Integer>();
//                                        System.out.println(g.getPDBName());
//                                        ///Check if the HEM atom is in the 
//                                        if (outside.containsKey(HEMAtom.getElement().toString())) {
//                                            inside = outside.get(HEMAtom.getElement().toString());
//                                            //Check if the element being bonded to.
//                                            if (inside.containsKey(g.getPDBName())) {
//                                                inside.put(g.getPDBName().toString(), inside.get(g.getPDBName()) + 1);
//                                            } else {
//                                                inside.put(g.getPDBName(), 1);
//                                                outside.put(HEMAtom.getElement().toString(), inside);
//                                            }
//
//                                        } else {
//                                            inside = new Hashtable<String, Integer>();
//                                            inside.put(g.getPDBName(), 1);
//                                            outside.put(HEMAtom.getElement().toString(), inside);
//                                        }
//                                        /////////*
//
//                                    }
//                                }
//                            }
//                        }
//                    }
//
//                }
//
//            }
////            if (counter > 100) {
////                break;
////            }
//            counter++;
//        }
//
//        Set<String> OutsideKeys = outside.keySet();
//
//        for (String OutsideKey : OutsideKeys) {
//            System.out.println("HEM Element :" + OutsideKey + ", Count :");
//            Set<String> InsideKeys = outside.get(OutsideKey).keySet();
//            for (String InsideKey : InsideKeys) {
//                System.out.println("\t" + InsideKey + ":" + outside.get(OutsideKey).get(InsideKey));
//            }
//        }

    }