[Chimera-users] User-defined graphics in chimera: NMR tensor plotting
Eric Pettersen
pett at cgl.ucsf.edu
Fri Aug 28 11:59:55 PDT 2020
Hi Albert,
To supplement Elaine's answer a tiny bit, an actual triangulated surface like a volume isosurface will have surface normal vectors associated with each vertex, which allows the underlying graphics to interpolate the lighting across the surface of each triangle in such a way that the surface appears much smother than it would if it were depicted as a simple collection of flat triangles. So a similar number of triangles depicted as a surface will look better than the same number of triangles depicted as a BILD object.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
> On Aug 28, 2020, at 10:30 AM, Elaine Meng <meng at cgl.ucsf.edu> wrote:
>
> Hello Albert,
> Is it possible to write the information as "volume data" (a 3D grid of values) such that isosurfaces would give the appearance that you want?
>
> Examples of this type of data include electron density maps from crystallography and EM, and electron localization function and spin density maps from QM calculations. I often see published images of orbitals (drawn in Chimera) that look similar to the image you sent, except they are smooth isosurfaces. I wanted to send a link but none of the examples I know are in open-access papers.
>
> Maybe it would work with values on the grid -1, 0, 1 with negatives enclosed in one color of isosurface and positives enclosed in the other color. However, I don't know how hard it would be to generate this from the information you have, or which format of volume data would be the simplest.
>
> Chimera reads many different volume data formats:
> <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/filetypes.html#volume>
>
> I hope this helps,
> Elaine
> -----
> Elaine C. Meng, Ph.D.
> UCSF Chimera(X) team
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
>
>> On Aug 28, 2020, at 1:54 AM, Albert Smith-Penzel <Albert.Smith-Penzel at medizin.uni-leipzig.de> wrote:
>>
>> Hello,
>>
>> I have a question about improving user defined graphics in Chimera.
>>
>> For background (maybe not necessary for answering):
>> I’m working with nuclear magnetic resonance and MD simulation, and so I want to plot dynamically averaged spin-spin (H–C) dipole tensors, obtained from MD, on top of the corresponding H–C bonds. I’ve been relatively successful, but while one has a very high-resolution picture of the molecule itself, the tensors themselves are visibly triangulated.
>>
>> How I get this plot:
>> Each tensor is expressed first in spherical coordinate (theta, phi, r). In python, I run Delauney from scipy.spatial on theta and phi to get a list of vertices that can be used for triangulation of the tensor. Then, for each tensor, I convert theta, phi, and r into cartesian coordinates, shift the center so that the tensor sits on top of the correct bond. Finally, I create a .bild file where I write out each triangle using the coordinates and vertices. Tensors have negative and positive values (red and blue in the plot), and so I only take triangles for which r for all vertices is positive, and then in a second step, take only triangles where all vertices are negative. This all gets written to the .bild file, and then opened in chimera on top of the molecule (see picture).
>>
>> The question:
>> The result is certainly acceptable, however, there is clearly a quality difference in the molecule rendering vs. the tensor rendering (obviously, because the tensors are just made of triangles that I’ve created in python). Is there a better way to bring the surface data describing the tensors into chimera that would then allow usage of some sort of smoothing within chimera for a nicer image? (And possibly with a relatively simple data format….)
>>
>> Thanks for your help!
>>
>> Cheers,
>> Albert Smith
>>
>> <example_triangulation.png>
>
>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>
More information about the Chimera-users
mailing list