Keep talking. I can see the benefit. All atoms DO have both real and screen coordinates, and I think the screen coordinates were in this structure as well, right? I can be convinced, especially if atom1.distance(atom2) works. And there certainly could be other uses for a Point3fi, as in drawing. That's quite cool. OK, well, if everything is working on your end, then it was just an update fluke on my part I suppose. Just surprised me that when I synchronized my version was broken. But of course you are more experienced than I am, and I'll certainly go with your idea here. Let's leave it in.
Bob [EMAIL PROTECTED] wrote: >>OK, was thinking about this some more, and actually there's a good >>programming reason for undoing that and going back to .point3f. The >>reason is that then I can know and search for when I'm accessing that >>important field. Yes? >> >> > >For me, it was a good simplification to introduce Point3fi (and Miguel made >several other modifications based on this one to simplify more). > >But, do as you wish, if you really want to revert this one, do it. >IMHO, the simplification has more interests than drawbacks, but I am not >developping much this time. > >Nico > > > > >>Bob >> >>Nicolas Vervelle wrote: >> >> >> >>>Bob Hanson wrote: >>> >>> >>> >>>>This is the one that really broke 10.9 for me. I'd like to have it >>>>undone, please. Or else let me know when you have compiled and have >>>>all the places fixed. Really, I don't care. I sort of like not having >>>>to say atom.point3f, but if it means >>>> >>>>atom.point3f.set(atom1.point3f) >>>> >>>>no longer has a simple equivalent, then I vote to undo it. >>>> >>>> >>>> >>>atom.set(atom1) should work. >>> >>>Nico >>> >>> >>> >>>>Bob >>>> >>>>[EMAIL PROTECTED] wrote: >>>> >>>> >>>> >>>>>Revision: 5453 >>>>> http://svn.sourceforge.net/jmol/?rev=5453&view=rev >>>>>Author: nicove >>>>>Date: 2006-08-30 13:30:56 -0700 (Wed, 30 Aug 2006) >>>>> >>>>>Log Message: >>>>>----------- >>>>>Reapplying r5072: >>>>>Introduced Point3fi class which includeds members for screen >>>>>coordinates. Atom derives from Point3fi. >>>>>At atom can now be treated like a Point3f, so there are a number of >>>>>places >>>>>in the code that can probably be simplified because we don't have to >>>>>call a method to ask an atom for its Point3f. >>>>> >>>>>Modified Paths: >>>>>-------------- >>>>> branches/v10_9/Jmol/src/org/jmol/quantum/QuantumCalculation.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Atom.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Bond.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Dipole.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Dots.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Frame.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Isosurface.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/LcaoCartoon.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/MeasuresRenderer.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/ModelManager.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Monomer.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/NucleicMonomer.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/NucleicPolymer.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Polyhedra.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Polymer.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/Sticks.java >>>>> branches/v10_9/Jmol/src/org/jmol/viewer/VectorsRenderer.java >>>>> >>>>>Added Paths: >>>>>----------- >>>>> branches/v10_9/Jmol/src/org/jmol/vecmath/ >>>>> branches/v10_9/Jmol/src/org/jmol/vecmath/Point3fi.java >>>>> >>>>>Modified: >>>>>branches/v10_9/Jmol/src/org/jmol/quantum/QuantumCalculation.java >>>>>=================================================================== >>>>>--- >>>>>branches/v10_9/Jmol/src/org/jmol/quantum/QuantumCalculation.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ >>>>>branches/v10_9/Jmol/src/org/jmol/quantum/QuantumCalculation.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -223,7 +223,7 @@ >>>>> for (int i = 0; i < atoms.length; i++) { >>>>> if (atoms[i] == null) >>>>> continue; >>>>>- this.atomCoordBohr[i] = new Point3f(atoms[i].point3f); >>>>>+ this.atomCoordBohr[i] = new Point3f(atoms[i]); >>>>> this.atomCoordBohr[i].scale(bohr_per_angstrom); >>>>> } >>>>> >>>>> >>>>>Added: branches/v10_9/Jmol/src/org/jmol/vecmath/Point3fi.java >>>>>=================================================================== >>>>>--- >>>>>branches/v10_9/Jmol/src/org/jmol/vecmath/Point3fi.java >>>>> >>>>>(rev 0) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/vecmath/Point3fi.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -0,0 +1,32 @@ >>>>>+/* $RCSfile$ >>>>>+ * $Author: egonw $ >>>>>+ * $Date: 2005-11-10 10:52:44 -0500 (Thu, 10 Nov 2005) $ >>>>>+ * $Revision: 4255 $ >>>>>+ * >>>>>+ * Copyright (C) 2006 Miguel, Jmol Development, www.jmol.org >>>>>+ * >>>>>+ * Contact: [EMAIL PROTECTED] >>>>>+ * >>>>>+ * This library is free software; you can redistribute it and/or >>>>>+ * modify it under the terms of the GNU Lesser General Public >>>>>+ * License as published by the Free Software Foundation; either >>>>>+ * version 2.1 of the License, or (at your option) any later version. >>>>>+ * >>>>>+ * This library is distributed in the hope that it will be useful, >>>>>+ * but WITHOUT ANY WARRANTY; without even the implied warranty of >>>>>+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >>>>>+ * Lesser General Public License for more details. >>>>>+ * >>>>>+ * You should have received a copy of the GNU Lesser General Public >>>>>+ * License along with this library; if not, write to the Free >>>>>Software >>>>>+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA >>>>>02110-1301 USA. >>>>>+ */ >>>>>+ >>>>>+package org.jmol.vecmath; >>>>>+import javax.vecmath.Point3f; >>>>>+ >>>>>+public class Point3fi extends Point3f { >>>>>+ public int screenX; >>>>>+ public int screenY; >>>>>+ public int screenZ; >>>>>+} >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Atom.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Atom.java 2006-08-30 >>>>>19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Atom.java 2006-08-30 >>>>>20:30:56 UTC (rev 5453) >>>>>@@ -26,6 +26,7 @@ >>>>>package org.jmol.viewer; >>>>> >>>>>import org.jmol.util.Logger; >>>>>+import org.jmol.vecmath.Point3fi; >>>>> >>>>>import org.jmol.g3d.Graphics3D; >>>>>import org.jmol.bspt.Tuple; >>>>>@@ -36,7 +37,7 @@ >>>>>import javax.vecmath.Vector3f; >>>>>import javax.vecmath.Point3i; >>>>> >>>>>-final public class Atom implements Tuple { >>>>>+final public class Atom extends Point3fi implements Tuple { >>>>> >>>>> final static byte VIBRATION_VECTOR_FLAG = 0x02; >>>>> final static byte IS_HETERO_FLAG = 0x04; >>>>>@@ -44,10 +45,6 @@ >>>>> Group group; >>>>> int atomIndex; >>>>> int atomSite; >>>>>- public Point3f point3f; >>>>>- int screenX; >>>>>- int screenY; >>>>>- int screenZ; >>>>> short screenDiameter; >>>>> short modelIndex; // we want this here for the BallsRenderer >>>>> byte elementNumber; >>>>>@@ -69,7 +66,7 @@ >>>>> Atom(Point3f pt) { //just a point -- just enough to determine >>>>>a position >>>>> isSimple = true; >>>>>- point3f = new Point3f(pt); >>>>>+ this.x = pt.x; this.y = pt.y; this.z = pt.z; >>>>> //must be transformed later -- Polyhedra; >>>>> formalChargeAndFlags = 0; >>>>> madAtom = 0; >>>>>@@ -98,8 +95,7 @@ >>>>> this.colixAtom = viewer.getColixAtom(this); >>>>> this.alternateLocationID = (byte)alternateLocationID; >>>>> setMadAtom(viewer.getMadAtom()); >>>>>- - this.point3f = new Point3f(x, y, z); >>>>>+ this.x = x; this.y = y; this.z = z; >>>>> if (isHetero) >>>>> formalChargeAndFlags |= IS_HETERO_FLAG; >>>>> >>>>>@@ -396,9 +392,9 @@ >>>>> Vector3f[] vibrationVectors; >>>>> if ((formalChargeAndFlags & VIBRATION_VECTOR_FLAG) == 0 || >>>>> (vibrationVectors = group.chain.frame.vibrationVectors) == >>>>>null) >>>>>- screen = viewer.transformPoint(point3f); >>>>>+ screen = viewer.transformPoint(this); >>>>> else - screen = viewer.transformPoint(point3f, >>>>>vibrationVectors[atomIndex]); >>>>>+ screen = viewer.transformPoint(this, >>>>>vibrationVectors[atomIndex]); >>>>> screenX = screen.x; >>>>> screenY = screen.y; >>>>> screenZ = screen.z; >>>>>@@ -548,25 +544,25 @@ >>>>> } >>>>> >>>>> Point3f getPoint3f() { >>>>>- return point3f; >>>>>+ return this; >>>>> } >>>>> >>>>> float getAtomX() { >>>>>- return point3f.x; >>>>>+ return x; >>>>> } >>>>> >>>>> float getAtomY() { >>>>>- return point3f.y; >>>>>+ return y; >>>>> } >>>>> >>>>> float getAtomZ() { >>>>>- return point3f.z; >>>>>+ return z; >>>>> } >>>>> >>>>> public float getDimensionValue(int dimension) { >>>>> return (dimension == 0 >>>>>- ? point3f.x >>>>>- : (dimension == 1 ? point3f.y : point3f.z)); >>>>>+ ? x >>>>>+ : (dimension == 1 ? y : z)); >>>>> } >>>>> >>>>> short getVanderwaalsMar() { >>>>>@@ -601,11 +597,11 @@ >>>>> // established bonds >>>>> // note that this algorithm works when maximum valence == 0 >>>>> Bond getLongestBondToDiscard(Atom atomChallenger) { >>>>>- float dist2Longest = >>>>>point3f.distanceSquared(atomChallenger.point3f); >>>>>+ float dist2Longest = distanceSquared(atomChallenger); >>>>> Bond bondLongest = null; >>>>> for (int i = bonds.length; --i >= 0; ) { >>>>> Bond bond = bonds[i]; >>>>>- float dist2 = >>>>>point3f.distanceSquared(bond.getOtherAtom(this).point3f); >>>>>+ float dist2 = distanceSquared(bond.getOtherAtom(this)); >>>>> if (dist2 > dist2Longest) { >>>>> bondLongest = bond; >>>>> dist2Longest = dist2; >>>>>@@ -966,15 +962,15 @@ >>>>> strT = JmolConstants.elementSymbols[elementNumber]; >>>>> break; >>>>> case 'x': >>>>>- floatT = point3f.x; >>>>>+ floatT = x; >>>>> floatIsSet = true; >>>>> break; >>>>> case 'y': >>>>>- floatT = point3f.y; >>>>>+ floatT = y; >>>>> floatIsSet = true; >>>>> break; >>>>> case 'z': >>>>>- floatT = point3f.z; >>>>>+ floatT = z; >>>>> floatIsSet = true; >>>>> break; >>>>> case 'X': >>>>>@@ -1110,9 +1106,9 @@ >>>>> Point3f pt = getFractionalCoord(); >>>>> new Point3f(); >>>>> try { >>>>>- >>>>>group.chain.frame.cellInfo[modelIndex].matrixEuclideanToFractional.transform(point3f,pt); >>>>> >>>>> >>>>>+ >>>>>group.chain.frame.cellInfo[modelIndex].matrixEuclideanToFractional.transform(this,pt); >>>>> >>>>> >>>>> } catch (Exception e) { >>>>>- pt = point3f; >>>>>+ pt = this; >>>>> } >>>>> return (ch == 'X' ? pt.x : ch == 'Y' ? pt.y : pt.z); >>>>> } >>>>>@@ -1120,9 +1116,9 @@ >>>>> Point3f getFractionalCoord() { >>>>> Point3f pt = new Point3f(); >>>>> try { >>>>>- >>>>>group.chain.frame.cellInfo[modelIndex].matrixEuclideanToFractional.transform(point3f,pt); >>>>> >>>>> >>>>>+ >>>>>group.chain.frame.cellInfo[modelIndex].matrixEuclideanToFractional.transform(this,pt); >>>>> >>>>> >>>>> } catch (Exception e) { >>>>>- pt = point3f; >>>>>+ pt = this; >>>>> } >>>>> return pt; >>>>> } >>>>>@@ -1148,7 +1144,7 @@ >>>>> } >>>>> >>>>> String getInfoXYZ() { >>>>>- return getIdentity() + " " + point3f; >>>>>+ return getIdentity() + " " + x + " " + y + " " + z; >>>>> } >>>>> >>>>> String getIdentity() { >>>>>@@ -1270,9 +1266,9 @@ >>>>> Hashtable getPublicProperties() { >>>>> Hashtable ht = new Hashtable(); >>>>> ht.put("element", getElementSymbol()); >>>>>- ht.put("x", new Double(point3f.x)); >>>>>- ht.put("y", new Double(point3f.y)); >>>>>- ht.put("z", new Double(point3f.z)); >>>>>+ ht.put("x", new Double(x)); >>>>>+ ht.put("y", new Double(y)); >>>>>+ ht.put("z", new Double(z)); >>>>> ht.put("atomIndex", new Integer(atomIndex)); >>>>> ht.put("modelIndex", new Integer(modelIndex)); >>>>> ht.put("argb", new Integer(getArgb())); >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Bond.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Bond.java 2006-08-30 >>>>>19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Bond.java 2006-08-30 >>>>>20:30:56 UTC (rev 5453) >>>>>@@ -183,12 +183,12 @@ >>>>> ht.put("order", getOrderName()); >>>>> ht.put("radius", new Double(getRadius())); >>>>> ht.put("modelIndex", new Integer(atom1.modelIndex)); >>>>>- ht.put("xA", new Double(atom1.point3f.x)); >>>>>- ht.put("yA", new Double(atom1.point3f.y)); >>>>>- ht.put("zA", new Double(atom1.point3f.z)); >>>>>- ht.put("xB", new Double(atom2.point3f.x)); >>>>>- ht.put("yB", new Double(atom2.point3f.y)); >>>>>- ht.put("zB", new Double(atom2.point3f.z)); >>>>>+ ht.put("xA", new Double(atom1.x)); >>>>>+ ht.put("yA", new Double(atom1.y)); >>>>>+ ht.put("zA", new Double(atom1.z)); >>>>>+ ht.put("xB", new Double(atom2.x)); >>>>>+ ht.put("yB", new Double(atom2.y)); >>>>>+ ht.put("zB", new Double(atom2.z)); >>>>> return ht; >>>>> } >>>>>} >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Dipole.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Dipole.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Dipole.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -148,7 +148,7 @@ >>>>> void set(Atom atom1, Atom atom2, float value) { >>>>> //also from frame >>>>> set(value); >>>>>- set(atom1.point3f, atom2.point3f); >>>>>+ set(atom1, atom2); >>>>> offsetSide = Dipoles.DEFAULT_OFFSETSIDE; >>>>> mad = Dipoles.DEFAULT_MAD; >>>>> atoms[0] = atom1; >>>>>@@ -157,9 +157,9 @@ >>>>> } >>>>> >>>>> void centerDipole() { >>>>>- float f = atoms[0].point3f.distance(atoms[1].point3f) / (2 * >>>>>dipoleValue) >>>>>+ float f = atoms[0].distance(atoms[1]) / (2 * dipoleValue) >>>>> - 0.5f; >>>>>- origin.scaleAdd(f, vector, atoms[0].point3f); >>>>>+ origin.scaleAdd(f, vector, atoms[0]); >>>>> center = new Point3f(); >>>>> center.scaleAdd(0.5f, vector, origin); >>>>> bond = atoms[0].getBond(atoms[1]); >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Dots.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Dots.java 2006-08-30 >>>>>19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Dots.java 2006-08-30 >>>>>20:30:56 UTC (rev 5453) >>>>>@@ -356,7 +356,7 @@ >>>>> void setAtomI(int indexI) { >>>>> this.indexI = indexI; >>>>> atomI = frame.atoms[indexI]; >>>>>- centerI = atomI.point3f; >>>>>+ centerI = atomI; >>>>> radiusI = getAppropriateRadius(atomI); >>>>> radiiIP2 = radiusI + radiusP; >>>>> radiiIP2 *= radiiIP2; >>>>>@@ -536,7 +536,7 @@ >>>>> if (onlySelectedDots && !bsOn.get(neighbor.atomIndex)) >>>>> continue; >>>>> float neighborRadius = getAppropriateRadius(neighbor); >>>>>- if (centerI.distance(neighbor.point3f) > >>>>>+ if (centerI.distance(neighbor) > >>>>> radiusI + radiusP + radiusP + neighborRadius) >>>>> continue; >>>>> if (neighborCount == neighbors.length) { >>>>>@@ -547,7 +547,7 @@ >>>>> neighborRadii2 = Util.doubleLength(neighborRadii2); >>>>> } >>>>> neighbors[neighborCount] = neighbor; >>>>>- neighborCenters[neighborCount] = neighbor.point3f; >>>>>+ neighborCenters[neighborCount] = neighbor; >>>>> neighborIndices[neighborCount] = neighbor.atomIndex; >>>>> float neighborPlusProbeRadii = neighborRadius + radiusP; >>>>> neighborPlusProbeRadii2[neighborCount] = >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Frame.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Frame.java 2006-08-30 >>>>>19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Frame.java 2006-08-30 >>>>>20:30:56 UTC (rev 5453) >>>>>@@ -883,7 +883,7 @@ >>>>> } >>>>> >>>>> Point3f getAtomPoint3f(int atomIndex) { >>>>>- return atoms[atomIndex].point3f; >>>>>+ return atoms[atomIndex]; >>>>> } >>>>> >>>>> int getBondCount() { >>>>>@@ -1061,7 +1061,7 @@ >>>>> Point3f average = this.averageAtomPoint; >>>>> average.set(0, 0, 0); >>>>> for (int i = atomCount; --i >= 0;) >>>>>- average.add(atoms[i].point3f); >>>>>+ average.add(atoms[i]); >>>>> average.scale(1f / atomCount); >>>>> } >>>>> >>>>>@@ -1093,7 +1093,7 @@ >>>>> float maxRadius = 0; >>>>> for (int i = atomCount; --i >= 0;) { >>>>> Atom atom = atoms[i]; >>>>>- float distAtom = center.distance(atom.point3f); >>>>>+ float distAtom = center.distance(atom); >>>>> float radiusVdw = atom.getVanderwaalsRadiusFloat(); >>>>> float outerVdw = distAtom + radiusVdw; >>>>> if (outerVdw > maxRadius) >>>>>@@ -1700,17 +1700,17 @@ >>>>> int modelIndex = atoms[i].modelIndex; >>>>> if (!cellInfo[modelIndex].coordinatesAreFractional) >>>>> continue; >>>>>- cellInfo[modelIndex].transform(atoms[i].point3f); >>>>>+ cellInfo[modelIndex].transform(atoms[i]); >>>>> } >>>>> } >>>>> } >>>>> >>>>> void calcAtomsMinMax(Point3f pointMin, Point3f pointMax) { >>>>>- pointMin.set(atoms[0].point3f); >>>>>- pointMax.set(atoms[0].point3f); >>>>>+ pointMin.set(atoms[0]); >>>>>+ pointMax.set(atoms[0]); >>>>> for (int i = atomCount; --i > 0;) { >>>>> // note that the 0 element was set above >>>>>- checkMinMax(atoms[i].point3f, pointMin, pointMax); >>>>>+ checkMinMax(atoms[i], pointMin, pointMax); >>>>> } >>>>> } >>>>> >>>>>@@ -1751,7 +1751,7 @@ >>>>> return ptCenter; >>>>> for (int i = atomCount; --i >= 0;) { >>>>> if (bs.get(i)) >>>>>- ptCenter.add(atoms[i].point3f); >>>>>+ ptCenter.add(atoms[i]); >>>>> } >>>>> ptCenter.scale(1.0f / nPoints); >>>>> return ptCenter; >>>>>@@ -2223,7 +2223,7 @@ >>>>> } >>>>> >>>>> float getDistance(int atomIndexA, int atomIndexB) { >>>>>- return >>>>>atoms[atomIndexA].point3f.distance(atoms[atomIndexB].point3f); >>>>>+ return atoms[atomIndexA].distance(atoms[atomIndexB]); >>>>> } >>>>> >>>>> Vector3f vectorBA; >>>>>@@ -2234,9 +2234,9 @@ >>>>> vectorBA = new Vector3f(); >>>>> vectorBC = new Vector3f(); >>>>> } >>>>>- Point3f pointA = atoms[atomIndexA].point3f; >>>>>- Point3f pointB = atoms[atomIndexB].point3f; >>>>>- Point3f pointC = atoms[atomIndexC].point3f; >>>>>+ Point3f pointA = atoms[atomIndexA]; >>>>>+ Point3f pointB = atoms[atomIndexB]; >>>>>+ Point3f pointC = atoms[atomIndexC]; >>>>> vectorBA.sub(pointA, pointB); >>>>> vectorBC.sub(pointC, pointB); >>>>> float angle = vectorBA.angle(vectorBC); >>>>>@@ -2246,8 +2246,8 @@ >>>>> >>>>> float getTorsion(int atomIndexA, int atomIndexB, int atomIndexC, >>>>> int atomIndexD) { >>>>>- return computeTorsion(atoms[atomIndexA].point3f, >>>>>atoms[atomIndexB].point3f, >>>>>- atoms[atomIndexC].point3f, atoms[atomIndexD].point3f); >>>>>+ return computeTorsion(atoms[atomIndexA], atoms[atomIndexB], >>>>>+ atoms[atomIndexC], atoms[atomIndexD]); >>>>> } >>>>> >>>>> static float toDegrees(float angleRadians) { >>>>>@@ -2489,14 +2489,14 @@ >>>>> Point3f getAveragePosition(int atomIndex1, int atomIndex2) { >>>>> Atom atom1 = atoms[atomIndex1]; >>>>> Atom atom2 = atoms[atomIndex2]; >>>>>- return new Point3f((atom1.point3f.x + atom2.point3f.x) / 2, >>>>>- (atom1.point3f.y + atom2.point3f.y) / 2, >>>>>- (atom1.point3f.z + atom2.point3f.z) / 2); >>>>>+ return new Point3f((atom1.x + atom2.x) / 2, >>>>>+ (atom1.y + atom2.y) / 2, >>>>>+ (atom1.z + atom2.z) / 2); >>>>> } >>>>> >>>>> Vector3f getAtomVector(int atomIndex1, int atomIndex2) { >>>>>- Vector3f V = new Vector3f(atoms[atomIndex1].point3f); >>>>>- V.sub(atoms[atomIndex2].point3f); >>>>>+ Vector3f V = new Vector3f(atoms[atomIndex1]); >>>>>+ V.sub(atoms[atomIndex2]); >>>>> return V; >>>>> } >>>>> >>>>>@@ -2525,7 +2525,7 @@ >>>>> float c2 = partialCharges[atom2.atomIndex]; >>>>> if (c1 != c2) { >>>>> Dipole dipole = dipoles.findDipole(atom1, atom2, true); >>>>>- float value = (c1 - c2) / 2f * >>>>>atom1.point3f.distance(atom2.point3f) >>>>>+ float value = (c1 - c2) / 2f * atom1.distance(atom2) >>>>> / E_ANG_PER_DEBYE; >>>>> if (value < 0) { >>>>> dipole.set(atom2, atom1, -value); >>>>>@@ -2725,17 +2725,17 @@ >>>>> void setAtomCoord(int atomIndex, float x, float y, float z) { >>>>> if (atomIndex < 0 || atomIndex >= atomCount) >>>>> return; >>>>>- atoms[atomIndex].point3f.x = x; >>>>>- atoms[atomIndex].point3f.y = y; >>>>>- atoms[atomIndex].point3f.z = z; >>>>>+ atoms[atomIndex].x = x; >>>>>+ atoms[atomIndex].y = y; >>>>>+ atoms[atomIndex].z = z; >>>>> } >>>>> >>>>> void setAtomCoordRelative(int atomIndex, float x, float y, float z) { >>>>> if (atomIndex < 0 || atomIndex >= atomCount) >>>>> return; >>>>>- atoms[atomIndex].point3f.x += x; >>>>>- atoms[atomIndex].point3f.y += y; >>>>>- atoms[atomIndex].point3f.z += z; >>>>>+ atoms[atomIndex].x += x; >>>>>+ atoms[atomIndex].y += y; >>>>>+ atoms[atomIndex].z += z; >>>>> } >>>>> >>>>> String hybridization; >>>>>@@ -2763,7 +2763,7 @@ >>>>> if (atom.bonds[i].isCovalent()) { >>>>> ++nBonds; >>>>> atom1 = atom.bonds[i].getOtherAtom(atom); >>>>>- n.sub(atom.point3f, atom1.point3f); >>>>>+ n.sub(atom, atom1); >>>>> n.normalize(); >>>>> z.add(n); >>>>> switch (nBonds) { >>>>>@@ -2956,15 +2956,15 @@ >>>>> case 1: >>>>> viewer.getPrincipalAxes(i, z, x, "sp3a", false); >>>>> pt = new Point3f(z); >>>>>- pt.scaleAdd(1.1f, atom.point3f); >>>>>+ pt.scaleAdd(1.1f, atom); >>>>> hAtoms[n++] = pt; >>>>> viewer.getPrincipalAxes(i, z, x, "sp3b", false); >>>>> pt = new Point3f(z); >>>>>- pt.scaleAdd(1.1f, atom.point3f); >>>>>+ pt.scaleAdd(1.1f, atom); >>>>> hAtoms[n++] = pt; >>>>> viewer.getPrincipalAxes(i, z, x, "sp3c", false); >>>>> pt = new Point3f(z); >>>>>- pt.scaleAdd(1.1f, atom.point3f); >>>>>+ pt.scaleAdd(1.1f, atom); >>>>> hAtoms[n++] = pt; >>>>> break; >>>>> case 2: >>>>>@@ -2972,18 +2972,18 @@ >>>>> && hybridization != "sp") { >>>>> viewer.getPrincipalAxes(i, z, x, "lpa", false); >>>>> pt = new Point3f(z); >>>>>- pt.scaleAdd(1.1f, atom.point3f); >>>>>+ pt.scaleAdd(1.1f, atom); >>>>> hAtoms[n++] = pt; >>>>> viewer.getPrincipalAxes(i, z, x, "lpb", false); >>>>> pt = new Point3f(z); >>>>>- pt.scaleAdd(1.1f, atom.point3f); >>>>>+ pt.scaleAdd(1.1f, atom); >>>>> hAtoms[n++] = pt; >>>>> } >>>>> break; >>>>> case 3: >>>>> if (viewer.getPrincipalAxes(i, z, x, "sp3", true)) { >>>>> pt = new Point3f(z); >>>>>- pt.scaleAdd(1.1f, atom.point3f); >>>>>+ pt.scaleAdd(1.1f, atom); >>>>> hAtoms[n++] = pt; >>>>> } >>>>> default: >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Isosurface.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Isosurface.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Isosurface.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -3948,7 +3948,7 @@ >>>>> Atom atom = atoms[i]; >>>>> if (atom.modelIndex != modelIndex) >>>>> continue; >>>>>- Point3f pt = new Point3f(atom.point3f); >>>>>+ Point3f pt = new Point3f(atom); >>>>> if (nSelected == 0 || bsSelected.get(i)) { >>>>> float rA = atom.getVanderwaalsRadiusFloat() + >>>>>qm_marginAngstroms; >>>>> if (pt.x - rA < xyzMin.x) >>>>>@@ -3994,7 +3994,7 @@ >>>>> Atom atom = atoms[i]; >>>>> if (atom.modelIndex != modelIndex) >>>>> continue; >>>>>- pt.set(atom.point3f); >>>>>+ pt.set(atom); >>>>> pt.scale(1 / ANGSTROMS_PER_BOHR); >>>>> jvxlFileHeader += atom.elementNumber + " " + >>>>>atom.elementNumber + ".0 " >>>>> + pt.x + " " + pt.y + " " + pt.z + "\n"; >>>>>@@ -4097,7 +4097,7 @@ >>>>> if (!atomSet.get(i)) >>>>> continue; >>>>> atomNo[iAtom] = atoms[i].elementNumber; >>>>>- solvent_ptAtom[iAtom] = atoms[i].point3f; >>>>>+ solvent_ptAtom[iAtom] = atoms[i]; >>>>> solvent_atomRadius[iAtom++] = >>>>>atoms[i].getVanderwaalsRadiusFloat() >>>>> + solventExtendedAtomRadius; >>>>> } >>>>>@@ -4152,7 +4152,7 @@ >>>>> for (int i = 0; i < nAtoms; i++) { >>>>> if (atomSet.get(i)) >>>>> continue; >>>>>- pt = atoms[i].point3f; >>>>>+ pt = atoms[i]; >>>>> float rA = atoms[i].getVanderwaalsRadiusFloat() >>>>> + solventExtendedAtomRadius; >>>>> if (pt.x + rA > xyzMin.x && pt.x - rA < xyzMax.x && pt.y + rA >>>>> >>>>> >>>>>>xyzMin.y >>>>>> >>>>>> >>>>>@@ -4177,7 +4177,7 @@ >>>>> for (int i = firstSet; i <= lastSet; i++) { >>>>> if (!bsNearby.get(i)) >>>>> continue; >>>>>- solvent_ptAtom[iAtom] = atoms[i].point3f; >>>>>+ solvent_ptAtom[iAtom] = atoms[i]; >>>>> solvent_atomRadius[iAtom++] = >>>>>atoms[i].getVanderwaalsRadiusFloat() >>>>> + solventExtendedAtomRadius; >>>>> } >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/LcaoCartoon.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/LcaoCartoon.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/LcaoCartoon.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -155,7 +155,7 @@ >>>>> } >>>>> super.setProperty("lcaoType",type,null); >>>>> Vector3f[] axes = { new Vector3f(), new Vector3f(), >>>>>- new Vector3f(frame.atoms[iAtom].point3f)}; >>>>>+ new Vector3f(frame.atoms[iAtom])}; >>>>> if (viewer.getPrincipalAxes(iAtom, axes[0], axes[1], type, true)) >>>>> super.setProperty("lcaoCartoon",axes,null); >>>>> } >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/MeasuresRenderer.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/MeasuresRenderer.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/MeasuresRenderer.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -164,7 +164,7 @@ >>>>> matrixT.set(aaT); >>>>> pointT.set(measurement.pointArc); >>>>> matrixT.transform(pointT); >>>>>- pointT.add(atomB.point3f); >>>>>+ pointT.add(atomB); >>>>> Point3i screenArc = viewer.transformPoint(pointT); >>>>> int zArc = screenArc.z - zOffset; >>>>> if (zArc < 0) zArc = 0; >>>>>@@ -173,7 +173,7 @@ >>>>> pointT.set(measurement.pointArc); >>>>> pointT.scale(1.1f); >>>>> matrixT.transform(pointT); >>>>>- pointT.add(atomB.point3f); >>>>>+ pointT.add(atomB); >>>>> Point3i screenLabel = viewer.transformPoint(pointT); >>>>> int zLabel = screenLabel.z - zOffset; >>>>> paintMeasurementString(screenLabel.x, screenLabel.y, zLabel, >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/ModelManager.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/ModelManager.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/ModelManager.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -652,7 +652,7 @@ >>>>> } >>>>> >>>>> float getBondLength(int i) { >>>>>- return getBondAtom1(i).point3f.distance(getBondAtom2(i).point3f); >>>>>+ return getBondAtom1(i).distance(getBondAtom2(i)); >>>>> } >>>>> Atom getBondAtom1(int i) { >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Monomer.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Monomer.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Monomer.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -129,7 +129,7 @@ >>>>> final Point3f getAtomPointFromOffset(byte offset) { >>>>> if (offset == -1) >>>>> return null; >>>>>- return chain.frame.atoms[firstAtomIndex + (offset & >>>>>0xFF)].point3f; >>>>>+ return chain.frame.atoms[firstAtomIndex + (offset & 0xFF)]; >>>>> } >>>>> >>>>> //////////////////////////////////////////////////////////////// >>>>>@@ -144,8 +144,7 @@ >>>>> } >>>>> >>>>> final Point3f getAtomPointFromOffsetIndex(int offsetIndex) { >>>>>- Atom atom = getAtomFromOffsetIndex(offsetIndex); >>>>>- return atom == null ? null : atom.point3f; >>>>>+ return getAtomFromOffsetIndex(offsetIndex); >>>>> } >>>>> >>>>> final Atom getSpecialAtom(byte[] interestingIDs, byte >>>>>specialAtomID) { >>>>>@@ -173,7 +172,7 @@ >>>>> int offset = offsets[i] & 0xFF; >>>>> if (offset == 255) >>>>> return null; >>>>>- return chain.frame.atoms[firstAtomIndex + offset].point3f; >>>>>+ return chain.frame.atoms[firstAtomIndex + offset]; >>>>> } >>>>> } >>>>> return null; >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/NucleicMonomer.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/NucleicMonomer.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/NucleicMonomer.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -191,7 +191,7 @@ >>>>> void getBaseRing6Points(Point3f[] ring6Points) { >>>>> for (int i = 6; --i >= 0; ) { >>>>> Atom atom = getAtomFromOffsetIndex(i + 3); >>>>>- ring6Points[i] = atom.point3f; >>>>>+ ring6Points[i] = atom; >>>>> } >>>>> } >>>>> >>>>>@@ -201,7 +201,7 @@ >>>>> if (isPurine) >>>>> for (int i = 5; --i >= 0; ) { >>>>> Atom atom = getAtomFromOffsetIndex(ring5OffsetIndexes[i]); >>>>>- ring5Points[i] = atom.point3f; >>>>>+ ring5Points[i] = atom; >>>>> } >>>>> return isPurine; >>>>> } >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/NucleicPolymer.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/NucleicPolymer.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/NucleicPolymer.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -64,7 +64,7 @@ >>>>> if (! otherNucleotide.isPyrimidine()) >>>>> continue; >>>>> Atom otherN3 = otherNucleotide.getN3(); >>>>>- float dist2 = myN1.point3f.distanceSquared(otherN3.point3f); >>>>>+ float dist2 = myN1.distanceSquared(otherN3); >>>>> if (dist2 < minDist2) { >>>>> bestNucleotide = otherNucleotide; >>>>> bestN3 = otherN3; >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Polyhedra.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Polyhedra.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Polyhedra.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -301,10 +301,10 @@ >>>>> float dAverage = 0; >>>>> >>>>> Point3f[] points = new Point3f[MAX_VERTICES * 3]; >>>>>- points[ptCenter] = centralAtom.point3f; >>>>>+ points[ptCenter] = centralAtom; >>>>> otherAtoms[ptCenter] = centralAtom; >>>>> for (int i = 0; i < ptCenter; i++) { >>>>>- points[i] = otherAtoms[i].point3f; >>>>>+ points[i] = otherAtoms[i]; >>>>> dAverage += points[ptCenter].distance(points[i]); >>>>> } >>>>> dAverage = dAverage / ptCenter; >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Polymer.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Polymer.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Polymer.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -194,11 +194,11 @@ >>>>> } >>>>> >>>>> final Point3f getInitiatorPoint() { >>>>>- return monomers[0].getInitiatorAtom().point3f; >>>>>+ return monomers[0].getInitiatorAtom(); >>>>> } >>>>> >>>>> final Point3f getTerminatorPoint() { >>>>>- return monomers[monomerCount - 1].getTerminatorAtom().point3f; >>>>>+ return monomers[monomerCount - 1].getTerminatorAtom(); >>>>> } >>>>> >>>>> final Atom getLeadAtom(int monomerIndex) { >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/Sticks.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/Sticks.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/Sticks.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -189,7 +189,7 @@ >>>>> if (! bsA.get(iA)) >>>>> continue; >>>>> Atom atomA = atoms[iA]; >>>>>- Point3f pointA = atomA.point3f; >>>>>+ Point3f pointA = atomA; >>>>> for (int iB = atomCount; --iB >= 0; ) { >>>>> if (iB == iA) >>>>> continue; >>>>>@@ -206,7 +206,7 @@ >>>>> continue; >>>>> if (CREATE_ONLY == connectOperation && bondAB != null) >>>>> continue; >>>>>- float distanceSquared = pointA.distanceSquared(atomB.point3f); >>>>>+ float distanceSquared = pointA.distanceSquared(atomB); >>>>> if (distanceSquared < minDistanceSquared || >>>>> distanceSquared > maxDistanceSquared) >>>>> continue; >>>>>@@ -235,7 +235,7 @@ >>>>> if (bsA.get(atom1.atomIndex) && bsB.get(atom2.atomIndex) || >>>>> bsA.get(atom2.atomIndex) && bsB.get(atom1.atomIndex)) { >>>>> if (bond.atom1.isBonded(bond.atom2)) { >>>>>- float distanceSquared = >>>>>atom1.point3f.distanceSquared(atom2.point3f); >>>>>+ float distanceSquared = atom1.distanceSquared(atom2); >>>>> if (distanceSquared >= minDistanceSquared && >>>>> distanceSquared <= maxDistanceSquared) >>>>> if (order == NULL_BOND_ORDER || >>>>> >>>>>Modified: branches/v10_9/Jmol/src/org/jmol/viewer/VectorsRenderer.java >>>>>=================================================================== >>>>>--- branches/v10_9/Jmol/src/org/jmol/viewer/VectorsRenderer.java >>>>>2006-08-30 19:41:22 UTC (rev 5452) >>>>>+++ branches/v10_9/Jmol/src/org/jmol/viewer/VectorsRenderer.java >>>>>2006-08-30 20:30:56 UTC (rev 5453) >>>>>@@ -87,14 +87,14 @@ >>>>> >>>>> // to have the vectors move when vibration is turned on >>>>> float vectorScale = viewer.getVectorScale(); >>>>>- pointVectorEnd.scaleAdd(vectorScale, vibrationVector, >>>>>atom.point3f); >>>>>+ pointVectorEnd.scaleAdd(vectorScale, vibrationVector, atom); >>>>> viewer.transformPoint(pointVectorEnd, vibrationVector, >>>>> screenVectorEnd); >>>>> diameter = (mad <= 20) >>>>> ? mad >>>>> : viewer.scaleToScreen(screenVectorEnd.z, mad); >>>>> pointArrowHead.scaleAdd(vectorScale * arrowHeadBase, >>>>>- vibrationVector, atom.point3f); >>>>>+ vibrationVector, atom); >>>>> viewer.transformPoint(pointArrowHead, vibrationVector, >>>>> screenArrowHead); >>>>> headWidthPixels = diameter * 3 / 2; >>>>> >>>>> >>>>>This was sent by the SourceForge.net collaborative development >>>>>platform, the world's largest Open Source development site. >>>>> >>>>>------------------------------------------------------------------------- >>>>> >>>>>Using Tomcat but need to do more? Need to support web services, >>>>>security? >>>>>Get stuff done quickly with pre-integrated technology to make your >>>>>job easier >>>>>Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>>>Geronimo >>>>>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>> >>>>>_______________________________________________ >>>>>Jmol-commits mailing list >>>>>[email protected] >>>>>https://lists.sourceforge.net/lists/listinfo/jmol-commits >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> >> >> > > >------------------------------------------------------------------------- >Using Tomcat but need to do more? Need to support web services, security? >Get stuff done quickly with pre-integrated technology to make your job easier >Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >_______________________________________________ >Jmol-developers mailing list >[email protected] >https://lists.sourceforge.net/lists/listinfo/jmol-developers > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
