Thanks Robert,

That works a brilliantly. I now feel quite stupid, especially considering my last line of questioning.

Thanks again,
Chris.




Robert Hanson wrote:
OR:

load caffeine.xyz;
spin branch {N8} {C19} 50 # CH3 starts spinning around the N8-C19 bond

select connected(C19) and not N8
rotateSelected {N8} {C19} 30  # CH3 rotates 30 degrees around that bond

This second doesn't presume rotation about a bond. The two atoms, N8 and C19, are simply defining an axis of rotation. That could be any two atoms or any two points:

rotateSelected {0 0 0} {1 1 1} 30

or a defined axis and angle:

rotateSelected axisangle {1 1 1 30}

or, if an axis name is designated, make sure you use "molecular" to refer to the molecular axis, not the window axes.

rotateSelected molecular x 30

Bob




On Mon, May 11, 2009 at 12:31 PM, Robert Hanson <[email protected]> wrote:
You tried rotateSelected?





On Mon, May 11, 2009 at 10:02 AM, Chris Foley <[email protected]> wrote:
Hi Jmol users,

Is it is possible to translate atoms programmatically from within a Java
application? I have tried variations on the following but it does not
seem to work:

           Point3f p = viewer.getAtomPoint3f(jmolindex);
     p.set(newXYZf);

Tantalisingly, as the program executes I see the atoms move in Jmol and
then they snap back to their original positions. I have a working Jmol
script for this but because I want to translate a large number of atoms
different distances the script is proving too slow.

To put this strange request in context, I am trying to rotate selected
atoms around a point, hence the need to "translate" the atoms individually.

Thanks in advance for any help.

Cheers,
Chris.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users



--
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



--
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
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to