| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
StructureViewer
Class for plotting structure in general structure viewer.
It takes care of creating temporary structure file in a desired
format and launching structure viewer as a background process.
The temporary files are removed when StructureViewer instance
goes out of scope.
Data attributes:
executable -- full path to the structure viewer executable or an executable
that can be found in system PATH. By default '' (not set).
argstr -- argument string for the viewer program, it can use shell
quoting. Instances of '%s' in the string are replaced with
temporary structure file. By default '%s'
fileformat -- structure format that can be loaded by the viewer.
Must be one of output formats supported by diffpy.Structure
package. By default 'pdb'.
_tmpdir -- Temporary directory for structure files opened by the viewer.
tmpdir is None before the first call to plot. The directory
and everything inside is removed when StructureViewer goes
out of the scope.
_plotcount -- Number of plots created by this viewer.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
Create StructureViewer instance. All arguments are optional,
they override defaults described in class docstring. The
configuration can be changed later using setConfig method.
executable -- path to the structure viewer executable
argstr -- argument string for the viewer program, it can use
shell quoting. Instances of '%s' are replaced with
temporary structure file.
fileformat -- structure format supported by diffpy.Structure package.
|
Return current configuration of StructureViewer instance.
Returns new dictionary with the following keys:
('executable', 'argstr', 'fileformat')
|
Configure StructureViewer instance using values in a dictionary.
cfg -- configuration dictionary, with the same keys as returned
by getConfig(). Any other keys are ignored.
No return value.
|
Launch new structure viewer and open a temporary copy of stru. stru -- instance of Structure class from diffpy.Structure No return value. Raise ControlConfigError if structure viewer could not be launched. |
Convert self.argstr to a list of string arguments.
strupath -- path to temporary structure file. Replaces every
instance of '%s' in self.argstr.
Return list of arguments (not including the viewer executable).
|
Create new temporary structure file in specified fileformat. stru -- instance of Structure class Return full path to the temporary file. |
Create new numbered temporary directory below self._tmpdir. Create _tmpdir if it does not exist yet. Return full path to the new temporary directory. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Fri Apr 10 19:11:01 2009 | http://epydoc.sourceforge.net |