Martin,
Jmol script has many ways to select subsets of atoms. Here's two
approaches to your problem.
The following script illustrates a way to select one or the other of two
molecules. It works with molecules in a single frame or with molecules
in the same frame.
var i = {*}.atomIndex.max + 1;select within(branch, {atomIndex = i},
{atomIndex=0});translateSelected {1 1 0}
select not selected;translateSelected {1 1 0}
The selection code selects the branch that has the atom with atomIndex = 0
For molecules in different frames, the following will work:
select 1.1;translateSelected {1 1 0}
select 2.1;translateSelected {1 1 0}
Otis
Otis Rothenberger
chemagic.com
On 8/1/2010 7:23 AM, Martin Guetlein wrote:
> Hello Jmol-Users,
>
> I'm new to Jmol, and I would like to translate single molecules
> instead of the whole set.
> The following example script:
>
> model 1
> // select molecule=1 // does not make a difference
> translateSelected {30 0 0}
> model 1 - 2
>
> .. translates molecules 1 and 2 (i.e.both molecules end up at the same
> location), instead of only moving molecule 1.
> (I experimented with move as well, without success).
> How can I do this?
>
> Is there some documentation on working with sets of molecules (rather
> than documentation that is focused on single molecules and viewer
> related aspects, what I mostly found)?
>
> Many thanks,
> Martin
>
>
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users