From: <ha...@us...> - 2014-09-23 09:58:53
|
Revision: 20021 http://sourceforge.net/p/jmol/code/20021 Author: hansonr Date: 2014-09-23 09:58:49 +0000 (Tue, 23 Sep 2014) Log Message: ----------- Jmol.___JmolVersion="14.3.7_2014.09.23" new feature: label %O -- lists all symmetry operators leading to this position (as a string) -- if more than one operator (contains a comma), this is a special position -- same as %[symmetry] but just a simple list of operators Modified Paths: -------------- trunk/Jmol/src/org/jmol/modelset/Atom.java trunk/Jmol/src/org/jmol/modelset/LabelToken.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/modelset/Atom.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/Atom.java 2014-09-22 14:44:37 UTC (rev 20020) +++ trunk/Jmol/src/org/jmol/modelset/Atom.java 2014-09-23 09:58:49 UTC (rev 20021) @@ -718,7 +718,7 @@ return 0; } - String getSymmetryOperatorList() { + String getSymmetryOperatorList(boolean isAll) { String str = ""; ModelSet f = group.chain.model.ms; int nOps = f.getModelSymmetryCount(mi); @@ -727,10 +727,18 @@ int[] cellRange = f.getModelCellRange(mi); int pt = nOps; int n = (cellRange == null ? 1 : cellRange.length); + BS bs = (isAll ? null : new BS()); for (int i = 0; i < n; i++) for (int j = 0; j < nOps; j++) if (atomSymmetry.get(pt++)) - str += "," + (j + 1) + "" + cellRange[i]; + if (isAll) { + str += "," + (j + 1) + cellRange[i]; + } else { + bs.set(j + 1); + } + if (!isAll) + for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSetBit(i + 1)) + str += "," + i; return (str.length() == 0 ? "" : str.substring(1)); } @@ -1486,7 +1494,7 @@ case T.symbol: return getElementSymbolIso(false); case T.symmetry: - return getSymmetryOperatorList(); + return getSymmetryOperatorList(true); } return ""; } Modified: trunk/Jmol/src/org/jmol/modelset/LabelToken.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/LabelToken.java 2014-09-22 14:44:37 UTC (rev 20020) +++ trunk/Jmol/src/org/jmol/modelset/LabelToken.java 2014-09-23 09:58:49 UTC (rev 20021) @@ -95,7 +95,7 @@ // and then also added in appendTokenValue() // and also in Eval, to atomProperty() - final private static String labelTokenParams = "AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxxYyyZzz%%%gqW"; + final private static String labelTokenParams = "AaBbCcDEefGgIiLlMmNnOoPpQqRrSsTtUuVvWXxxYyyZzz%%%gqW"; final private static int[] labelTokenIds = { /* 'A' */T.altloc, /* 'a' */T.atomname, @@ -117,6 +117,7 @@ /* 'm' */T.group1, /* 'N' */T.molecule, /* 'n' */T.group, + /* 'O' */'O', // all symmetry operators /* 'o' */T.symmetry, /* 'P' */T.partialcharge, /* 'p' */T.psi, @@ -524,6 +525,9 @@ case T.model: strT = atom.getModelNumberForLabel(); break; + case 'O': + strT = atom.getSymmetryOperatorList(false); + break; case T.occupancy: strT = "" + atom.atomPropertyInt(t.tok); break; Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-09-22 14:44:37 UTC (rev 20020) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2014-09-23 09:58:49 UTC (rev 20021) @@ -19,8 +19,15 @@ TODO: vibration on with modulation and occupancy could animate occupancy -Jmol.___JmolVersion="14.3.7_2014.09.22" +Jmol.___JmolVersion="14.3.7_2014.09.23" +new feature: label %O + -- lists all symmetry operators leading to this position (as a string) + -- if more than one operator (contains a comma), this is a special position + -- same as %[symmetry] but just a simple list of operators + +JmolVersion="14.3.7_2014.09.22" + FEATURE CHANGE: atoms without vibration will no longer report out as vxyz = {0 0 0} or vx = 0 -- print {atomno=3}.vxyz and {*}.vxyz.all will report -1 instead of {vx vy vz} when atom does not have a vibration This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |