public void breakUp(Molecule A){
    
    Molecule Asub;
    Network networkA;
    ArrayList<Molecule> fragmentsMol = new ArrayList<Molecule>();
    ArrayList<Network> fragments = new ArrayList<Network>();
    
    int[] bondingSites;
    int bondingSite;
    
    int[] AsubMolID;
    
    bondingSite=0;
    
    AsubMolID = A.selectRandom();
    
    Asub = new Molecule(A.getFromMoleculeID(AsubMolID, AsubMolID.length, 0));
    
    fragmentsMol = A.split(AsubMolID);
    fragmentsMol.add(Asub);
    fragments = moleculeArrToNetworkArr(fragmentsMol);
    
    A.unFlagAll();
    
    networkA = library.get(A.getID());
    networkA.setState(A.getState());
    
    double avActivity = networkA.getActivity();
    double avCycleLengthBefore = networkA.getCycleLength();
    double avCycleLengthAfter = 0;
    double P = 0;
    
    for(int i=0; i<fragments.size(); i++){
      
      avActivity += (double) fragments.get(i).getActivity();
      avCycleLengthAfter += (double) fragments.get(i).getCycleLength();
      
    }
    
    avActivity = avActivity/(fragments.size()+1);
    //avCycleLengthAfter = avCycleLengthAfter/fragments.size();
    
    
    double exponent = ((avCycleLengthAfter + avCycleLengthBefore)/2 + avActivity)
    - avCycleLengthBefore;
    
    P = Math.exp(-exponent/temperature);
    
    /*if(avActivityAfter < ActivityBefore){
      
      P = 1;
      
    }
    else{
      
      //P=0;
      //P = exp[(int)avCycleLengthAfter-(int)avCycleLengthBefore];
      P = Math.exp( ((ActivityBefore-avActivityAfter)/ (1*temperature) ) );
      //P=1;
    }*/
    
    boolean bondBroken = (Math.random()<P)? true:false;
    
    if(bondBroken){
      //System.out.printf("\t"+A.toStringf()+" ---> %d\n", fragments.size());
      numReactions++;
      ArrayList<Molecule> reactants = new ArrayList<Molecule>();
      ArrayList<Molecule> products = new ArrayList<Molecule>();
      
      reactants.add(A);
      bucket.remove(A);
      library.get(A.getID()).decrPop();
      
      for(int i=0; i<fragmentsMol.size(); i++){
        
        bucket.add(fragmentsMol.get(i));
        products.add(fragmentsMol.get(i));
        library.get(fragmentsMol.get(i).getID()).incrPop();
        
      }
      
      //products.add(bucket.get(bucket.size()-1));
      //library.get(bucket.get(bucket.size()-1).getID()).incrPop();
      
      
      //Reaction R = new Reaction(reactants, products, this);
      //int reactionIndex = reactionsUpdate(R);
      //reactions.get(reactionIndex).incrCount();
      
    
    }
  
  }