pymol-open-source
                                
                                
                                
                                    pymol-open-source copied to clipboard
                            
                            
                            
                        How to compile with VTKM support?
Hi, I'm having problems compiling PyMol with VTKM support.
I downloaded version VTKM 1.5.1 and compiled it.
Which is the correct way to link this library?
Passing --use-vtkm=1.5.x to setup.py should set the appropriate compiler/linker flags.
I tried to move the directory of vtkm library vtkm_installation_dir/include  inside the directory pymol_dir/include and then run setup.py with --use-vtkm=1.5.x
But setup.py issued an error because was not able to locate the library.
Then I tried to link the directory of the library in /usr/include
At this point i'm getting this error from the compiler
/usr/bin/ld: cannot find -lvtkm_cont-1.5
/usr/bin/ld: cannot find -lvtkm_filter-1.5
Maybe I'm doing something wrong..
I'll try sometime this week to do a manual installation of vtk-m, but I usually retrieve my dependencies via conda package manager:
conda install -c schrodinger vtk-m
if you have conda.
Thanks . I don't have conda though.. I'll wait than.
A question.. Does isosurfaces will look nicer using vtk-m algorithm? Or is it a matter of performances?
AFAIK, back when Warren implemented support for isosurface generation, marching cubes was still patented but eventually expired in 2005. Since then PyMOL has used a marching tetrahedra approach, but we observed weird artifacts like very blocky surfaces where the contour wasn't optimal, steep gradients, or ambiguities from face diagonals. Thomas Holder implemented two marching cube approaches for PyMOL 2.5, one of which requires VTKm. Both seem to address these issues and look superior to the older approach. I'm not sure about the performance amongst all 3, but the Vtk-m approach is the preferred of all three approaches.
set isosurface_algorithm [0, 1, or 2]
where 0 => Marching Cube Vtkm, 1 => Basic impl of Marching Cube done manually, 2 => Legacy marching tetrahedra approach. 0 is default, but should go to 1 if VTKm isn't compiled with PyMOL.
PyMOL wiki currently doesn't compare these three approaches yet, but I'll try to add some pictures comparing them all at some point.
Oh.. OK now it's clear. Thanks for the explanation @JarrettSJohnson
apologies for hijacking this Issue... but can support for newer vtk-m versions be added if compatible (current one is the 1.9 branch)?