Package com.mockturtlesolutions.jpHtools.database

Examples of com.mockturtlesolutions.jpHtools.database.BufferSolution


    this.Params = new DblParamSet();
    this.pH = pHin;
    this.desiredIonicStr = desired_ionicStr;
   
   
    BufferSolution sol;
    for (int j=0;j<this.bufferSolutions.size();j++)
    {
     
      sol = (BufferSolution)this.bufferSolutions.get(j);
      if (j>0)
View Full Code Here


                return((String[])this.Params.keySet().toArray());
        }
 
  public DblMatrix getValueAt(DblMatrix factors)
        {
    BufferSolution sol;
    DblMatrix fact;
    this.Params.show("Parameters");
   
   
    // for (int j=0;j<this.bufferSolutions.size();j++)
//     {
//       sol = (BufferSolution)this.bufferSolutions.get(j);
//      
//       if (j==0)
//       {
//         fact = new DblMatrix(0.0);
//       }
//       else
//       {
//         fact = this.getParam(new String("Factor"+j));
//       }
//      
//       //We're optimizing the log of the mixture coefficients.
//       factors.setDblAt(DblMatrix.pow(10,fact),j); 
//     }
    
    BufferSolution mixture = null;
    //mixture = BufferSolution.createMixture(this.repos,this.bufferSolutions,factors);
          mixture = BufferSolution.createMixture(this.bufferSolutions,factors);
   
    mixture.show("Mixture");
   
    DblMatrix concMatrix = new DblMatrix(this.BVector.getN());
    HashMap spec_conc = null;
    spec_conc = (HashMap)mixture.species(this.pH);
   
   
    //Get the predicted ionic strength too!
    HashMap ionicStr = null;
    ionicStr = mixture.ionicStr(this.pH);
   
    DblMatrix iStrength = (DblMatrix)ionicStr.get("total");
   
   
    Set buffers = spec_conc.keySet();
View Full Code Here

    else
    {
      //System.out.println("The buffer "+buffername+" does not have any titration data. No optimization will be done. Exiting...");
      if (this.getObjectsToSample().length>0)
      {
        BufferSolution sol = new BufferSolution();
        sol.setConnection(Connection);
        sol.setRepository(repos);
        sol.initialize();
        sol.add(remoteStorage,new Double(1.0));
       
        LinkedList samples = new LinkedList();
        for (int j=0;j<this.maxIterations;j++)
        {
          HashMap extra = new HashMap();
View Full Code Here

    else
    {
      //System.out.println("The buffer "+buffername+" does not have any titration data. No optimization will be done. Exiting...");
      if (this.getObjectsToSample().length>0)
      {
        BufferSolution sol = new BufferSolution();
        sol.setConnection(Connection);
        sol.setRepository(repos);
        sol.initialize();
        sol.add(remoteStorage,new Double(1.0));
       
        LinkedList samples = new LinkedList();
        for (int j=0;j<this.maxIterations;j++)
        {
          HashMap extra = new HashMap();
View Full Code Here

         
          try
          {
           
            //bufferSolution = new BufferSolution(repos);
            bufferSolution = new BufferSolution();
            //bufferSolution.setConfig(Config);
            System.out.println("LLLLLLLLLLLLLLLLLLLLLLLLL");
            bufferSolution.setConnection(CONN);
            Config.show();
            bufferSolution.setRepository(repos);
View Full Code Here

  the given buffer solution.
  */
  public void setBufferSolution(BufferSolution sol)
  {
    //this.bufferSolution = new BufferSolution(this.repos);
    this.bufferSolution = new BufferSolution();
    this.bufferSolution.setConnection(sol.getConnection());
    this.bufferSolution.setRepository(sol.getRepository());
    this.bufferSolution.initialize();
   
    //this.table = new ContainsTable(this.Config,this.server);
View Full Code Here

            {
              public void actionPerformed(ActionEvent e)
              {
                try
                {
                  BufferSolution bufferSolution = gBufferSolution.getBufferSolution();
                  DblMatrix newInitpH = bufferSolution.initpH(guess,lower,upper);
                  pHText.setText(newInitpH.getDoubleAt(0).toString());
                  pHText.setCaretPosition(0);
                }
                catch (Exception err)
                {
View Full Code Here

               
                LinearConstraintObjective obj = new LinearConstraintObjective(repos,A,B,bufferSolutions,target_ionicStr,pH);
               
               
                DblParamSet Param = new DblParamSet();
                BufferSolution sol;
                //We have n-1 parameters since we define the first solutions
                //coefficient to be 1.
                for (int j=1;j<bufferSolutions.size();j++)
                {
                  sol = (BufferSolution)bufferSolutions.get(j);
View Full Code Here

   
    this.BVector.fireTableStructureChanged();
    this.XVector.fireTableStructureChanged();
    this.AMatrix.fireTableStructureChanged();
   
    BufferSolution mixed = null;
    try
    {
      mixed = new BufferSolution();
     
    }
    catch (Exception err)
    {
      throw new RuntimeException("Problem creating mixture buffer solution.",err);
    }
   
    GraphicalBufferSolution nextSol = null;
    BufferSolution bsol = null;
    HashMap species_conc = null;
    //Create a dummy mixture and get all the species at once.
    try
    {
      for (int j=0;j<this.bufferSolutions.size();j++)
View Full Code Here

TOP

Related Classes of com.mockturtlesolutions.jpHtools.database.BufferSolution

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.