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.
<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />
The vtkAtoms class plots atoms during simulations, extracting the relevant information from the list of<br />
atoms. It is created using the list of atoms as an argument to the constructor. Then one or more visualization<br />
modules can be attached using add_module(name, module).<br />
Example:<br />
>>> va = vtkAtoms(atoms)<br />
>>> va.add_forces()<br />
>>> va.add_axes()<br />
>>> XXX va.add_to_renderer(vtk_ren)<br />
Construct a fundamental VTK-representation of atoms.<br />
atoms: Atoms object or list of Atoms objects The atoms to be plotted.<br />
scale = 1: float or int Relative scaling of all Atoms-specific visualization.<br />
add_axes()<br />
Add an orientation indicator for the cartesian axes. An appropriate vtkAxesModule is added to the<br />
module anchor under axes.<br />
add_cell()<br />
Add a box outline of the cell using atoms.get_cell(). The existing vtkUnitCellModule is added<br />
to the module anchor under cell.<br />
add_forces()<br />
Add force vectors for the atoms using atoms.get_forces(). A vtkGlyphModule is added to the<br />
module anchor under force.<br />
add_velocities()<br />
Add velocity vectors for the atoms using atoms.get_velocities(). A vtkGlyphModule is added to<br />
the module anchor under velocity.<br />
Atom-centered data<br />
The superclass vtkAtomicPositions implements the basic concepts for representing atomic-centered data<br />
in VTK.<br />
class ase.visualize.vtk.grid.vtkAtomicPositions(pos, cell)<br />
Provides an interface for adding Atoms-centered data to VTK modules. Atomic positions, e.g. obtained<br />
using atoms.get_positions(), constitute an unstructured grid in VTK, to which scalar and vector can be added<br />
as point data sets.<br />
Just like Atoms, instances of vtkAtomicPositions can be divided into subsets, which makes it easy<br />
to select atoms and add properties.<br />
Example:<br />
>>> cell = vtkUnitCellModule(atoms)<br />
>>> apos = vtkAtomicPositions(atoms.get_positions(), cell)<br />
>>> apos.add_scalar_property(atoms.get_charges(), ’charges’)<br />
>>> apos.add_vector_property(atoms.get_forces(), ’forces’)<br />
Construct basic VTK-representation of a set of atomic positions.<br />
pos: NumPy array of dtype float and shape (n,3) Cartesian positions of the atoms.<br />
cell: Instance of vtkUnitCellModule of subclass thereof Holds information equivalent to that of<br />
atoms.get_cell().<br />
add_scalar_property(data, name=None, active=True)<br />
Add VTK-representation of scalar data at the atomic positions.<br />
data: NumPy array of dtype float and shape (n,) Scalar values corresponding to the atomic positions.<br />
name=None: str Unique identifier for the scalar data.<br />
108 Chapter 7. Documentation for modules in <strong>ASE</strong>