ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
active=True: bool Flag indicating whether to use as active scalar data.<br />
add_vector_property(data, name=None, active=True)<br />
Add VTK-representation of vector data at the atomic positions.<br />
<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />
data: NumPy array of dtype float and shape (n,3) Vector components corresponding to the<br />
atomic positions.<br />
name=None: str Unique identifier for the vector data.<br />
active=True: bool Flag indicating whether to use as active vector data.<br />
get_points(subset=None)<br />
Return (subset of) vtkPoints containing atomic positions.<br />
subset=None: list of int A list of indices into the atomic positions; ignored if None.<br />
get_unstructured_grid(subset=None)<br />
Return (subset of) an unstructured grid of the atomic positions.<br />
Predefined shapes<br />
subset=None: list of int A list of indices into the atomic positions; ignored if None.<br />
The class vtkGlyphModule implements the lower-level objects for representing predefined shapes (glyphs) in<br />
VTK.<br />
class ase.visualize.vtk.module.vtkGlyphModule(vtk_pointset, glyph_source, scalemode=None,<br />
colormode=None)<br />
Modules represent a unified collection of VTK objects needed for introducing basic visualization concepts<br />
such as surfaces or shapes.<br />
A common trait of all modules is the need for an actor representation and corresponding generic properties<br />
such as lighting, color and transparency.<br />
Poly data modules are based on polygonal data sets, which can be mapped into graphics primitives suitable<br />
for rendering within the VTK framework.<br />
Glyph modules construct these polygonal data sets by replicating a glyph source across a specific set of<br />
points, using available scalar or vector point data to scale and orientate the glyph source if desired.<br />
Example:<br />
>>> atoms = molecule(’C60’)<br />
>>> cell = vtkUnitCellModule(atoms)<br />
>>> apos = vtkAtomicPositions(atoms.get_positions(), cell)<br />
>>> vtk_ugd = apos.get_unstructured_grid()<br />
>>> glyph_source = vtkAtomSource(’C’)<br />
>>> glyph_module = vtkGlyphModule(vtk_ugd, glyph_source)<br />
Construct VTK-representation of a module containing glyphs. These glyphs share a common source, defining<br />
their geometrical shape, which is cloned and oriented according to the input data.<br />
vtk_pointset: Instance of vtkPointSet or subclass thereof A vtkPointSet defines a set of positions,<br />
which may then be assigned specific scalar of vector data across the entire set.<br />
glyph_source: Instance of ~vtk.vtkCustomGlyphSource or subclass thereof Provides the basic shape<br />
to distribute over the point set.<br />
get_actor()<br />
Return the actor representing this module in a rendering scene.<br />
set_actor(vtk_act)<br />
Set the actor representing this module in a rendering scene.<br />
set_property(vtk_property)<br />
Set the property of the actor representing this module.<br />
7.13. <strong>ASE</strong>-VTK 109