Revision: 21017 http://sourceforge.net/p/jmol/code/21017 Author: hansonr Date: 2016-03-23 04:35:05 +0000 (Wed, 23 Mar 2016) Log Message: ----------- Jmol.___JmolVersion="14.4.4_2016.03.23"
new feature: load =magndata/1.1.37 -- links to the MAGNDATA database at http://webbdcrista1.ehu.es/magndata -- "magndata", "http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif", new feature: set vectorTrail n -- adds a trail onto a modulating vector (as for an incommensurate magnetic spin) -- n trails are made, typically in a fan-like pattern that trails the spinning vector load =magndata/1.1.37 set vectortrace 20 set vibrationperiod 2 vibration on new feature: unitcell ON adds #nnn (international table number) to cell description if found bug fix: {*}.find("CHEMICAL","NAMES") only reports one name. code: more efficient identifying space group Modified Paths: -------------- branches/v14_4/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java branches/v14_4/Jmol/src/org/jmol/script/ScriptEval.java branches/v14_4/Jmol/src/org/jmol/script/T.java branches/v14_4/Jmol/src/org/jmol/util/Vibration.java branches/v14_4/Jmol/src/org/jmol/viewer/GlobalSettings.java branches/v14_4/Jmol/src/org/jmol/viewer/JC.java branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java trunk/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java trunk/Jmol/src/org/jmol/script/ScriptEval.java trunk/Jmol/src/org/jmol/script/T.java trunk/Jmol/src/org/jmol/util/Vibration.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 trunk/Jmol/src/org/jmol/viewer/Viewer.java Modified: branches/v14_4/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -37,6 +37,7 @@ import javajs.util.P3; import javajs.util.P3i; +import javajs.util.T3; import javajs.util.V3; import org.jmol.util.Vibration; @@ -67,6 +68,10 @@ private boolean vibrationOn; private boolean drawCap; private boolean showModVecs; + private int vectorTrace; + private P3 ptTemp4; + private P3 ptTemp3; + private P3 ptTemp2; @Override @@ -81,6 +86,7 @@ short[] colixes = vectors.colixes; boolean needTranslucent = false; vectorScale = vwr.getFloat(T.vectorscale); + vectorTrace = vwr.getInt(T.vectortrail); if (vectorScale < 0) vectorScale = 1; vectorSymmetry = vwr.getBoolean(T.vectorsymmetry); @@ -115,14 +121,14 @@ needTranslucent = true; continue; } - renderVector(atom); + renderVector(atom, vib); if (vectorSymmetry) { if (vibTemp == null) vibTemp = new Vibration(); vibTemp.setT(vib); vibTemp.scale(-1); transform(mads[i], atom, vibTemp, null); - renderVector(atom); + renderVector(atom, vib); } } if (haveModulations) @@ -133,21 +139,22 @@ JmolModulationSet mod = ms.getModulation(i); if (mod == null) continue; + if (!g3d.setC(Shape.getColix(colixes, i, atom))) { + needTranslucent = true; + continue; + } // now we focus on modulations // this may involve a modulated atom or a spin modulation if (!transform(mads[i], atom, null, mod)) continue; - if (!g3d.setC(Shape.getColix(colixes, i, atom))) { - needTranslucent = true; - continue; - } - renderVector(atom); + renderVector(atom, null); } return needTranslucent; } - private boolean transform(short mad, Atom atom, Vibration vib, JmolModulationSet mod2) { + private boolean transform(short mad, Atom atom, Vibration vib, + JmolModulationSet mod2) { boolean isMod = (vib == null || vib.modDim >= 0); boolean isSpin = (!isMod && vib.modDim == Vibration.TYPE_SPIN); if (vib == null) @@ -188,15 +195,15 @@ headOffsetVector.scale(headScale / headOffsetVector.length()); } else if (vectorsCentered || isSpin) { standardVector = false; - // Vibration v; - // if (mod2 == null || !mod2.isEnabled()) { - // v = vib; -// } else { -// v = vibTemp; -// vibTemp.set(0, 0, 0); -// v.setTempPoint(vibTemp, null, 1, vwr.g.modulationScale); -// vwr.tm.getVibrationPoint(vib, v, Float.NaN); -// } + // Vibration v; + // if (mod2 == null || !mod2.isEnabled()) { + // v = vib; + // } else { + // v = vibTemp; + // vibTemp.set(0, 0, 0); + // v.setTempPoint(vibTemp, null, 1, vwr.g.modulationScale); + // vwr.tm.getVibrationPoint(vib, v, Float.NaN); + // } pointVectorEnd.scaleAdd2(0.5f * vectorScale, vib, ptTemp); pointVectorStart.scaleAdd2(-0.5f * vectorScale, vib, ptTemp); } else { @@ -212,6 +219,7 @@ tm.transformPtScrT3(pointArrowHead, screenArrowHead); } } + if (!standardVector) { tm.transformPtScrT3(pointVectorEnd, screenVectorEnd); tm.transformPtScrT3(pointVectorStart, screenVectorStart); @@ -226,10 +234,30 @@ headWidthPixels = diameter << 1; if (headWidthPixels < diameter + 2) headWidthPixels = diameter + 2; + return true; } - private void renderVector(Atom atom) { + private void renderVector(Atom atom, Vibration vib) { + if (vib != null && vectorTrace > 0) {// show trace + if (ptTemp4 == null) { + ptTemp3 = new P3(); + ptTemp4 = new P3(); + ptTemp2 = new P3(); + } + int d = Math.max(1, diameter >> 2); + P3[] pts = vib.addTracePt(vectorTrace, pointVectorEnd); + tm.transformPtScrT3(atom, ptTemp4); + if (pts != null) + for (int i = pts.length, p = vectorTrace; --i >= 0;) { + P3 pt = pts[--p]; + if (pt == null) + break; + tm.transformPtScrT3(pt, ptTemp2); + g3d.fillCylinderBits(GData.ENDCAPS_FLAT, d, ptTemp4, ptTemp2); + } + } + if (drawShaft) { pTemp3.set(atom.sX, atom.sY, atom.sZ); if (standardVector) Modified: branches/v14_4/Jmol/src/org/jmol/script/ScriptEval.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/script/ScriptEval.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/script/ScriptEval.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -4590,7 +4590,7 @@ } else if (!isData) { if (localName != null) localName = vwr.fm.getFilePath(localName, false, false); - if (!filename.equals("string") && !filename.equals("String[]")) + if (!filename.equals("String[]")) loadScript.append("/*file*/").append( (localName != null ? PT.esc(localName) : "$FILENAME$")); } @@ -7885,6 +7885,9 @@ break; case 3: switch (tokAt(1)) { + case T.trace: + setIntProperty("vectorTrace", intParameterRange(2, 0, 20)); + return; case T.scale: if (!Float.isNaN(value = floatParameterRange(2, -100, 100))) setFloatProperty("vectorScale", value); Modified: branches/v14_4/Jmol/src/org/jmol/script/T.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/script/T.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/script/T.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -934,6 +934,7 @@ public final static int strandcountformeshribbon = intparam | 52; public final static int strandcountforstrands = intparam | 54; public final static int strutspacing = intparam | 56; + public final static int vectortrail = intparam | 57; public final static int zdepth = intparam | 58; public final static int zslab = intparam | 60; public final static int zshadepower = intparam | 62; @@ -1081,9 +1082,9 @@ public final static int usenumberlocalization = booleanparam | 195; public final static int vectorscentered = booleanparam | 196; public final static int vectorsymmetry = booleanparam | 197; - public final static int waitformoveto = booleanparam | 198; - public final static int windowcentered = booleanparam | 199; - public final static int wireframerotation = booleanparam | 200; + public final static int waitformoveto = booleanparam | 199; + public final static int windowcentered = booleanparam | 200; + public final static int wireframerotation = booleanparam | 201; public final static int zerobasedxyzrasmol = booleanparam | 202; public final static int zoomenabled = booleanparam | 204; public final static int zoomheight = booleanparam | 206; @@ -2435,6 +2436,7 @@ "vectorScale", "vectorsCentered", "vectorSymmetry", + "vectorTrail", "vibrationPeriod", "vibrationScale", "visualRange", @@ -3472,6 +3474,7 @@ vectorscale, // "vectorScale" vectorscentered, // "vectorsCenered" vectorsymmetry, // "vectorSymmetry" + vectortrail, // "vectorTrail" vibrationperiod, // "vibrationPeriod" vibrationscale, // "vibrationScale" visualrange, // "visualRange" Modified: branches/v14_4/Jmol/src/org/jmol/util/Vibration.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/util/Vibration.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/util/Vibration.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -2,6 +2,7 @@ import java.util.Map; +import javajs.util.P3; import javajs.util.T3; import javajs.util.V3; @@ -88,4 +89,32 @@ return Integer.MIN_VALUE; } + public boolean showTrace; + private P3[] trace = null; + public int tracePt; + + public void startTrace(int n) { + trace = new P3[n]; + tracePt = n; + } + + public P3[] addTracePt(int n, Point3fi ptNew) { + if (ptNew == null || trace == null || n == 0 || n > trace.length) + startTrace(n); + if (ptNew != null && n > 2) { + if (--tracePt <= 0) { + P3 p0 = trace[trace.length - 1]; + for (int i = trace.length; --i >= 1;) + trace[i] = trace[i-1]; + trace[1] = p0; + tracePt = 1; + } + P3 p = trace[tracePt]; + if (p == null) + p = trace[tracePt] = new P3(); + p.setT(ptNew); + } + return trace; + } + } Modified: branches/v14_4/Jmol/src/org/jmol/viewer/GlobalSettings.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/GlobalSettings.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/viewer/GlobalSettings.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -379,6 +379,7 @@ setB("vectorsCentered", vectorsCentered); setF("vectorScale", vectorScale); setB("vectorSymmetry", vectorSymmetry); + setI("vectorTrail", vectorTrail); setF("vibrationPeriod", vibrationPeriod); setF("vibrationScale", vibrationScale); setB("waitForMoveTo", waitForMoveTo); @@ -629,6 +630,7 @@ float vectorScale = 1f; boolean vectorSymmetry = false; // Jmol 12.3.2 boolean vectorsCentered = false; // Jmol 14.1.14 + int vectorTrail = 0; // Jmol 14.4.4 float vibrationPeriod = 1f; float vibrationScale = 1f; boolean wireframeRotation = false; Modified: branches/v14_4/Jmol/src/org/jmol/viewer/JC.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/JC.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/viewer/JC.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -68,6 +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", + "magndata", "http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif", // _#CHANGEABLE_ flag indicates that the loaded file should be saved in any state in full // ' at start indicates a Jmol script evaluation "ams", "'http://rruff.geo.arizona.edu/AMS/viewJmol.php?'+(0+'%file'==0? 'mineral':('%file'.length==7? 'amcsd':'id'))+'=%file&action=showcif#_DOCACHE_'", Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/viewer/Jmol.properties 2016-03-23 04:35:05 UTC (rev 21017) @@ -10,8 +10,21 @@ Jmol.___JmolVersion="14.4.4_2016.03.23" +new feature: load =magndata/1.1.37 + -- links to the MAGNDATA database at http://webbdcrista1.ehu.es/magndata + -- "magndata", "http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif", + +new feature: set vectorTrail n + -- adds a trail onto a modulating vector (as for an incommensurate magnetic spin) + -- n trails are made, typically in a fan-like pattern that trails the spinning vector + load =magndata/1.1.37 + set vectortrace 20 + set vibrationperiod 2 + vibration on + new feature: unitcell ON adds #nnn (international table number) to cell description if found + bug fix: {*}.find("CHEMICAL","NAMES") only reports one name. code: more efficient identifying space group Modified: branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java 2016-03-22 18:50:47 UTC (rev 21016) +++ branches/v14_4/Jmol/src/org/jmol/viewer/Viewer.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -1884,7 +1884,7 @@ htParams.put( "loadScript", loadScript = new SB().append(PT.rep(loadScript.toString(), - "$FILENAME$", "data \"model inline\"\n" + strModel + "/*file*/$FILENAME$", "/*data*/data \"model inline\"\n" + strModel + "end \"model inline\""))); } if (strModel != null) { @@ -5038,6 +5038,8 @@ return g.smallMoleculeMaxAtoms; case T.strutspacing: return g.strutSpacing; + case T.vectortrail: + return g.vectorTrail; } Logger.error("viewer.getInt(" + T.nameOf(tok) + ") - not listed"); return 0; @@ -5774,6 +5776,9 @@ case T.scriptreportinglevel: value = eval.setStatic(tok, value); break; + case T.vectortrail: + g.vectorTrail = value; + break; case T.bondingversion: // 14.1.11 value = (value == 0 ? Elements.RAD_COV_IONIC_OB1_100_1 Modified: trunk/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/renderspecial/VectorsRenderer.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -37,6 +37,7 @@ import javajs.util.P3; import javajs.util.P3i; +import javajs.util.T3; import javajs.util.V3; import org.jmol.util.Vibration; @@ -67,6 +68,10 @@ private boolean vibrationOn; private boolean drawCap; private boolean showModVecs; + private int vectorTrace; + private P3 ptTemp4; + private P3 ptTemp3; + private P3 ptTemp2; @Override @@ -81,6 +86,7 @@ short[] colixes = vectors.colixes; boolean needTranslucent = false; vectorScale = vwr.getFloat(T.vectorscale); + vectorTrace = vwr.getInt(T.vectortrail); if (vectorScale < 0) vectorScale = 1; vectorSymmetry = vwr.getBoolean(T.vectorsymmetry); @@ -115,14 +121,14 @@ needTranslucent = true; continue; } - renderVector(atom); + renderVector(atom, vib); if (vectorSymmetry) { if (vibTemp == null) vibTemp = new Vibration(); vibTemp.setT(vib); vibTemp.scale(-1); transform(mads[i], atom, vibTemp, null); - renderVector(atom); + renderVector(atom, vib); } } if (haveModulations) @@ -133,21 +139,22 @@ JmolModulationSet mod = ms.getModulation(i); if (mod == null) continue; + if (!g3d.setC(Shape.getColix(colixes, i, atom))) { + needTranslucent = true; + continue; + } // now we focus on modulations // this may involve a modulated atom or a spin modulation if (!transform(mads[i], atom, null, mod)) continue; - if (!g3d.setC(Shape.getColix(colixes, i, atom))) { - needTranslucent = true; - continue; - } - renderVector(atom); + renderVector(atom, null); } return needTranslucent; } - private boolean transform(short mad, Atom atom, Vibration vib, JmolModulationSet mod2) { + private boolean transform(short mad, Atom atom, Vibration vib, + JmolModulationSet mod2) { boolean isMod = (vib == null || vib.modDim >= 0); boolean isSpin = (!isMod && vib.modDim == Vibration.TYPE_SPIN); if (vib == null) @@ -188,15 +195,15 @@ headOffsetVector.scale(headScale / headOffsetVector.length()); } else if (vectorsCentered || isSpin) { standardVector = false; - // Vibration v; - // if (mod2 == null || !mod2.isEnabled()) { - // v = vib; -// } else { -// v = vibTemp; -// vibTemp.set(0, 0, 0); -// v.setTempPoint(vibTemp, null, 1, vwr.g.modulationScale); -// vwr.tm.getVibrationPoint(vib, v, Float.NaN); -// } + // Vibration v; + // if (mod2 == null || !mod2.isEnabled()) { + // v = vib; + // } else { + // v = vibTemp; + // vibTemp.set(0, 0, 0); + // v.setTempPoint(vibTemp, null, 1, vwr.g.modulationScale); + // vwr.tm.getVibrationPoint(vib, v, Float.NaN); + // } pointVectorEnd.scaleAdd2(0.5f * vectorScale, vib, ptTemp); pointVectorStart.scaleAdd2(-0.5f * vectorScale, vib, ptTemp); } else { @@ -212,6 +219,7 @@ tm.transformPtScrT3(pointArrowHead, screenArrowHead); } } + if (!standardVector) { tm.transformPtScrT3(pointVectorEnd, screenVectorEnd); tm.transformPtScrT3(pointVectorStart, screenVectorStart); @@ -226,10 +234,30 @@ headWidthPixels = diameter << 1; if (headWidthPixels < diameter + 2) headWidthPixels = diameter + 2; + return true; } - private void renderVector(Atom atom) { + private void renderVector(Atom atom, Vibration vib) { + if (vib != null && vectorTrace > 0) {// show trace + if (ptTemp4 == null) { + ptTemp3 = new P3(); + ptTemp4 = new P3(); + ptTemp2 = new P3(); + } + int d = Math.max(1, diameter >> 2); + P3[] pts = vib.addTracePt(vectorTrace, pointVectorEnd); + tm.transformPtScrT3(atom, ptTemp4); + if (pts != null) + for (int i = pts.length, p = vectorTrace; --i >= 0;) { + P3 pt = pts[--p]; + if (pt == null) + break; + tm.transformPtScrT3(pt, ptTemp2); + g3d.fillCylinderBits(GData.ENDCAPS_FLAT, d, ptTemp4, ptTemp2); + } + } + if (drawShaft) { pTemp3.set(atom.sX, atom.sY, atom.sZ); if (standardVector) Modified: trunk/Jmol/src/org/jmol/script/ScriptEval.java =================================================================== --- trunk/Jmol/src/org/jmol/script/ScriptEval.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/script/ScriptEval.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -4590,7 +4590,7 @@ } else if (!isData) { if (localName != null) localName = vwr.fm.getFilePath(localName, false, false); - if (!filename.equals("string") && !filename.equals("String[]")) + if (!filename.equals("String[]")) loadScript.append("/*file*/").append( (localName != null ? PT.esc(localName) : "$FILENAME$")); } @@ -7885,6 +7885,9 @@ break; case 3: switch (tokAt(1)) { + case T.trace: + setIntProperty("vectorTrace", intParameterRange(2, 0, 20)); + return; case T.scale: if (!Float.isNaN(value = floatParameterRange(2, -100, 100))) setFloatProperty("vectorScale", value); Modified: trunk/Jmol/src/org/jmol/script/T.java =================================================================== --- trunk/Jmol/src/org/jmol/script/T.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/script/T.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -934,6 +934,7 @@ public final static int strandcountformeshribbon = intparam | 52; public final static int strandcountforstrands = intparam | 54; public final static int strutspacing = intparam | 56; + public final static int vectortrail = intparam | 57; public final static int zdepth = intparam | 58; public final static int zslab = intparam | 60; public final static int zshadepower = intparam | 62; @@ -1081,9 +1082,9 @@ public final static int usenumberlocalization = booleanparam | 195; public final static int vectorscentered = booleanparam | 196; public final static int vectorsymmetry = booleanparam | 197; - public final static int waitformoveto = booleanparam | 198; - public final static int windowcentered = booleanparam | 199; - public final static int wireframerotation = booleanparam | 200; + public final static int waitformoveto = booleanparam | 199; + public final static int windowcentered = booleanparam | 200; + public final static int wireframerotation = booleanparam | 201; public final static int zerobasedxyzrasmol = booleanparam | 202; public final static int zoomenabled = booleanparam | 204; public final static int zoomheight = booleanparam | 206; @@ -2435,6 +2436,7 @@ "vectorScale", "vectorsCentered", "vectorSymmetry", + "vectorTrail", "vibrationPeriod", "vibrationScale", "visualRange", @@ -3472,6 +3474,7 @@ vectorscale, // "vectorScale" vectorscentered, // "vectorsCenered" vectorsymmetry, // "vectorSymmetry" + vectortrail, // "vectorTrail" vibrationperiod, // "vibrationPeriod" vibrationscale, // "vibrationScale" visualrange, // "visualRange" Modified: trunk/Jmol/src/org/jmol/util/Vibration.java =================================================================== --- trunk/Jmol/src/org/jmol/util/Vibration.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/util/Vibration.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -2,6 +2,7 @@ import java.util.Map; +import javajs.util.P3; import javajs.util.T3; import javajs.util.V3; @@ -88,4 +89,32 @@ return Integer.MIN_VALUE; } + public boolean showTrace; + private P3[] trace = null; + public int tracePt; + + public void startTrace(int n) { + trace = new P3[n]; + tracePt = n; + } + + public P3[] addTracePt(int n, Point3fi ptNew) { + if (ptNew == null || trace == null || n == 0 || n > trace.length) + startTrace(n); + if (ptNew != null && n > 2) { + if (--tracePt <= 0) { + P3 p0 = trace[trace.length - 1]; + for (int i = trace.length; --i >= 1;) + trace[i] = trace[i-1]; + trace[1] = p0; + tracePt = 1; + } + P3 p = trace[tracePt]; + if (p == null) + p = trace[tracePt] = new P3(); + p.setT(ptNew); + } + return trace; + } + } Modified: trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/viewer/GlobalSettings.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -379,6 +379,7 @@ setB("vectorsCentered", vectorsCentered); setF("vectorScale", vectorScale); setB("vectorSymmetry", vectorSymmetry); + setI("vectorTrail", vectorTrail); setF("vibrationPeriod", vibrationPeriod); setF("vibrationScale", vibrationScale); setB("waitForMoveTo", waitForMoveTo); @@ -629,6 +630,7 @@ float vectorScale = 1f; boolean vectorSymmetry = false; // Jmol 12.3.2 boolean vectorsCentered = false; // Jmol 14.1.14 + int vectorTrail = 0; // Jmol 14.4.4 float vibrationPeriod = 1f; float vibrationScale = 1f; boolean wireframeRotation = false; Modified: trunk/Jmol/src/org/jmol/viewer/JC.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/JC.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/viewer/JC.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -68,6 +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", + "magndata", "http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif", // _#CHANGEABLE_ flag indicates that the loaded file should be saved in any state in full // ' at start indicates a Jmol script evaluation "ams", "'http://rruff.geo.arizona.edu/AMS/viewJmol.php?'+(0+'%file'==0? 'mineral':('%file'.length==7? 'amcsd':'id'))+'=%file&action=showcif#_DOCACHE_'", Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2016-03-23 04:35:05 UTC (rev 21017) @@ -69,6 +69,21 @@ Jmol.___JmolVersion="14.5.4_2016.03.23" +new feature: load =magndata/1.1.37 + -- links to the MAGNDATA database at http://webbdcrista1.ehu.es/magndata + -- "magndata", "http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif", + +new feature: set vectorTrail n + -- adds a trail onto a modulating vector (as for an incommensurate magnetic spin) + -- n trails are made, typically in a fan-like pattern that trails the spinning vector + load =magndata/1.1.37 + set vectortrace 20 + set vibrationperiod 2 + vibration on + +bug fix: saving a state after using LOAD "" (empty quotes) + after pasting data directly into the application creates an unreadable state + new feature: unitcell ON adds #nnn (international table number) to cell description if found bug fix: {*}.find("CHEMICAL","NAMES") only reports one name. Modified: trunk/Jmol/src/org/jmol/viewer/Viewer.java =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Viewer.java 2016-03-22 18:50:47 UTC (rev 21016) +++ trunk/Jmol/src/org/jmol/viewer/Viewer.java 2016-03-23 04:35:05 UTC (rev 21017) @@ -1884,7 +1884,7 @@ htParams.put( "loadScript", loadScript = new SB().append(PT.rep(loadScript.toString(), - "$FILENAME$", "data \"model inline\"\n" + strModel + "/*file*/$FILENAME$", "/*data*/data \"model inline\"\n" + strModel + "end \"model inline\""))); } if (strModel != null) { @@ -5038,6 +5038,8 @@ return g.smallMoleculeMaxAtoms; case T.strutspacing: return g.strutSpacing; + case T.vectortrail: + return g.vectorTrail; } Logger.error("viewer.getInt(" + T.nameOf(tok) + ") - not listed"); return 0; @@ -5774,6 +5776,9 @@ case T.scriptreportinglevel: value = eval.setStatic(tok, value); break; + case T.vectortrail: + g.vectorTrail = value; + break; case T.bondingversion: // 14.1.11 value = (value == 0 ? Elements.RAD_COV_IONIC_OB1_100_1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140 _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits