On Fri, May 24, 2013 at 9:54 AM, Angel Herráez <[email protected]> wrote:
> Hello Pshemak
>
> > Finally, can the selected groups of atom (ions) be given a name (ID) so
> > they could be referred to without repeating the selection criteria?
>
> Yes, two ways: using the "define" command or using a JmolScript variable
>
> e.g.
> define myAtomSet _Cl and within(6.0, atomNo=6);
> then
> select myAtomSet;
>
> I'm never sure with the variables, but something like
> var myAtomSet = _Cl and within(6.0, atomNo=6);
>
Need braces there on that one since it is not a legacy Jmol command.
myAtomSet = {_Cl and within(6, @6)}
for example. "var" would localize that definition to a given {...}
enclosure.
load nacl.mol
myAtomSet = {_Cl and within(6, @6)}
print myatomset
({0 1 3:5 7 10 15 19 21:23})
color {myatomset} blue
color @myatomset green
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
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
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users