Package mmLib :: Module Library
[hide private]
[frames] | no frames]

Module Library

source code

Monomer and element library data classes. The Library classes are used for the identification and construction of biopolymers and ligands.

Classes [hide private]
  ElementDesc
Element description class returned by library_get_element_desc().
  MonomerDesc
Monomer description class returned by library_get_monomer_desc().
Functions [hide private]
 
library_construct_element_desc(symbol)
Constructs the ElementDesc object for the given element symbol.
source code
 
library_get_element_desc(symbol)
Loads/caches/returns an instance of the ElementDesc class for the given element symbol.
source code
 
library_use_monomer_zipfile()
Returns True if the zipfile version of the monomer library should be used, or False if the uncompressed directory hierarchy should be used.
source code
 
library_open_monomer_lib_zipfile(monomer_name)
Returns the open file object for the mmCIF monomer library file if it is found in the monomer library zipfile.
source code
 
library_open_monomer_lib_directory(monomer_name)
Returns the open file object for the mmCIF monomer library file if it...
source code
 
library_open_monomer_lib_file(monomer_name)
Returns the open file object for the mmCIF monomer library file if it is found from library_open_monomer_lib_directory() or library_open_monomer_lib_zipfile().
source code
 
library_construct_monomer_desc(res_name)
Constructs the MonomerDesc object for the given residue name.
source code
 
library_get_monomer_desc(res_name)
Loads/caches/returns the monomer description objec MonomerDesc for the given monomer residue name.
source code
 
library_is_amino_acid(res_name)
Returns True if the res_name is an amino acid.
source code
 
library_is_nucleic_acid(res_name)
Returns True if the res_name is a nucleic acid.
source code
 
library_is_standard_residue(res_name)
Returns True if the res_name is a standard amino or nucleic acid.
source code
 
library_is_water(res_name)
Return True if the res_name is water.
source code
 
library_guess_element_from_name(name0, res_name)
Try everything we can possibly think of to extract the element symbol from the atom name.
source code
 
test_module() source code
Variables [hide private]
  DATA_PATH = '/home/merritt/src/pymmlib-1.2.0/mmLib/Data'
  ELEMENT_DATA_PATH = '/home/merritt/src/pymmlib-1.2.0/mmLib/Dat...
  MMLIB_MONOMER_DATA_PATH = '/home/merritt/src/pymmlib-1.2.0/mmL...
  RCSB_MONOMER_DATA_FILE = '/home/merritt/src/pymmlib-1.2.0/mmLi...
  RCSB_MONOMER_DATA_PATH = '/home/merritt/src/pymmlib-1.2.0/mmLi...
  ELEMENT_CACHE = {}
  MONOMER_RES_NAME_CACHE = {}
  ELEMENT_CIF_FILE = [[[{'van_der_walls_radius': '1.200000', 'na...
  MMLIB_MONOMERS_CIF = [[[{'one_letter_code': 'G', 'chem_type': ...
  RCSB_USE_ZIP = None
hash(x)
  RCSB_ZIP = None
hash(x)
  ELEMENT_SYMBOL_DICT = {'AC': True, 'AG': True, 'AL': True, 'AR...
  AMINO_ACID3_LIST = ['GLY', 'ALA', 'VAL', 'LEU', 'ILE', 'PRO', ...
  AMINO_ACID31_DICT = {'ALA': 'A', 'ARG': 'R', 'ASN': 'N', 'ASP'...
  AMINO_ACID13_DICT = {'A': 'ALA', 'C': 'CYS', 'D': 'ASP', 'E': ...
  NUCLEIC_ACID_LIST = ['A', 'G', 'C', 'T', 'U']
  NUCLEIC_ACID_RES_NAME_DICT = {'+A': 'A', '+C': 'C', '+G': 'G',...
  ALT_RES_NAME_DICT = {'+A': 'A', '+C': 'C', '+G': 'G', '+T': 'T...
  JUNK = 'Library.py'
  MMLIB_PATH = '/home/merritt/src/pymmlib-1.2.0/mmLib'
  __package__ = 'mmLib'
Function Details [hide private]

library_get_element_desc(symbol)

source code 

Loads/caches/returns an instance of the ElementDesc class for the given element symbol. The source of the element data is the mmLib/Data/elements.cif file.

library_use_monomer_zipfile()

source code 

Returns True if the zipfile version of the monomer library should be used, or False if the uncompressed directory hierarchy should be used. If the

library_open_monomer_lib_directory(monomer_name)

source code 
Returns the open file object for the mmCIF monomer library file if it
is found as an uncompressed mmCIF file at the path:
    mmLib/Data/Monomers/NAME[0]/NAME.cif

library_open_monomer_lib_file(monomer_name)

source code 

Returns the open file object for the mmCIF monomer library file if it is found from library_open_monomer_lib_directory() or library_open_monomer_lib_zipfile(). library_open_monomer_lib_directory() is checked first because loading the file from the directory sturcture is much faster than loading it from a zipfile.

library_guess_element_from_name(name0, res_name)

source code 

Try everything we can possibly think of to extract the element symbol from the atom name. If available, use the monomer dictionary to help narrow down the search.


Variables Details [hide private]

ELEMENT_DATA_PATH

Value:
'/home/merritt/src/pymmlib-1.2.0/mmLib/Data/elements.cif'

MMLIB_MONOMER_DATA_PATH

Value:
'/home/merritt/src/pymmlib-1.2.0/mmLib/Data/monomers.cif'

RCSB_MONOMER_DATA_FILE

Value:
'/home/merritt/src/pymmlib-1.2.0/mmLib/Data/Monomers.zip'

RCSB_MONOMER_DATA_PATH

Value:
'/home/merritt/src/pymmlib-1.2.0/mmLib/Data/Monomers'

ELEMENT_CIF_FILE

Value:
[[[{'van_der_walls_radius': '1.200000', 'name': 'Hydrogen', 'symbol': \
'H', 'covalent_radius': '0.320', 'number': '1', 'color_rgb': '#FFFFFF'\
, 'atomic_weight': '1.007940'}], [{'b4': '57.799698', 'c': '0.003038',\
 'a3': '0.140191', 'a1': '0.493002', 'charge': '0', 'a2': '0.322912', \
'a4': '0.040810', 'b2': '26.125700', 'b3': '3.142360', 'wavelength': '\
CuKa', 'b1': '10.510900'}, {'b4': '3.567090', 'c': '0.002389', 'a3': '\
0.415815', 'a1': '0.897661', 'charge': '-1', 'a2': '0.565616', 'a4': '\
0.116973', 'b2': '15.187000', 'b3': '186.575989', 'wavelength': 'CuKa'\
...

MMLIB_MONOMERS_CIF

Value:
[[[{'one_letter_code': 'G', 'chem_type': 'aliphatic', 'id': 'GLY'}]], \
[[{'one_letter_code': 'A', 'chem_type': 'aliphatic', 'id': 'ALA'}]], [\
[{'one_letter_code': 'V', 'chem_type': 'aliphatic', 'id': 'VAL'}], [{'\
atom4': 'CG1', 'atom3': 'CB', 'name': 'chi1', 'atom2': 'CA', 'atom1': \
'N'}]], [[{'one_letter_code': 'L', 'chem_type': 'aliphatic', 'id': 'LE\
U'}], [{'atom4': 'CG', 'atom3': 'CB', 'name': 'chi1', 'atom2': 'CA', '\
atom1': 'N'}, {'atom4': 'CD1', 'atom3': 'CG', 'name': 'chi2', 'atom2':\
 'CB', 'atom1': 'CA'}]], [[{'one_letter_code': 'I', 'chem_type': 'alip\
...

ELEMENT_SYMBOL_DICT

Value:
{'AC': True,
 'AG': True,
 'AL': True,
 'AR': True,
 'AS': True,
 'AT': True,
 'AU': True,
 'Ac': True,
...

AMINO_ACID3_LIST

Value:
['GLY',
 'ALA',
 'VAL',
 'LEU',
 'ILE',
 'PRO',
 'PHE',
 'TYR',
...

AMINO_ACID31_DICT

Value:
{'ALA': 'A',
 'ARG': 'R',
 'ASN': 'N',
 'ASP': 'D',
 'CYS': 'C',
 'GLN': 'Q',
 'GLU': 'E',
 'GLY': 'G',
...

AMINO_ACID13_DICT

Value:
{'A': 'ALA',
 'C': 'CYS',
 'D': 'ASP',
 'E': 'GLU',
 'F': 'PHE',
 'G': 'GLY',
 'H': 'HIS',
 'I': 'ILE',
...

NUCLEIC_ACID_RES_NAME_DICT

Value:
{'+A': 'A',
 '+C': 'C',
 '+G': 'G',
 '+T': 'T',
 '+U': 'U',
 'A': 'A',
 'A+': 'A',
 'Ar': 'A',
...

ALT_RES_NAME_DICT

Value:
{'+A': 'A',
 '+C': 'C',
 '+G': 'G',
 '+T': 'T',
 '+U': 'U',
 'A+': 'A',
 'Ad': 'A',
 'Ar': 'A',
...