Re: [Jmol-users] [Jmol-developers] 11.1 _modelNumber suggestion
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 * 100 + modelNo This allows for up to 1000 files open at a time, each with up to 99 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] [Jmol-developers] 11.1 _modelNumber suggestion
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 * 100 + modelNo This allows for up to 1000 files open at a time, each with up to 99 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
Re: [Jmol-users] Jmol and Moodle
Bob Hanson wrote: OK, you're on track. Check that file from the machine that is causing the problem. When you go to that exact URL with that browser, do you get a login message from the server? When I go there, I get a log in screen. Ah, so I'm betting only one of your browsers is passing on the secure password to the server when Jmol makes that call. Something like that. I'm going to change this error message to display the first 1000 characters of the file. That should be very helpful in general. Yes, ok, that's done. Jmol 11.1.12 will have this feature. When you look in the log file you will see the first three lines of the file. Also, this will display in the applet window. (a feature of 11.1) Bob When I do as you asked I get a window that asks me what I want to do with the file: open or save. No request for a password. I'm already logged in so probably it doesn't need my login while you weren't logged in when you tried it. * Jeff Hansen Department of Chemistry DePauw University Greencastle, IN 46135 [EMAIL PROTECTED] * - 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.phpp=sourceforgeCID=DEVDEV___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Jmol 11.1.12 is ready for building
Jmol 11.1.12 is ready for Nico to release it. Two new items just in: 1) new file command file n like frame range n.1 - n.m where n is the file number and m is the number of models in the file. All models in this file are made displayable, and if we have display *, all atoms will be displayed. 2) select model= and select file= select file=2 # does the obvious, I think select model=2 # selects for the MODEL NUMBER irrespective of the number of files loaded So, for example, if file 1 had 3 models and file 2 has 5 models, then select file=1 # selects models 1.1, 1.2, and 1.3 select model=2 # selects models 1.2 and 2.2 PROVIDED they are not PDB files with MODEL records if any file has PDB MODEL records, then select model=n selects for THAT model designation. So, for example, if that first model has models 33, 22, and 11 in it, then select model=1 # only selects for 2.1, because there is no model 1 in file 1 select model=33 # selects for 1.1, because that model is listed as MODEL 33 I think its logical! Note also that you can use variables here: filename = 3 file @filename modelnum = 4 select [EMAIL PROTECTED] # or select model=modelnum # @ is unnecessary in this context Bob - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Jmol 11.1.12 is ready for building
Bob Hanson wrote: Jmol 11.1.12 is ready for Nico to release it. Done ! Bob, it's very useful your addition of the changes in JmolConstants :) I just copy / pasted it to get the change log of the release Nico - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Jmol 11.1.13 feature PROPOSAL
I have just checked in a version of Jmol that allows: inverting selected atoms about points and planes writing of selected coordinates and orientation reading those files back into Jmol Basically, there is a new command: invertSelection which by itself inverts all atoms through the center of rotation invertSelection POINT [some point description] which inverts selected atoms through a point invertSelection PLANE [some plane description] which inverts selected atoms across a plane Now, once this is done, of course, the atoms are not where they used to be. That would mess up the state, so I have added a new DATA type called coord: DATA coord set 24 ; Jmol Coordinate Data Format 1 -- Jmol 11.1.13 2007-02-14 15:54; 1 H H1_#1 2.9400268 2.3187106 -0.35901633 ; 2 N N2_#2 -1.4280989 2.2970076 0.9680812 ; 3 C C3_#3 -0.5195322 0.37288004 -0.24890617 ; ... 24 H H24_#24 0.7507625 -1.5374694 -1.5575587 ; end coord set; which allows setting of atom coordinates in bulk. This is necessary, of course, because if you move the atoms, we have to reproduce that in the script. So with that, it seemed simple enough (about 10 lines of code) to create: write coords which writes the same SPT script as write state except it also includes coordinate positions. SO, having done that, it seemed ridiculous if Jmol could write coordinates but not read what it had written, so I added a tiny JmolDataReader to read those files. I really don't know if that is of any particular use. But it was simple enough to do. But more useful, probably, would be the ability to write the coordinates in a more standard format, and if people feel strongly that we should NOT be able to read these script files this way, I would be happy to remove that capability. Comments? Suggestions for perhaps a SIMPLE general format for writing coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited, but with bonds), PDB? (unlimited, but rather involved). Alternatively, should Jmol have a new native format that includes the state? I don't want to make a big deal about this; just wondering. And, yes, I know -- the next thing needed is rotateSelected. I'm working on that. When that is in, we can start having quite some fun with loading two files, inverting one, moving it above the other, rotating it independently, etc. I think there might be some nice applications that would use this capability. Bob - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL
I have just checked in a version of Jmol that allows: inverting selected atoms about points and planes I like it! I thought about asking to add something like this a while back, but never got around to submitting an official feature request. I can think of some really nice ways of using this capability. (I'm working on some pages that illustrate concepts of point-group symmetry - see http://www.otterbein.edu/home/fac/dnhjhns/xmltest/demo.html ) I still haven't had time to digest the cool new scripting capabilities... And, yes, I know -- the next thing needed is rotateSelected. I'm working on that. Any chance you can think about improper rotations as well? :-) Comments? Suggestions for perhaps a SIMPLE general format for writing coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited, but with bonds), PDB? (unlimited, but rather involved). Alternatively, should Jmol have a new native format that includes the state? If Jmol is creating it, what you have looks ok (except for connectivity). I don't know if bonds should be stored like MOL files or as Jmol commands (like the state). I like the idea (in principle) of using XML, though it certainly doesn't fit the simple criterion. Dean On 2/14/07 7:01 PM, Bob Hanson [EMAIL PROTECTED] wrote: I have just checked in a version of Jmol that allows: inverting selected atoms about points and planes writing of selected coordinates and orientation reading those files back into Jmol Basically, there is a new command: invertSelection which by itself inverts all atoms through the center of rotation invertSelection POINT [some point description] which inverts selected atoms through a point invertSelection PLANE [some plane description] which inverts selected atoms across a plane Now, once this is done, of course, the atoms are not where they used to be. That would mess up the state, so I have added a new DATA type called coord: DATA coord set 24 ; Jmol Coordinate Data Format 1 -- Jmol 11.1.13 2007-02-14 15:54; 1 H H1_#1 2.9400268 2.3187106 -0.35901633 ; 2 N N2_#2 -1.4280989 2.2970076 0.9680812 ; 3 C C3_#3 -0.5195322 0.37288004 -0.24890617 ; ... 24 H H24_#24 0.7507625 -1.5374694 -1.5575587 ; end coord set; which allows setting of atom coordinates in bulk. This is necessary, of course, because if you move the atoms, we have to reproduce that in the script. So with that, it seemed simple enough (about 10 lines of code) to create: write coords which writes the same SPT script as write state except it also includes coordinate positions. SO, having done that, it seemed ridiculous if Jmol could write coordinates but not read what it had written, so I added a tiny JmolDataReader to read those files. I really don't know if that is of any particular use. But it was simple enough to do. But more useful, probably, would be the ability to write the coordinates in a more standard format, and if people feel strongly that we should NOT be able to read these script files this way, I would be happy to remove that capability. Comments? Suggestions for perhaps a SIMPLE general format for writing coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited, but with bonds), PDB? (unlimited, but rather involved). Alternatively, should Jmol have a new native format that includes the state? I don't want to make a big deal about this; just wondering. And, yes, I know -- the next thing needed is rotateSelected. I'm working on that. When that is in, we can start having quite some fun with loading two files, inverting one, moving it above the other, rotating it independently, etc. I think there might be some nice applications that would use this capability. Bob - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL
this now works. Aren't matrices great! I cannot believe how easy this is. The new command is rotateSelected and then just like rotate or spin Because I'm loathe to create still another command, I've added spin as a keyword to rotate so now you can say, for example: select file=1; rotateSelected spin internal 10 (C5/1) (C6/1) or, in context: load files cholesterol.mol cholesterol.mol file 0;display *; show all models, all atoms select file=1; invertselected # now I have two enantiomers translateselected {0 5 5} # offset one center visible rotateselected x 180;rotateselected y 180 rotateSelected spin internal x 10 set picking select molecule And, sure enough, only the top cholesterol spins. If you use the mouse, both models rotate with the mouse -- unless you hold ALT down while rotating, then only the spinning model rotates with you! And, if you select the other model while this is happening, guess what? IT starts spinning instead. Or, select all, and, yes, all start spinning. TOO much fun! Oh, and then do set navigationmode set navigationspeed 50 and use the arrow keys to enter the SPINNING molecule and look around. Oh, oh. Oh, I think I'm going to get sick. I do NOT recommend doing this. Seriously. I think some people might have to leave the room if you do this for a crowd. Yeiks. Bob That's a slippery slope to molecule manipulation and other molecular editing tasks. ;-) Not interested. Jmol should be able to load two models and rotate one so it can be compared (visually) with another but I don't think it needs to *make* the other model. done - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Jmol 11.1.13 feature PROPOSAL
Dean Johnston wrote: I have just checked in a version of Jmol that allows: inverting selected atoms about points and planes I like it! I thought about asking to add something like this a while back, but never got around to submitting an official feature request. I can think of some really nice ways of using this capability. (I'm working on some pages that illustrate concepts of point-group symmetry - see http://www.otterbein.edu/home/fac/dnhjhns/xmltest/demo.html ) I still haven't had time to digest the cool new scripting capabilities... great -- you can use the Miller indices and select symmetry operation sets: select symop=1555 invertselected HKL {1/2 1/2 0} oooh. And, yes, I know -- the next thing needed is rotateSelected. I'm working on that. done - that works, too. Any chance you can think about improper rotations as well? :-) Let's see.. What's an improper rotation again? Oh, sure, that's trivial -- angle = 60 rotate internal @angle {} {}; select *;invertSelected POINT {...}; Right? Comments? Suggestions for perhaps a SIMPLE general format for writing coordinates? XYZ? (no number limitation, but no bonds), MOL? (limited, but with bonds), PDB? (unlimited, but rather involved). Alternatively, should Jmol have a new native format that includes the state? If Jmol is creating it, what you have looks ok (except for connectivity). I don't know if bonds should be stored like MOL files or as Jmol commands (like the state). I like the idea (in principle) of using XML, though it certainly doesn't fit the simple criterion. It's really not important. If you write coord state.spt and then load state.spt the nice thing is that it's all one file now. But you are pretty much just back to what you get in an XYZ file. But if you instead have that original file still in place and script state.spt then it loads the original file and moves the atoms to where they need to be. Bob - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] advice needed
OK, I've got rotation, translation, and inversion of selected atoms going now. It can all be scripted using rotateSelected translateSelected invertSelected The question is: How to specify this with the mouse? Right now I've set it up (11.1.13) so that if you set allowRotateSelected and then hold down the ALT key, only the selected atoms rotate. Here's a quiz for you. What does the following script do? load files cholesterol.mol cholesterol.mol file 0;display *; select file=1; invertselected translateselected {0 5 5} center visible rotateselected x 180 rotateselected y 180 thefile = 1 spinrate = 10 message _here select file = thefile rotateSelected spin internal x @spinrate thefile = 3 - thefile spinrate = - spinrate delay 0.05 goto _here Bob - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] advice needed
WOW! This is what I needed two months ago. You just made about half of my Javascript code unnecessary, but it's so much easier and cleaner to do it within Jmol. OK, I've got rotation, translation, and inversion of selected atoms going now. It can all be scripted using rotateSelected translateSelected invertSelected The question is: How to specify this with the mouse? Right now I've set it up (11.1.13) so that if you set allowRotateSelected Should you do something like: set altMouseMode ( rotateSelected | translateSelected | invertSelected ) ??? It would be cool to be able to control inversion with the mouse.. (I really like the rotateSelected with the mouse) Another idea. Can you RESTRICT the rotateSelected to be only around an arbitrary axis? Here's a quiz for you. What does the following script do? Ummm, synchronized spinners? Oddly enough, one molecule disappeared after a minute or two. great -- you can use the Miller indices and select symmetry operation sets: select symop=1555 invertselected HKL {1/2 1/2 0} Yeah, it's been a while since I've used Miller indices - ok, that will be MUCH simpler. Let's see.. What's an improper rotation again? Oh, sure, that's trivial -- Yes, just roto-reflection. Trivial. Dean - 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.phpp=sourceforgeCID=DEVDEV ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users