Re: [Jmol-users] Re: Polyhedra connections
Hens Borkent wrote: Not knowing what (or who? New sponsor?) maxFactor was I changed the number to e.g, 1.9, and that froze the applet, so some checking needs to be done probably. that's fixed, and explained in my previous posting. -- Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr "Imagination is more important than knowledge." - Albert Einstein --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Re: Polyhedra connections
For the "full Monte" see http://www.stolaf.edu/people/hansonr/jmol/test/poly/poly.htm :) Proposed for the documentation: polyhedra Jmol supports polyhedral representation of molecular structures, including tetrahedra, octahedra, and many other geometric forms. Centers. Potential polyhedra centers are defined either by the currently selected set of atoms or by explicitly indicating an atom expression within the polyhedra command. polyhedra (chlorine) polyhedra (atomno=1) 2.0 polyhedra (atomno=1 or atomno=3) 4 select (atomno < 3); polyhedra 4 Vertices. From this set of centers, polyhedra can be formed based upon a specified number of bonds (e.g., polyhedra 6) or upon a maximum distance expressed as a decimal number (e.g., polyhedra 2.0). In addition, you can add the keyword "TO" and a second atom expression to indicate that only atoms matching this expression should be selected for vertices. The default is to use bonds, but if a radius and a number of bonds is indicate, then the number of "bonds" simply means the number of vertices within this radius, actually "bonded" or not. polyhedra (silicon) TO (oxygen) 4 polyhedra (zinc) TO (oxygen or nitrogen) 5.0 Options. Several additional options may be used to adjust the appearance of the polygons. These include: COLLAPSED Collapse the polygon into the center atom, as though all the volume had been removed, leaving only a "skin." This allows visualization of the central atom. EDGES Highlight the edges of the polyhedra. FRONTEDGES Highlight only the front edges of the polyhedra (Useful when color is translucent.) MAXFACTOR [decimal number] (default 1.85) Determines the cutoff point used to determine faces. Vertex-vertex distances longer than this factor times the average center-vertex distance are discarded. In certain circumstances this parameter can be adjusted to produce better polygons. FACECENTEROFFSET [decimal number] (default 0.25) This absolute offset, in Angstroms, sets the position of the point at the base of the cavity in a collapsed polygon. The value 0.0 indicates that the base of the cavity should be the central atom and is not recommended. Adjusting this parameter can lead to interesting effects. Additional commands that can be invoked after polygons have been created include the following. Note that each can include a specified atom set or use the current selection so as to operate only on specific polyhedra based on their center atoms. polyhedra ON/OFF{default: ON} Show or hide polyhedra whose central atom is selected. polyhedra DELETE Delete the polyhedra associated with central atoms that are selected. polyhedra EDGES As above polyhedra FRONTEDGES As above polyhedra NOEDGES Turns off edges -- Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr "Imagination is more important than knowledge." - Albert Einstein --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] Re: Polyhedra connections
> Bob, > > Incredible what a nice, estetically pleasing pictures one can make this > way with a few commands. > The facet type of depiction I really like, as it doesn't hide the > central atom. I agree ... very nice Miguel --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Re: Polyhedra connections
Bob, Incredible what a nice, estetically pleasing pictures one can make this way with a few commands. The facet type of depiction I really like, as it doesn't hide the central atom. Not knowing what (or who? New sponsor?) maxFactor was I changed the number to e.g, 1.9, and that froze the applet, so some checking needs to be done probably. For the rest: great! Hens folks interested in polyhedra and/or connections, please take a look at this page. Several new ideas there: -- "facet" depiction for polyhedra -- selectable number of bond connections in polyhedra -- select connected(min_bonds, max_bonds, atom selection set) -- variable number of bonds in polyhedra, not just 4 or 6. --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
[Jmol-users] Re: Polyhedra connections
As a follow up I've tried a number of variations to produce a generic version, it is very subtle, I just tried var script = "load ./inorganicmodels/" + model + "; select *; connect DELETE; select oxygen or fluorine or chlorine or bromine or iodine or sulfur or selenium or hydrogen or nitrogen or boron; connect 1.0 3.0 (all); polyhedra bonds; select *; polyhedra frontedges; select silicon; colour blue; select *;connect; wireframe on; select *";and this didn't work as I hoped.Could someone tell how to code a form system, so my test page with the polyhedra collection can be made more open to others so if they are interested they can try polyhedra code with my examples.http://www.chem.ox.ac.uk/ic4/polyhedratest.aspKarlThanks Bob, I'm pleased that my reading of the commands was far out. I tried switching to an updated based on the changes you suggested version c.f. var script = "load ./inorganicmodels/" + model + "; select *; connect 2.7 (oxygen) ; connect 3.0 (fluorine) ; connect 2.9 (bromine); connect 3.0 (iodine); connect 3.3 (sulfur or selenium) ; connect 2.9 (sodium) (chlorine); connect 3.8 (caesium) (chlorine); polyhedra bonds; select *; polyhedra frontedges; select silicon; colour blue; select *;connect; wireframe on; select *";But I think my 10.0.48 doesn't like it and you link to you code version is broken I think. In fact the link on the JMOL home site to your work Interactive Scripting Doc http://www.stolaf.edu/people/hansonr/jmol/docs is now brokenIn my current version of commands before reading your message I adopted the Delete commands to remove unwanted overlapping polyhedra.var script = "load ./inorganicmodels/" + model + "; select *; connect DELETE; select *; connect 1.0 2.7 (oxygen); connect 1.0 3.3 (sulphur); connect 1.0 2.8 (nitrogen); connect 1.0 3.3 (hydrogen); connect 1.0 3.3 (selenium); connect 1.0 3.3 (carbon); connect 1.0 3.3 (arsenic); connect 1.0 3.0 (fluorine); select sodium; connect 1.0 2.9 (chlorine); select caesium; connect 1.0 3.8 (chlorine); connect 1.0 2.9 (bromine); connect 1.0 3.6 (iodine); select *; polyhedra bonds; polyhedra frontedges; select sodium; polyhedra DELETE; select calcium; polyhedra DELETE; select silicon; colour blue; select *;connect; wireframe on; select *";I like the select box idea but don't know how to implement it with the load command, is there an example somewhere.I also really like the idea of the polyhedra bonds number specification, so that would be really useful for a case by case code but the code I want is generic for a large number of structures which would include 4 and 6 structures.Having 8 for a polyhedra as an option would be nice too. The classic CsCl structure. Though in my example code, I cannot even Cs Cl get to have a wireframe structure even though I've set "select caesium; connect 1.0 3.8 (chlorine);"In my examples I don't know why, LiCl and KCl are not displaying at least a wireframe whereas AgCl is.Overall, I'm really pleased the way the polyhedra works and look forward to progress here.The collection if you are wondering is for the latest Shriver and Atkins "Inorganic Chemistry" v4 website. This has 1700 JMOL structures to illustrate the book, available online really soon.Regards, KarlKarl, this is great! Congratulations. I'm delighted the connect command is working so well for you.Suggestion to compact it a bit:1) you don't need "1.0" unless you really think there are connections shorter than that that you DON'T want to bond.2) You no longer need to select, but if you use it, you don't have to specify it over and over. The following should work:select *;connect 2.7 (oxygen) ;connect 3.0 (fluorine) ;connect 2.9 (bromine);connect 3.0 (iodine);connect 3.3 (sulfur or selenium) ;connect 2.9 (sodium) (chlorine);connect 3.8 (caesium) (chlorine);(if that wasn't in 10.00.48, it's in http://www.stolaf.edu/people/hansonr/jmol/test/json)3) putting those radio buttons in a select box would be friendier! :)4) for polyhedra, I'd select one or the other of the elements such as Na or Cl, but not both. That way they won't overlap. One possibility would be to select all the anions prior to the polyhedrons command:select chlorine or fluorine or .polyhedra bonds5) for fun, I just modified the polyhedra command so that it allows you to specify the number of bonds to allow. so if you saypolyhedra bonds 6then ONLY octahedra will show. Does that sound useful?Something else that might be useful: since connect can dynamically change the bonding, you can now connect some atoms, create polyhedra, unconnect them, connect others, make new polyhedra, etc.If you find that aspects of the polyhedra command need improvement, please do ask. I'm VERY interested in this. Bob Hanson