Andreas wrote:

> So far my Application used to communicate with Jmol
> by sending script commands to it.

Good. That is the right way.

> Today I wanted to add some mouse listeners and query over
> which amino acids the mouse cursor is located.
> So when moving the mouse over the Jmol viewer,
> chain identifier, amino acid resiude number,
> and insertion code should be determined when displaying a PDB file.
>
> By declaring public the getSeqcode method in
> src/org/jmol/viewer/datamodel/Atom.java it is
> possible to get the PDB residue number from "outside".
>
> Is this the proper way to retreive this data?

arghh ... NO! ;-)

Anything that you want *must* go through the JmolViewer.

The routines in viewer/datamodel are *not* public ... if you use them then
I guarantee that they will break.

I prefer to have them in a separate subdirectory because it is easier to
manager. But since people think that they are public then it looks like I
need to move them all into the viewer directory and remove the 'public'
designations.

> How can the insertion code be retreived?

If the JmolViewer does not provide the information that you need then we
will add it.

I have just added
  String JmolViewer.getAtomChain(int atomIndex)
  String JmolViewer.getAtomSequenceCode(int atomIndex)

Let me know what else you need.

> If I manage to bring this to work I will add the solution to the wiki
pages, how to integrate Jmol into another Application.

That would be great.


Miguel





-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to