Noel,

slab:

Jmol 11.3.55 cleans this up. There was a bug in how slab set operated; 
it is immensely cleaner now, and as a bonus we have

_slabPlane
_depthPlane

defined. So at any time -- whether slab is on or not -- you can do 
something like this:

  isosurface plane @{_slabplane}

or

  color (within(0.2, @{_slabPlane}) yellow

Note that for within(xxx,<some plane>), you can define "all the atoms on 
one side" by setting xxx to 999, and "all the atoms on the other side" 
as xxx = -999

Note that the only difference between slab and depth in this context is 
the direction of cutting -- toward you or away from you. But really they 
are just two planes that you can manipulate independently. Note that the 
definitions depend critically on how the model is rotated unless you 
define the plane yourself using something like the following:

  slab {atomno=1} {atomno=2} {atomno=4 or atomno=5}  #through atoms 1, 
2, and the center of the bond between 4 and 5
  display model=2.1 and within(999,@{_slabPlane}) or model =1.1

So even if you don't turn slab on, that plane is defined, and you can 
use it.


Noel O'Boyle wrote:

>Dear all,
>
>I've been having a lot of success with Jmol now that I've gotten over
>the inital activation energy. Before I write a blog post recording
>what I've done and posting some pictures, I thought I might ask a
>raise a few questions about random things that I came up against.
>
>(1) Slabs appear to cut through all models. It would be great if a
>slab could just be applied to one model or the selected models. (Use
>case: I want to see the whole ligand in the active site, but I need to
>cut back the isosurface.)
>
>  
>
they do have to cut through all models. But note that now you can use 
the slab plane to select a set of atoms, and you can include a model in 
that:

slab 60;
select within(-999, @{_slabPlane}) and model=2.1
display selected


>(2) "slab set" appears to behave differently than documented. I didn't
>expect the slab to move or reset when I issued the command "slab set",
>but it appears to do so, although it then remains fixed while rotating
>the molecule (as documented).
>
>  
>
bugs.

>(3) It would be great to be able to print out three points in the
>slab, so that I construct a plane myself using those points or select
>all points on one side of the plane.
>
>  
>
Well, you can get the equation of the plane now, and you can calculate 
the points yourself, I guess.
Note that you can define a plane in terms of three points chosen from 
coordinates, atom positions, or averages of atom positions.

>(4) Loading property data using {*}.property_d = load("myfile.txt")
>worked fine in the applet. However, I couldn't get it to work in the
>application, where I wanted to load a file from a different folder.
>Surely the applet isn't restricted by security to particular folders?
>Also, I wasn't sure how to test whether the data was actually loaded
>correctly. "print property_d" doesn't appear to do anything useful
>even when property_d contains information.
>
>  
>
These all worked for me:

print load("t.spt")
print load("/temp/writevar.txt")
print load("e:/temp/readme.txt")
print load("../../log.txt")

That uses the same method as above, so it should be working. Use print 
to test.

(Make sure you you use forward slash, /, even if you are on a PC.)

>(5) At one point, I was trying to select the last molecule in a model.
>I had to do something like:
>   nMol = getProperty("moleculeInfo", {model=1.1}).size
>and use,
>  script INLINE "select molecule=" + nMol
>
>Would something like "select molecule=-1" be a good idea?
>
>  
>
nMol = {2.1}[0].molecule

(the molecule of the last atom in model 2.1)

>(6) I found that mapping property data onto an isosurface worked fine
>except that you need to have property data for every atom in every
>model up to the model for which you are actually drawing the
>isosurface. I think this is undocumented, and doesn't really seem to
>be a useful feature. (The documentation just says that property data
>is required for every atom in the model, which seems more reasonable.)
>
>  
>
Not if you load the data a different way. For example, you could use

{model=2.1}.property_mydata = array(2,3,4,5,6,6,7);

or a data command where the first column is the atom number and the 
second is the data, and you define

set propertyAtomNumberField 1
set propertyDataField 2
data "mydata"
34 2.1
35 2.3
36 3.6
......
end "mydata"

should load data just for those atoms (I think it puts 0s everywhere else)

>(7) jmolScriptWait is a good idea. But it'd be great to have something
>similar for jmolInitialize, either a Wait version, or a callback to a
>javascript function (e.g. onload="myfunction"). At the moment, I stuff
>everything into the call to jmolInitialize, but it's not really the
>best way to do it, and if I want to do some javascript to process some
>feature of the model after it has been loaded, it's not very
>convenient.
>
>  
>
nothing should be in jmolInitialize -- you mean jmolApplet ? That is 
really the way to go, because then Jmol runs the script immediately 
after file loading.
Still, you can use:

jmolSetCallback("loadStructCallback", "myfunc")


>Let me know if you want some example pages, or if I should file
>feature requests, etc.
>
>  
>
You're doing great! A pro already!

Bob

>Noel
>
>-------------------------------------------------------------------------
>SF.Net email is sponsored by: 
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://sourceforge.net/services/buy/index.php
>_______________________________________________
>Jmol-users mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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



-------------------------------------------------------------------------
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to