On Thursday 31 October 2002 11:55, Fabian Dortu wrote:
> On Thu, 2002-10-31 at 10:34, E.L. Willighagen wrote:
> > On Wednesday 30 October 2002 19:38, Fabian Dortu wrote:
> > > Hi Egon,
> > >
> > > To add crystal support for CML files, the easiest way would be to code
> > > it in Convention.java of JCFL. JCFL is used by Jmol, right?
> >
> > Yes, though it uses the version in CDK... Events are passed to JMolCDO
> > with object name "a-axes" and some property name (do not remember the
> > exact names at this moment...) And, actually, the adapted Jmol version
> > for viewing crystals which I had up for download some time ago (about
> > which we had contact) already has the code...
> >
> > > Then JMolCDO.java will be straightforward to modify.
> >
> > Yes, it is... It's about 15 minutes work...(including testing..) If you
> > think it would take you longer, I can do it if you like... let me know.
>
> Actually, it is not as straighforward due to my implementation of
> crystal stuffs. Indeed, JMolCDO returns a ChemFrame but crystal info is
> stored in a CrystalFile and the ChemFrames are generated based on this
> info.
> In other words, it would be easier if JMolCDO had a reference to the
> ChemFile. The code would look like this:
>
> CMLReader.java
> --------------
> ...
> ChemFile file;      //not instanciated
> JMolCDO cdo = new JMolCDO(file);
> ...
>
> return file;
>
>
>
> JMolCDO.java
> ------------
> Depending if we have crystal info or not, a CrystalFile or a ChemFile is
> instanciated and information is filled in it.
>
>
> What do you think of it?

Yes, that looks good.

Egon


-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to