Thanks, Bob.  This is exactly what I need!

--Chuck

On Aug 6, 2009, at 1:47 PM, Robert Hanson wrote:

The most flexible way is to use

jmolViewer.getProperty(returnType, infoType, paramInfo);

You would specify:

returnType = null
infoType = "PolymerInfo"
paramInfo = "*" // or whatever subset you want, for instance "*:A"


This will return a Java object that lists all groups in that set of atoms and indicates if they are in helix, sheet, etc. To see the structure of this object, use

print getProperty("polymerInfo")

It is a Vector of Vector of Vector of Hashtable:

models    Vector[1]
polymers    Vector[1]
monomers    Vector[46]
chain    "A"
atomInfo2    "[THR]1:A.CG2 #7"
monomerIndex    0
shapeVisibilityFlags    0
atomInfo1    "[THR]1:A.N #1"
_apt2    6
_apt1    0
structureType    "sheet"
structureId    1
sequenceNumber    1
psi    147.66006
atomIndex2    6
atomIndex1    0
...(45 more of these)


Alternatively, if you just want the PDB file header info, use

jmolViewer.evalString("script(\"show structure\")")

and parse the information yourself. For example:

HELIX    1  H1 SER A  164  ILE A  176
HELIX    2  H2 LYS A  230  VAL A  235
HELIX    3  H3 SER A  236  ASN A  245
SHEET    1  S1 2 TYR A  20  THR A  21
SHEET    2  S2 2 GLN A  30  ASN A  34
SHEET    3  S3 2 HIS A  40  ASN A  48
SHEET    4  S4 2 TRP A  51  SER A  54
SHEET    5  S5 2 GLN A  64  LEU A  67
SHEET    6  S6 2 GLN A  81  VAL A  90
SHEET    7  S7 2 MET A 104  LEU A 108
SHEET    8  S8 2 GLN A 135  GLY A 140
SHEET    9  S9 2 LYS A 156  PRO A 161
SHEET   10 S10 2 MET A 180  ALA A 183
SHEET   11 S11 2 PRO A 198  CYS A 201
SHEET   12 S12 2 LYS A 204  TRP A 215
SHEET   13 S13 2 GLY A 226  THR A 229


Bob Hanson











On Thu, Aug 6, 2009 at 11:17 AM, Charles Shubert <[email protected]> wrote:
How does my Java application get a list of secondary structures from
JmolViewer that duplicates the information in a pdb file?

For a HELIX this would be: the helix id,  init residue, end residue.
For a SHEET STRAND this would be: the strand#, sheet id, number of
strands, init residue, end residue.

Thanks, Chuck




------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users



--
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
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  
http://p.sf.net/sfu/bobj-july_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to