At 07:50 PM 5/10/2005, you wrote:
> Does Jmol have an internal file format where one can specify an atom > location XYZ (Cartesian) and the radius of the sphere it will use to > represent it, ie. adjust it's Van der Waals radius? > > I want to display a set of overlapping spheres of varying > diameter. Unfortunately, the geomview applet, JGV, does not display > spheres and so I was hoping to use Jmol for this task.
Using the scripting language you can easily adjust the color and diameter of every sphere.
Nice. Scripting language is a great feature in Jmol.
I suspect that the simplest format for you to use would be the .xyz format:
----- Martin's test file 3 H 0 0 0 H 1 1 1 H -1 -1 -1 -----
First line is a comment second line is atom count subsequent lines are element symbol followed by cartesian coordinate values x, y, z expressed in angstroms.
I think xyz files should have atom count first then comment line, no?
You can then set the colors and sizes as follows:
select atomno=1; color atom red; spacefill 0.5; select atomno=2; color atom green; spacefill 1.0; select atomno=3; color atom blue; spacefill 2.0;
I've set this up. I create an xyz file with H atoms and then a second file which contains the commands to set color and spacefill.
Two things I've noticed.
1./ When using the applet I load the structure via
jmolApplet(500, "load test.xyz");
then I try to source the script which sets the color via
jmolScript('source changes.jmol");This doesn't work. ? So I use
jmolLink("source changes.jmol", "click to change colors");This works fine. On the webpage I just click the link and the changes occur, a bit slow but it works.
Do I need to enable something in the browser settings for the jmolScript("source... ) to work?
2./ When I use the Jmol program locally. I load the file and then use the script command menu item to bring
up a command line prompt and type "source changes.jmol". This works fine but the console shows the progress, ie.
"atom 1 selected...atom 2 selected ..." and on so in the console window. The output to screen seems to slow down the
progress considerably. Can I use something like "source changes.jmol >& /dev/null "? So that the verbosity is trashed.
The middle mouse button (or shift+left mouse button) covers both zooming and rotating, can these be separated?
It's tricky to zoom and not rotate at the same time, anyone else noticed this?
This is setting the colors to be red, green, and blue and the radii to 0.5, 1.0, and 2.0 angstrom, respectively.
Do not forget to use a decimal point in the sizes or you will get unexpected results.
Let us know how it works out.
Thanks for your help.
Martin.
Miguel
------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

