# `class pdb.PdbChain`

Available on all platforms

Container of a chain in pdb file

## Class Fields

### `static var interpolation:Int`

number of interpolation points used when creating smooth chain in wm3d

## Instance Fields

### `var max_index:Int`

maximum residue index in this chain

### `var min_index:Int`

minimum residue index in this chain

### `var name:String`

name of this chain

### `var residues:Map<Int, PdbResidue>`

residues in this chain, where the key of Map is residue index

### `function new(n:String):Void`

Constructor. You can set chain name by `n`.

### `function addAtom(resname:String, resid:Int, atom:PdbAtom):Void`

add an PdbAtom `atom` to the `resid` in this chain. `resname` is used only when creating new residue.

### `function assignSec(sec:PdbSecondary):Void`

assign secondary structure `sec` to all residues

### `function calcSecondaryStructures():Void`

calculate secondary structure information

### `function genSecondaryString():String`

returns secondary structure information of this chain. See `Pdb.hx` for details about notations.

### `function genXml():String`

returns WMXML xml as a string

### `function get_max_index():Int`

getter of `max_index`

### `function get_min_index():Int`

getter of `min_index`

### `function get_name():String`

### `function get_residues():Map<Int, PdbResidue>`

getter of `residues`

### `function set_max_index(i:Int):Int`

setter of `max_index`

### `function set_min_index(i:Int):Int`

setter of `min_index`

### `function set_name(n:String):String`