Revision: 20305 http://sourceforge.net/p/jmol/code/20305 Author: hansonr Date: 2015-02-18 22:56:05 +0000 (Wed, 18 Feb 2015) Log Message: ----------- Jmol.___JmolVersion="14.3.12_2015.02.18b"
bug fix: POV-Ray renderer does not show proper backbone bug fix: POV-Ray renderer with a translucent surface shows bonds that should be hidden bug fix: CML reader does not show proper atom names for crystal structures bug fix: unitcell info for PDB file biomolecule does not show "biomolecule 1" Modified Paths: -------------- trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlCmlReader.java trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java trunk/Jmol/src/org/jmol/api/SymmetryInterface.java trunk/Jmol/src/org/jmol/g3d/Graphics3D.java trunk/Jmol/src/org/jmol/modelset/ModelSet.java trunk/Jmol/src/org/jmol/popup/JmolGenericPopup.java trunk/Jmol/src/org/jmol/render/SticksRenderer.java trunk/Jmol/src/org/jmol/renderbio/BackboneRenderer.java trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java trunk/Jmol/src/org/jmol/symmetry/Symmetry.java trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java trunk/Jmol/src/org/jmol/symmetry/SymmetryInfo.java trunk/Jmol/src/org/jmol/symmetry/UnitCell.java trunk/Jmol/src/org/jmol/util/ModulationSet.java trunk/Jmol/src/org/jmol/util/SimpleUnitCell.java trunk/Jmol/src/org/jmol/viewer/Jmol.properties Modified: trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/adapter/readers/cif/CifReader.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -241,7 +241,7 @@ if (htAudit != null && auditBlockCode.contains("_MOD_")) { String key = PT.rep(auditBlockCode, "_MOD_", "_REFRNCE_"); if (asc.setSymmetry((SymmetryInterface) htAudit.get(key)) != null) { - notionalUnitCell = asc.getSymmetry().getNotionalUnitCell(); + unitCellParams = asc.getSymmetry().getUnitCellParams(); iHaveUnitCell = true; } } else if (htAudit != null) { @@ -630,7 +630,7 @@ float v = parseFloatStr(data); if (Float.isNaN(v)) return; - //could enable EM box: notionalUnitCell[0] = 1; + //could enable EM box: unitCellParams[0] = 1; for (int i = 0; i < TransformFields.length; i++) { if (key.indexOf(TransformFields[i]) >= 0) { setUnitCellItem(6 + i, v); @@ -1720,7 +1720,7 @@ Logger.debug(molecularType + " removing " + i + " " + atoms[i].atomName + " " + atoms[i]); } - asc.setCurrentModelInfo("notionalUnitcell", null); + asc.setCurrentModelInfo("unitCellParams", null); if (nMolecular++ == asc.iSet) { asc.clearGlobalBoolean(AtomSetCollection.GLOBAL_FRACTCOORD); asc.clearGlobalBoolean(AtomSetCollection.GLOBAL_SYMMETRY); Modified: trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/adapter/readers/cif/MMCifReader.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -129,7 +129,7 @@ setBiomolecules(ht); if (thisBiomolecule != null) { asc.getXSymmetry().applySymmetryBio(thisBiomolecule, - notionalUnitCell, applySymmetryToBonds, filter); + unitCellParams, applySymmetryToBonds, filter); asc.xtalSymmetry = null; } } Modified: trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/adapter/readers/pdb/PdbReader.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -428,7 +428,7 @@ asc.setCurrentModelInfo("biomolecules", vBiomolecules); setBiomoleculeAtomCounts(); if (thisBiomolecule != null && applySymmetry) { - asc.getXSymmetry().applySymmetryBio(thisBiomolecule, notionalUnitCell, applySymmetryToBonds, filter); + asc.getXSymmetry().applySymmetryBio(thisBiomolecule, unitCellParams, applySymmetryToBonds, filter); vTlsModels = null; // for now, no TLS groups for biomolecules asc.xtalSymmetry = null; } @@ -1343,14 +1343,14 @@ } private void scale(int n) throws Exception { - if (notionalUnitCell == null) + if (unitCellParams == null) return; // Could be an EM image // this information will only be processed // if a lattice is requested. int pt = n * 4 + 2; - notionalUnitCell[0] = cryst1; + unitCellParams[0] = cryst1; setUnitCellItem(pt++,getFloat(10, 10)); setUnitCellItem(pt++,getFloat(20, 10)); setUnitCellItem(pt++,getFloat(30, 10)); Modified: trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlCmlReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlCmlReader.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/adapter/readers/xml/XmlCmlReader.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -97,7 +97,7 @@ // the same atom array gets reused // it will grow to the maximum length; // ac holds the current number of atoms - private int ac; + private int aaLen; private Atom[] atomArray = new Atom[100]; private int bondCount; @@ -138,6 +138,7 @@ * the current state */ protected int state = START; + private int atomIndex0; /* * added 2/2007 Bob Hanson: @@ -279,7 +280,7 @@ } if (name.equalsIgnoreCase("atomArray")) { state = MOLECULE_ATOM_ARRAY; - ac = 0; + aaLen = 0; boolean coords3D = false; if (atts.containsKey("atomID")) { breakOutAtomTokens(atts.get("atomID")); @@ -317,7 +318,7 @@ for (int i = tokenCount; --i >= 0;) atomArray[i].elementSymbol = tokens[i]; } - for (int i = ac; --i >= 0;) { + for (int i = aaLen; --i >= 0;) { Atom atom = atomArray[i]; if (!coords3D) atom.z = 0; @@ -421,7 +422,7 @@ } } - final private static String[] notionalUnitcellTags = { "a", "b", "c", "alpha", + final private static String[] unitCellParamTags = { "a", "b", "c", "alpha", "beta", "gamma" }; @Override @@ -476,7 +477,7 @@ if (name.equals("scalar")) { state = CRYSTAL; if (scalarTitle != null) - checkUnitCellItem(notionalUnitcellTags, scalarTitle); + checkUnitCellItem(unitCellParamTags, scalarTitle); else if (scalarDictRef != null) checkUnitCellItem(JmolAdapter.cellParamNames, (scalarDictValue .startsWith("_") ? scalarDictValue : "_" + scalarDictValue)); @@ -533,7 +534,7 @@ case MOLECULE_ATOM_ARRAY: if (name.equalsIgnoreCase("atomArray")) { state = MOLECULE; - for (int i = 0; i < ac; ++i) + for (int i = 0; i < aaLen; ++i) addAtom(atomArray[i]); } break; @@ -603,10 +604,11 @@ return; String s; Atom[] atoms = asc.atoms; - for (int i = 0; i < ac; i++) + for (int i = atomIndex0; i < asc.ac; i++) if ((s = atomIdNames.getProperty(atoms[i].atomName)) != null) atoms[i].atomName = s; atomIdNames = null; + atomIndex0 = asc.ac; } private void addNewBond(String a1, String a2, int order) { @@ -694,13 +696,13 @@ } void checkAtomArrayLength(int newAtomCount) { - if (ac == 0) { + if (aaLen == 0) { if (newAtomCount > atomArray.length) atomArray = new Atom[newAtomCount]; for (int i = newAtomCount; --i >= 0;) atomArray[i] = new Atom(); - ac = newAtomCount; - } else if (newAtomCount != ac) { + aaLen = newAtomCount; + } else if (newAtomCount != aaLen) { throw new IndexOutOfBoundsException("bad atom attribute length"); } } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/adapter/smarter/AtomSetCollectionReader.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -183,7 +183,7 @@ protected String sgName; protected boolean ignoreFileUnitCell; protected boolean ignoreFileSpaceGroupName; - public float[] notionalUnitCell; //0-5 a b c alpha beta gamma; 6-21 matrix c->f + public float[] unitCellParams; //0-5 a b c alpha beta gamma; 6-21 matrix c->f protected int desiredModelNumber = Integer.MIN_VALUE; public SymmetryInterface symmetry; protected OC out; @@ -688,15 +688,15 @@ protected void initializeSymmetry() { previousSpaceGroup = sgName; - previousUnitCell = notionalUnitCell; + previousUnitCell = unitCellParams; iHaveUnitCell = ignoreFileUnitCell; if (!ignoreFileUnitCell) { - notionalUnitCell = new float[25]; + unitCellParams = new float[25]; //0-5 a b c alpha beta gamma //6-21 m00 m01... m33 cartesian-->fractional //22-24 supercell.x supercell.y supercell.z for (int i = 25; --i >= 0;) - notionalUnitCell[i] = Float.NaN; + unitCellParams[i] = Float.NaN; symmetry = null; } if (!ignoreFileSpaceGroupName) @@ -722,7 +722,7 @@ iHaveUnitCell = true; doCheckUnitCell = true; sgName = previousSpaceGroup; - notionalUnitCell = previousUnitCell; + unitCellParams = previousUnitCell; } return lastAtomCount; } @@ -748,10 +748,10 @@ private void initializeCartesianToFractional() { for (int i = 0; i < 16; i++) - if (!Float.isNaN(notionalUnitCell[6 + i])) + if (!Float.isNaN(unitCellParams[6 + i])) return; //just do this once for (int i = 0; i < 16; i++) - notionalUnitCell[6 + i] = ((i % 5 == 0 ? 1 : 0)); + unitCellParams[6 + i] = ((i % 5 == 0 ? 1 : 0)); nMatrixElements = 0; } @@ -759,7 +759,7 @@ if (ignoreFileUnitCell) return; for (int i = 6; i < 22; i++) - notionalUnitCell[i] = Float.NaN; + unitCellParams[i] = Float.NaN; checkUnitCell(6); } @@ -768,9 +768,9 @@ return; if (i == 0 && x == 1 || i == 3 && x == 0) return; - if (!Float.isNaN(x) && i >= 6 && Float.isNaN(notionalUnitCell[6])) + if (!Float.isNaN(x) && i >= 6 && Float.isNaN(unitCellParams[6])) initializeCartesianToFractional(); - notionalUnitCell[i] = x; + unitCellParams[i] = x; if (Logger.debugging) { Logger.debug("setunitcellitem " + i + " " + x); } @@ -787,15 +787,15 @@ if (ignoreFileUnitCell) return; clearUnitCell(); - notionalUnitCell[0] = a; - notionalUnitCell[1] = b; - notionalUnitCell[2] = c; + unitCellParams[0] = a; + unitCellParams[1] = b; + unitCellParams[2] = c; if (alpha != 0) - notionalUnitCell[3] = alpha; + unitCellParams[3] = alpha; if (beta != 0) - notionalUnitCell[4] = beta; + unitCellParams[4] = beta; if (gamma != 0) - notionalUnitCell[5] = gamma; + unitCellParams[5] = gamma; iHaveUnitCell = checkUnitCell(6); } @@ -804,28 +804,28 @@ return; if (i == 0) for (int j = 0; j < 6; j++) - notionalUnitCell[j] = 0; + unitCellParams[j] = 0; i = 6 + i * 3; - notionalUnitCell[i++] = xyz[i0++]; - notionalUnitCell[i++] = xyz[i0++]; - notionalUnitCell[i] = xyz[i0]; - if (Float.isNaN(notionalUnitCell[0])) { + unitCellParams[i++] = xyz[i0++]; + unitCellParams[i++] = xyz[i0++]; + unitCellParams[i] = xyz[i0]; + if (Float.isNaN(unitCellParams[0])) { for (i = 0; i < 6; i++) - notionalUnitCell[i] = -1; + unitCellParams[i] = -1; } iHaveUnitCell = checkUnitCell(15); } private boolean checkUnitCell(int n) { for (int i = 0; i < n; i++) - if (Float.isNaN(notionalUnitCell[i])) + if (Float.isNaN(unitCellParams[i])) return false; - if (n == 22 && notionalUnitCell[0] == 1) { - if (notionalUnitCell[1] == 1 - && notionalUnitCell[2] == 1 - && notionalUnitCell[6] == 1 - && notionalUnitCell[11] == 1 - && notionalUnitCell[16] == 1 + if (n == 22 && unitCellParams[0] == 1) { + if (unitCellParams[1] == 1 + && unitCellParams[2] == 1 + && unitCellParams[6] == 1 + && unitCellParams[11] == 1 + && unitCellParams[16] == 1 ) return false; // this is an mmCIF or PDB case for NMR models having @@ -850,7 +850,7 @@ if (!iHaveUnitCell) return null; if (symmetry == null) { - getNewSymmetry().setUnitCell(notionalUnitCell, false); + getNewSymmetry().setUnitCell(unitCellParams, false); checkUnitCellOffset(); } return symmetry; @@ -1161,7 +1161,7 @@ } if (doConvertToFractional && !fileCoordinatesAreFractional && getSymmetry() != null) { if (!symmetry.haveUnitCell()) - symmetry.setUnitCell(notionalUnitCell, false); + symmetry.setUnitCell(unitCellParams, false); symmetry.toFractional(atom, false); iHaveFractionalCoordinates = true; } Modified: trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java =================================================================== --- trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/adapter/smarter/XtalSymmetry.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -81,7 +81,7 @@ return (this.symmetry = symmetry); } - private float[] notionalUnitCell = new float[6]; + private float[] unitCellParams = new float[6]; private float[] baseUnitCell; // expands to 26 for cartesianToFractional matrix as array (PDB) and supercell @@ -151,23 +151,23 @@ private Lst<float[]> trajectoryUnitCells; - private void setNotionalUnitCell(float[] info, M3 matUnitCellOrientation, + private void setUnitCell(float[] info, M3 matUnitCellOrientation, P3 unitCellOffset) { - notionalUnitCell = new float[info.length]; + unitCellParams = new float[info.length]; this.unitCellOffset = unitCellOffset; for (int i = 0; i < info.length; i++) - notionalUnitCell[i] = info[i]; + unitCellParams[i] = info[i]; asc.haveUnitCell = true; - asc.setCurrentModelInfo("notionalUnitcell", notionalUnitCell); + asc.setCurrentModelInfo("unitCellParams", unitCellParams); if (asc.isTrajectory) { if (trajectoryUnitCells == null) { trajectoryUnitCells = new Lst<float[]>(); asc.setInfo("unitCells", trajectoryUnitCells); } - trajectoryUnitCells.addLast(notionalUnitCell); + trajectoryUnitCells.addLast(unitCellParams); } asc.setGlobalBoolean(AtomSetCollection.GLOBAL_UNITCELLS); - getSymmetry().setUnitCell(notionalUnitCell, false); + getSymmetry().setUnitCell(unitCellParams, false); // we need to set the auxiliary info as well, because // ModelLoader creates a new symmetry object. if (unitCellOffset != null) { @@ -201,7 +201,7 @@ SymmetryInterface applySymmetryFromReader(SymmetryInterface readerSymmetry) throws Exception { asc.setCoordinatesAreFractional(acr.iHaveFractionalCoordinates); - setNotionalUnitCell(acr.notionalUnitCell, acr.matUnitCellOrientation, + setUnitCell(acr.unitCellParams, acr.matUnitCellOrientation, acr.unitCellOffset); setAtomSetSpaceGroupName(acr.sgName); setSymmetryRange(acr.symmetryRange); @@ -213,7 +213,7 @@ readerSymmetry = acr.getNewSymmetry(); doApplySymmetry = readerSymmetry.createSpaceGroup( acr.desiredSpaceGroupIndex, (acr.sgName.indexOf("!") >= 0 ? "P1" - : acr.sgName), acr.notionalUnitCell); + : acr.sgName), acr.unitCellParams); } else { acr.doPreSymmetry(); readerSymmetry = null; @@ -392,7 +392,7 @@ symmetry = null; symmetry = getSymmetry(); - setNotionalUnitCell(new float[] { 0, 0, 0, 0, 0, 0, va.x, va.y, va.z, + setUnitCell(new float[] { 0, 0, 0, 0, 0, 0, va.x, va.y, va.z, vb.x, vb.y, vb.z, vc.x, vc.y, vc.z }, null, offset); setAtomSetSpaceGroupName(oabc == null ? "P1" : "cell=" + supercell); symmetry.setSpaceGroup(doNormalize); @@ -720,8 +720,8 @@ symmetry.getLatticeDesignation()); asc.setCurrentModelInfo("unitCellRange", unitCells); asc.setCurrentModelInfo("unitCellTranslations", unitCellTranslations); - baseUnitCell = notionalUnitCell; - notionalUnitCell = new float[6]; + baseUnitCell = unitCellParams; + unitCellParams = new float[6]; reset(); } @@ -972,7 +972,7 @@ @SuppressWarnings("unchecked") public void applySymmetryBio(Map<String, Object> thisBiomolecule, - float[] notionalUnitCell, + float[] unitCellParams, boolean applySymmetryToBonds, String filter) { if (latticeCells != null && latticeCells[0] != 0) { Logger.error("Cannot apply biomolecule when lattice cells are indicated"); @@ -987,13 +987,13 @@ return; symmetry = null; // it's not clear to me why you would do this: - if (!Float.isNaN(notionalUnitCell[0])) // PDB can do this; - setNotionalUnitCell(notionalUnitCell, null, unitCellOffset); + if (!Float.isNaN(unitCellParams[0])) // PDB can do this; + setUnitCell(unitCellParams, null, unitCellOffset); getSymmetry().setSpaceGroup(doNormalize); //symmetry.setUnitCell(null); addSpaceGroupOperation("x,y,z", false); String name = (String) thisBiomolecule.get("name"); - setAtomSetSpaceGroupName(name); + setAtomSetSpaceGroupName(acr.sgName = name); int len = biomts.size(); this.applySymmetryToBonds = applySymmetryToBonds; bondCount0 = asc.bondCount; @@ -1095,11 +1095,6 @@ asc.errorMessage = "appendAtomCollection error: " + e; } } - // mat.m03 /= notionalUnitCell[0]; // PDB could have set this to Float.NaN - // if (Float.isNaN(mat.m03)) - // mat.m03 = 1; - // mat.m13 /= notionalUnitCell[1]; - // mat.m23 /= notionalUnitCell[2]; if (i > 0) symmetry.addBioMoleculeOperation(mat, false); } @@ -1199,28 +1194,12 @@ * */ public void scaleFractionalVibs() { - float[] params = getBaseSymmetry().getNotionalUnitCell(); + float[] params = getBaseSymmetry().getUnitCellParams(); P3 ptScale = P3.new3(1 / params[0], 1 / params[1], 1 / params[2]); -// P3 pt = new P3(); int i0 = asc.getAtomSetAtomIndex(asc.iSet); for (int i = asc.ac; --i >= i0;) { Vibration v = (Vibration) asc.atoms[i].vib; if (v != null) { -// pt = ptScale; -// if (mod != null) { - // this is not relevant, because this has to be done in doPreSymmetry() - // before subsystems are set, I think. -// // if there are modulations, then a fractional vib would be -// // a vib within a modulation set. -// v = mod.getVibration(false); -// if (v == null) -// continue; -// SymmetryInterface subsym = mod.getSubSystemUnitCell(); -// if (subsym != null) { -// params = subsym.getNotionalUnitCell(); -// pt.set(1 / params[0], 1 / params[1], 1 / params[2]); -// } -// } v.scaleT(ptScale); } } Modified: trunk/Jmol/src/org/jmol/api/SymmetryInterface.java =================================================================== --- trunk/Jmol/src/org/jmol/api/SymmetryInterface.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/api/SymmetryInterface.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -60,7 +60,7 @@ Lst<String> getMoreInfo(); - public float[] getNotionalUnitCell(); + public float[] getUnitCellParams(); public Matrix getOperationRsVs(int op); @@ -172,7 +172,7 @@ public void setTimeReversal(int op, int val); - public void setUnitCell(float[] notionalUnitCell, boolean setRelative); + public void setUnitCell(float[] params, boolean setRelative); public void initializeOrientation(M3 matUnitCellOrientation); Modified: trunk/Jmol/src/org/jmol/g3d/Graphics3D.java =================================================================== --- trunk/Jmol/src/org/jmol/g3d/Graphics3D.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/g3d/Graphics3D.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -396,10 +396,8 @@ downsampleFullSceneAntialiasing(false); } platform.setBackgroundColor(bgcolor); - platform.notifyEndOfRendering(); - //setWidthHeight(antialiasEnabled); - currentlyRendering = false; + currentlyRendering = isPass2 = false; } public static void mergeBufferPixel(int[] pbuf, int offset, int argbB, Modified: trunk/Jmol/src/org/jmol/modelset/ModelSet.java =================================================================== --- trunk/Jmol/src/org/jmol/modelset/ModelSet.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/modelset/ModelSet.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -1005,9 +1005,9 @@ * @return just the first unit cell * */ - public float[] getNotionalUnitcell() { + public float[] getUnitCellParams() { SymmetryInterface c = getUnitCell(0); - return (c == null ? null : c.getNotionalUnitCell()); + return (c == null ? null : c.getUnitCellParams()); } public boolean setCrystallographicDefaults() { Modified: trunk/Jmol/src/org/jmol/popup/JmolGenericPopup.java =================================================================== --- trunk/Jmol/src/org/jmol/popup/JmolGenericPopup.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/popup/JmolGenericPopup.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -378,7 +378,7 @@ isPDB = checkBoolean("isPDB"); isMultiFrame = (modelCount > 1); isSymmetry = checkBoolean("hasSymmetry"); - isUnitCell = modelInfo.containsKey("notionalUnitcell"); + isUnitCell = modelInfo.containsKey("unitCellParams"); fileHasUnitCell = (isPDB && isUnitCell || checkBoolean("fileHasUnitCell")); isLastFrame = (modelIndex == modelCount - 1); altlocs = vwr.ms.getAltLocListInModel(modelIndex); Modified: trunk/Jmol/src/org/jmol/render/SticksRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/render/SticksRenderer.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/render/SticksRenderer.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -94,21 +94,22 @@ hbondsSolid = vwr.getBoolean(T.hbondssolid); isAntialiased = g3d.isAntialiased(); boolean needTranslucent = false; - if (!isExport && isPass2) - for (int i = bsForPass2.nextSetBit(0); i >= 0; i = bsForPass2 - .nextSetBit(i + 1)) { - bond = bonds[i]; - renderBond(); - } - else + if (isPass2) { + if (!isExport) + for (int i = bsForPass2.nextSetBit(0); i >= 0; i = bsForPass2 + .nextSetBit(i + 1)) { + bond = bonds[i]; + renderBond(); + } + } else { for (int i = ms.bondCount; --i >= 0;) { bond = bonds[i]; - if ((bond.shapeVisibilityFlags & myVisibilityFlag) != 0 - && renderBond()) { + if ((bond.shapeVisibilityFlags & myVisibilityFlag) != 0 && renderBond()) { needTranslucent = true; bsForPass2.set(i); } } + } return needTranslucent; } @@ -249,6 +250,7 @@ } } + // set the diameter xA = a.sX; Modified: trunk/Jmol/src/org/jmol/renderbio/BackboneRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/renderbio/BackboneRenderer.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/renderbio/BackboneRenderer.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -41,6 +41,7 @@ @Override protected void renderBioShape(BioShape bioShape) { + boolean checkPass2 = (!isExport && !vwr.gdata.isPass2); boolean showSteps = vwr.getBoolean(T.backbonesteps) && bioShape.bioPolymer.isNucleic(); isDataFrame = vwr.ms.isJmolDataFrameForModel(bioShape.modelIndex); @@ -49,7 +50,7 @@ Atom atomA = ms.at[leadAtomIndices[i]]; short cA = colixes[i]; mad = mads[i]; - drawSegment(atomA, ms.at[leadAtomIndices[i + 1]], cA, colixes[i + 1], 100); + drawSegment(atomA, ms.at[leadAtomIndices[i + 1]], cA, colixes[i + 1], 100, checkPass2); if (showSteps) { NucleicMonomer g = (NucleicMonomer) monomers[i]; Lst<BasePair> bps = g.getBasePairs(); @@ -57,22 +58,22 @@ for (int j = bps.size(); --j >= 0;) { int iAtom = bps.get(j).getPartnerAtom(g); if (iAtom > i) - drawSegment(atomA, ms.at[iAtom], cA, cA, 1000); + drawSegment(atomA, ms.at[iAtom], cA, cA, 1000, checkPass2); } } } } } - private void drawSegment(Atom atomA, Atom atomB, short colixA, short colixB, float max) { - if (atomA.nBackbonesDisplayed == 0 - || atomB.nBackbonesDisplayed == 0 - || ms.isAtomHidden(atomB.i) - || !isDataFrame && atomA.distanceSquared(atomB) > max) + private void drawSegment(Atom atomA, Atom atomB, short colixA, short colixB, + float max, boolean checkPass2) { + if (atomA.nBackbonesDisplayed == 0 || atomB.nBackbonesDisplayed == 0 + || ms.isAtomHidden(atomB.i) || !isDataFrame + && atomA.distanceSquared(atomB) > max) return; colixA = C.getColixInherited(colixA, atomA.colixAtom); colixB = C.getColixInherited(colixB, atomB.colixAtom); - if (!isExport && !isPass2 && !setBioColix(colixA) && !setBioColix(colixB)) + if (checkPass2 && !setBioColix(colixA) && !setBioColix(colixB)) return; int xA = atomA.sX, yA = atomA.sY, zA = atomA.sZ; int xB = atomB.sX, yB = atomB.sY, zB = atomB.sZ; @@ -82,8 +83,8 @@ if (mad < 0) { g3d.drawLine(colixA, colixB, xA, yA, zA, xB, yB, zB); } else { - int width = (int) (exportType == GData.EXPORT_CARTESIAN ? mad : vwr - .tm.scaleToScreen((zA + zB) / 2, mad)); + int width = (int) (isExport ? mad : vwr.tm.scaleToScreen((zA + zB) / 2, + mad)); g3d.fillCylinderXYZ(colixA, colixB, GData.ENDCAPS_SPHERICAL, width, xA, yA, zA, xB, yB, zB); } Modified: trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java =================================================================== --- trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/renderbio/BioShapeRenderer.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -88,7 +88,6 @@ protected short[] colixesBack; protected STR[] structureTypes; - protected boolean isPass2; protected boolean wireframeOnly; protected abstract void renderBioShape(BioShape bioShape); @@ -103,7 +102,6 @@ } private void setGlobals() { - isPass2 = vwr.gdata.isPass2; invalidateMesh = false; needTranslucent = false; g3d.addRenderer(T.hermitelevel); Modified: trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -256,7 +256,7 @@ spaceGroup = spaceGroup.substring(0, spaceGroup.indexOf("[")).trim(); if (spaceGroup.equals("unspecified!")) return "no space group identified in file"; - sg = SpaceGroup.determineSpaceGroupNA(spaceGroup, cellInfo.getNotionalUnitCell()); + sg = SpaceGroup.determineSpaceGroupNA(spaceGroup, cellInfo.getUnitCellParams()); } else if (spaceGroup.equalsIgnoreCase("ALL")) { return SpaceGroup.dumpAll(); } else if (spaceGroup.equalsIgnoreCase("ALLSEITZ")) { @@ -575,11 +575,11 @@ } private final static SpaceGroup determineSpaceGroupNA(String name, - float[] notionalUnitcell) { - return (notionalUnitcell == null ? determineSpaceGroup(name, 0f, 0f, 0f, 0f, 0f, 0f, -1) - : determineSpaceGroup(name, notionalUnitcell[0], notionalUnitcell[1], - notionalUnitcell[2], notionalUnitcell[3], notionalUnitcell[4], - notionalUnitcell[5], -1)); + float[] unitCellParams) { + return (unitCellParams == null ? determineSpaceGroup(name, 0f, 0f, 0f, 0f, 0f, 0f, -1) + : determineSpaceGroup(name, unitCellParams[0], unitCellParams[1], + unitCellParams[2], unitCellParams[3], unitCellParams[4], + unitCellParams[5], -1)); } private final static SpaceGroup determineSpaceGroup(String name, float a, float b, Modified: trunk/Jmol/src/org/jmol/symmetry/Symmetry.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/Symmetry.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/symmetry/Symmetry.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -331,12 +331,12 @@ @SuppressWarnings("unchecked") @Override public void setSymmetryInfo(int modelIndex, - Map<String, Object> modelAuxiliaryInfo, float[] notionalCell) { + Map<String, Object> modelAuxiliaryInfo, float[] unitCellParams) { symmetryInfo = new SymmetryInfo(); - float[] notionalUnitcell = symmetryInfo.setSymmetryInfo(modelAuxiliaryInfo, notionalCell); - if (notionalUnitcell == null) + float[] params = symmetryInfo.setSymmetryInfo(modelAuxiliaryInfo, unitCellParams); + if (params == null) return; - setUnitCell(notionalUnitcell, modelAuxiliaryInfo.containsKey("jmolData")); + setUnitCell(params, modelAuxiliaryInfo.containsKey("jmolData")); unitCell.moreInfo = (Lst<String>) modelAuxiliaryInfo.get("moreUnitCellInfo"); modelAuxiliaryInfo.put("infoUnitCell", getUnitCellAsArray(false)); setOffsetPt((P3) modelAuxiliaryInfo.get("unitCellOffset")); @@ -368,8 +368,8 @@ } @Override - public void setUnitCell(float[] notionalUnitCell, boolean setRelative) { - unitCell = UnitCell.newA(notionalUnitCell, setRelative); + public void setUnitCell(float[] unitCellParams, boolean setRelative) { + unitCell = UnitCell.newA(unitCellParams, setRelative); } @Override @@ -424,8 +424,8 @@ } @Override - public float[] getNotionalUnitCell() { - return unitCell.getNotionalUnitCell(); + public float[] getUnitCellParams() { + return unitCell.getUnitCellParams(); } @Override Modified: trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/symmetry/SymmetryDesc.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -871,7 +871,7 @@ if (type == T.point) { if (isBio) return ""; - symTemp.setUnitCell(uc.getNotionalUnitCell(), false); + symTemp.setUnitCell(uc.getUnitCellParams(), false); uc.toFractional(pt, false); if (Float.isNaN(pt.x)) return ""; Modified: trunk/Jmol/src/org/jmol/symmetry/SymmetryInfo.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/SymmetryInfo.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/symmetry/SymmetryInfo.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -53,7 +53,14 @@ SymmetryInfo() { } - float[] setSymmetryInfo(Map<String, Object> info, float[] notionalUnitCell) { + + /** + * + * @param info + * @param unitCellParams an array of parameters could be from model, but also could be from a trajectory listing + * @return actual unit cell parameters + */ + float[] setSymmetryInfo(Map<String, Object> info, float[] unitCellParams) { cellRange = (int[]) info.get("unitCellRange"); periodicOriginXyz = (P3) info.get("periodicOriginXyz"); sgName = (String) info.get("spaceGroup"); @@ -86,15 +93,15 @@ infoStr += s; } infoStr += "\n"; - if (notionalUnitCell == null) - notionalUnitCell = (float[]) info.get("notionalUnitcell"); - if (!SimpleUnitCell.isValid(notionalUnitCell)) + if (unitCellParams == null) + unitCellParams = (float[]) info.get("unitCellParams"); + if (!SimpleUnitCell.isValid(unitCellParams)) return null; coordinatesAreFractional = info.containsKey("coordinatesAreFractional") ? ((Boolean) info.get("coordinatesAreFractional")).booleanValue() : false; isMultiCell = (coordinatesAreFractional && symmetryOperations != null); - return notionalUnitCell; + return unitCellParams; } } Modified: trunk/Jmol/src/org/jmol/symmetry/UnitCell.java =================================================================== --- trunk/Jmol/src/org/jmol/symmetry/UnitCell.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/symmetry/UnitCell.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -86,9 +86,9 @@ return c; } - public static UnitCell newA(float[] notionalUnitcell, boolean setRelative) { + public static UnitCell newA(float[] params, boolean setRelative) { UnitCell c = new UnitCell(); - c.init(notionalUnitcell); + c.init(params); c.initUnitcellVertices(); c.allFractionalRelative = setRelative; return c; @@ -488,12 +488,12 @@ } public boolean isSameAs(UnitCell uc) { - if (uc.notionalUnitcell.length != notionalUnitcell.length) + if (uc.unitCellParams.length != unitCellParams.length) return false; - for (int i = notionalUnitcell.length; --i >= 0;) - if (notionalUnitcell[i] != uc.notionalUnitcell[i] - && !(Float.isNaN(notionalUnitcell[i]) && Float - .isNaN(uc.notionalUnitcell[i]))) + for (int i = unitCellParams.length; --i >= 0;) + if (unitCellParams[i] != uc.unitCellParams[i] + && !(Float.isNaN(unitCellParams[i]) && Float + .isNaN(uc.unitCellParams[i]))) return false; return (fractionalOffset == null ? !uc.hasOffset() : uc.fractionalOffset == null ? !hasOffset() Modified: trunk/Jmol/src/org/jmol/util/ModulationSet.java =================================================================== --- trunk/Jmol/src/org/jmol/util/ModulationSet.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/util/ModulationSet.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -551,7 +551,7 @@ private float[] axesLengths; float[] getAxesLengths() { - return (axesLengths == null ? (axesLengths = symmetry.getNotionalUnitCell()) + return (axesLengths == null ? (axesLengths = symmetry.getUnitCellParams()) : axesLengths); } Modified: trunk/Jmol/src/org/jmol/util/SimpleUnitCell.java =================================================================== --- trunk/Jmol/src/org/jmol/util/SimpleUnitCell.java 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/util/SimpleUnitCell.java 2015-02-18 22:56:05 UTC (rev 20305) @@ -43,7 +43,7 @@ public class SimpleUnitCell { - protected float[] notionalUnitcell; //6 parameters + optional 16 matrix items + protected float[] unitCellParams; //6 parameters + optional 16 matrix items public M4 matrixCartesianToFractional; public M4 matrixFractionalToCartesian; public double volume; @@ -74,39 +74,39 @@ fractionalOrigin = new P3(); } - public static SimpleUnitCell newA(float[] parameters) { + public static SimpleUnitCell newA(float[] params) { SimpleUnitCell c = new SimpleUnitCell(); - c.init(parameters); + c.init(params); return c; } - protected void init(float[] parameters) { - if (parameters == null) - parameters = new float[] {1, 1, 1, 90, 90, 90}; - if (!isValid(parameters)) + protected void init(float[] params) { + if (params == null) + params = new float[] {1, 1, 1, 90, 90, 90}; + if (!isValid(params)) return; - notionalUnitcell = AU.arrayCopyF(parameters, parameters.length); + unitCellParams = AU.arrayCopyF(params, params.length); - a = parameters[0]; - b = parameters[1]; - c = parameters[2]; - alpha = parameters[3]; - beta = parameters[4]; - gamma = parameters[5]; + a = params[0]; + b = params[1]; + c = params[2]; + alpha = params[3]; + beta = params[4]; + gamma = params[5]; // (int) Float.NaN == 0 (but not in JavaScript!) - na = Math.max(1, parameters.length >= 25 && !Float.isNaN(parameters[22]) ? (int) parameters[22] : 1); - nb = Math.max(1, parameters.length >= 25 && !Float.isNaN(parameters[23]) ? (int) parameters[23] : 1); - nc = Math.max(1, parameters.length >= 25 && !Float.isNaN(parameters[24]) ? (int) parameters[24] : 1); + na = Math.max(1, params.length >= 25 && !Float.isNaN(params[22]) ? (int) params[22] : 1); + nb = Math.max(1, params.length >= 25 && !Float.isNaN(params[23]) ? (int) params[23] : 1); + nc = Math.max(1, params.length >= 25 && !Float.isNaN(params[24]) ? (int) params[24] : 1); if (a <= 0) { // must calculate a, b, c alpha beta gamma from Cartesian vectors; - V3 va = V3.new3(parameters[6], parameters[7], parameters[8]); - V3 vb = V3.new3(parameters[9], parameters[10], parameters[11]); - V3 vc = V3.new3(parameters[12], parameters[13], parameters[14]); + V3 va = V3.new3(params[6], params[7], params[8]); + V3 vb = V3.new3(params[9], params[10], params[11]); + V3 vc = V3.new3(params[12], params[13], params[14]); setABC(va, vb, vc); if (c < 0) { - float[] n = AU.arrayCopyF(parameters, -1); + float[] n = AU.arrayCopyF(params, -1); if (b < 0) { vb.set(0, 0, 1); vb.cross(vb, va); @@ -124,7 +124,7 @@ n[13] = vc.y; n[14] = vc.z; } - parameters = n; + params = n; } } @@ -144,7 +144,7 @@ setCellParams(); - if (parameters.length > 21 && !Float.isNaN(parameters[21])) { + if (params.length > 21 && !Float.isNaN(params[21])) { // parameters with a 4x4 matrix // [a b c alpha beta gamma m00 m01 m02 m03 m10 m11.... m20...] // this is for PDB and CIF reader @@ -165,20 +165,20 @@ f = 1; break; } - scaleMatrix[i] = parameters[6 + i] * f; + scaleMatrix[i] = params[6 + i] * f; } matrixCartesianToFractional = M4.newA16(scaleMatrix); matrixCartesianToFractional.getTranslation(fractionalOrigin); matrixFractionalToCartesian = M4.newM4(matrixCartesianToFractional).invert(); - if (parameters[0] == 1) + if (params[0] == 1) setParamsFromMatrix(); - } else if (parameters.length > 14 && !Float.isNaN(parameters[14])) { + } else if (params.length > 14 && !Float.isNaN(params[14])) { // parameters with a 3 vectors // [a b c alpha beta gamma ax ay az bx by bz cx cy cz...] M4 m = matrixFractionalToCartesian = new M4(); - m.setColumn4(0, parameters[6] * na, parameters[7] * na, parameters[8] * na, 0); - m.setColumn4(1, parameters[9] * nb, parameters[10] * nb, parameters[11] * nb, 0); - m.setColumn4(2, parameters[12] * nc, parameters[13] * nc, parameters[14] * nc, 0); + m.setColumn4(0, params[6] * na, params[7] * na, params[8] * na, 0); + m.setColumn4(1, params[9] * nb, params[10] * nb, params[11] * nb, 0); + m.setColumn4(2, params[12] * nc, params[13] * nc, params[14] * nc, 0); m.setColumn4(3, 0, 0, 0, 1); matrixCartesianToFractional = M4.newM4(matrixFractionalToCartesian).invert(); } else { @@ -291,8 +291,8 @@ return (dimension == 2); } - public final float[] getNotionalUnitCell() { - return notionalUnitcell; + public final float[] getUnitCellParams() { + return unitCellParams; } public final float[] getUnitCellAsArray(boolean vectorsOnly) { Modified: trunk/Jmol/src/org/jmol/viewer/Jmol.properties =================================================================== --- trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-02-18 22:39:06 UTC (rev 20304) +++ trunk/Jmol/src/org/jmol/viewer/Jmol.properties 2015-02-18 22:56:05 UTC (rev 20305) @@ -15,8 +15,14 @@ TODO: remove HTML5 dependency on synchronous file loading (check SCRIPT command for problems) TODO: add 2D graphics panel for Ramachandran and NBO-style 2D graphics -- send to browser as data uri? -Jmol.___JmolVersion="14.3.12_2015.02.18" +Jmol.___JmolVersion="14.2.12_2015.02.18b" +bug fix: CML reader does not show proper atom names for crystal structures +bug fix: POV-Ray renderer does not show proper backbone width (since forever) +bug fix: POV-Ray renderer with a translucent surface shows bonds that should be hidden (since 13.1) +bug fix: unitcell info for PDB file biomolecule does not show "biomolecule 1" +JmolVersion="14.3.12_2015.02.18" + bug fix: load filter "biomolecule 1" broken in 14.3.12_2015.02.14 JmolVersion="14.3.12_2015.02.17b" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ Jmol-commits mailing list Jmol-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-commits