Re: [Jmol-users] JmolViewer

2012-01-30 Thread Charles Shubert
Hi Bob,

I wrote my response from my memory of what we do and, unfortunately, I did not 
look at our current codebase to see what we actually do.  Now that I've done my 
homework, you are absolutely correct in pointing out this flaw in my memory of 
how to use Jmol.  Whatever I was remembering about wanting to expose something 
that was not available in the JmolViewer interface has either been abandoned in 
our current code or is now part of the JmolViewer interface.

I'll take a look at the JmolViewer interface and see if I can come up with some 
specific suggestions about what might be helpful.

Thanks,

--Chuck

- Original Message - 
  From: Robert Hanson 
  To: Charles Shubert ; jmol-users@lists.sourceforge.net 
  Sent: Monday, January 30, 2012 11:16 AM
  Subject: Re: [Jmol-users] JmolViewer


  Chuck, question: JmolViewer extends JmolSimpleViewer, so how is it that there 
is something in JmolSimpleViewer that is not in JmolViewer? Or is 
"SimpleJmolViewer" your own class? 

  I regularly add aspects to JmolViewer that people need exposed. Do let me 
know if that is the case. The point of using JmolViewer is to identify the 
public methods of Viewer that are actually public and not just necessarily so 
for inter-package processing within Jmol. Those are the ones that we guarantee 
will not be changed; others in Viewer may be modified without notice. 

  Can you send me a copy of your SimpleJmolViewer interface? Suggestions for 
additions to JmolViewer? 

  Bob


  On Mon, Jan 30, 2012 at 11:05 AM, Charles Shubert  wrote:

Hi Lochana,


  StarBiochem required some functionality available in the SimpleJmolViewer 
but not exposed in the JmolViewer interface.  




  -- 
  Robert M. Hanson
  Professor of Chemistry
  St. Olaf College
  1520 St. Olaf Ave.
  Northfield, MN 55057
  http://www.stolaf.edu/people/hansonr
  phone: 507-786-3107


  If nature does not answer first what we want,
  it is better to take what answer we get. 

  -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolViewer

2012-01-30 Thread Robert Hanson
Chuck, question: JmolViewer extends JmolSimpleViewer, so how is it that
there is something in JmolSimpleViewer that is not in JmolViewer? Or is
"SimpleJmolViewer" your own class?

I regularly add aspects to JmolViewer that people need exposed. Do let me
know if that is the case. The point of using JmolViewer is to identify the
public methods of Viewer that are actually public and not just necessarily
so for inter-package processing within Jmol. Those are the ones that we
guarantee will not be changed; others in Viewer may be modified without
notice.

Can you send me a copy of your SimpleJmolViewer interface? Suggestions for
additions to JmolViewer?

Bob

On Mon, Jan 30, 2012 at 11:05 AM, Charles Shubert  wrote:

> **
> Hi Lochana,
>
>   StarBiochem required some functionality available in the
> SimpleJmolViewer but not exposed in the JmolViewer interface.
>
>
>
-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolViewer

2012-01-30 Thread Charles Shubert
Hi Lochana,

We embed Jmol and redistribute Jmol.jar in our free StarBiochem application 
(http://web.mit.edu/star/biochem/).  The StarBiochem app has a user interface 
that drives Jmol with scripts through the JmolViewer interface.  Although the 
scripting interface works and does most things we want, it took us a very long 
time to understand how to use it properly.

As a Java programmer, I would have preferred working with a well documented 
JmolViewer interface that exposed the complete functionality and architecture 
of Jmol in a programmer friendly way. StarBiochem uses the SimpleJmolViewer 
implementation of the JmolViewer interface.  We like to use interfaces in 
StarBiochem to provide some isolation for its various components.  StarBiochem 
required some functionality available in the SimpleJmolViewer but not exposed 
in the JmolViewer interface.  To get to that functionality we extended the 
JmolViewer interface and implemented a class that uses the new interface and 
wraps SimpleJmolViewer.

Jmol is a wonderful tool.  It is very fast in both loading and execution.  I 
would guess that we have had about 20,000 StarBiochem (Jmol) users world wide 
in the last year. We rarely get a bug report and, when we do, it rarely has 
anything to do with the behavior of the embedded Jmol. We expect the number 
StarBiochem users to be significantly higher in 2012, so we are very happy that 
Jmol is solid.

--Chuck
  - Original Message - 
  From: Nicolas Vervelle 
  To: lochana menikarachchi ; jmol-users@lists.sourceforge.net 
  Sent: Monday, January 30, 2012 2:46 AM
  Subject: Re: [Jmol-users] JmolViewer


  Hi,


  I think you can use Jmol.jar for this purpose.
  It will probably contain a lot more that you want to use, but it should work.
  Or maybe JmolData.jar, I'm not sure what's in it.


  Nico


  On Sun, Jan 29, 2012 at 3:02 AM, lochana menikarachchi  
wrote:

Hi All,

I was looking for a JmolViewer jar file that I can embed in a stand alone 
application. I can see JMol application and applet viewer in the downloads but 
not a jar file that can be used for developing a stand alone application. How 
do I go about this??

Thanks.

Lochana



--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users






--


  --
  Try before you buy = See our experts in action!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-dev2


--


  ___
  Jmol-users mailing list
  Jmol-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/jmol-users
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolViewer

2012-01-29 Thread Nicolas Vervelle
Hi,

I think you can use Jmol.jar for this purpose.
It will probably contain a lot more that you want to use, but it should
work.
Or maybe JmolData.jar, I'm not sure what's in it.

Nico

On Sun, Jan 29, 2012 at 3:02 AM, lochana menikarachchi
wrote:

> Hi All,
>
> I was looking for a JmolViewer jar file that I can embed in a stand alone
> application. I can see JMol application and applet viewer in the downloads
> but not a jar file that can be used for developing a stand alone
> application. How do I go about this??
>
> Thanks.
>
> Lochana
>
>
> --
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] JmolViewer

2012-01-28 Thread lochana menikarachchi
Hi All,

I was looking for a JmolViewer jar file that I can embed in a stand alone 
application. I can see JMol application and applet viewer in the downloads but 
not a jar file that can be used for developing a stand alone application. How 
do I go about this??

Thanks.

Lochana
--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolViewer

2008-02-28 Thread Bob Hanson
heavens, yes!

http://jmol.svn.sourceforge.net/viewvc/jmol/trunk/Jmol/examples/basic/Integration.java

Very simple.

Bob


Mir Mohammed Assadullah wrote:

> Greetings:
>  
> I want to integrate JMol into a JAVA app that I am writing. I looked 
> at JMol.java source and it looks a bit involved. I am wondering if 
> anyone has a simpler example of integration.
>  
> I want to use the JmolViewer as a JPanel in my application and be able 
> to pass a molecule coordinates to it.
>  
> Thanks,
>  
> Assadullah
>
> 
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try 
> it now. 
> 
>  
>
>
>
>
>-
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
>
>
>
>___
>Jmol-users mailing list
>Jmol-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get. 

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] JmolViewer

2008-02-28 Thread Mir Mohammed Assadullah
Greetings:
   
  I want to integrate JMol into a JAVA app that I am writing. I looked at 
JMol.java source and it looks a bit involved. I am wondering if anyone has a 
simpler example of integration.
   
  I want to use the JmolViewer as a JPanel in my application and be able to 
pass a molecule coordinates to it.
   
  Thanks,
   
  Assadullah

   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolViewer, Viewer

2007-07-14 Thread hansonr
Try checking

 if(viewer.haveFrame())

first, just to see if there is a model loaded. ("Frame" in this context
refers to a model, recently refactored as "ModelSet", not a Java Frame.) I
think your problem may be that you have a viewer but no model set. That's
usually what a null pointer exception from a method such as
viewer.getAtomCount() means. In general, when you create a viewer, you
should also call

setAppletContext(String htmlName, URL documentBase, URL codeBase,
String appletProxyOrCommandOptions)

So a typical instantiation might be:

JmolViewer viewer = JmolViewer.allocateViewer(display, modelAdapter);
viewer.setAppletContext("", null, null, "");

That second method includes a call to zap(), which instantiates a new
ModelSet, allowing viewer.getAtomCount() to return "0".

Bob



> I'm building a jmol embedded application which will allow me to open more
> than one molecules. Currently I'm able to open multiple molecules in a
> single application. However now I'm facing problems regarding Viewer. I
> have a jmolPanel which instantiate a SmarterJmolAdapter and also
> JmolViewer like what most people will do. I added this jmolPanel into a
> JInternalFrame (moleculeFrame) which will later be added to the main
> JDesktopPane. I have my own set of swing.GUi components that I want to use
> to access and manipulate the opened molecules which are shown in the
> jmolPanels contained in the moleculeFrames. Now the problem is whenever I
> try to access the viewer of each jmolPanel e.g viewer =
> (moleculeFrame.getJmolPanel()).getViewer();which will ask the jmolPanel of
> that particular moleculeFrame I'm referring to return the Viewer
> (JmolViewer).Then I tried to
> ...System.out.println(viewer.getAtomCount());I'm getting
> nullPointerException from the modelManager. I guess my Viewer is a
>  null when I'm doing this, so any better way of instantiating the viewers
> in order to make it work?Help and advice will be very much
> appreciated.RegardsKevin
> _
> Did you know you can now customize your mailbox with different colours to
> suit your mood with Windows Live Hotmail?
> http://get.live.com/mail/features-
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] JmolViewer, Viewer

2007-07-11 Thread Angel Herraez
Hi Kevin

I cannot help with your description of problem (it's a programmer 
question; you should post this kind of questions to jmol-developers, 
although they will also have read jmol-users), but it may be useful 
to you knowing that recent Jmol versions are able to open several 
files.

>From the app, use menu File > Open and tick the selection box at the 
right  "append models".

>From the console or script, use
  load files "file1.mol" "file2.mol" "file3.mol"
(quotes are mandatory)
or
  load "file1.mol"
  load append "file2.mol"
  load append "file3.mol"

Hope it helps


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] JmolViewer, Viewer

2007-07-11 Thread kevinseah.05
I'm building a jmol embedded application which will allow me to open more than 
one molecules. Currently I'm able to open multiple molecules in a single 
application. However now I'm facing problems regarding Viewer. I have a 
jmolPanel which instantiate a SmarterJmolAdapter and also JmolViewer like what 
most people will do. I added this jmolPanel into a JInternalFrame 
(moleculeFrame) which will later be added to the main JDesktopPane. I have my 
own set of swing.GUi components that I want to use to access and manipulate the 
opened molecules which are shown in the jmolPanels contained in the 
moleculeFrames. Now the problem is whenever I try to access the viewer of each 
jmolPanel e.g viewer = (moleculeFrame.getJmolPanel()).getViewer();which will 
ask the jmolPanel of that particular moleculeFrame I'm referring to return the 
Viewer (JmolViewer).Then I tried to 
...System.out.println(viewer.getAtomCount());I'm getting nullPointerException 
from the modelManager. I guess my Viewer is a 
 null when I'm doing this, so any better way of instantiating the viewers in 
order to make it work?Help and advice will be very much appreciated.RegardsKevin
_
Did you know you can now customize your mailbox with different colours to suit 
your mood with Windows Live Hotmail?
http://get.live.com/mail/features-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users