On 5/24/2013 10:49 AM, Robert Hanson wrote:
On Fri, May 24, 2013 at 9:54 AM, Angel Herráez <angel.herr...@uah.es
<mailto:angel.herr...@uah.es>> 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
Thanks Angel and Bob. That clarifies a lot.
PM
------------------------------------------------------------------------------
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
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users