class pdb.Pdb

Available on all platforms

data container for pdb file

  • data hierarchy

Pdb - PdbModel - PdbChain(use chain id) - PdbResidue - PdbAtom

  • PdbModel : MODELs which are often used for NMR structure
  • PdbChain : A chain
  • PdbResidue : A residue
  • PdbAtom : An atom

keywords to be interpretted are: TER, END, ENDMDL, HELIX, SHEET, ATOM, HETATM

Class Fields

static var coil_radius:String

radius of coil used when generating xml

static var helix_color:String

color of helix used when generating xml

static var helix_thickness:String

thickness of helix used when generating xml

static var ribbon_radius:String

radius of ribbon used when generating xml

static var strand_color:String

color of strand used in generating xml

static var strand_thickness:String

thickness of strand used in generating xml

Instance Fields

var models:Map<Int, PdbModel>

Pdb MODEL container; which often appears in NMR structures.

function new(pdbText:String):Void

Constructor. If pdb text is given, input and secondary structure assign will be performed. See also readAtOnce.

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

add an atom to this instance. -mn: model number -cid: chain id -resname: residue name -atom: PdbAtom; contains atom name, atom index, positions see also PdbAtom class.

function calcSecondaryStructures():Void

assign secondary structures

function empty():Bool

returns true if this instance is empty. Otherwise, returns false.

function genSecondaryString():String

returns secondary structure assignements as a string. Each secondary structure element is written in one-character code as

  • H: alpha helix
  • 3: 3-10 helix
  • P: pi-helix
  • E: beta-strand
  • C: coil
  • T: turn
  • B: bridge

function genXml():String

generate XML string from PDB data and return it as a string.

function get_models():Map<Int, PdbModel>

getter of models

function initialize():Void

initialize data

function postProcess():Void

assign secondary structure. Note that this function does not return the result of assignment. Use genSecondaryString function to get the result.

function readAtOnce(pdbText:String, doPostProcess:Bool):Void

read whole pdb file and store it data. If doPostProcess is true, secondary structure will be assigned.

function readLine(line:String):Void

read a line of pdb file and parse it.