From: Dr N. O'B. <no...@ca...> - 2006-07-29 10:44:17
|
On Jul 28 2006, Rick Muller wrote: >Nice! Let me know if I can help with anything. Don't worry - I'm already thinking of a few questions :-) >By the way, how are you using mayavi? Did you have to write your own >routine to input the cube file, or is that fairly easy? If you have a Numeric array, you can use pyvtk by Pearu Peterson (http://cens.ioc.ee/projects/pyvtk/) to create an input XML file for VTK. As an example see the "__main__" section of: http://www.redbrick.dcu.ie/~noel/Cube2VTK.txt (which is a G03 cube file reader I did about a year ago). Once created, you can use mayavi -d myfile.vtk. It's also possible to interface to VTK directly (it comes with Python bindings) but that would be more complicated, although perhaps something cclib could think about later. Mayavi/VTK can also visualise a volume of vectors in some cool ways (arrows, flows, and so on). Would it be possible to easily calculate the gradient (i.e. separately with respect to x, then y, then z) of the electron density at every point in a volume? Would this be useful to visualise? I don't think I've ever seen anyone do this though, but I think it's related to the atoms in molecules theory. Noel |