Package schrodinger :: Package analysis :: Package visanalysis :: Module volumedataio
[hide private]
[frames] | no frames]

Module volumedataio

Classes [hide private]
  _MMInitialiser
The _MMInitialiser class exists solely to initialise and terminate the mmlibs correctly.
  _MMVol
The _MMVol class acts as a wrapper around low-level MMVol objects.
Functions [hide private]
class object
Singleton(cls)
This function acts as a decorator to a class defintion.
VolumeData
LoadPickle(stream=None, filename=None)
This function retrieves a VolumeData instance from the specified Python Pickle file.
 
SavePickle(volumeData, stream=None, filename=None)
This function saves the specified VolumeData object to the specified file in Python Pickle format.
VolumeData
_MMVolToVolumeData(mmvol, handleNonOrthogonalAxes=False)
This function converts the specified mmvol object to a VolumeData instance.
VolumeData
LoadVisFile(filename)
This function retrieves a VolumeData object from a Schrodinger .vis file.
 
_VolumeDataToMMVol(volumeData, mmvol)
This function configures the specified mmvol object to be equivalent to the specified VolumeData.
 
SaveVisFile(volumeData, filename)
This function saves a VolumeData object to a Schrodinger .vis file.
 
SaveCCP4File(volumeData, filename)
This function saves a VolumeData object to a CCP4 file.
VolumeData
LoadCNSFile(filename)
This function loads a VolumeData object from a CNS file.
Variables [hide private]
  _X = 0
  _Y = 1
  _Z = 2
  _VX = np.array([1.0, 0.0, 0.0])
  _VY = np.array([0.0, 1.0, 0.0])
  _VZ = np.array([0.0, 0.0, 1.0])
  _MUST_SPECIFY_FILE = "Either stream or filename must be specif...
  _NON_ORTHOGONAL = "Non-orthogonal axes are currently not permi...
  _DEFAULT_NAME = "VolumeData"
  _PYTHON = "PYTHON"
  _mmInitialiser = _MMInitialiser()
Function Details [hide private]

Singleton(cls)

 

This function acts as a decorator to a class defintion. Its purpose is to ensure that only one instance of the class is ever accessible by the user. We use this single instance in place of global variables as it makes the code considerably more explicit.

Parameters:
  • cls (class object) - Specifies the class which is to become a singleton.
Returns: class object
The decorated class-object

LoadPickle(stream=None, filename=None)

 

This function retrieves a VolumeData instance from the specified Python Pickle file.

Parameters:
  • stream (file) - The stream containing the Pickle information. Overrides filename
  • filename (string) - The file containing a Pickle holding a VolumeData object. This argument is ignored if stream is not None.
Returns: VolumeData
The VolumeData object extracted from the Pickle.

SavePickle(volumeData, stream=None, filename=None)

 

This function saves the specified VolumeData object to the specified file in Python Pickle format.

Parameters:
  • volumeData (VolumeData) - The VolumeData object to be serialised
  • stream (file) - The stream to save the Pickle information to
  • filename (string) - The file to save the Pickle information to. This argument is ignored if stream is not None

_MMVolToVolumeData(mmvol, handleNonOrthogonalAxes=False)

 

This function converts the specified mmvol object to a VolumeData instance.

Parameters:
  • mmvol - The MMVol object to be loaded into a VolumeData instance
  • mmvol - MMVol handle
  • handleNonOrthogonalAxes (bool) - True if the function should handle non-orthogonal axes. False otherwise. [Currently this parameter is ignored and the function will throw an exception if it encounters non- orthogonal axes.
Returns: VolumeData
The newly constructed VolumeData instance

LoadVisFile(filename)

 

This function retrieves a VolumeData object from a Schrodinger .vis file.

Parameters:
  • filename (string) - A Schrodinger .vis file containing a valid mmvol object
Returns: VolumeData
The VolumeData extracted from the contents of the .vis file

_VolumeDataToMMVol(volumeData, mmvol)

 

This function configures the specified mmvol object to be equivalent to the specified VolumeData.

Parameters:
  • volumeData (VolumeData) - The VolumeData object to be converted
  • mmvol (MMVol handle) - A pre-allocated mmvol handle which awaits configuration

SaveVisFile(volumeData, filename)

 

This function saves a VolumeData object to a Schrodinger .vis file.

Parameters:
  • volumeData (volumeData) - The VolumeData to be serialised
  • filename (string) - Where to store the .vis file

SaveCCP4File(volumeData, filename)

 

This function saves a VolumeData object to a CCP4 file.

Parameters:
  • volumeData (VolumeData) - The VolumeData to be serialised
  • filename (string) - Where to store the .CCP4 file

LoadCNSFile(filename)

 

This function loads a VolumeData object from a CNS file.

Parameters:
  • filename (string) - The .cns formatted file
Returns: VolumeData
The VolumeData object extracted from the .cns file.

Variables Details [hide private]

_MUST_SPECIFY_FILE

Value:
"Either stream or filename must be specified."

_NON_ORTHOGONAL

Value:
"Non-orthogonal axes are currently not permitted."