>> Passing the structure back to Jmol means that you need to implement >> the JmolModelAdapter interface. That is the API for feeding structures >> to Jmol. > > Miguel, the plugins use the CDKEditBus interface for this... Jmol's > jmol/app/JmolViewer.java provides this interface to plugins... > >> Currently, Jmol can only support one 'ModelAdapter'. However, this is >> something that we planned to change. > > Hence, I don't quite see why a JmolModelAdapter needs to be > implemented... Could you elaborate?
I still haven't looked at the CDKEditBus code ... I apologize. I'll take a look at it. I don't want this to sound like a lecture ... but I am going to 'core dump' my thoughts about interfaces into/out of the Jmol viewer. The design philosophy behind the JmolModelAdapter interface is that it is the *proper* and *only* way to feed molecular models into Jmol. I think that it is very important that we maintain that. If the CDKEditBus is feeding data structures into Jmol then I believe that it should implement the JmolModelAdapter. And if the JmolModelAdapter doesn't provide the functionality that is needed, then we should fix the interface. I also planned to provide a similar interface for retrieving data about the model. I now realize that since you didn't have this available, you used the JmolViewer directly. But that was not my plan. The JmolViewer works, but I now believe that it is too close to the Jmol implementation. It is designed for controlling the viewer/display/rendering, not for external access to the data model. Other applications are going to want to read the full model and write a full model. It is important that we provide very clean interfaces for doing that. The JmolModelAdapter on one side and an equivalent on the other side. That makes it easier for other people to access the data structures. However, what I *really* care about is that it makes it easier for us to *change* the data structures. We still need the flexibility to throw away code and make significant changes to data structures. We can only do that if we control the entrance/exit paths. I'll take a look at the CDKEditBus. The project is big enough that at times it is hard to keep an eye on architecture when I am spending so much time focusing on implementation ;-) Miguel ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Jmol-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jmol-developers
