Table of Contents

Module: PhiReaders DelphiViewer/PhiReaders.py

File: PhiReaders.py Date: 06.20.2000 Description: Three parsers to read Biosym(Insight), GRASP and DelPhi unformatted phi (electrostatic grid) formats from DelPhi *.phi files. In addition, the parsers can generate VRML and volume models from the phi data.

Imports: - chimera - _cubes - * from struct - * from array

Classes: - BiosymPhiReader - GraspPhiReader - DelPhiReader

Caveats: NOTE that the last class name is DelPhiReader NOT DelPhiPhiReader!

Last modified: 06.20.2000 - Added and base functionality completed. 06.21.2000 - Mucked around with scaling. 06.23.2000 - Setup scaling correctly. Added note concerning BiosymPhiReader. Not working! Added more comments. Rather, more USEFUL comments. 07.27.2000 - Started to add volume rendering functionality.

To do: 06.23.2000 - Add BiosymPhiReader functionality using correct scaling etc. Adjust VRML writers to take filenames as input? Add more comments/documentation.

Imported modules   
from Texturer import RGBRampTexture
import _cubes
import chimera
import struct
Functions   
RunTest
parsePhiFile
  RunTest 
RunTest ()

print Generating VRML from Biosym data... br = BiosymPhiReader(sod_biosym.phi) br.parseFile() vrmlfile = open(temp_biosym.wrl, w) br.writeVRMLSurface(vrmlfile, 1.0)

print Generating VRML from GRASP data... gr = GraspPhiReader(sod_grasp.phi) gr.parseFile() vrmlfile = open(temp_grasp.wrl, w) gr.writeVRMLSurface(vrmlfile, 1.0)

red = chimera.Color_lookup(red) blue = chimera.Color_lookup(blue) print Generating VRML from DelPhi data... dr = DelPhiReader(/home/spin/jmurray/default.phi) dr.parseFile() dr.viewVRMLMesh(-1.0, red, Isosurface) dr.viewVRMLMesh(1.0, blue, Isosurface)

  parsePhiFile 
parsePhiFile ( phiFileName )

Classes   

BasePhiReader

BiosymPhiReader

DelPhiReader

GraspPhiReader


Table of Contents

This document was automatically generated on Wed Mar 26 19:02:11 2003 by HappyDoc version 2.1