[vtk-developers] vtkChemistry update

David Lonie loniedavid at gmail.com
Fri Jul 22 20:11:18 EDT 2011


Hi all,

It's been a couple weeks since my last update, and I'd like to fill
everyone in one the new developments. I've made two blog posts
describing the Chemistry kit (with some screenshots) here:

http://davidlonie.blogspot.com/2011/06/overdue-update-gsocvtkchemistry.html
http://davidlonie.blogspot.com/2011/07/vtkchemistry-now-with-electrons.html

The most recent additions have been targeting electronic data
visualization. As with the vtkMoleculeMapper class, the
vtkElectronMapper/Actor classes aim to be simple to use and intuitive
to chemists. The entire pipeline to render a molecule (read from an
OpenQube-supported QM output file) with an arbitrary molecular orbital
(the LUMO in this case) is simply

  //--------------------------------------------------------------------------
  // Set up molecule source
  vtkNew<vtkOpenQubeMoleculeSource> oq;
  oq->SetFileName(fname);
  oq->Update();

  //--------------------------------------------------------------------------
  // Molecular geometry
  vtkNew<vtkMoleculeMapper> molMapper;
  molMapper->SetInputConnection(oq->GetOutputPort());
  molMapper->UseLiqouriceStickSettings();

  vtkNew<vtkActor> molActor;
  molActor->SetMapper(molMapper.GetPointer());

  //--------------------------------------------------------------------------
  // Electron cloud
  vtkNew<vtkElectronMapper> eleMapper;
  eleMapper->SetInput(mol);
  eleMapper->UseLUMO();

  vtkNew<vtkElectronActor> eleActor;
  eleActor->SetMapper(eleMapper.GetPointer());
  eleActor->SetRenderStyleToVolume(); // Could be Isosurface instead

Add eleActor and molActor to the target renderer, and it's good to go!

I would like some feedback on some changes to vtkVector that I've made
along the way, but I'll make a separate thread for that. As before,
the current state of the code is up at
https://github.com/dlonie/VTK/commits/chemistry-review if anyone would
like to test/comment/view.

Cheers,

Dave



More information about the vtk-developers mailing list