Hi,
Here are some remarks and ideas regarding surfaces. I’m working on
most of these items but I’m not sure yet how to add all this to the
surface dialog. I was thinking of adding an expert button to show more
advanced options.
All of these items involve computing cube values and I’m trying to
abstract this in a single class.
- large molecules
Add lower resolutions, now we have Low = 0.36A. We could add Very Low
= 0.5A and Custom which enabled a QDoubleSpinBox next to the
resolution combobox. I already have this here and the spinbox is
updated when the resolution combobox changes. Resolutions below 1.5A
have atoms sticking out of the surface.
For large molecules, even a 1.0A resolution results in large meshes
which result in poor rendering performance. The mesh resolution is
currently taken from the vdw surface cube and I don’t know if it makes
sense to “decouple” this. My guess would be that atoms would stick out
again. I tried to change this but couldn’t get this to work (had some
problems with the normals I think). Another options would be to use a
mesh simplification algorithm but I have no experience with this.
Ideas are welcome
- electrostatic potential vdw surfaces
At the moment it is possible to color vdw surfaces by electrostatic
potential but the “color mixing” is primitive. I have just pushed a
patch to gerrit to improve the color transitions and some improvements
to the way the ESP is computed (i.e. include formal charges when
hydrogens are added). Some before after screenshots:
1CRN before: http://imagebin.org/110524
1CRN after: http://imagebin.org/110525
1DRF after: http://imagebin.org/110526
The current implementation computes the ESP for each vertex in the
surface mesh. It uses the NeighborList class with a 7A cut-off which
is too low for electrostatics. Considering all atoms would be possible
using QtConcurrent (and OpenCL) and a Cube from which vertex ESP is
interpolated (see below).
Use different charges (OBChargeModel).
- other properties
Like ESP, other properties (e.g. lipophilicity, …) could be mapped
to surfaces.
- solvent accessible surface
We could use an external program.
The oldest algorithm is “rolling” a probe sphere with radius 1.4A over
the vdw surface.
It’s possible to do this using a convolution in Fourier space
(requires 3D FFT with which I have little experience, interesting
approach though)
A Monte Carlo algorithm might be easy to implement
(QtConcurrent/OpenCL performance might be acceptable)
Less cavities reduces the mesh size.
Again, ideas are welcome…
- OpenCL
I’ve written a class that makes it easy to run various OpenCL kernels
to compute Cube elements (e.g. vdw surface, esp, …) from atom data
(positions, radius, charge). The performance is very impressive here
(using Gefore GTX260) with a 25x speedup compared to the QtConcurrent
implementation. The class is OpenCL only at the moment but
QtConcurrent could be added to use this class for performing all atom
based cube computations mentioned in this mail. Although OpenCL could
be used for multi-core CPUs too, QtConcurrent isn’t an additional
dependency.
Are there any objections to adding OpenCL capabilities to the main
repository (through gerrit)? All OpenCL code would be optional of
course.
Cheers,
Tim