NearestNeighborMode
Date: 2014-08-08

melting.nearestNeighborModel

## Class NearestNeighborMode

- java.lang.Object
- - melting.nearestNeighborModel.NearestNeighborMode

- All Implemented Interfaces:
    MeltingComputationMethod

      public class NearestNeighborMode
      extends java.lang.Object
      implements MeltingComputationMethod

  This class represents the nearest neighbor model. It implements the MelitngComputationMethod Interface

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NearestNeighborMode()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static double` | `computesHairpinTemperature(Environment environment)` computes the melting temperature of a hairpin loop (when there is more than 4 CNG repeats in a sequence)
    `static double` | `computesMeltingTemperature(Environment environment)` computes the melting temperature for for the Environment 'environment'.
    `ThermoResult` | `computesThermodynamics()` This method is called to compute the melting temperature.
    `RegisterMethods` | `getRegister()` This method is called to get the RegisterMethod of the implemented class.
    `boolean` | `isApplicable()` This method is called to check that the options entered by the users are applicable with the used model (class).
    `void` | `setUpVariables(java.util.HashMap<java.lang.String,java.lang.String> options)` Creates the Environment object and set up the variables of the chosen model.

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

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

- - ### Constructor Detail

    - #### NearestNeighborMode

          public NearestNeighborMode()

  - ### Method Detail

    - #### computesThermodynamics

          public ThermoResult computesThermodynamics()

      Description copied from interface: `MeltingComputationMethod`
      This method is called to compute the melting temperature.
      Specified by:
        `computesThermodynamics` in interface `MeltingComputationMethod`
      Returns:
        ThermoResult containing the computed enthalpy, entropy and melting temperature.

    - #### isApplicable

          public boolean isApplicable()

      Description copied from interface: `MeltingComputationMethod`
      This method is called to check that the options entered by the users are applicable with the used model (class).
      Specified by:
        `isApplicable` in interface `MeltingComputationMethod`
      Returns:
        false if at least one chosen option makes the model completely false. If one chosen option may lead to less reliable results, a warning message will appear. (ex : wrong hybridization type)

    - #### setUpVariables

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

      Description copied from interface: `MeltingComputationMethod`
      Creates the Environment object and set up the variables of the chosen model.
      Specified by:
        `setUpVariables` in interface `MeltingComputationMethod`
      Parameters:
        `options` - containing all the options (default options and options entered by the user)

    - #### getRegister

          public RegisterMethods getRegister()

      Description copied from interface: `MeltingComputationMethod`
      This method is called to get the RegisterMethod of the implemented class.
      Specified by:
        `getRegister` in interface `MeltingComputationMethod`
      Returns:
        the RegisterMethod of the implemented class.

    - #### computesHairpinTemperature

          public static double computesHairpinTemperature(Environment environment)

      computes the melting temperature of a hairpin loop (when there is more than 4 CNG repeats in a sequence)
      Parameters:
        `environment` -
      Returns:
        double melting temperature of a hairpin loop for the Environment 'environment'.

    - #### computesMeltingTemperature

          public static double computesMeltingTemperature(Environment environment)

      computes the melting temperature for for the Environment 'environment'.
      Parameters:
        `environment` -
      Returns:
        double melting temperature for for the Environment 'environment'.