[switch to Jmol-users list]
Dave, I did a little modification. Tell me if this suits you for
_modelNumber:
1) If only one file, one model is loaded, then you get "1" unless the
file is a PDB file with a MODEL record, in which case you get the number
on that record.
2) If only one file, multiple models are loaded, then you get "1.1",
"1.2", "1.3", ... , etc. You can still use the standard "1" "2" "3" to
address these, but this seems to me a bit clearer in indicating to the
user that the models are all from the same file and that "*/1.1" may be
preferred to "*/1", though both work.
3) If several files are loaded, and each has only one model, then you
get "1" "2" "3" as usual.
4) If several files are loaded, and one or more has multiple models,
then FOR THOSE FILES, you will see "2.1" "2.2" etc., but for files that
are loaded that don't have multiple models, you just see an integer "2".
Note that the new file.model notation allows for a very handy way to
select all the models in a given file. You just specify the integer file
number:
select */2
selects all models of file 2 if more than one model exists. It's the
same as
select */2.0
This is so much better than "1001" "1002" "2001" that I'm taking those
out of the documentation.
I will look into "_file" and _model", but what do you want these to say
when there are multiple models displayed?
I have just checked in a set of modifications that makes "frame" much
more sensible. Now, for example, you can say:
frames 1.1-1.5
to see just these frames. This is the same as
frame range 1.1 1.5
frame 0
Also allowed now:
frames 1.5-
open ended.
Then, in addition, the _modelNumber variable is changed to a STRING
(which is necessary when displaying decimal numbers like 1.34), and so
it made sense to me to have it deliver the EXACT range of models being
displayed. So, for example, if you do:
frame range 1.5-
and the file has 13 models, then
message %{_modelNumber}
will return
1.5-1.13
which is far more useful, I think.
OK, so with that all set up, I'm ready to do the _file and _model
variables, but I need to know what you want for when multiple models are
displayed.
But I would like you to try the "x.y--w.z" type notation first and see
if it would work for you. If you are using a webpage you can always
dissect it out yourself from getProperty animationInfo as well or even
now a simple
var info = jmolScriptWait("message %{_modelNumber}")
and then parse that.
Bob
[EMAIL PROTECTED] wrote:
>Bob,
>
>Thanks for the work you've done on the frame
>command and the variable access. I've got
>a nit-picky suggestion :
>
>I've been using echo %{_modelNumber} with multiple
>files loaded, and find that you get the numbers
>in the format 1001, 1002.. 2001 etc, which is
>a bit confusing to the end user. Would
>it be possible to have separate variables _fileNumber
>and _modelNumber (or whatever names you prefer), so
>you could echo things like "File 1, Frame 2" ?
>
>
>Thanks,
>
>Dave
>
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users