| |
- libvtkRenderingPython.vtkAssembly(libvtkRenderingPython.vtkProp3D)
-
- BaseNode
-
- AtomNode
- BondNode
- ScalarSphereNode
- TriangleNode
- VibratingAtomNode
- libvtkRenderingPython.vtkFollower(libvtkRenderingPython.vtkActor)
-
- TextFollowerNode
class AtomNode(BaseNode) |
|
Class for rendering atoms.
The following public methods are exported :
highlight_picked() -- highlight the node
apply_material() -- set a new material to the node |
|
- Method resolution order:
- AtomNode
- BaseNode
- libvtkRenderingPython.vtkAssembly
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Accepts the common keywords for all nodes, see the constructor of BaseNode.
Positional arguments :
atom -- atom (pyviblib.molecule.Atom)
Keyword arguments (specific to this class) :
mode -- ball & stick or van der Waals
one of (resources.NUM_MODE_BALLSTICK,
resources.NUM_MODE_VDW)
(default resources.NUM_MODE_BALLSTICK)
color_picked_atom -- color of a picked atom node
(default resources.COLOR_PICKED_ATOM)
- apply_material = <function apply_material>
- Set a new material to the atom node.
Positional arguments :
material -- new material (pyviblib.util.pse.Material)
- highlight_picked = <function highlight_picked>
- Highlight/unhighlight a picked atom node.
The color of the picked atom node is set to
resources.COLOR_HIGHLIGHTED_PICKED_ATOM.
Nothing is done if the node is not picked.
Keyword arguments :
highlight -- whether to highlight the atom node (default True)
transparency -- transparency
- pick = <function pick>
- Pick the atom node.
Overrides the method of the base class.
Create a nimbus around the atom (25% transparent).
Nothing is done if the node is not pickable or already picked.
- set_material = <function set_material>
- Set a new material to the atom node.
Positional arguments :
material -- new material (pyviblib.util.pse.Material)
- set_resolution = <function set_resolution>
- Set the resolution of the atom node.
Overrides the method of the base class.
Positional arguments :
resolution -- new theta and phi resolution
|
class BaseNode(libvtkRenderingPython.vtkAssembly) |
|
Base class for 3D objects used in PyVib2.
The class inherits from the vtk.vtkAssembly class. Since the multiple
inheritance is not supported by VTK classes, one cannot inherit
simultaneously from the object class and so, no properties are available.
See :
http://www.vtk.org/doc/release/5.0/html/a01164.html
The following public methods are exported :
pick() -- pick the node
unpick() -- unpick the node
get_pickable() -- whether the node can be picked
set_pickable() -- set whether the node can be picked
get_picked() -- whether the node is picked
get_highlighted() -- whether the node is highlighted
set_resolution() -- set the resolution of the node
The following functions should be overriden in subclasses :
pick()
unpick()
set_resolution()
_render() -- the rendering is performed in this function |
|
- Method resolution order:
- BaseNode
- libvtkRenderingPython.vtkAssembly
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Keyword arguments (common to all nodes) :
resolution -- resolution (default resources.NUM_RESOLUTION_VTK)
color -- color (default white)
diffuse_color -- diffuse color (default white)
specular_color -- specular color (default white)
ambient_color -- ambient color (default white)
diffuse -- diffuse lightning coefficient (default 1.0)
specular -- specular lightning coefficient (default 0.1)
specularPower -- specular power (default 20)
ambient -- ambient lightning coefficient (default 0.)
transparency -- transparency (between 0. and 1.)
- get_highlighted = <function get_highlighted>
- Whether the node is highlighted.
- get_pickable = <function get_pickable>
- Whether the node can be picked.
- get_picked = <function get_picked>
- Whether the node is picked.
- pick = <function pick>
- Pick the node.
Subclasses should override this function to do something reasonable.
New actors should be collected to the self.__actors_picked list.
- set_pickable = <function set_pickable>
- Set whether the node can be picked.
Positional arguments :
value -- new state
- set_resolution = <function set_resolution>
- Set the resolution of the node.
Subclasses should override the function to make something reasonable.
Positional arguments :
resolution -- new resolution
- unpick = <function unpick>
- Unpick the node.
This implementation removes all actors from the self.__actors_picked list.
|
class BondNode(BaseNode) |
|
Class for rendering bonds.
The following public methods are exported :
get_bond() -- get the bond passed to the constructor
render_displaced() -- displace the bond node |
|
- Method resolution order:
- BondNode
- BaseNode
- libvtkRenderingPython.vtkAssembly
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Accepts the common keywords for all nodes, see the constructor of BaseNode.
Positional arguments :
bond -- bond (pyviblib.molecule.Bond)
Keyword arguments (specific to this class) :
mode -- one cylinder or two cylinders
one of (resources.NUM_MODE_BONDS_MONOLITH_COLOR,
resources.NUM_MODE_BONDS_ATOMS_COLOR)
(default resources.NUM_MODE_BONDS_ATOMS_COLOR)
color -- diffuse color of the bond node if mode is set to
resources.NUM_MODE_BONDS_MONOLITH_COLOR
(default resources.COLOR_BONDS_DEFAULT)
rounded_bond -- whether to render hemispheres at the both ends of the
bond for a better appearance (default False)
- get_bond = <function get_bond>
- Return the bond passed to the constructor.
- render_displaced = <function render_displaced>
- Displace the bond node.
Called during an animation.
Nothing is done for a hydrogen bond.
Positional arguments :
Lx1 -- displacement from the equilibrium position for the first atom
Lx2 -- displacement from the equilibrium position for the second atom
- set_resolution = <function set_resolution>
- Set the resolution of the bond node.
Overrides the method of the base class.
Positional arguments :
resolution -- new number of facets
|
class ScalarSphereNode(BaseNode) |
|
Sphere whose size is dependent on a scalar value.
Useful e.g. for representing ACPs and GCPs.
The following public methods are exported :
get_radius() -- get the radius of the sphere |
|
- Method resolution order:
- ScalarSphereNode
- BaseNode
- libvtkRenderingPython.vtkAssembly
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Accepts the common keywords for all nodes, see the constructor of BaseNode.
Positional arguments :
value -- the value
pos -- position of the sphere (null-based array)
Keyword arguments (specific to this class) :
mode -- whether the absolute value should be proportional to the
surface or to the volume of the sphere
one of (resources.NUM_MODE_PROPORTIONAL_TO_VOLUME,
resources.NUM_MODE_PROPORTIONAL_TO_SURFACE)
(default resources.NUM_MODE_PROPORTIONAL_TO_SURFACE)
scale_factor -- factor with which the radius is multiplied
(default 1.)
color_positive -- diffuse color of the sphere for positive values
(default : red)
color_negative -- diffuse color of the sphere for negative values
(default : yellow)
- get_radius = <function get_radius>
- Get the radius of the sphere.
- set_resolution = <function set_resolution>
- Set the resolution of the node.
Overrides the method of the base class.
Positional arguments :
resolution -- new theta and phi resolution
|
class TextFollowerNode(libvtkRenderingPython.vtkFollower) |
|
Rendering a text which follows a camera.
More specifically it will not change its position or scale,
but it will continually update its orientation so that it is right
side up and facing the camera.
This class does not inherit from BaseNode.
See :
http://www.vtk.org/doc/release/4.0/html/classvtkFollower.html |
|
- Method resolution order:
- TextFollowerNode
- libvtkRenderingPython.vtkFollower
- libvtkRenderingPython.vtkActor
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Positional arguments :
text -- text
position -- position of the text
camera -- camera to follow
Keyword arguments :
scale -- isotropic scale (default 0.1)
|
class TriangleNode(BaseNode) |
|
Rendering a triangle. |
|
- Method resolution order:
- TriangleNode
- BaseNode
- libvtkRenderingPython.vtkAssembly
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Accepts the common keywords for all nodes, see the constructor of BaseNode.
Positional arguments :
p1 -- coordinates of the first vertex (one-based ndarray)
shape : (4,)
p2 -- coordinates of the second vertex (one-based ndarray)
shape : (4,)
p3 -- coordinates of the third vertex (one-based ndarray)
shape : (4,)
|
class VibratingAtomNode(BaseNode) |
|
Class for rendering vibrational motion on atoms.
The following public methods are exported :
highlight_picked() -- highlight the node |
|
- Method resolution order:
- VibratingAtomNode
- BaseNode
- libvtkRenderingPython.vtkAssembly
- libvtkRenderingPython.vtkProp3D
- libvtkCommonPython.vtkProp
- libvtkCommonPython.vtkObject
- libvtkCommonPython.vtkObjectBase
Data and other attributes defined here:
- __init__ = <function __init__>
- Constructor of the class.
Accepts the common keywords for all nodes, see the constructor of BaseNode.
Positional arguments :
atom -- atom (pyviblib.molecule.Atom)
L -- excursion (one-based ndarray)
shape : (4,)
freq -- wavenumber in in cm**(-1)
Keyword arguments (specific to this class) :
mode -- sphere or arrow representation
one of
(resources.STRING_MODE_VIB_REPRESENTATION_SPHERES,
resources.STRING_MODE_VIB_REPRESENTATION_ARROWS)
(default first)
rep_type -- cartesian or mass-weighted excursions
one of (resources.STRING_VIB_ENERGY,
STRING_VIB_EXCURSIONS)
(no default)
rep_subtype -- representation subtype
one of (STRING_VIB_ENERGY_VOLUME,
STRING_VIB_ENERGY_VOLUME_ZERO_POINT,
STRING_VIB_EXCURSIONS_DIAMETER,
STRING_VIB_EXCURSIONS_DIAMETER_ZEROPOINT,
STRING_VIB_EXCURSIONS_DIAMETER_STANDARD)
(no default)
scale_factor -- multiply factor for the amplitude of vibrational motion
(default 1.)
color_sphere_1 -- color of the first hemisphere in the sphere mode, i.e.
mode = resources.STRING_MODE_VIB_REPRESENTATION_SPHERES
(default resources.COLOR_VIB_HEMISPHERE_1)
color_sphere_2 -- color of the first hemisphere in the sphere mode, i.e.
mode == resources.STRING_MODE_VIB_REPRESENTATION_ARROWS
(default resources.COLOR_VIB_HEMISPHERE_2)
color_arrows -- color of the arrow in the arrow mode, i.e.
mode = STRING_MODE_VIB_REPRESENTATION_ARROWS
(default resources.COLOR_VIB_REPRESENTATION_ARROWS)
- highlight_picked = <function highlight_picked>
- Highlight/unhighlight a picked atom node.
The color of the picked atom node is set to
resources.COLOR_HIGHLIGHTED_PICKED_ATOM.
Nothing is done if the node is not picked.
Keyword arguments :
highlight -- whether to highlight the atom node (default True)
- pick = <function pick>
- Pick the atom node.
Overrides the method of the base class.
Create a nimbus around the atom (60% transparent).
Nothing is done if the node is not pickable or already picked.
- set_resolution = <function set_resolution>
- Set the resolution of the atom node.
Overrides the method of the base class.
Positional arguments :
resolution -- new resolution
in the sphere mode : theta and phi resolution
in the arrow mode : number of facets
| |