Package mmLib :: Module FileIO
[show private | hide private]
[frames | no frames]

Module mmLib.FileIO

Load and save mmLib.Structure objects from/to mmLib supported formats. The mmCIF and PDB file formats are currently supported.
Classes
ZCat  

Exceptions
FileIOUnsupportedFormat  

Function Summary
  get_file_arg(args)
  get_file_extension(path, default_extension)
Returns the 3-letter extension of the filename.
  LoadStructure(**args)
Loads a mmCIF file(.cif) or PDB file(.pdb) into a Structure class and returns it.
  open_fileobj(fil, file_mode)
  OpenFile(path, mode)
Right now this only supports opening GZip'ed files, in the future it might be extended for URLs.
  SaveStructure(**args)
Saves a Structure object into a supported file type.
  test_module()

Function Details

get_file_extension(path, default_extension='PDB')

Returns the 3-letter extension of the filename.

LoadStructure(**args)

Loads a mmCIF file(.cif) or PDB file(.pdb) into a Structure class and returns it. The function takes 5 named arguments, one is required:

file = <file object or path; required> format = <'PDB'|'CIF'; defaults to 'PDB'> structure = <mmLib.Structure object to build on; defaults to createing new> sequence_from_structure = [True|False] <infer sequence from structure file, default False> library_bonds = [True|False] <build bonds from monomer library, default False> distance_bonds = [True|False] <build bonds from covalent distance calculations, default False>

OpenFile(path, mode)

Right now this only supports opening GZip'ed files, in the future it might be extended for URLs.

SaveStructure(**args)

Saves a Structure object into a supported file type. file = <file object or path; required> structure = <mmLib.Structure object to save; required> format = <'PDB' or 'CIF'; defaults to 'PDB'>

Generated by Epydoc 2.1 on Sun Apr 23 22:08:39 2006 http://epydoc.sf.net