You can get any "show" data back from "print" using
print show("sequence false")
$ load =1crn
PLANT PROTEIN 30-APR-81 1CRN
WATER STRUCTURE OF A HYDROPHOBIC PROTEIN AT ATOMIC RESOLUTION.
PENTAGON RINGS OF WATER MOLECULES IN CRYSTALS OF CRAMBIN
found biomolecule 1: A
$ show sequence false
Model 1
Chain A:
TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN
$ x = show("sequence false")
$ print x
Model 1
Chain A:
TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN
Thus, in JavaScript, you can get the sequence (of the selected atoms) using:
var seq = Jmol.evaluateVar(jmolApplet, "show('sequence false')")
and then apply a bit of parsing to remove the Model/Chain business.
In addition, note that you can get the cysteine linkages using Jmol
bioSMILES:
$ print {*}.find("SMILES",true)
//* Jmol bioSMILES 14.3.11_2015.01.18 2015-01-18 19:26 1 *//
//* chain A protein 1 *//
~p~TTC:1C:2PSIVARSNFNVC:3RLPGTPEAIC:3ATYTGC:2IIIPGA
TC:1PGDYAN //* 46 *//
where C:1 links with C:1, C:2 with C:2, and C:3 with C:3
Finally, there is still one more thing you can do. The .find() function can
return a sequence:
$ print {*}.find("SEQUENCE")
//* chain A protein 1 *// ~p~TTCCPSIVARSNFNVCRLPGTPEAICATYTGCIIIPGATCPGDYAN
//* 46 *//
and you can use this along with searching for sequences:
$ select within(SEQUENCE,"EQAC")
58 atoms selected
$ print {within(SEQUENCE,"EQAC")}.find("SEQUENCE")
//* chain A protein 8 *// ~p~EQAC //* 11 *//.
//* chain B protein 8 *// ~p~EQAC //* 11 *//
Bob
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users