# `class pdb.PdbModel`

Available on all platforms

Container for a MODEL in pdb file. If there are no MODELs in pdb file, at least one MODEL exists and is used in this program.

## Instance Fields

### `var chains:Map<String, PdbChain>`

chains which belong to this MODEL

### `var index:Int`

index of this MODEL

### `function new(i:Int):Void`

Constructor. You can set MODEL number by `i`.

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

add an PdbAtom `atom` to this MODEL.

- cid: chain id
- resname: residue name
- resid: residue index
- atom: a PdbAtom

### `function gatherHeteroes():Array<PdbAtom>`

gather hetero atoms from all chains

### `function genSecondaryString():String`

returns secondary structure information as a string. See the same name function in `Pdb.hx` for details.

### `function genXml():String`

generate WMXML style xml data of this MODEL and return it as a string.

### `function genXmlHeteroes():String`

return only NON-CHAIN, hetero atom part of XML data as a string.

### `function genXmlNotChains(atoms:Array<PdbAtom>):String`

generate non-CHAIN xml data; ATOMs and BONDs

### `function generateXmlAtomsBonds(minx:Int, miny:Int, minz:Int, maxx:Int, maxy:Int, maxz:Int, atoms:Array<PdbAtom>, indexes:Array<Array<Array<Array<Int>>>>):String`

generate ATOMs and BONDs for heteroes.

### `function get_chains():Map<String, PdbChain>`

getter of `chains`

### `function get_index():Int`

getter of `index`

### `function initializeSecondary():Void`

initialize secondary structure type. COIL for amino acids and NONE for others.

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

setter of `index`