Hi!

So far my Application used to communicate with Jmol by sending script
commands to it. 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?

How can the insertion code be retreived?


that's what is happing right now:

public void mouseMoved(MouseEvent e) {

        int pos = viewer.findNearestAtomIndex(e.getX(),e.getY());
        if ( pos == -1 ) { return ; }
        Atom atom = viewer.getFrame().getAtomAt(pos);
        char chainId = atom.getChainID();
        String seqcode = atom.getSeqcodeString();
        // get insertion code

        // do something with the data...
}

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

Thanks,
Andreas


-- 
--------------------------------------------------

Andreas Prlic      Wellcome Trust Sanger Institute
                   Hinxton, Cambridge CB10 1SA, UK
                   





-------------------------------------------------------
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