.
.
.
. 2012-03-13: Note that I’m trying to supply support as soon as possible. Please, in return, show us one of your structures you handle with Atomic Blender by uploading some nice rendered images. Thanks!
******************** Original message ********************
Dear all.
I just finished my small little Python/Blender project Atomic Blender. It loads crystal or molecule structures from PDB files into Blender 2.5 (and higher versions). I integrated a panel into the Tools tab with many kind of options, which permits an easy handling of the structures. More details can be found here:
EDIT (2011-12-16): Blender 2.61 is out. So, for activating the script in Blender 2.61 go to: File -> User Preferences -> Official/Community. Search and mark ‘PDB - Atomic Blender’ and choose also ‘Save As Default’. That’s it! You can import PDB files via: File -> Import -> Protein Data Bank (*.pdb)
EDIT (2011-12-09): A new version of Blender will be published soon, where Atomic Blender is a part of. Please, wait for the final release (next week).
Otherwise: You can find the newest version of Atomic Blender always here: https://svn.blender.org/svnroot/bf-extensions/trunk/py/scripts/addons/ or in the ad-on section of Blender (before version 2.61: User Preferences -> Testing, Later in version 2.61: User Preferences -> Official/Community).
If I click Draw The Object button without specifying valid paths to data (which I don’t have) the script crashes. So I pulled down a PDB file from your site. I still get a crash even if I browse to your .PDB file and .DAT file.
Yes, I forgot to mention one particular problem I still have (is described in the documentation though): You need to uncheck ‘relative path’ on the left of the file requester.
I have been searching for a long time for solving this problem (relative path doesn’t work) but couldn’t find a solution so far. May be, there is somebody who can help me:
When I open a file requester with …
bpy.types.Scene.pdb_filepath = bpy.props.StringProperty(name=“PDB File”, description=“Path to the PDB file”, maxlen = 256, default = PDBFILE, subtype=‘FILE_PATH’, options={‘HIDDEN’})
… ‘relative path’ in the file dialog doesn’t work. Question: How can I program it in Python such that ‘relative path’ is not automatically checked? Thanks for any help.
hi,
you could look at this script: http://projects.blender.org/tracker/index.php?func=detail&aid=23566&group_id=153&atid=467
It’s broken but may help with the file path problem.
I/O scripts should open the filebrowser, then the user should navigate to the folder/file.
You could also look at 2.60a release i/o scripts to see how they do it to.
Thanks
I’m really interested in this script * would like to see .pdb working well,
then I will make every effort towards getting the script into blender contrib, then release.
Okay, I will see. The next days are reserved for this script anyway because I rewrite the drawing part at the moment => Blender has not been created for loading many NURBS (> 5000) - it takes a very long time. So, this is why I have to make the code more faster. And indeed, yesterday I could find a solution. - Give me a few days … I let you all know.
I just tried the version you have posted at your site. Atomic_Blender_v1.1.blend
I have downloaded PDB file C60.pdb from the site in the above link.
You script does come up and panels are drawn in the Properties panel.
I browse to the PDB file.
I browse to your DAT file.
I click DRAW THE OBJECT and I get an error that you see in the screen shot.
Your relative pathing code does not seem to work on Windows XP 64.
I moved Atomic_Blender.dat to a folder external to the BLEND file and this seemed to disable the relative pathing when I browse to it. HOWEVER, when I click DRAW THE OBJECT I still get no results in the scene.
Hmmm, so there is still an issue with this path … . I have Linux 64 bit and I’m sure it works also for 32 Bit. Tomorrow, I will test it under Windows XP 32 Bit. I tell you what I have found. I also try Windows Vista by time … need to search somebody with this OS.
Be patient … thx.
EDIT - A quick test under Windows XP 32Bit shows: Yes, ‘relative path’ crossed doesn’t work and I know why. I need to change a bit the code. Please wait. However, if ‘relative path’ is not crossed everything works fine, well at least for me. Please, confirm Atom, thx.
hi, thanks for the cool script
I noticed you can actually import .ent (protein data bank extension) natively with your script.
All you need to do is in the import window at the top nest to show hidden, press “Enable Filtering of files”.
Then select the .ent file & the script imports successfully!
this is somewhat easier than renaming the .ent file extension to .pdb asI had suggested.
thanks for the cool script