# Module MMTK.NucleicAcids

## Functions

- isNucleotideChain()

  Returns 1 if x is a NucleotideChain.

## Class Nucleotide: Nucleic acid residue

A subclass of MMTK.ChemicalObjects.Group.

Nucleotides are a special kind of group. Like any other group, they are defined in the chemical database. Each residue has two or three subgroups (`sugar` and `base`, plus `phosphate` except for 5'-terminal residues) and is usually connected to other residues to form a nucleotide chain. The database contains three variants of each residue (5'-terminal, 3'-terminal, non-terminal).

Constructor: Nucleotide(kind, model="all")

kind

  the name of the nucleotide in the chemical database. This is the full name of the residue plus the suffix "_5ter" or "_3ter" for the terminal variants.

model

  one of "all" (all-atom), "none" (no hydrogens), "polar" (united-atom with only polar hydrogens), "polar_charmm" (like "polar", but defining polar hydrogens like in the CHARMM force field). Currently the database has definitions only for "all".

Methods:

- backbone()

  Returns the sugar and phosphate groups.

- bases()

  Returns the base group.

## Class NucleotideChain: Nucleotide chain

A subclass of MMTK.Biopolymers.ResidueChain.

Nucleotide chains consist of nucleotides that are linked together. They are a special kind of molecule, i.e. all molecule operations are available.

Constructor: NucleotideChain(sequence, **|properties|)

sequence

  the nucleotide sequence. This can be a list of two-letter codes (a "d" or "r" for the type of sugar, and the one-letter base code), or a PDBNucleotideChain object. If a PDBNucleotideChain object is supplied, the atomic positions it contains are assigned to the atoms of the newly generated nucleotide chain, otherwise the positions of all atoms are undefined.

properties

  optional keyword properties:

- model: one of "all" (all-atom), "no_hydrogens" or "none" (no hydrogens), "polar_hydrogens" or "polar" (united-atom with only polar hydrogens), "polar_charmm" (like "polar", but defining polar hydrogens like in the CHARMM force field). Default is "all". Currently the database contains definitions only for "all".

- terminus_5: 1 if the first nucleotide should be constructed using the 5'-terminal variant, 0 if the non-terminal version should be used. Default is 1.

- terminus_3: 1 if the last residue should be constructed using the 3'-terminal variant, 0 if the non-terminal version should be used. Default is 1.

- circular: 1 if a bond should be constructed between the first and the last residue. Default is 0.

- name: a name for the chain (a string)

Nucleotide chains act as sequences of residues. If `n` is a NucleotideChain object, then

- `len(n)` yields the number of nucleotides

- `n[i]` yields nucleotide number `i` (counting from zero)

- `n[i:j]` yields the subchain from nucleotide number `i` up to but excluding nucleotide number `j`

Methods:

- backbone()

  Returns a collection containing the sugar and phosphate groups of all nucleotides.

- bases()

  Returns a collection containing the base groups of all nucleotides.

## Class NucleotideSubChain: A contiguous part of a nucleotide chain

NucleotideSubChain objects are the result of slicing operations on NucleotideChain objects. They cannot be created directly. NucleotideSubChain objects permit all operations of NucleotideChain objects, but cannot be added to a universe.