Actually, the easiest way is to use

JmolViewer.getProperty(null, "chainInfo", "")

This returns a HashTable with entry "models" that is a Vector. Each 
models element is a HashTable with entry "chains", which is a Vector. 
Each chains element is a Hashtable "residues", which is a Vector of the 
groups in the chain, each element again a HashTable. The "atomInfo1" 
entry of that HashTable is a String that will give you the three-letter 
code for the group.

Thus:

models    Vector[1]   
chains    Vector[1]   
residues    Vector[46]   
atomInfo2    "[THR]1:A.CG2 #7"
atomInfo1    "[THR]1:A.N #1"
_apt2    6
_apt1    0
groupID    17
seqCode    "1"
visibilityFlags    0
groupIndex    0
,
atomInfo2    "[THR]2:A.CG2 #14"
atomInfo1    "[THR]2:A.N #8"
_apt2    13
_apt1    7
groupID    17
seqCode    "2"
visibilityFlags    0
groupIndex    1
,
etc...

Alternatively you can get the group name from the groupID entry (an 
Integer) using

Group.getGroupName((short)groupID)

I realize it's not trivial to drill down to that groupID level. But it 
can be done. Just be careful with your parentheses.

Bob


Charles Musgui wrote:

> Hello,
>
> I would like to know how I can interact with a protein model loaded 
> within JMol. To be more precise, here is what I'd like to do, directly 
> using the JMol API:
> 1. get the protein model, then get the Chain IDs contained in the 
> model (I suppose here I handle a protein 3D structure)
> 2. get a particular Chain using its ID,
> 3. given the chain, get its protein sequence
>
> I've tried to understand the JMol API and I've found the package 
> "org.jmol.modelsetbio", but I've failed to figure out how to retrieve 
> a "BioModel" out of the  JMolViewer.
>
> Thanks for your help,
> Charles
>
>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>This SF.net email is sponsored by: Microsoft
>Defy all challenges. Microsoft(R) Visual Studio 2008.
>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Jmol-developers mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-developers
>  
>


-- 
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/vse0120000070mrt/direct/01/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to