Environment
Date: 2014-08-08

melting

## Class Environment

- java.lang.Object
- - melting.Environment

-     public class Environment
      extends java.lang.Object

  This class represents the environment of the sequences for which we want to know the melting temperature. It contains the sequences, the different ions and agents in the solution, the information about the sequences... Instance variables : HashMap concentrations : ion and agent concentrations double oligomerConcentration : oligomer concentration (in excess) int factor : correction factor of the oligomer concentration boolean IsSelfComplementarity String Hybridization : type of hybridization NucleotidSequences sequences : contains the sequences ThermoResult result : contains the results of Melting HashMap options : contains the options (default options and options entered by the user)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Environment(java.util.HashMap<java.lang.String,java.lang.String> options)` creates an Environment object from the different options (default options and options entered by the user).

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addResult(double enthalpy, double entropy)` increments the ThermoResult enthalpy and ThermoResult entropy of Environment.
    `java.util.HashMap<java.lang.String,java.lang.Double>` | `getConcentrations()` This method is called to get the concentrations of Environment.
    `double` | `getDMSO()` This method is called to get the DMSO concentration.
    `double` | `getDNTP()` This method is called to get the dNTP concentration.
    `int` | `getFactor()` This method is called to get the factor of Environment.
    `double` | `getFormamide()` This method is called to get the formamide concentration.
    `java.lang.String` | `getHybridization()` This method is called to get the hybridization of Environment.
    `double` | `getK()` This method is called to get the potassium concentration.
    `double` | `getMg()` This method is called to get the magnesium concentration.
    `double` | `getNa()` This method is called to get the sodium concentration.
    `double` | `getNucleotides()` This method is called to get the oligomerConcentration of Environment.
    `java.util.HashMap<java.lang.String,java.lang.String>` | `getOptions()` This method is called to get the HashMap options of Environment.
    `ThermoResult` | `getResult()` This method is called to get the ThermoResult of Environment.
    `NucleotidSequences` | `getSequences()` This method is called to get the sequences NucleotidSequences of Environment.
    `double` | `getTris()` This method is called to get the Tris buffer concentration.
    `boolean` | `isSelfComplementarity()` To check if the sequences are self complementary.
    `void` | `setFactor(int factor)` changes the factor value of Environment.
    `void` | `setMg(double Mg)` changes the magnesium concentration in the environment
    `void` | `setNa(double na)` changes the sodium concentration in the environment
    `void` | `setResult(double temperature)` changes the melting temperature of ThermoResult.
    `void` | `setResult(ThermoResult result)` changes the result ThermoResult of Environment.
    `void` | `setSelfComplementarity(boolean b)` changes the boolean value of the isSelfComplementarity boolean.
    `void` | `sortSquences(java.lang.String hybridization, java.lang.String firstSequence, java.lang.String secondSequence)` sorts the sequences in function of the type of hybridization : In case of DNA/RNA type of hybridization, the sequence (5'3') must be a DNA sequence and the complementary sequence (3'5') a RNA sequence.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### Environment

          public Environment(java.util.HashMap<java.lang.String,java.lang.String> options)

      creates an Environment object from the different options (default options and options entered by the user). initialises the different instance variables of the Environment object. If the options HashMap is null, an OptionSyntaxError is thrown. If all the required ion concentrations (Na, Mg, K, Tris) are 0, an OptionSyntaxError is thrown.
      Parameters:
        `options` - : contains the options (default options and options entered by the user)

  - ### Method Detail

    - #### sortSquences

          public void sortSquences(java.lang.String hybridization,
                          java.lang.String firstSequence,
                          java.lang.String secondSequence)

      sorts the sequences in function of the type of hybridization : In case of DNA/RNA type of hybridization, the sequence (5'3') must be a DNA sequence and the complementary sequence (3'5') a RNA sequence. In case of mRNA/RNA type of hybridization, the sequence (5'3') must be a mRNA sequence and the complementary sequence (3'5') a RNA sequence. Then creates the sequences NucleotidSequences of the Environment object.
      Parameters:
        `hybridization` - : type of hybridization. Precise the nature of each sequence (DNA, RNA or mRNA)
        `firstSequence` - : sequence (5'3')
        `secondSequence` - : complementary sequence (3'5')

    - #### getFactor

          public int getFactor()

      This method is called to get the factor of Environment.
      Returns:
        int factor of Environment.

    - #### setFactor

          public void setFactor(int factor)

      changes the factor value of Environment.
      Parameters:
        `factor` - : new factor value

    - #### getResult

          public ThermoResult getResult()

      This method is called to get the ThermoResult of Environment.
      Returns:
        ThermoResult result of Environment.

    - #### getSequences

          public NucleotidSequences getSequences()

      This method is called to get the sequences NucleotidSequences of Environment.
      Returns:
        NucleotidSequences sequences of Environment.

    - #### getNucleotides

          public double getNucleotides()

      This method is called to get the oligomerConcentration of Environment.
      Returns:
        double oligomerConcentration of Environment.

    - #### isSelfComplementarity

          public boolean isSelfComplementarity()

      To check if the sequences are self complementary.
      Returns:
        true if the sequences are self complementary.

    - #### setSelfComplementarity

          public void setSelfComplementarity(boolean b)

      changes the boolean value of the isSelfComplementarity boolean.
      Parameters:
        `b` -

    - #### getHybridization

          public java.lang.String getHybridization()

      This method is called to get the hybridization of Environment.
      Returns:
        String hybridization of Environment. (represents the type of hybridization)

    - #### getOptions

          public java.util.HashMap<java.lang.String,java.lang.String> getOptions()

      This method is called to get the HashMap options of Environment.
      Returns:
        HashMap options of Environment.

    - #### getNa

          public double getNa()

      This method is called to get the sodium concentration.
      Returns:
        double Na corresponding to the sodium concentration.

    - #### getMg

          public double getMg()

      This method is called to get the magnesium concentration.
      Returns:
        double Mg corresponding to the magnesium concentration.

    - #### setMg

          public void setMg(double Mg)

      changes the magnesium concentration in the environment
      Parameters:
        `Mg` - : new magnesium concentration

    - #### getTris

          public double getTris()

      This method is called to get the Tris buffer concentration.
      Returns:
        double Tris corresponding to the Tris buffer concentration.

    - #### getK

          public double getK()

      This method is called to get the potassium concentration.
      Returns:
        double K corresponding to the potassium concentration.

    - #### getConcentrations

          public java.util.HashMap<java.lang.String,java.lang.Double> getConcentrations()

      This method is called to get the concentrations of Environment.
      Returns:
        HashMap concentrations of Environment. (contains the different ion and agent concentrations)

    - #### getDMSO

          public double getDMSO()

      This method is called to get the DMSO concentration.
      Returns:
        double DMSO corresponding to the DMSO concentration.

    - #### getFormamide

          public double getFormamide()

      This method is called to get the formamide concentration.
      Returns:
        double formamide corresponding to the formamide concentration.

    - #### setNa

          public void setNa(double na)

      changes the sodium concentration in the environment
      Parameters:
        `Na` - : new sodium concentration

    - #### addResult

          public void addResult(double enthalpy,
                       double entropy)

      increments the ThermoResult enthalpy and ThermoResult entropy of Environment. with the specified double enthalpy and double entropy.
      Parameters:
        `enthalpy` - : enthalpy incrementation value
        `entropy` - : entropy incrementation value

    - #### setResult

          public void setResult(double temperature)

      changes the melting temperature of ThermoResult.
      Parameters:
        `temperature` - : new melting temperature

    - #### setResult

          public void setResult(ThermoResult result)

      changes the result ThermoResult of Environment.
      Parameters:
        `result` - : new ThermoResult object.

    - #### getDNTP

          public double getDNTP()

      This method is called to get the dNTP concentration.
      Returns:
        double dNTP corresponding to the dNTP concentration.