JRS format specifications; Jmol

Have jReality programming problems or questions? Post them here.
Post Reply
hansonr
Posts: 2
Joined: Tue 3. Nov 2009, 15:09

JRS format specifications; Jmol

Post by hansonr » Tue 3. Nov 2009, 15:19

Hello, I'm the principal developer of the Jmol molecular visualization applet/application. http://jmol.sourceforge.net

We are interested in using JReality to export 3D molecular graphics to U3D/PDF format. Rather than bundling a huge set of classes with Jmol, I'm thinking that the simple solution is to export JRS files, and deliver those to something like WritePDF for processing.

Questions:

1) Does this sound reasonable?
2) Is there a command-line version of writePDF that converts JRS format to U3D/PDF? It's easy enough to adapt WritePDF, of course, and I can do that if you don't have it done already.
3) Is there a description somewhere of the JRS file format?
4) We have, say, 100,000 spheres and tubes. (Also all sorts of triangulated surfaces, ellipsoids, etc.) Currently I have an efficient exporter for creating IDTF format files where I just create one sphere and one cylinder and then use them extensively with transformations. Is this built into the JRS format?
5) Cameras and default views. I had given up on U3D for delivering specific views of proteins, but now that I see JReality, I suspect that the combination of viewports, cameras, and PDF-JavaScript should do the trick. I need some help with that.

Thanks,

Bob Hanson

User avatar
steffen
Posts: 186
Joined: Fri 16. Jun 2006, 13:30
Location: TU Berlin
Contact:

Re: JRS format specifications; Jmol

Post by steffen » Tue 3. Nov 2009, 19:00

Hi, jmol looks very interesting. Would be a great application for our u3d/pdf export..
2) Is there a command-line version of writePDF that converts JRS format to U3D/PDF?
I dont think we have something like that...
3) Is there a description somewhere of the JRS file format?
No, sorry. When we know how your geometry will be represented in jreality, I can create a sample file and some documentation for the required features.
...where I just create one sphere and one cylinder and then use them extensively with transformations. Is this built into the JRS format?
This is definintely possible in with jreality (jrs is a file format that supports all jreality features). Any part of the scene can be reused in the jreality scene graph. Maybe it is also possible to render the molecules as IndexedLineSets, we support rendering of points as spheres (where the colors/radii can be set for each point individually) as well as rendering lines (between points) as tubes, again with individual colors/radii. There is however no way to do ellipsoids in this way.
5) Cameras and default views. I had given up on U3D for delivering specific views of proteins, but now that I see JReality, I suspect that the combination of viewports, cameras, and PDF-JavaScript should do the trick. I need some help with that.
I am also not an expert with that, but Stefan Sechelmann has written all the corresponding code. When exporting to PDF, there are different javascript tools available. But as far as I remember, Adobe reader does not care about the initial matrices. However, Stefan can help...

hansonr
Posts: 2
Joined: Tue 3. Nov 2009, 15:09

Re: JRS format specifications; Jmol

Post by hansonr » Tue 3. Nov 2009, 19:23

Thank you for the quick reply, Steffen. OK, so a work in progress. Same here! That's fine. It sounds like we could have a fruitful relationship.

I've uploaded a set of files that are representative of what we want to do. They are in http://chemapps.stolaf.edu/jmol/docs/examples-11/u3d

http://chemapps.stolaf.edu/jmol/docs/ex ... d/1crn.jpg should give you the idea of what we want to reproduce in a PDF document. It's a simple perspective model -- nothing too fancy. Perfection is great; this doesn't have to be perfect, though.

Right now Jmol is set up to export a variety of file formats. The idea, I think, would be to add a JRS exporter. Since I already have an IDTF exporter, I'm figuring this is a pretty simple job.

The JPG file there gives a sense of what we are after; the u3d and pdf files give a sense of where I'm at.

Issues include:

- perspective
- center of rotation

Post Reply