Who are you?... Where have you been my whole life?.... I am gonna binge watch all your videos.. Really really pumped to learn what I was waiting to do for a long long time..
This is a very important tutorial - thank you for explaining in detail. I have tried several times and always had problems to understand how you can change anything after exporting from PDB or XYZ files. Now made it all clear, and I will be using this approach definitely in the future.
Awesome tutorial! I've worked with this addon before, and the fact that I couldn't get the multiple bonds was so frustating, I had to do them manually... But no more! Also, a tip: To precisely control your focus, you can create an empty, and go to Camera>Depth of Field>Focus on Object, and select the empty. Then, you can simply drag it where you want to focus ;)
hello! Thanks for the great tutorial. I just wanted to give a quick comment that documents my experience with this in 2022 as some minor things have changed since the making of the original video (plus if I ever have to go back I can hopefully follow this). I'll note I am running on mac so I don't know how universally applicable this is. 1) the name importer in avagadro for me was completely broken. I did some sluthing online and found that this is possibly due to the reference website having changed their url from HTTP to HTTPS, which broke the links. I dont know how true this as I vaguely remeber it working, albiet barely, AFTER that post was made. Regardless, switching from avagadro 1.2 to avagadro2 (1.95) solved my issues. 2) It looks like avagadro2 deals with double/triple links properly, so i no longer needed open babel. (also note that the export location has changed slightly in avagadro2, you need to go to export>molecule> and find the pdb file there, instead of saveas as in the video). 3) the import using NURBS didn't work too well for me (I could only get sticks to show). Another commenter also mentioned this and CG Figures recommended switching from NURBS to mesh in the import properties which did seem to fix this issue. hopefully that helps someone as I was having a lot of trouble originally (even after using openbabel). I can also try to answer any questions though I should mention I am not super familiar with this stuff as I am in a non-chem field and am just using this for some education videos and maybe thesis.
10:35 Actually, your original settings remain in the Viewport Display panel, since they are used by the “Workbench” renderer that is used to display objects in the Viewport Shading mode. You can copy them from there and paste them into the BSDF settings in your node graph, which should be slightly easier than entering them all again.
First of all, your tutorials are really great. Easy to understand and to follow through. Unfortunately, I am facing a problem that is: When I import the pdb files to Blender I never get the balls and sticks model (even though they appear like it when I open in Avogadro and Mercury) but rather just the "sticks model". . I went to download the water molecule and the thrombin (protein) for PDB and the problem gets even worst as I can only get the small points and rarely a "sticks model" portion. Went everywhere and I can't find a proper answer to this :/ congrats on the initiative!
I gather this is a problem a few people have encountered recently. I think it has to do with how you import the balls. Try setting the import to mesh. I think the default value of NURBS might be causing issues in newer versions of Blender.
12:50 Or you could just instance the whole collection. You can do this any number of times. You can independently position, scale and rotate each instance. Any changes you make to the original collection are automatically reflected in all instances. Collections are there to make things easier for you, not harder!
I've had mixed success with the collections. You can instance the whole thing but I find it falls apart for certain operations where it's just easier to have a single object. Particularly if you want to add modifiers or play with physics. But definitely as a general rule if you're working with a precise number of molecules that you'll be independently placing I do completely agree that instancing the collection is the quickest way to go.
For unknown reason the "Generate 3D coordinates" crashed OpenBabel everytime I tried to use it. I just let it unmarked and the conversion also worked well for some small molecules I tried. If someone is having trouble with that, just convert the file directly and it will probably work.
You're awesome, man. Thanks to you I've recently tried making some gold and silver nanoparticles. Can't wait to try out some molecules ! Can you import the molecules from Chemdraw or Chem3D ?
Hey, that's awesome. I have imported molecules from Chemdraw before, but that's a different workflow (Luminous Lab has a great tutorial for that - th-cam.com/video/iC2Yvf1bIFA/w-d-xo.html The version of Blender is a bit older but the process is the same). I'm pretty sure Chem3D supports both .mol and .pdb so it should work exactly the same. I used Avogadro here because it's free, but I used to use Chem3D when I still had access.
Hey Suresh, this is something I've been thinking about for a while and I will likely incorporate it into a more general tutorial on visualizing volumetrics from data. I don't really anticipate finding a good way to integrate wave equations into Blender but I'm currently looking for a way to convert data into something that can be visualized.
Thanks a lot for all the great work you do! I’m having some issues with converting molecular files using Open Babel and then importing them into Blender. Here are the problems I’m facing: 1. When I convert a file from MLD to PDB using Open Babel, the resulting PDB file appears in Blender without double bonds, or the molecular structure shows up all messed up. 2. When I try to convert a file from MLD to PDB using Open Babel, sometimes nothing happens. The file doesn’t get converted, and no output is generated. Any tips or advice on how to fix these would be super helpful. Maybe some specific commands or settings in Open Babel or Blender that I’m missing?
Unfortunately this seems to be a persistent problem that a lot of people encounter. Open Babel (in my experience) can be a bit fiddly. Sometimes just pressing convert a few times seems to resolve issues and if you're familiar with pdb outputs you can usually tell if the output is reasonable. For reference, which version of Blender are you using?
I personally use PyMOL for ribbon diagrams. If you are looking for a walkthrough, Brady Johnston has two videos (Blender for Biochemists) that cover how to import and handle ribbon diagrams for a given structure.
@@CGFigures thanks for the quick reply! I've seen those and tried pymol. The cartoon representation works great, but the ribbon diagram looks kinda shitty in comparison to the ribbons of Avogadro
@@KnowArt I see what you're saying. Avogadro's ribbons look a lot more like actual ribbons and less like cartoons. I'm explore this a bit and probably make a followup for proteins
is there anyway to make the connecting cylinders taper into each other, creating a more organic shape? Without actually making all of them from scratch.
This is potentially achievable through molecular nodes or atomic nodes but it would definitely be more of a custom process. I don't know of any 'one-click' type of solution at the moment
Hi, thank you so much. Really benefited a lot from your nice job. I have one question about how to freely tailor the structure. For example, I imported the 2D MoS2 nanosheet from Vesta, now I want to tailor the nanosheet to nanoribbon, but I don't know how to remove undesired atoms and sticks. Because, once I click one atom like Mo, all of Mo atoms are going to be selected. I'm really stuck here. One possible way I think is tailoring the nanosheet in Vesta to nanoribbon, and then import it to Blender. Just feel there may be better tip for this. My Blender version is 3.6. Sorry to bother you with so many words.
If I've got it right the issue is likely that all the geometry you're working with is still instanced. If you select the whole collection and use Ctrl+A to realize the instances then you should be able to independently select all the atoms and bonds. It can be very slow though if your structure is really big. I'm not entirely sure what you mean by tailoring from sheet to ribbon, that could be very complex depending on what you're after.
Thank you for the great tutorial. It is a great help to me. (Luckily I found an old Windows computer so I could get Open Babel to work. Hooray!) However, I have a problem at another point. When I preset Dupliverts and then try to edit the atoms in Blender (new materials, textures ...), I can't see the Dupliverts objects of the atoms. I can see the pivot point but not the surface or the material. For example, I can scale the atoms, but not edit the material. (The bonds are displayed and can also be edited.) What am I doing wrong? Does anyone have any advice?
I made a 'fast' version of this tutorial that might address your issue (th-cam.com/video/yGft0iLGukg/w-d-xo.htmlsi=qvPeHyfhmviYd8BK). If all you want to do is change the material you could technically add it to another object in the scene and then modify it from there. The atoms are usually imported as instances and are hidden from view. If you realize all the instances then you should be able to directly change the materials. Hope that helps.
Great video. You helped me a lot with my projects. Now, they shine a looot!. I have a question, I just downloaded blender in a new computer and when importing the pdb file, it seems to work except I cannot see any of the atoms (balls). I made sure Carbon mesh (for example) is active...but still, I cannot see any of the balls in the structure. Some advice? Thanks!
Thanks. That's an interesting problem. Normally this is just the setting under 'Balls/atoms' and you need to make sure it's set to mesh and not NURBS or Meta. If that still isn't working it is likely an issue with the pdb file though it's hard to say
Hi, this was a great tutorial. Could make my molecule and turn it into a meshed single object. Actually what I want is to make the molecule glow. But tried many ways - couldn't do it (a)tried adding a material, change the surface to emission and add bloom in Render (b) tried to add glare in compositing. Could you help? Do we have to resort to having an invisible glowy plane?
Hi Richa, that's interesting. When you added the material did it apply to the mesh? Once you have the single mesh object I really can't see why it wouldn't have glowed with the settings you applied. The only thing I can think of is that the material didn't actually apply.
Hi, Thanks for the tutorial. I tried doing the same and I made a diamide molecule. I saved it as mol file. when I opened it in Open Babel, and loaded the file, it did not show any molecule from input file. Left side box was empty. what could be missing? Thanks in advance
Okay, that one is new to me. There is maybe a small chance this is related to what was selected in Avogadro. Have you tried exporting the mol file from molview.org?
@@CGFigures I found that the files had 0kb size from Avogadro. So there was nothing to show in the file. This was a Diamide molecule. I tried getting it from import from online that method failed. So I drew it myself> minimised the energy then saved as mol file. I will try the MolView and see if it can be solved. Thanks again for your response. Have a nice weekend!
Hi, I was following the toturial but I do not get the the dubbel bonds in blender, I also do not get the error messages in Babel, any idea what I could be doing wrong?
Hi Jorik. Unfortunately this is a bit of a trial and error process. It's usually the open babel part where things go wrong. I find you have to just try to generate the 3D coordinates until the pdb works. If you can see that you have the 3D coordinates in your pdb file make sure the multiple bonds box is checked in atomic blender. Otherwise, it sometimes helps to check the box for deleting hydrogens in open babel. Hope that helps.
i have no idea, why there's no bond shown. Although I clicked on the bonds button while imporiting the pdb file. is it because i output pdb file in the software diamond and it didn't output the bond?
This sounds like it is probably an issue with the pdb file. There is a slightly newer version of this tutorial that makes use of molview and it might help if you follow that one. th-cam.com/video/yGft0iLGukg/w-d-xo.html
Hi, I simply followed your procedure to import TiO2 to blender, however, there is always error: divide by zero if I check the bond checkbox. Is there any know what is possible reason the how to fix it?
hello thanks for the excellent tutorial, however, could you tell me how can I get the molecule by importing by searching the molecule name? because my workstation only has import by file, there is no other options, however, I saw you have many options, hope hear from you soon
Hi Shiying, the import molecule by name feature of Avogadro has been a bit troublesome lately for me (and many others). These days I usually draw the structure in molview and download it directly. It's frustrating but gives much more reliable results. There is some work in the community to get a general molecular import working for Blender and if there's any progress on that front I'll be sure to make a general update for it.
Hey Harrison. At the time of recording this tutorial I was using the version of Avogadro available on the website. These days I use ChimeraX or molview.org to create the 3D structure. This tutorial is due for a bit of a refresh.
Hi! Thanks for the tutorial, it's really useful and helpful! Just a question: I have to render lots of molecules as a particle systems, in a disordered way, but there is a way to avoid superposition between of them? Like every molecules stays alone with respect to others, and not 3 or 4 of them rendered almost in the same position? Thanks again!
Hi Michele, there definitely are. The first is to just increase the number of points you are using to place the particles and then move between different random seed values until you have a distribution you're happy with. The other way is a bit newer and requires using geometry nodes. Geometry nodes will allow you to use a Poisson distribution where you control the density of molecules. Otherwise you can also use the old fashioned route of placing the molecules by hand.
hello, I have a doubt, when a molecule with different atoms is imported and you make it an object, it has different materials corresponding to the atoms, but when I want to apply shading to stylize the molecule, it only applies to one part, specifically to the atoms carbon, do you know why? also it seems that the nodes do not work with these objects
Each "atom" (including the bonds) gets its own shader using this approach. You would have to change the shaders for each type of atom or swap all of them for one shader. They should all be listed in the materials tab. It's likely that just the carbon atom material slot is being changed. In terms of shader nodes you likely need to change the input to generated or object coordinates (likely object). If you were referring to geometry nodes this workflow is from a much older version of Blender that didn't have geometry nodes.
Hello First of all thanks for the tutorial, I tried all your steps, but when I import the PDB file, Blender does not show the molecules, it shows just the bonds among them, could you help me please?
I'm new in Blender, and I want to make a nice 3d molecule to my powerpoint presentation and when I export to .obj format all the structure is grayish and I have no idea why this is happening. Do you have any advice for this?
When I've worked with 3D models in powerpoint it's always been with gltf2. I have a video specifically focused on exporting to powerpoint. It can be difficult to get things to work exactly as you want in terms of lighting/shading but my guess is that the obj format is pulling all the colour information out. th-cam.com/video/Cr1-01cutHs/w-d-xo.html
I am having issues downloading Open Babel on Mac because I have no idea what any of the methods are (the site gives me options of HomeBrew and Conda - I have no coding experience and have no idea what these are). There is no link to a simple installer. Do you have any tips?
Hi Madelyn. Unfortunately I am not a Mac user and I am not familiar with their installers (or lack thereof in this case). I know there is an online version of openbabel but it doesn't output useful 3D coordinates in my experience. If you don't really need double or triple bonds though you can get away with just exporting the pdb file from Avogadro.
Hey I'm having an issue. I'm making a capsaicin molecule for a school project and I've gone through the conversion process during openbabel however after I convert the file and import into blender, the molecule does not show any double bonds even though they are visible in avogadro. I've tried to manually edit the pdb file to write in double bonds but it's still not working. Any help?
Hey Zyrien, this is unfortunately a common occurrence. Usually it's openbabel being a bit strange. I sometimes find that if I check the box for Generate 3D coordinates, then generate the file, uncheck the box and do it again that it works. You can also try to remove the hydrogens and it might have the same effect. The only other thing that comes to mind is making sure you have the multiple bonds option enabled in Blender. If it's not working out with the mol file from Avogadro you should be able to download the mol file from molview. I just tested converting that one into a pdb and it worked fine when I imported it into Blender.
I was not able to save the file. I create the molecule and then trying to save it but it is saying that (Not responding) and no molecule is saving. Please help me…
I gather this a problem with Avogadro (which has unfortunately been a bit unstable). My best advice for now is to try to make your molecule somewhere else. If you google "molview" that website should let you draw your molecule and export the structure as a .mol file.
Idk if I understand this correctly (I usually just skim tutorials like this), but wouldn't it be easier to just press ctrl+. and then scale the atoms and bonds with individual origins instead of going through the collection to the hidden parent object?
Hey Franz, if that works it's a great suggestion. I'm not sure if the instanced version would work that way but I'll give it a shot when I get the chance.
"Generate 3D coordinates" doesn't make double bonds for me. Do you have any other settings that I don't? I'm not sure what's going wrong here. Do I have a wrong version of Open Babel? edit: I should mention that I figured out the system PDB uses for making bonds, so I can correct for it manually, but that becomes tedious for bigger, more complex molecules.
This is a pretty common issue. Unfortunately Open Babel is odd sometimes. Try checking the box for "Generate 3D coordinates", generating the file, then unchecking it and generating it again (with the box unchecked). For some strange reason that often works. If you're still having issues double check that you have the "bonds" option checked in Atomic Blender. Hope that helps.
@@CGFigures Nope, it didn't. If I amend the PDB then Blender shows double bonds. Besides, I can see the valency doesn't add up in Open Babel. However, I just found out that using the mol file, it's actually really easy to add the double bonds manually, so that even with bigger molecules it really isn't that tedious anymore. Anyway, thanks a ton for your reply, it's really cool to see you stay in touch with your community, nice work.
Very nice tutorial! I've followed your suggestions but when I saved .stf file and imported it just carbon atoms were showed. Do you have any tip on how to fix that?
Hi Anderson. Where did you get the .stf file from? I remember this tutorial using .mol and .pdb but not .stf. It has been awhile since I made this tutorial so I might have forgotten or overlooked it.
@@CGFigures Sorry! I mean .stl. When I saved .stl file in order to print the molecule I just got a fragmented molecule when I open the file in the 3D printer software.
@@andersonsmg Oh, I see. I think I've seen this before. If memory serves Blender can be a bit funny about exporting instanced geometry. I think you have to make the whole molecule one object and then it should work. That said, the way these molecules get built might not be the best way to export for 3D printing. Because the bonds are still "inside" the atoms it leads to some weird slicing. You can sort of fix that problem by using a remesh modifier set to voxel with a low voxel size for high resolution. It will give a better model for printing, it's just going to also have a ton of geometry
@@CGFigures Hi again! I've followed your suggestion using voxel modifier to adjust my molecules for printing. However, I still got a mesh gap between atoms and bonds that is struggling my printing process. I'm a beginer in 3D printing. Your tutorial was very helpfull to design the molecules and I was wondering if you have any other advice to fix this issue.
Hi Mohd, if you don't mind me asking, which version of Blender are you using? I also find that sometimes you need to try converting the mol file to pdb twice in OpenBabel (with and without the 'Generate 3D coordinates enabled) before it works. It can be a bit fiddly.
Interesting. I haven't add any problems with it, but it may be that I have an older version of Avogadro. I'm pretty sure it needs an active internet connection to work and maybe if you have a VPN or firewall it's getting blocked. I'm using version 1.2.0 and just checked it without any problems. It can also depend on the name of the structure you're trying to add. Have you tried testing something simple like "Benzene" or "Ibuprofen"?
Hi, would you say 3d modeling is useful and is practiced by careers involving a Chemistry degree apart from just Chemical Engineering? How so? Is it becoming more important,?
Hey You, 3D modeling is an incredibly useful skill. If anything I would say it's more useful outside Chemical Engineering. Scientific visualization is a career in its own right and some of my colleagues who have degrees in Chemistry specifically went on to work professionally in those areas. It also translates across a number of areas. Journalism, scientific publishing, chemical industry. All of these areas will hire scientific illustrators. There's also the entirely separate fact that being able to 3D model and "bring something to life" is a great way to communicate it. I've used it to design new equipment or lab infrastructure (though that's more Fusion 360/solidworks) and to better explain my work to other scientists. I've made images and figures that people have used in published work, in job interviews, in grant proposals, you name it. At the end of the day I think that being a good scientist requires good communication. Not everyone does that the same way but 3D modeling is a really useful skill for doing it and that translates across the sciences, but also to most professions. It's definitely not the only skill, but I think it's one worth having if you're interested in it.
Hey Louis, I'm assuming you're working from Avogadro. You might have better luck with exporting the molecule files from Chimera. If you don't mind me asking, how did you check that the double bonds exist? In my experience the Blender side of things is almost never the problem and it boils down to the .pdb not having all the proper information.
@@CGFigures I reloaded with avogadro and send the file to someone else who checked with yet another program. I tried to convert mol2, mol, and even from sdf from pubchem to pdb with open babel with no succes in render.
@@louisg7062 Hmmm. I've had that problem before where I've opened the file in other software and it still shows the double bonds but Blender doesn't. In my experience open babel is usually the tricky part here. I wish I had a better suggestion and I'm actively pursuing one for a followup, but honestly the thing that I've found works is to just toggle the "generate 3D" on and off and keep hitting convert until the pdb output is correct. In rare instances I've just had to download the pdb directly from other sources. I'll followup if I find something more concrete.
Hi, thanks for this, when I try and merge atoms they all end up looking like oxygen (resized and colored red)? The merge bonds portion worked great wondering if that is happening for anyone else?
Hi Ben, thanks for bringing this up. Having just tested it, this looks like it's an issue with the Blender version. I have no problems in 2.91 but I do get exactly what you're describing in the 2.92 alpha version. Can you let me know which version you're using?
I may have figured this one out. If you bring the atoms in as NURBS this merging of colours and sizes seems to occur. If you use mesh it works as intended. You can also use NURBS and then use "F3 - Convert to Mesh" on all the different atoms you want to join and then it should work as intended.
@@CGFigures Using the 2.91 version and the problem was on my end I was getting confused because there was a mesh label on my atoms already and I wasn't going through the convert, also my convert does not have the text -- from curve/mesh/surface/text -- but it worked great. These will be heading into Unity so now onto that task. Thanks again.
Hi Jabed. You can scale by first hitting S and then dragging the mouse. Luminous lab also has a detailed video for working with pdb files if you'd like some additional resources. th-cam.com/video/4LC-1GE-OsY/w-d-xo.html&ab_channel=LuminousLab
Hey there. If you don't mind me asking, what kind of molecule are you trying to make. I've been getting a bunch of comments recently about the double bonds and I suspect there is something going on with Open Babel and I'm trying to narrow down what. In the past I have tried checking and unchecking "generate 3D coordinates" and then trying to convert the file. It takes a few tries sometimes but I can usually still get it to work. Hope that helps
@@CGFigures This is what i did I searched ATP in avogadro, then saved it to .mol and than .mol converted to .pbd and marked the checkbox 3D coordinates but when i imported to blender it was a total mess
@@reginadominique4357 Hey Regina. This is going to seem like a very odd suggestion. But try leaving the hydrogens alone, checking 3D coordinates, then unchecking it and then pressing convert. For some strange reason I have found that sometimes helps.
This tutorial was EXACTLY what I was looking for. Thank you SO MUCH
Who are you?... Where have you been my whole life?.... I am gonna binge watch all your videos.. Really really pumped to learn what I was waiting to do for a long long time..
You found a new profession... 3D Scientists Artist. :)
This is a very important tutorial - thank you for explaining in detail. I have tried several times and always had problems to understand how you can change anything after exporting from PDB or XYZ files. Now made it all clear, and I will be using this approach definitely in the future.
This video taught me several features that I was struggling to find otherwise. Thank You so much!
Awesome tutorial! I've worked with this addon before, and the fact that I couldn't get the multiple bonds was so frustating, I had to do them manually... But no more!
Also, a tip: To precisely control your focus, you can create an empty, and go to Camera>Depth of Field>Focus on Object, and select the empty. Then, you can simply drag it where you want to focus ;)
that is the same problem I'm facing.. hope that things will be solved, for me
hello! Thanks for the great tutorial. I just wanted to give a quick comment that documents my experience with this in 2022 as some minor things have changed since the making of the original video (plus if I ever have to go back I can hopefully follow this). I'll note I am running on mac so I don't know how universally applicable this is.
1) the name importer in avagadro for me was completely broken. I did some sluthing online and found that this is possibly due to the reference website having changed their url from HTTP to HTTPS, which broke the links. I dont know how true this as I vaguely remeber it working, albiet barely, AFTER that post was made. Regardless, switching from avagadro 1.2 to avagadro2 (1.95) solved my issues.
2) It looks like avagadro2 deals with double/triple links properly, so i no longer needed open babel. (also note that the export location has changed slightly in avagadro2, you need to go to export>molecule> and find the pdb file there, instead of saveas as in the video).
3) the import using NURBS didn't work too well for me (I could only get sticks to show). Another commenter also mentioned this and CG Figures recommended switching from NURBS to mesh in the import properties which did seem to fix this issue.
hopefully that helps someone as I was having a lot of trouble originally (even after using openbabel). I can also try to answer any questions though I should mention I am not super familiar with this stuff as I am in a non-chem field and am just using this for some education videos and maybe thesis.
You're a lifesaver, kind stranger!
It is just awesome, so useful, I regret I have found it only now!
10:35 Actually, your original settings remain in the Viewport Display panel, since they are used by the “Workbench” renderer that is used to display objects in the Viewport Shading mode. You can copy them from there and paste them into the BSDF settings in your node graph, which should be slightly easier than entering them all again.
That's cool, I did not know that. I do prefer to customize away from the default palette myself, but that's a good tip.
Im so thankful for your tutorial ! Helped me a lot
Appreciate you !
If only I stumbled upon this earlier....
Very helpful, many thanks!!
Thanks you! Your video is really helpful and easy to understand
This was mega awesome, thank you!
First of all, your tutorials are really great. Easy to understand and to follow through.
Unfortunately, I am facing a problem that is: When I import the pdb files to Blender I never get the balls and sticks model (even though they appear like it when I open in Avogadro and Mercury) but rather just the "sticks model".
. I went to download the water molecule and the thrombin (protein) for PDB and the problem gets even worst as I can only get the small points and rarely a "sticks model" portion.
Went everywhere and I can't find a proper answer to this :/
congrats on the initiative!
I gather this is a problem a few people have encountered recently. I think it has to do with how you import the balls. Try setting the import to mesh. I think the default value of NURBS might be causing issues in newer versions of Blender.
@@CGFigures Thank you! :)
12:50 Or you could just instance the whole collection. You can do this any number of times. You can independently position, scale and rotate each instance. Any changes you make to the original collection are automatically reflected in all instances. Collections are there to make things easier for you, not harder!
I've had mixed success with the collections. You can instance the whole thing but I find it falls apart for certain operations where it's just easier to have a single object. Particularly if you want to add modifiers or play with physics. But definitely as a general rule if you're working with a precise number of molecules that you'll be independently placing I do completely agree that instancing the collection is the quickest way to go.
gratitude beyond words!!!
I was making game effects but this is surprisingly helpful
For unknown reason the "Generate 3D coordinates" crashed OpenBabel everytime I tried to use it. I just let it unmarked and the conversion also worked well for some small molecules I tried. If someone is having trouble with that, just convert the file directly and it will probably work.
I would love to take this further and show a chemical reaction taking place, such as adsorption and desorption in reversible metal hydrides.
thanks
You're awesome, man. Thanks to you I've recently tried making some gold and silver nanoparticles. Can't wait to try out some molecules ! Can you import the molecules from Chemdraw or Chem3D ?
Hey, that's awesome. I have imported molecules from Chemdraw before, but that's a different workflow (Luminous Lab has a great tutorial for that - th-cam.com/video/iC2Yvf1bIFA/w-d-xo.html The version of Blender is a bit older but the process is the same). I'm pretty sure Chem3D supports both .mol and .pdb so it should work exactly the same. I used Avogadro here because it's free, but I used to use Chem3D when I still had access.
Thanks ❤❤
thank you so much
Please make video on Making atomic orbitals with the help of schrodinger wave equation in blender.
Hey Suresh, this is something I've been thinking about for a while and I will likely incorporate it into a more general tutorial on visualizing volumetrics from data. I don't really anticipate finding a good way to integrate wave equations into Blender but I'm currently looking for a way to convert data into something that can be visualized.
@@CGFigures Thank you for replying and considering my feedback, Thank you very much again.
Thanks a lot for all the great work you do! I’m having some issues with converting molecular files using Open Babel and then importing them into Blender. Here are the problems I’m facing:
1. When I convert a file from MLD to PDB using Open Babel, the resulting PDB file appears in Blender without double bonds, or the molecular structure shows up all messed up.
2. When I try to convert a file from MLD to PDB using Open Babel, sometimes nothing happens. The file doesn’t get converted, and no output is generated.
Any tips or advice on how to fix these would be super helpful. Maybe some specific commands or settings in Open Babel or Blender that I’m missing?
Unfortunately this seems to be a persistent problem that a lot of people encounter. Open Babel (in my experience) can be a bit fiddly. Sometimes just pressing convert a few times seems to resolve issues and if you're familiar with pdb outputs you can usually tell if the output is reasonable. For reference, which version of Blender are you using?
Thanks brother ❤❤
hmm... and what about ribbon diagrams? I can't get anything but the ball-and-sticks to work when exporting from Avogadro
I personally use PyMOL for ribbon diagrams. If you are looking for a walkthrough, Brady Johnston has two videos (Blender for Biochemists) that cover how to import and handle ribbon diagrams for a given structure.
@@CGFigures thanks for the quick reply! I've seen those and tried pymol. The cartoon representation works great, but the ribbon diagram looks kinda shitty in comparison to the ribbons of Avogadro
@@KnowArt I see what you're saying. Avogadro's ribbons look a lot more like actual ribbons and less like cartoons. I'm explore this a bit and probably make a followup for proteins
@@CGFigures That'd be splendid!
nice video, thanks
I cant seem to get double bonds in Babel using these steps. Any clue what i might be doing wrong?
You are awesomeeeeee!
The internet is awesome
very nice video... my blender does not import with double bonds... how to work with molecular surface in blender?
I can't get rid of the atom element from my rendered image. Any suggestions?
You should mention, that Avogadro program is only available for 32 bit systems. There is no 64 bit version to download anywhere..
is there anyway to make the connecting cylinders taper into each other, creating a more organic shape? Without actually making all of them from scratch.
This is potentially achievable through molecular nodes or atomic nodes but it would definitely be more of a custom process. I don't know of any 'one-click' type of solution at the moment
Hi, thank you so much. Really benefited a lot from your nice job.
I have one question about how to freely tailor the structure. For example, I imported the 2D MoS2 nanosheet from Vesta, now I
want to tailor the nanosheet to nanoribbon, but I don't know how to remove undesired atoms and sticks. Because, once I click one atom like Mo, all of Mo atoms are going to be selected. I'm really stuck here. One possible way I think is tailoring the nanosheet in Vesta to nanoribbon, and then import it to Blender. Just feel there may be better tip for this.
My Blender version is 3.6.
Sorry to bother you with so many words.
If I've got it right the issue is likely that all the geometry you're working with is still instanced. If you select the whole collection and use Ctrl+A to realize the instances then you should be able to independently select all the atoms and bonds. It can be very slow though if your structure is really big. I'm not entirely sure what you mean by tailoring from sheet to ribbon, that could be very complex depending on what you're after.
Thanks so much. I also found it's also available if we import the file with 'dae ' type.@@CGFigures
Thank you for the great tutorial. It is a great help to me. (Luckily I found an old Windows computer so I could get Open Babel to work. Hooray!) However, I have a problem at another point. When I preset Dupliverts and then try to edit the atoms in Blender (new materials, textures ...), I can't see the Dupliverts objects of the atoms. I can see the pivot point but not the surface or the material. For example, I can scale the atoms, but not edit the material. (The bonds are displayed and can also be edited.) What am I doing wrong? Does anyone have any advice?
I made a 'fast' version of this tutorial that might address your issue (th-cam.com/video/yGft0iLGukg/w-d-xo.htmlsi=qvPeHyfhmviYd8BK). If all you want to do is change the material you could technically add it to another object in the scene and then modify it from there. The atoms are usually imported as instances and are hidden from view. If you realize all the instances then you should be able to directly change the materials. Hope that helps.
Great video. You helped me a lot with my projects. Now, they shine a looot!. I have a question, I just downloaded blender in a new computer and when importing the pdb file, it seems to work except I cannot see any of the atoms (balls). I made sure Carbon mesh (for example) is active...but still, I cannot see any of the balls in the structure. Some advice?
Thanks!
Thanks. That's an interesting problem. Normally this is just the setting under 'Balls/atoms' and you need to make sure it's set to mesh and not NURBS or Meta. If that still isn't working it is likely an issue with the pdb file though it's hard to say
Hi, this was a great tutorial. Could make my molecule and turn it into a meshed single object. Actually what I want is to make the molecule glow. But tried many ways - couldn't do it (a)tried adding a material, change the surface to emission and add bloom in Render (b) tried to add glare in compositing. Could you help? Do we have to resort to having an invisible glowy plane?
Hi Richa, that's interesting. When you added the material did it apply to the mesh? Once you have the single mesh object I really can't see why it wouldn't have glowed with the settings you applied. The only thing I can think of is that the material didn't actually apply.
Hi, Thanks for the tutorial. I tried doing the same and I made a diamide molecule. I saved it as mol file. when I opened it in Open Babel, and loaded the file, it did not show any molecule from input file. Left side box was empty. what could be missing? Thanks in advance
Okay, that one is new to me. There is maybe a small chance this is related to what was selected in Avogadro. Have you tried exporting the mol file from molview.org?
@@CGFigures I found that the files had 0kb size from Avogadro. So there was nothing to show in the file. This was a Diamide molecule. I tried getting it from import from online that method failed. So I drew it myself> minimised the energy then saved as mol file. I will try the MolView and see if it can be solved. Thanks again for your response.
Have a nice weekend!
Hi, I was following the toturial but I do not get the the dubbel bonds in blender, I also do not get the error messages in Babel, any idea what I could be doing wrong?
Hi Jorik. Unfortunately this is a bit of a trial and error process. It's usually the open babel part where things go wrong. I find you have to just try to generate the 3D coordinates until the pdb works. If you can see that you have the 3D coordinates in your pdb file make sure the multiple bonds box is checked in atomic blender. Otherwise, it sometimes helps to check the box for deleting hydrogens in open babel. Hope that helps.
i have no idea, why there's no bond shown. Although I clicked on the bonds button while imporiting the pdb file. is it because i output pdb file in the software diamond and it didn't output the bond?
This sounds like it is probably an issue with the pdb file. There is a slightly newer version of this tutorial that makes use of molview and it might help if you follow that one. th-cam.com/video/yGft0iLGukg/w-d-xo.html
Hi, I simply followed your procedure to import TiO2 to blender, however, there is always error: divide by zero if I check the bond checkbox.
Is there any know what is possible reason the how to fix it?
It works fine if I uncheck the bond checkbox. However the molecular doesn't have the double bond between Ti and O.
I also did with the ciprofloxacin, there were no bonding.
hello thanks for the excellent tutorial, however, could you tell me how can I get the molecule by importing by searching the molecule name? because my workstation only has import by file, there is no other options, however, I saw you have many options, hope hear from you soon
Hi Shiying, the import molecule by name feature of Avogadro has been a bit troublesome lately for me (and many others). These days I usually draw the structure in molview and download it directly. It's frustrating but gives much more reliable results. There is some work in the community to get a general molecular import working for Blender and if there's any progress on that front I'll be sure to make a general update for it.
Wow the installation for Avogadro is intense. The download link takes you to a version which is 6 years out of date. What version are you using?
Hey Harrison. At the time of recording this tutorial I was using the version of Avogadro available on the website. These days I use ChimeraX or molview.org to create the 3D structure. This tutorial is due for a bit of a refresh.
Hi! Thanks for the tutorial, it's really useful and helpful! Just a question: I have to render lots of molecules as a particle systems, in a disordered way, but there is a way to avoid superposition between of them? Like every molecules stays alone with respect to others, and not 3 or 4 of them rendered almost in the same position? Thanks again!
Hi Michele, there definitely are. The first is to just increase the number of points you are using to place the particles and then move between different random seed values until you have a distribution you're happy with. The other way is a bit newer and requires using geometry nodes. Geometry nodes will allow you to use a Poisson distribution where you control the density of molecules. Otherwise you can also use the old fashioned route of placing the molecules by hand.
hello, I have a doubt, when a molecule with different atoms is imported and you make it an object, it has different materials corresponding to the atoms, but when I want to apply shading to stylize the molecule, it only applies to one part, specifically to the atoms carbon, do you know why? also it seems that the nodes do not work with these objects
Each "atom" (including the bonds) gets its own shader using this approach. You would have to change the shaders for each type of atom or swap all of them for one shader. They should all be listed in the materials tab. It's likely that just the carbon atom material slot is being changed. In terms of shader nodes you likely need to change the input to generated or object coordinates (likely object). If you were referring to geometry nodes this workflow is from a much older version of Blender that didn't have geometry nodes.
Hello
First of all thanks for the tutorial, I tried all your steps, but when I import the PDB file, Blender does not show the molecules, it shows just the bonds among them, could you help me please?
I set the import to mesh and it works! :)
thanks for the amazing and easy turorial
I'm new in Blender, and I want to make a nice 3d molecule to my powerpoint presentation and when I export to .obj format all the structure is grayish and I have no idea why this is happening. Do you have any advice for this?
When I've worked with 3D models in powerpoint it's always been with gltf2. I have a video specifically focused on exporting to powerpoint. It can be difficult to get things to work exactly as you want in terms of lighting/shading but my guess is that the obj format is pulling all the colour information out. th-cam.com/video/Cr1-01cutHs/w-d-xo.html
I am having issues downloading Open Babel on Mac because I have no idea what any of the methods are (the site gives me options of HomeBrew and Conda - I have no coding experience and have no idea what these are). There is no link to a simple installer. Do you have any tips?
Hi Madelyn. Unfortunately I am not a Mac user and I am not familiar with their installers (or lack thereof in this case). I know there is an online version of openbabel but it doesn't output useful 3D coordinates in my experience. If you don't really need double or triple bonds though you can get away with just exporting the pdb file from Avogadro.
Hey I'm having an issue. I'm making a capsaicin molecule for a school project and I've gone through the conversion process during openbabel however after I convert the file and import into blender, the molecule does not show any double bonds even though they are visible in avogadro. I've tried to manually edit the pdb file to write in double bonds but it's still not working. Any help?
Hey Zyrien, this is unfortunately a common occurrence. Usually it's openbabel being a bit strange. I sometimes find that if I check the box for Generate 3D coordinates, then generate the file, uncheck the box and do it again that it works. You can also try to remove the hydrogens and it might have the same effect. The only other thing that comes to mind is making sure you have the multiple bonds option enabled in Blender. If it's not working out with the mol file from Avogadro you should be able to download the mol file from molview. I just tested converting that one into a pdb and it worked fine when I imported it into Blender.
There is also another option I just remembered. My "Common Molecules" pack already includes Capsaicin. It's also free. cgfigures.gumroad.com/l/DsTgK
"simulate the physical representation of a cartoon representation of a molecule "
I was not able to save the file. I create the molecule and then trying to save it but it is saying that (Not responding) and no molecule is saving. Please help me…
I gather this a problem with Avogadro (which has unfortunately been a bit unstable). My best advice for now is to try to make your molecule somewhere else. If you google "molview" that website should let you draw your molecule and export the structure as a .mol file.
Idk if I understand this correctly (I usually just skim tutorials like this), but wouldn't it be easier to just press ctrl+. and then scale the atoms and bonds with individual origins instead of going through the collection to the hidden parent object?
Hey Franz, if that works it's a great suggestion. I'm not sure if the instanced version would work that way but I'll give it a shot when I get the chance.
"Generate 3D coordinates" doesn't make double bonds for me. Do you have any other settings that I don't? I'm not sure what's going wrong here. Do I have a wrong version of Open Babel?
edit: I should mention that I figured out the system PDB uses for making bonds, so I can correct for it manually, but that becomes tedious for bigger, more complex molecules.
This is a pretty common issue. Unfortunately Open Babel is odd sometimes. Try checking the box for "Generate 3D coordinates", generating the file, then unchecking it and generating it again (with the box unchecked). For some strange reason that often works. If you're still having issues double check that you have the "bonds" option checked in Atomic Blender. Hope that helps.
@@CGFigures Nope, it didn't. If I amend the PDB then Blender shows double bonds. Besides, I can see the valency doesn't add up in Open Babel. However, I just found out that using the mol file, it's actually really easy to add the double bonds manually, so that even with bigger molecules it really isn't that tedious anymore. Anyway, thanks a ton for your reply, it's really cool to see you stay in touch with your community, nice work.
Very nice tutorial! I've followed your suggestions but when I saved .stf file and imported it just carbon atoms were showed. Do you have any tip on how to fix that?
Hi Anderson. Where did you get the .stf file from? I remember this tutorial using .mol and .pdb but not .stf. It has been awhile since I made this tutorial so I might have forgotten or overlooked it.
@@CGFigures Sorry! I mean .stl. When I saved .stl file in order to print the molecule I just got a fragmented molecule when I open the file in the 3D printer software.
@@andersonsmg Oh, I see. I think I've seen this before. If memory serves Blender can be a bit funny about exporting instanced geometry. I think you have to make the whole molecule one object and then it should work. That said, the way these molecules get built might not be the best way to export for 3D printing. Because the bonds are still "inside" the atoms it leads to some weird slicing. You can sort of fix that problem by using a remesh modifier set to voxel with a low voxel size for high resolution. It will give a better model for printing, it's just going to also have a ton of geometry
Thank you very much my friend. I'll try that and let you know. :)
@@CGFigures Hi again! I've followed your suggestion using voxel modifier to adjust my molecules for printing. However, I still got a mesh gap between atoms and bonds that is struggling my printing process. I'm a beginer in 3D printing. Your tutorial was very helpfull to design the molecules and I was wondering if you have any other advice to fix this issue.
Hi I am unable to import double bond in blender.
Hi Mohd, if you don't mind me asking, which version of Blender are you using? I also find that sometimes you need to try converting the mol file to pdb twice in OpenBabel (with and without the 'Generate 3D coordinates enabled) before it works. It can be a bit fiddly.
Hello, this is a great tutorial, but does the "Fetch by chemical name" feature no longer work in Avogadro?
DIdn't work for me either. Tried rebooting, reinstalling and it didn't work.
Interesting. I haven't add any problems with it, but it may be that I have an older version of Avogadro. I'm pretty sure it needs an active internet connection to work and maybe if you have a VPN or firewall it's getting blocked. I'm using version 1.2.0 and just checked it without any problems. It can also depend on the name of the structure you're trying to add. Have you tried testing something simple like "Benzene" or "Ibuprofen"?
@@CGFigures I appreciate the reply and it seems like it is now working. However, I have no idea what I changed. (The worst type of fix)
@@CGFigures It tried again and it's now working : )
Hi, would you say 3d modeling is useful and is practiced by careers involving a Chemistry degree apart from just Chemical Engineering? How so? Is it becoming more important,?
Hey You, 3D modeling is an incredibly useful skill. If anything I would say it's more useful outside Chemical Engineering. Scientific visualization is a career in its own right and some of my colleagues who have degrees in Chemistry specifically went on to work professionally in those areas. It also translates across a number of areas. Journalism, scientific publishing, chemical industry. All of these areas will hire scientific illustrators. There's also the entirely separate fact that being able to 3D model and "bring something to life" is a great way to communicate it. I've used it to design new equipment or lab infrastructure (though that's more Fusion 360/solidworks) and to better explain my work to other scientists. I've made images and figures that people have used in published work, in job interviews, in grant proposals, you name it. At the end of the day I think that being a good scientist requires good communication. Not everyone does that the same way but 3D modeling is a really useful skill for doing it and that translates across the sciences, but also to most professions. It's definitely not the only skill, but I think it's one worth having if you're interested in it.
@@CGFigures thank you!
Is it possible to install Open babel on a MacBook without the need to write code?
Hey Mika. As a non-Mac user I can't say for sure. There are versions of open babel that run online which may work.
Useful but after many file formats and wasted time I can't get blender to show double bonds (that exist, I checked). Any idea ?
Hey Louis, I'm assuming you're working from Avogadro. You might have better luck with exporting the molecule files from Chimera. If you don't mind me asking, how did you check that the double bonds exist? In my experience the Blender side of things is almost never the problem and it boils down to the .pdb not having all the proper information.
@@CGFigures I reloaded with avogadro and send the file to someone else who checked with yet another program. I tried to convert mol2, mol, and even from sdf from pubchem to pdb with open babel with no succes in render.
@@louisg7062 Hmmm. I've had that problem before where I've opened the file in other software and it still shows the double bonds but Blender doesn't. In my experience open babel is usually the tricky part here. I wish I had a better suggestion and I'm actively pursuing one for a followup, but honestly the thing that I've found works is to just toggle the "generate 3D" on and off and keep hitting convert until the pdb output is correct. In rare instances I've just had to download the pdb directly from other sources. I'll followup if I find something more concrete.
Hi, thanks for this, when I try and merge atoms they all end up looking like oxygen (resized and colored red)? The merge bonds portion worked great wondering if that is happening for anyone else?
Hi Ben, thanks for bringing this up. Having just tested it, this looks like it's an issue with the Blender version. I have no problems in 2.91 but I do get exactly what you're describing in the 2.92 alpha version. Can you let me know which version you're using?
I may have figured this one out. If you bring the atoms in as NURBS this merging of colours and sizes seems to occur. If you use mesh it works as intended. You can also use NURBS and then use "F3 - Convert to Mesh" on all the different atoms you want to join and then it should work as intended.
@@CGFigures Using the 2.91 version and the problem was on my end I was getting confused because there was a mesh label on my atoms already and I wasn't going through the convert, also my convert does not have the text -- from curve/mesh/surface/text -- but it worked great. These will be heading into Unity so now onto that task. Thanks again.
can someone please tell me how to scale it. he just shows moving with mouse, how ?
Hi Jabed. You can scale by first hitting S and then dragging the mouse. Luminous lab also has a detailed video for working with pdb files if you'd like some additional resources. th-cam.com/video/4LC-1GE-OsY/w-d-xo.html&ab_channel=LuminousLab
I still don't see Double Bonds, even though I follow instructions.
Hey there. If you don't mind me asking, what kind of molecule are you trying to make. I've been getting a bunch of comments recently about the double bonds and I suspect there is something going on with Open Babel and I'm trying to narrow down what. In the past I have tried checking and unchecking "generate 3D coordinates" and then trying to convert the file. It takes a few tries sometimes but I can usually still get it to work. Hope that helps
@@CGFigures It happens even with Benzene. Tried Amino Acids, too.
I'll try what you said above.
but what if i want the hidrogens for a molecule like ATP?
Hey Regina, usually the hydrogens are added by default. If you want to keep them just don't check the "Delete hydrogens" box in Openbabel
@@CGFigures This is what i did
I searched ATP in avogadro, then saved it to .mol and than .mol converted to .pbd and marked the checkbox 3D coordinates but when i imported to blender it was a total mess
Then the only way to look "normal" is check the "Delete hydrogens" but it still missing the double bond
@@reginadominique4357 Hey Regina. This is going to seem like a very odd suggestion. But try leaving the hydrogens alone, checking 3D coordinates, then unchecking it and then pressing convert. For some strange reason I have found that sometimes helps.
when I import pbd, i can't see the balls
Interesting. What setting are you using for the import of the balls? Is it mesh or nurbs?
@@CGFigures In nurbs, balls are not visible but in mesh, they are visible.
...SouthernShotty?
Does SouthernShotty do molecule stuff? That would be really cool. I am definitely not SouthernShotty, but I do really enjoy/appreciate his work.
Sorry but you speak too quickly for me to follow.
Sorry about that, I do tend to be a bit quick. To take a suggestion from Gerald Undone, maybe try setting the playback speed to 75%
@@CGFigures I was about to say 0.75 speed. That is the sweet spot for me. Works great for these tutorials.
too much explanation. confuse me