see http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm
Several new features presently only available in
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.zip and
http://chemapps.stolaf.edu/jmol/docs/examples-11/
Check it out!
Bob
,'### settable radius, color, and label ###'
,'# Jmol 11.7.40 allows for reading and changing the spacefill radius and
label of an atom programmatically as well as selecting atoms by label.'
,'load caffeine.xyz'
,'{*}.label = for(x;{*};x.distance({0 0 0}))'
,'{*}.label = {*}.radius.all'
,'{*}.color = for(x;{*};if(x.radius < 0.3;"red";"blue"))'
,'load 1crn.pdb;color temperature;{*}.radius = for(x;{*};x.temperature/20)'
,'### inline FOR function ###'
,'# Jmol 11.7.40 introduces the inline FOR function, which allows creation
of a list of values based on processing of individual atom properties in a
set of selected atoms. The syntax is similar to the <b>select()</b>
function: <b>for(dummyVariable;{atom expression};math expression)</b>. The
real power is that the result is a list that can be mapped back onto the
atoms as a new or replacement property.'
,'load 1crn.pdb'
,'pt = {0 0 0};{*}.property_dist = for(x;{*};x.distance(pt));color
property_dist'
,'pt = {*}.xyz;{*}.radius = for(x;{*};x.distance(pt)/pt)'
,'### inline IF function ###'
,'# Jmol 11.7.40 adds in inline IF function that works like the Java syntax
xxx = (booleanExpression ? ifTrue : ifFalse). Since we are already using ?
and :, we use semicolons instead, and this becomes in Jmol: <b>xxx =
if(booleanExpression; ifTrue; ifFalse)</b>. By itself this is just a
convenience; with other recent enhancements, it is very powerful.'
,'load 1crn.pdb'
,'ave = {*}.bonds.length; print if(ave < 1.5 ; "shorter than 1.5" ; "not so
short")'
,'### Materials Studio .xsd reader ###'
,'# Jmol 11.7.40 adds a reader for polymeric structures created using <a
href=http://accelrys.com/products/materials-studio/>Materials Studio</a>.
For now, at least, individual "molecules" are loaded into separate models.'
,'load PolyBisphenol.xsd'
,'color group'
,'label "%[resno]"'
,'selectionhalos on;select resno=1;delay 1;select resno=2;delay 1;select
resno=3;delay 1;select none'
,'### atom property upgrade ###'
,'# Jmol 11.7.40 adds extensive support for working with atom properties.
See <a target="_blank" href="../index.htm#atomproperties">the interactive
documentation</a> for details.'
,'load 1d66.pdb;selectionhalos on;select none'
,'select atomName="CA"'
,'select group="ARG"'
,'select (chain="A" or chain="B") and helix'
,'load quartz.cif {2 2 2};selectionhalos on;select none'
,'select cell=555'
,'select connected({element="Si"}[3])'
,'print {element="Si"}[3].bonds.label("%[atomName]1 %[symmetry]1
%[atomName]2 %[symmetry]2 %4.3LENGTH")'
,'### label %[structure] %[strucNo] ###'
,'# Jmol 11.7.40 adds a new way to specify label parameters, and with that,
two new options. <b>%[structureType]</b> reports "helix", "sheet", "turn",
or "none"; <b>%[strucNo]</b> adds to that a unique identifying number.'
,'load 1crn.pdb;cartoons only;color cartoons structure; color cartoons
translucent;'
,'select *.ca; wireframe on; label %[structure]'
,'select *.ca; wireframe on; label %[structure]%[strucNo]'
--
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
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users