public void populateLibrary(int numSpecies, int numNodes, int numBondingSites){
    
    Molecule nullMolecule = new Molecule();
    
    if(!reuse){
      library.add(new Network(0));
      for(int i=1; i<numSpecies; i++){
        library.add(new Network(numNodes, i, numBondingSites));
        library.get(i).setMol(new Molecule(i, nullMolecule, nullMolecule));
        progress("Adding...", i, numSpecies);
        
      
      }
      progress("Adding...", numSpecies, numSpecies);
    
      for(int i=0; i<numSpecies; i++){
        DataOutput out = new DataOutput("/data/library/"+i+".txt");
        progress("Saving...", i, numSpecies);
        
        try{
          out.writeToFile(library.get(i));
        }catch(IOException e){System.out.println("Could not write file.");}
      }
      progress("Saving...", numSpecies, numSpecies);
      
    }
    else{
      
      for(int i=0; i<numSpecies; i++){
        progress("Retrieving...", i, numSpecies);
        DataOutput in = new DataOutput(path+i+".txt");
        try{
          library.add(in.readFile());
          library.get(0).setPop(0);
        }catch(IOException e){
          e.printStackTrace();
        }catch(ClassNotFoundException e){
          e.printStackTrace();
        }
        
      }
      progress("Retrieving...", numSpecies, numSpecies);
      
    }
    
    
  }