The NucleicAcid Class¶
-
class
ionize.
NucleicAcid
(name=None, size=None, sequence=None, species=None)[source]¶ -
context
(context=False)¶ Control the context in which ion properties are calculated.
The context is used as a convenience to specify what values of pH, ionic strength, and temperature are used to compute ion properties.
- Example::
``water = ionize.Solution()
my_ion.mobility() # Raises without a pH for calculation
- with my_ion.context(water):
- my_ion.mobility() # Uses water pH
my_ion.context(water) my_ion.mobility() # Uses water pH my_ion.context() # Returns water my_ion.context(None)``
There are multiple sources from which pH, ionic strength, and temperature can be drawn. They are, in order of priority:
Method parameters. Manually setting a value when calling an ion method always has the highest priority. Context. Default values. The default temperature is the package reference temperature, 25 degrees C. This is assumed throughout the package if temperature is not specified. The default ionic strength is the solvent ionic strength. This ionic strength is calculated from the pH if available. Otherwise, it is calculated as the minimum ionic strength associated with the solvent dissociation constant. There is no default value for the pH.
Parameters: context – The new context to use for ion calculations. If context is False, the current context is returned. Context can be None (to erase the current context) or a Solution object.
-
diffusivity
(pH=None, ionic_strength=None, temperature=None)¶ The diffusivity of the ion, in meter^2/second.
-
molar_conductivity
(pH=None, ionic_strength=None, temperature=None)¶ The molar conductivity of the ion, in Seimens/meter/Molar.
-
name
¶ Name of the ion.
-
reference_temperature
¶ The temperature at which ion properties were measured.
-
save
(filename)¶ Save a serialized Ion to a file.
-
separability
(other, pH=None, ionic_strength=None, temperature=None)¶ Return the separability between this ion and the other ion.
Separabillity is a normalized difference between this ion and the other ion, defined as:
abs((self.mobility - other.mobility)/ self.mobility)Parameters: other – The other ion for comparison. Must have valid context and mobility methods.
The context from this ion is used to override the context of the other ion.
-
sequence
¶ Sequence of the nucleic acid.
-
serialize
(nested=False, compact=False)¶ Returns a JSON serialized string representation of the ion. This representation can be returned to an Ion object using deserialize.
Parameters: nested – If True, skips JSON serialization and returns a python dictionary.
Parameters: compact – If True, returns a JSON representation with minimal characters. Otherwise, whitespace is introduced for readability.
-
size
¶ Number of bases or base pairs in the nucleic acid.
-
species
¶ Type of nucleic acid species.
-