Revision: 20871 http://sourceforge.net/p/jmol/code/20871 Author: hansonr Date: 2015-11-30 00:00:28 +0000 (Mon, 30 Nov 2015) Log Message: ----------- Jmol.___JmolVersion="14.5.0_2015.11.29"
new feature: drawing of spheres in 2D window -- as percent position or absolute, as for ECHO -- diameter is % if position is %; otherwise is pixels -- examples draw d1 diameter 5 [90 90 %] color blue // 5% diameter draw d2 diameter 15 [90 90] color blue // pixel diameter draw dO diameter 2 [90 90 %] color @{ {_O}.color } set echo eO [95 90 %]; echo "O" -- can be used in the context of an element key: load $caffeine function createElementKey() { var y = 90 for (var e in {*}.element.pivot){ var c = {element=@e}.color draw ID @{"d_"+ e} diameter 2 [90 @y %] color @c set echo ID @{"e_" + e} [91 @{y-1} %] echo @e font echo 24 bold sansserif color echo black y -= 5 } } createElementKey new feature: additional predefined sets for periodic table: "@nonmetal _H,_He,_C,_N,_O,_F,_Ne,_S,_P,_Cl,_Ar,_Se,_Br,_Kr,_I,_Xe,_At,_Rn", "@noblegas _He,_Ne,_Ar,_Kr,_Xe,_Rn", "@metal !nonmetal", "@alkaliMetal _Li,_Na,_K,_Rb,_Cs,_Fr", "@alkalineEarth _Be,_Mg,_Ca,_Sr,_Ba,_Ra", "@semimetal _B,_Si,_Ge,_As,_Sb,_Te,_Po", "@transitionMetal elemno>=21&elemno<=30|elemno>=39&elemno<=48|elemno>=72&elemno<=80|elemno>=104&elemno<=112", "@lanthanide elemno>=57&elemno<=71", "@actinide elemno>=89&elemno<=103", new feature: load =am/<mineralName> loads last (earliest?) entry in American Mineralogist Crystal Database -- for example, load =am/corundum -- reads mineral page such as http://rruff.geo.arizona.edu/AMS/minerals/Corundum and extracts from that the last database ID. -- adding .1, .2, ..., or .0 will return only the first, second, ..., or last structure on that page -- requires a preliminary search followed by the actual file load. -- only the final ID-based file load is saved in the state. -- a hack; uses an evaluation of the string: 'http://rruff.geo.arizona.edu/AMS/CIF_text_files/'+load('http://rruff.geo.arizona.edu/AMS/minerals/%FILE').split(\"viewJmol('\")[(%n == 0 ? 0 : %n + 1)].split(\"'\")[1]+'_cif.txt' -- for example, see http://rruff.geo.arizona.edu/AMS/viewJmol.php?id=19280 bug fix: files with names containing "[]" cannot be loaded. bug fix: print {cell=555}.find("cellFormula") can fail because of 2% slop involved in defining cell=555 Modified Paths: -------------- trunk/Jmol/appletweb/jsmol.zip trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java trunk/Jmol/src/org/jmol/viewer/JC.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/appletweb/jsmol.zip =================================================================== (Binary files differ) Modified: trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java 2015-11-29 22:18:42 UTC (rev 20870) +++ trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java 2015-11-30 00:00:28 UTC (rev 20871) @@ -698,6 +698,8 @@ || (isLigand = key.equals("_chem_comp_atom_comp_id"))) { if (!processAtomSiteLoopBlock(isLigand)) return; + if (thisDataSetName.equals("global")) + asc.setCollectionName(thisDataSetName = chemicalName); asc.setAtomSetName(thisDataSetName); asc.setCurrentModelInfo("chemicalName", chemicalName); asc.setCurrentModelInfo("structuralFormula", thisStructuralFormula); Modified: trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java 2015-11-29 22:18:42 UTC (rev 20870) +++ trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java 2015-11-30 00:00:28 UTC (rev 20871) @@ -902,9 +902,9 @@ } if (format.startsWith("'")) { // needs evaluation + // xxxx.n means "the nth item" + pt = id.indexOf("."); int n = (pt > 0 ? PT.parseInt(id.substring(pt + 1)) : 0); - if (n > 0) - n++; if (pt > 0) id = id.substring(0, pt); format = PT.rep(format, "%n", "" + n); Modified: trunk/Jmol/src/org/jmol/viewer/JC.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JC.java 2015-11-29 22:18:42 UTC (rev 20870) +++ trunk/Jmol/src/org/jmol/viewer/JC.java 2015-11-30 00:00:28 UTC (rev 20871) @@ -68,7 +68,7 @@ "map", "http://www.ebi.ac.uk/pdbe/api/%TYPE/%FILE?pretty=false&metadata=true", "rna3d", "http://rna.bgsu.edu/rna3dhub/%TYPE/download/%FILE", "aflow", "http://aflowlib.mems.duke.edu/users/jmolers/binary_new/%FILE.aflow_binary", - "am", "'http://rruff.geo.arizona.edu/AMS/CIF_text_files/'+load('http://rruff.geo.arizona.edu/AMS/minerals/%FILE').split(\"viewJmol('\")[%n].split(\"'\")[1]+'_cif.txt'" + "am", "'http://rruff.geo.arizona.edu/AMS/CIF_text_files/'+load('http://rruff.geo.arizona.edu/AMS/minerals/%FILE').split(\"viewJmol('\")[(%n == 0 ? 0 : %n + 1)].split(\"'\")[1]+'_cif.txt'" }; public static String[] macros = { Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-11-29 22:18:42 UTC (rev 20870) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-11-30 00:00:28 UTC (rev 20871) @@ -73,6 +73,7 @@ draw dO diameter 2 [90 90 %] color @{ {_O}.color } set echo eO [95 90 %]; echo "O" -- can be used in the context of an element key: + load $caffeine function createElementKey() { var y = 90 for (var e in {*}.element.pivot){ @@ -85,7 +86,6 @@ y -= 5 } } - load $caffeine createElementKey new feature: additional predefined sets for periodic table: @@ -103,11 +103,11 @@ -- for example, load =am/corundum -- reads mineral page such as http://rruff.geo.arizona.edu/AMS/minerals/Corundum and extracts from that the last database ID. - -- adding /1, /2, ..., /0 will return only the first, second, ..., last structure on that page + -- adding .1, .2, ..., or .0 will return only the first, second, ..., or last structure on that page -- requires a preliminary search followed by the actual file load. -- only the final ID-based file load is saved in the state. -- a hack; uses an evaluation of the string: - 'http://rruff.geo.arizona.edu/AMS/CIF_text_files/'+load('http://rruff.geo.arizona.edu/AMS/minerals/%FILE').split(\"viewJmol('\")[%n].split(\"'\")[1]+'_cif.txt' + 'http://rruff.geo.arizona.edu/AMS/CIF_text_files/'+load('http://rruff.geo.arizona.edu/AMS/minerals/%FILE').split(\"viewJmol('\")[(%n == 0 ? 0 : %n + 1)].split(\"'\")[1]+'_cif.txt' -- for example, see http://rruff.geo.arizona.edu/AMS/viewJmol.php?id=19280 bug fix: files with names containing "[]" cannot be loaded. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140 _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits