Molecules

This is the thumbnail from my most recent tutorial on the CGFigures channel on YouTube. The tutorial shows start to finish how you can design or access molecules using free software and then import them into Blender for rendering. As someone with a decade of university chemistry under their belt this may be my favourite subject. This image was rendered in Eevee (with a whole hell of a lot of depth of field) and shows five different molecules (benzene, ibuprofen, adenosine, boron subphthalocyanine chloride and Spiro-MeOTAD). With largely the same atoms these five structures separately act as solvents, painkillers, fundamental building blocks of life, OLED emitters and one of the primary components of some of the highest efficiency solar cells in the world. Chemistry can be pretty cool sometimes and showing it off in Blender is just as awesome.

5 Likes

Hi there,
really nice work. :smiley:

Being a chemist myself, I wanted to add that there are various scripts that allow to import molecular structures into Blender, such as blmol:

I am currently adding an interface and support for volumetric data from cube files to this, in order to view molecular orbital/electron densities/etc:
phe-LUMO

You can check it out here:

Thanks for posting this. This is very cool and I’m definitely going to check it out. Volumetrics sound like they would be a really cool addition. I have a workaround for those right now but saying that it isn’t very pretty would be generous.

Thank you for the code. I am a physicist and I use the VASP code. I am trying to visualize the density of the magnetization (the CHGCAR file) with blender. the bmol code takes into account this type of file? as you do to make the charge density more or less transparent?

I never used VASP and are not familiar with its file formats. If you can convert the density you are interested in into a cube file that is commonly used by other programs (like Gaussian, Orca, GPAW, …) it should be not problem to visualize it.

Thank you very much for the code! This is seriously great. If possible, I would have one request regarding the electrostatic potential with the ‘Draw colored surface’ option. It seems that at the moment the colorization is constrained to the van der Waals radii. Is it possible to add an option to plot the colored surface on a custom electron density level? Something like VESTA does, which allows to visualize the electrostatic potential for different isosurface values?

That is a good suggestion, but I am afraid I will not have the time to do much on the code in the near future. However, feel free to modify it yourself. :slight_smile:

I completely understand. I tried to take a look at your code, and especially at the draw_esp function. I think it would be enough to pass an arbitrary surface to draw_surface, instead of using mol.calculate_vdw(esp). However, I can’t seem to be able to figure out how to do that. May I kindly ask if you you have any suggestion in this sense?
It is honestly quite a pity, since I wanted to make the figures for my PhD thesis in Blender using your script. :frowning:

I know I have a love for chemistry, I know I do, but high school isn’t exactly helping because we don’t have any practical chemistry, it’s always theory. Has been for the past 2 and a half years, but thankfully NileRed has shown me that chemistry is fun and exciting. Anyways, the point of my rant is that I wanted to say how I never realised that I could 3D model molecules! And your creation here gave me that idea, so I wanna thank you for it :smiley: Great stuff my dude, hope to see more