p3d.library module

From p3d
Jump to: navigation, search

The library module holds a Library with some constants, e.g. hydrophobicity and side chain surface. Additionally some methods are included for easier access.

Library class

p3d.library.Library

The library is a python dictionary. Its keys are

  • AA : Three letter Aminoacid codes in ['GLY', ...]
  • AA_3_to_1 : three to one letter code
  • AA_1_to_3 : one to three letter code
  • Hydropathy : Hydropathy index number (Hydrophilic negative) {'A':1.8, ...}
  • SidechainSurface: AA side chain surface volume in nm2 {'A':1.15, ...}
  • AtomCount : Number of Atoms {'A':5, ...}
  • Atoms : Atom names in AA {'A':['CA','C'...], ...}
  • UniqueAtoms : Unique atoms in given AA {'CD':['GLN', 'LYS', 'PRO', 'GLU', 'ARG'], ...}
  • Mass : Mass in Da of given AA {'A':89, ...}

Methods

convert a three letter amino acid code into a one letter code
 >>> p3d.library.convert321('TRP')
'W'
convert a one letter amino acid code into a three letter code
 >>> p3d.library.convert123('Y')
'TYR'
calculate hydrophobicity
A one or a three letter AA is allowed as argument
hydrophobicity after J.Kyte and R.F.Doolittle (1982) JMB 157, 105-132
 >>> p3d.library.calcHydropathy('Y')
-1.3
calculate side chain surface
A one or a three letter AA is allowed as argument
SideChainSurface after J.Kyte and R.F.Doolittle (1982) JMB 157, 105-132
 >>> p3d.library.calcSideChainSurface('Y')
2.2999999999999998
return mass
A one or a three letter AA is allowed as argument
returns mass of given AA
 >>> p3d.library.calcMass('Y')
181.09999999999999