How to add new ion and denaturing agent species

1) Create a new method in the Environment class from the melting package. This method must facilitate the usage of the new ion or denaturing agent species concentration in the program.

public double getNewSpecies() {
		if (concentrations.containsKey("newSpecies-Name")){
			return concentrations.get("newSpecies-Name");
		}
		return 0;
	}

2) If the new species concentration is a "required ion concentration", that's to say the new species can be the only one species in the solution (no other ions are necessary), you have to change the method private boolean isRequiredConcentrations() in the Environment class.

private boolean isRequiredConcentrations(){
		double Na = 0;
		double Mg = 0;
		double K = 0;
		double Tris = 0;
		
		// The new species must be initialised
		double NewSpecies = 0;
		
		if (concentrations.containsKey("Na")){
			Na = concentrations.get("Na");
		}
		if (concentrations.containsKey("Mg")){
			Mg = concentrations.get("Mg");
		}
		if (concentrations.containsKey("K")){
			K = concentrations.get("K");
		}
		if (concentrations.containsKey("Tris")){
			Tris = concentrations.get("Tris");
		}
		
		// To get the concentration of the new species
		if (concentrations.containsKey("newSpecies")){
			Tris = concentrations.get("newSpecies");
		}
		
		// the new species concentration must be strictly positive
		if (Na > 0 || K > 0 || Mg > 0 || Tris > 0 || newSpecies > 0){
			return true;
		}
		return false;
	}

Now, the future steps depend on the identity of the new species you want to add.



Subsections

Computational Neurobiology 2009-08-24