Hello Pshemak
> Consider NaCl crystal structure. I have a specific Na+ in mind. Let's
> say @6. Now, I want to select all chlorides that are within 6 A of that
> specific Na+. How could I do that?
select _Cl and within(6.0, atomNo=6);
select _Cl & within(6.0, @6); //same but shorter
you might need braces {} around the atom expression
> If I want to do the same, but select all chlorides that are more than 6
> but less than 12 A away from the sodium cation (@6), what would be the
> command for a case like that?
select _Cl & within(12.0, @6) & ! within(6.0, @6) ;
> 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);
(you may or not need the "var" part)
then
select @myAtomSet;
------------------------------------------------------------------------------
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