ScientificBlender??? PyMol

:o
Hallo

I just came along and asked me: Is there any script or plugin to import molecular coordinates to blender? If not, there should be one. I’m sick of importing large DXF-files and crunched VRML-files via Crossroads and stuff.
Anyway, to may opinion there should be a ScientificBlender. This could open this program to scientific illustration and animation.
Any link, piece of code, suggestion, opinion, and discussion would be great.

Supplement: Reply 5
This matter becomes even more actual, because the new free.blender.fund logo is a Coronene molecule.

accutrans 3d can convert .mol and .pdb files to vrml. unfortunately the resulting files are enourmo and slow to move about.

if the file format are easy to parse and well documented, if should be easy to make a script to import them.

Martin

Thanks for your reply

Using VRML-files is the thing I’d like to avoid. It’s like visiting your neighbor via the moon.

My problem is that I hardly can code.
With my very first attempt on coding I finally came to the point that I could import a molecular coordinate file. The result is a single vertex for every atom. With halo texture this gives a nice new representation of molecules.

What’s needed ?

For those of you not familiar with molecular coordinate files they are quite simple text files.
For example carbon monoxide:

XXX
X C x-cordinate y-coordinate z-coordinate X X
X O x-cordinate y-coordinate z-coordinate X X
…additional coordinates of the same molecule from molecular dynamics calculations to create animations

(X are additional parameters specific to the progamms they are from)

The primary tasks are

-placing a blender sphere for any atom coordinate
-linking every two coordinates which are appart a cetain value by a blender tube or cylinder
-determinig the radii of the spheres by the atom type (C, O, …)
-determinig the textures of spheres and cyclinders by the atom type

Seceondary tasks would be

-placing any object to the atom coordinates (for artistic reasons)
-option to set cyclinder and sphere diameters equal or different and/or adjust them (for different representations: ball and stick, cyclinders, spacefill,…)
-for animations: assign the molecular coordinates to a single frame and placing additional molecular coordinates to subsequent frames.

and more.

Thanks for every hint, comment, help. :o

That could be very easy to do.

I need a break from the Dynamica code. If you send me one or two example file containing the molecular data, I’ll try to make an import script.

Martin

First, thanks to theeth for its offer.

Second, I remembered there is an python based open source molecular modeling package, MMTK http://starship.python.net/crew/hinsen/MMTK/.
Revisiting this page, I found a link to PyMol http://pymol.sourceforge.net/, a quit new, also python based, open source molecular visualization package.
The latter has nice features at first sight, but it is seems to be strongly sientific orientated and does not have the more funny and more artistic capabilities of blender.

Question: Do you think it does make sense to link this somehow to blender ? How costy this would be ?

if the pickled version if documented, it should be very easy and fast to load in Blender. If I get a structure done with the MOL format, it would be even easier to add other files format afterward.

Martin

I just gave a quick look to the files you gave me. I think they should be easy to parse in Python. I’ll tackle the problem tomorrow.

In the mean time, if you could give me any reference to the atom size (I know I have this somewhere, but…) that would be great.

Martin

Wow, didn’t expect it so quickly.

It runs.
First impression is very good, or lets say it in german: blendend (splendid) :stuck_out_tongue:
Have to play with it for a while, but I’m propably away the next two days.
So, be patient.

Meanwhile, this is worth some extra Euros to the foundation.
Hope you agree with this.

ah, I told you it would be easy.

Next, I’ll try to add the other input format, and representation style. The animation part will probably be a little thougher (basicly, there’s two way to do it. One cheap but slow, one though but faster.).

Martin

I just came across this post and it sounds very cool. Will you be posting this script when it’s finished?

wow cool…
Last time I read this topic you hadn’t even started on the script and now its finished.

Soon we’ll have blender being mentioned in scientific papers.

It’s try to post it tonight.

I quickly added PDB import yesterday, so you can already import PDB and XZ files and output them in SpaceFill or Ball and Stick mode.

Martin

There seems to be some interest in this matter for other people, too.
So I thought about launching a little webpage.
The idea is first to post theeth script, other science related scripts, collect related stuff, display some pictures, add some molecule files which may be of interest for non chemists. For example, Buckyballs, nanotubs, belt like molecules etc. which could be useful for some futuristic architecture or starships etc.

What do you think ?

There are a lot of scientist out there having an enormous amount of data, many of them can code.
If blender could reach those who have some interest in 3D art or educational things this could open up further resources.

Sure, that’s a good idea.

Just tell me in advance where you put my script, so there isn’t two different versions available on the web at the same time.

Martin

PyMOL has probably improved quite a bit since 2002. So I’ll just bump this to the top of the list to get peoples attention again.

Anybody have a working import script for importing PDB coordinates into Blender?

Ciao

Is this thread still alive???
I’m a bioinformatics student. I’d definetly like .pdb import in blender.
Google wasn’t of much help. I have some basic experiance with blender.
Could you please post the script with a short howto???
I’m a noob u see:confused:

You can find (perhaps) the file at this address :
http://www.zoo-logique.org/3D.Blende…rtMolecule.zip

How does it work???