Bob,

Thank you for all your work on this, it's amazing
you can keep up with all these threads at once!

I've tested your bleeding-edge 11.1.12 zip file for these new 
features, and the _currentFileNumber and _currentModelNumberInFile
are great for me, as is the 'frame m.x-n.y' syntax.

But, there does seem now to be a problem with 'frame next', 'frame prev'
and 'frame last' which wasn't there in 11.1.11 --- these commands
don't seem to work beyond the first file.
i.e. having done

load "files" "file1.sdf" "file2.sdf"
frame 2.1

all of 'frame next', 'frame prev' and 'frame last' 
do nothing.


Thanks again,

Dave

On Wed, 14 Feb 2007 02:10:43 -0600, "Bob Hanson" <[EMAIL PROTECTED]>
said:
> Jmol 11.1.12 implements
> 
> _currentFileNumber
> _currentModelNumberInFile
> 
> 
> for example:
> 
> set echo top left
> echo File %{_currentFileNumber}|Model %{_currentModelNumber}|ID: 
> %{_modelNumber}
> 
> Note that:
> 
> 1) if multiple models are displayed from a single file, then 
> _currentModelNumber goes to 0;
> 2) if multiple models are displayed from multiple files, then both 
> variables go to 0.
> 
> I've also added four new parameters to the animFrameCallback function:
> 
> animCallback(applet, frameNo, fileNo, modelNo, firstNo, lastNo)
> 
> the proper way to access the frame from JavaScript would be using   
> "fileNo.modelNo".
> As in:
> 
> jmolScript("frame " + fileNo + "." + modelNo)
> 
> When only one file is loaded, you can just use the modelNo (1,2,3,...), 
> as before, or you can use fileNo.modelNo, since in that case fileNo is 
> 1, and 1.1, 1.2, 1.3 always work.
> 
> Note that to avoid floating point problems, firstNo and LastNo have the 
> file and model put together as:
> 
> fileNo * 1000000 + modelNo
> 
> This allows for up to 1000 files open at a time, each with up to 999999 
> models. Should be plenty, I think. The "2001" "1001" business still 
> works, but I don't recommend it.
> 
> Bob
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Bob Hanson wrote:
> 
> > [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
> >>  
> >>
> >
> >
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
-- 
  Dave Evans
  [EMAIL PROTECTED]
  http://www.davidaevans.org


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to