You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to create Protein or Chemical structures in .pdb or .mol format for use with iBooks Author. Please help.

Dear Community,


There are a large variety of software packages used by Chemists and Biologists to view and manipulate Protein and Chemical structures in 3D. They typically have formats such as .pdb, or .mol. I have looked around and none of the software packages that I currently use allow me to export to the COLLADA (.dae) format.


Does anyone have any idea where to begin to allow me to do this. I would like to try and put in some of the 3D objects into the iBook Author program.


Thank you. Chase

Mac OS X (10.7.2)

Posted on Jan 20, 2012 11:02 AM

Reply
Question marked as Top-ranking reply

Posted on Jan 22, 2012 5:16 AM

ibooks Author accepts exported collada models from Poser Pro very fine, even with texture and lights. This program also allows to make animated Quicktime Movies from your models, and thus you can use these movies alongside free rotatable dae models also in ibooks autor. It is a nice workflow it seems ( and I am only experimenting as we speak ) .. :


User uploaded file


these models in iBooks Author ( they can be zoomed, rotated, fullscreened on iPad ) :

User uploaded file

18 replies
Question marked as Top-ranking reply

Jan 22, 2012 5:16 AM in response to chase.smith

ibooks Author accepts exported collada models from Poser Pro very fine, even with texture and lights. This program also allows to make animated Quicktime Movies from your models, and thus you can use these movies alongside free rotatable dae models also in ibooks autor. It is a nice workflow it seems ( and I am only experimenting as we speak ) .. :


User uploaded file


these models in iBooks Author ( they can be zoomed, rotated, fullscreened on iPad ) :

User uploaded file

Jan 21, 2012 5:38 AM in response to jkyriazidis

Thanks, but when I went to the JMol site and looked at the file formats that were supported, I found this statement on their wiki:


Collada formats (KMZ/DAE) are Open Source arrangements that have been incorporated into many 3D packages and support textures/surfaces etc. They are a possible XML replacement to VRML and are the format apparently supported by the new Apple textbook authoring system iBooks author.

Not yet supported by Jmol. There is a feature request for this.

We would need:

  • A description of how to specify a cylinder (position/translation, orientation/rotation, radius, length) but not using vertexes or meshes.
  • A description of how to specify a sphere (position/translation, orientation/rotation, radius) but not using vertexes or meshes.


This is very frustrating that actual practicing chemists and biologists will not be able to easily produce this type of 3D content for the iBooks Author. Especially because they use modeled chemical stuctures in their demo videos.


Please let me know if I might have missed something.

Jan 20, 2012 11:25 PM in response to chase.smith

i Know exactly what you are looking for. When i firstly downloaded iBooks Author i opened pymol in order to create a ray traced model to put into iBooks. Unfortunately, this cannot happen with Pymol. I searched a lot and i found no answer. Pymol does not export in collada format.


But there is a solution. Instaed of using Pymol, try Jmol which supports exporting in collada (dae) files. I didnt try this to myself but i read on the internet that it is possible.


Good luck to all of us. Apple should have thought about that and should have told DeLano Sc. earlier since they have a close relationship.

Jan 22, 2012 7:45 AM in response to chase.smith

You can use standard molecular modelling apps like UCSF Chimera (http://www.cgl.ucsf.edu/chimera/) or pymol to open the structure and export it as VRML, X3D, or OBJ. Then open that file in the free Meshlab (http://meshlab.sourceforge.net/) and export as Collada.


iBooks author seems to prefer Collada version 1.4 over 1.5 files, and likes the mesh to be triangulated.


Be aware that your representation options in the molecular modelling app (ribbon, space-filling, surface etc.) will determine what geometry is exported.


For a much more flexible experience, look into Molecular Maya, ePMV, or Bioblender, which are plugins for Maya, Cinema4D, and (the free and open source) Blender to add molecular modelling functionality directly within those environments.

Jan 27, 2012 5:09 PM in response to robert176

Thank you robert176 and others who answered previously. I will give some of your suggestions a try. Unfortunately I was hoping to shortcut the entire process which at the moment does not seem possible. What I really need is to have the makers of the Chemistry Modeling Software provide an option to export directly to Collada, and not require me to filter the output through several Professional 3D Modeling programs. That sort of defeats the intended purpose of the iBooks Author supposedly being user friendly.

Jan 28, 2012 1:57 PM in response to chase.smith

I believe that Apple should have provided an easily way to get Pymol images into iBooks Author as VRML has been the de facto standard. After a number of days, I have a method which works, but this much effort should not be necessary. Anyway here it is.


1) Set the viewport in Pymol to 512,384 to do this in the command window type

viewport 512,384

Note, I'm not totally sure you need to do this.


2) Draw you image in Pymol and output the image in VRML format, to do that

File -> Save Image As -> VRML 2 ...

I'll assume that you have given the file the name "pymol_output", you actual get pymol_output.wrl


3) In a terminal window go to the folder where the above file is located and issue the following command. This removes some stuff that messes up the lightening

sed '9,15d' pymol_output.wrl > bender_in.wrl


4) Next you need blender. You can download it from

http://www.blender.org/download/get-blender/


5) Open Blender. In the upper right corner in the Scene section

right click on Lamp and delete it

right click on Cube and delete it

right click on Camera and delete it


Save this file so you don't have to do this every time. I called mine empty_blender_file.blend


6) Either open empty_blender_file.blend or continue from #5 and read in the file from #3

File -> import->X3D Extensible 3D (.x3d/.wrl)


this reads in the file


7) Write out the file in collada .dae format

File->export->collada (.dae)


Done. This file will read into iBooks Author and have somewhat uniform lighting. By the way, .dae files can be opened an checked in Preview. Its easier than going back and forth into the iPad, since you can rotate the image in Preview.


Hope this helps, let me know if it works for you and if you have any suggestions.

Finally someone needs to write a one step VRML and X3D to collada converter that will work with PyMol and Chimera etc.


Have fun!

Jan 28, 2012 5:30 PM in response to kantrow

@kantrow Thanks for posting those instructions, they're super helpful.


I had a couple follow up points/questions:


- When I initially followed the isntructions, Blender kept crashing when I tried to import the file. However, I used Chimera instead and this problem was solved

- I know nothing about 3D molecules: how would I be able to make the atoms different colours (they all turned out black for me) and the whole thing seems very dark? In Blender they appear as nice colours, so it's only when it's exported to .dae that this happens

- Is there way crop the extra space around a molecule, mine is rathre small in a large white box?

- Finally, in the Life on Earth Book they have their background as white, until you make the molecule full screen when it becomes black. Any idea how to do this?


Many thanks!

Jan 29, 2012 11:06 AM in response to chase.smith

@burgesg2


You need to keep the complexity of the structure in PyMol pretty simply. Try a cartoon of pdb 1crn for example.


In regard to color, the step in my instructions.

sed '9,15d' pymol_output.wrl > bender_in.wrl is specific to PyMol and is necessary to get uniform lighting. Without this step the back side is black. This may have something to do with the colors not coming out correctly in Chimera, since you don't want to do this for a Chimera file. If you want to use Chimera see my post on the Chimera discussion list.


In regard to size, make the image the correct size in PyMol before you export. You can do this in blender by moving the viewport, but I am not a blender expert.


Here is a link to a .dae file of 1crn that you can import into iBooks Author or Preview that was originally from Chimera

http://dl.dropbox.com/u/4300550/1crn2_mod.dae


Turns out that Okino Computer Graphics makes a .wrl and .x3d to .dae converter PolyTrans at


http://www.okino.com


Hope this helps.


Oct 3, 2012 10:25 AM in response to ChB_Fr91

Can you go through your workflow in meshlab? Are there specific export settings or just regular set up settings that you have used?


I have downloaded meshlab, imported various .pdb files and then exported them as .dae (collada) format without any problems. Ibooks will then NOT allow me to add them to the 3D widget. I keep getting an "The 3D file “4INS.dae” wasn’t added. The scene couldn’t be loaded" error message.


I have also downloaded different collada files to see if they work into ibooks and they seem to work fine.


Here is a sample of the file that I have tried... a simple glucose file. http://qsad.bu.edu/data/pdbfiles/D-glucose.pdb


Any help would be appreciated.

Oct 4, 2012 6:03 AM in response to Mango4444

I had no problem to import glucose in Meshlab and then to export choosing collada. See snapshots here: https://www.dropbox.com/sh/nxvb7f7d35e78v8/4pEu1X0K21?lst (tests with small glucose [.dae file 163 Ko] and bigger HbF[18,7Mo])

Then, to import in author, a "simple" drag and drop from the finder.

I used also export from Chimera: it works also BUT files can be very heavy (smoother surface,so number of elements increases very fast) and even they are imported in author (with warning message about file size) they are not always displayed onipad. Use only small molecules. Advantage with chimera is that there are many option option to show molecule.

It is also possible to import dae files generated by meshlab in sketchup and then to re-export files in dae format. After this operation, they can be displayed by preview (but colors have disappeared).

How to create Protein or Chemical structures in .pdb or .mol format for use with iBooks Author. Please help.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.