Revision: 17563
http://jmol.svn.sourceforge.net/jmol/?rev=17563&view=rev
Author: hansonr
Date: 2012-09-14 04:02:09 +0000 (Fri, 14 Sep 2012)
Log Message:
-----------
refactoring for JavaScript
Modified Paths:
--------------
trunk/Jmol/src/org/jmol/symmetry/HallInfo.java
trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java
Added Paths:
-----------
trunk/Jmol/src/org/jmol/symmetry/HallRotation.java
trunk/Jmol/src/org/jmol/symmetry/HallTranslation.java
Modified: trunk/Jmol/src/org/jmol/symmetry/HallInfo.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/HallInfo.java 2012-09-14 03:02:37 UTC (rev 17562)
+++ trunk/Jmol/src/org/jmol/symmetry/HallInfo.java 2012-09-14 04:02:09 UTC (rev 17563)
@@ -73,9 +73,9 @@
try {
String str = this.hallSymbol = hallSymbol.trim();
str = extractLatticeInfo(str);
- if (Translation.getLatticeIndex(latticeCode) == 0)
+ if (HallTranslation.getLatticeIndex(latticeCode) == 0)
return;
- latticeExtension = Translation.getLatticeExtension(latticeCode,
+ latticeExtension = HallTranslation.getLatticeExtension(latticeCode,
isCentrosymmetric);
str = extractVectorInfo(str) + latticeExtension;
Logger.info("Hallinfo: " + hallSymbol + " " + str);
@@ -120,7 +120,7 @@
}
*/
private String getLatticeDesignation() {
- return Translation.getLatticeDesignation(latticeCode, isCentrosymmetric);
+ return HallTranslation.getLatticeDesignation(latticeCode, isCentrosymmetric);
}
private String extractLatticeInfo(String name) {
@@ -186,8 +186,8 @@
String primitiveCode;
String lookupCode;
String translationString;
- Rotation rotation;
- Translation translation;
+ HallRotation rotation;
+ HallTranslation translation;
Matrix4f seitzMatrix12ths = new Matrix4f();
boolean isImproper;
int order;
@@ -285,7 +285,7 @@
ptr = 3;
}
lookupCode = code.substring(0, ptr);
- rotation = Rotation.lookup(lookupCode);
+ rotation = HallRotation.lookup(lookupCode);
if (rotation == null) {
Logger.error("Rotation lookup could not find " + inputCode + " ? "
+ lookupCode);
@@ -297,12 +297,12 @@
// primitive notation. This made coding FAR simpler -- all lattice
// operations indicated by one to three 1xxx or -1 extensions.
- translation = new Translation();
+ translation = new HallTranslation();
translationString = "";
int len = code.length();
for (int i = ptr; i < len; i++) {
char translationCode = code.charAt(i);
- Translation t = new Translation(translationCode, order);
+ HallTranslation t = new HallTranslation(translationCode, order);
if (t.translationCode != '\0') {
translationString += "" + t.translationCode;
translation.rotationShift12ths += t.rotationShift12ths;
@@ -356,221 +356,3 @@
}
}
-class Translation {
-
- char translationCode = '\0';
- int rotationOrder;
- int rotationShift12ths;
- Point3i vectorShift12ths = new Point3i();
-
- Translation() {
- }
-
- Translation(char translationCode, int order) {
- for (int i = 0; i < hallTranslationTerms.length; i++) {
- Translation h = hallTranslationTerms[i];
- if (h.translationCode == translationCode) {
- if (h.rotationOrder == 0 || h.rotationOrder == order) {
- this.translationCode = translationCode;
- rotationShift12ths = h.rotationShift12ths;
- vectorShift12ths = h.vectorShift12ths;
- return;
- }
- }
- }
- }
-
- private Translation(char translationCode,
- Point3i vectorShift12ths) {
- this.translationCode = translationCode;
- this.rotationOrder = 0;
- this.rotationShift12ths = 0;
- this.vectorShift12ths = vectorShift12ths;
- }
-
- private Translation(char translationCode, int order,
- int rotationShift12ths) {
- this.translationCode = translationCode;
- this.rotationOrder = order;
- this.rotationShift12ths = rotationShift12ths;
- this.vectorShift12ths = new Point3i();
- }
-
- final static String getHallLatticeEquivalent(int latticeParameter) {
- // SHELX LATT --> Hall term
- char latticeCode = Translation.getLatticeCode(latticeParameter);
- boolean isCentrosymmetric = (latticeParameter > 0);
- return (isCentrosymmetric ? "-" : "") + latticeCode + " 1";
- }
-
- final static int getLatticeIndex(char latt) {
- /*
- * returns lattice code (1-9, including S and T) for a given lattice type
- * 1-7 match SHELX codes
- *
- */
- for (int i = 1, ipt = 3; i <= nLatticeTypes; i++, ipt+=3)
- if (latticeTranslationData[ipt].charAt(0) == latt)
- return i;
- return 0;
- }
-
- /**
- *
- * @param latt SHELX index or character
- * @return lattice character P I R F A B C S T or \0
- *
- */
- final static char getLatticeCode(int latt) {
- if (latt < 0)
- latt = -latt;
- return (latt == 0 ? '\0' : latt > nLatticeTypes ?
- getLatticeCode(getLatticeIndex((char)latt))
- : latticeTranslationData[latt * 3].charAt(0));
- }
-
- final static String getLatticeDesignation(int latt) {
- boolean isCentrosymmetric = (latt > 0);
- String str = (isCentrosymmetric ? "-" : "");
- if (latt < 0)
- latt = -latt;
- if (latt == 0 || latt > nLatticeTypes)
- return "";
- return str + getLatticeCode(latt) + ": "
- + (isCentrosymmetric ? "centrosymmetric " : "")
- + latticeTranslationData[latt * 3 + 1];
- }
-
- final static String getLatticeDesignation(char latticeCode, boolean isCentrosymmetric) {
- int latt = getLatticeIndex(latticeCode);
- if (!isCentrosymmetric)
- latt = - latt;
- return getLatticeDesignation(latt);
- }
-
- final static String getLatticeExtension(char latt, boolean isCentrosymmetric) {
- /*
- * returns a set of rotation terms that are equivalent to the lattice code
- *
- */
- for (int i = 1, ipt = 3; i <= nLatticeTypes; i++, ipt += 3)
- if (latticeTranslationData[ipt].charAt(0) == latt)
- return latticeTranslationData[ipt + 2]
- + (isCentrosymmetric ? " -1" : "");
- return "";
- }
-
- final static String[] latticeTranslationData = {
- "\0", "unknown", ""
- ,"P", "primitive", ""
- ,"I", "body-centered", " 1n"
- ,"R", "rhombohedral", " 1r 1r"
- ,"F", "face-centered", " 1ab 1bc 1ac"
- ,"A", "A-centered", " 1bc"
- ,"B", "B-centered", " 1ac"
- ,"C", "C-centered", " 1ab"
- ,"S", "rhombohedral(S)", " 1s 1s"
- ,"T", "rhombohedral(T)", " 1t 1t"
- };
-
- final static int nLatticeTypes = latticeTranslationData.length/3 - 1;
-
-
- final static Translation[] hallTranslationTerms = {
- // all units are 12ths
- new Translation('a', new Point3i(6, 0, 0))
- , new Translation('b', new Point3i(0, 6, 0))
- , new Translation('c', new Point3i(0, 0, 6))
- , new Translation('n', new Point3i(6, 6, 6))
- , new Translation('u', new Point3i(3, 0, 0))
- , new Translation('v', new Point3i(0, 3, 0))
- , new Translation('w', new Point3i(0, 0, 3))
- , new Translation('d', new Point3i(3, 3, 3))
- , new Translation('1', 2, 6)
- , new Translation('1', 3, 4)
- , new Translation('2', 3, 8)
- , new Translation('1', 4, 3)
- , new Translation('3', 4, 9)
- , new Translation('1', 6, 2)
- , new Translation('2', 6, 4)
- , new Translation('4', 6, 8)
- , new Translation('5', 6, 10)
- // extension to handle rhombohedral lattice as primitive
- , new Translation('r', new Point3i(4, 8, 8))
- , new Translation('s', new Point3i(8, 8, 4))
- , new Translation('t', new Point3i(8, 4, 8))
- };
-}
-
-class Rotation {
- String rotCode;
- //int order;
- Matrix4f seitzMatrix = new Matrix4f();
- Matrix4f seitzMatrixInv = new Matrix4f();
-
- Rotation () {
- }
-
- private Rotation (String code, String matrixData) {
- rotCode = code;
- //order = code.charAt(0) - '0';
- float[] data = new float[16];
- float[] dataInv = new float[16];
- data[15] = dataInv[15] = 1f;
-
- for (int i = 0, ipt = 0; ipt < 11; i++) {
- int value = 0;
- switch(matrixData.charAt(i)) {
- case ' ':
- ipt++;
- continue;
- case '+':
- case '1':
- value = 1;
- break;
- case '-':
- value = -1;
- break;
- }
- data[ipt] = value;
- dataInv[ipt] = -value;
- ipt++;
- }
- seitzMatrix.set(data);
- seitzMatrixInv.set(dataInv);
- }
-
- final static Rotation lookup(String code) {
- for (int i = hallRotationTerms.length; --i >= 0;)
- if (hallRotationTerms[i].rotCode.equals(code))
- return hallRotationTerms[i];
- return null;
- }
-
- final static Rotation[] hallRotationTerms = {
- // in matrix definitions, "+" = 1; "-" = -1;
- // just a compact way of indicating a 3x3
- new Rotation("1_" , "+00 0+0 00+")
- , new Rotation("2x" , "+00 0-0 00-")
- , new Rotation("2y" , "-00 0+0 00-")
- , new Rotation("2z" , "-00 0-0 00+")
- , new Rotation("2\'" , "0-0 -00 00-") //z implied
- , new Rotation("2\"" , "0+0 +00 00-") //z implied
- , new Rotation("2x\'" , "-00 00- 0-0")
- , new Rotation("2x\"" , "-00 00+ 0+0")
- , new Rotation("2y\'" , "00- 0-0 -00")
- , new Rotation("2y\"" , "00+ 0-0 +00")
- , new Rotation("2z\'" , "0-0 -00 00-")
- , new Rotation("2z\"" , "0+0 +00 00-")
- , new Rotation("3x" , "+00 00- 0+-")
- , new Rotation("3y" , "-0+ 0+0 -00")
- , new Rotation("3z" , "0-0 +-0 00+")
- , new Rotation("3*" , "00+ +00 0+0")
- , new Rotation("4x" , "+00 00- 0+0")
- , new Rotation("4y" , "00+ 0+0 -00")
- , new Rotation("4z" , "0-0 +00 00+")
- , new Rotation("6x" , "+00 0+- 0+0")
- , new Rotation("6y" , "00+ 0+0 -0+")
- , new Rotation("6z" , "+-0 +00 00+")
- };
-}
Added: trunk/Jmol/src/org/jmol/symmetry/HallRotation.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/HallRotation.java (rev 0)
+++ trunk/Jmol/src/org/jmol/symmetry/HallRotation.java 2012-09-14 04:02:09 UTC (rev 17563)
@@ -0,0 +1,128 @@
+/* $RCSfile$
+ * $Author: egonw $
+ * $Date: 2005-11-10 09:52:44 -0600 (Thu, 10 Nov 2005) $
+ * $Revision: 4255 $
+ *
+ * Copyright (C) 2003-2005 Miguel, Jmol Development, http://www.jmol.org
+ *
+ * Contact: jmol-developers@...
+ *
+ * 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.symmetry;
+
+/*
+ * Bob Hanson 9/2006
+ *
+ * references: International Tables for Crystallography Vol. A. (2002)
+ *
+ * http://www.iucr.org/iucr-top/cif/cifdic_html/1/cif_core.dic/Ispace_group_symop_operation_xyz.html
+ * http://www.iucr.org/iucr-top/cif/cifdic_html/1/cif_core.dic/Isymmetry_equiv_pos_as_xyz.html
+ *
+ * LATT : http://macxray.chem.upenn.edu/LATT.pdf thank you, Patrick Carroll
+ *
+ * Hall symbols:
+ *
+ * http://cci.lbl.gov/sginfo/hall_symbols.html
+ *
+ * and
+ *
+ * http://cci.lbl.gov/cctbx/explore_symmetry.html
+ *
+ * (-)L [N_A^T_1] [N_A^T_2] ... [N_A^T_P] V(Nx Ny Nz)
+ *
+ * lattice types S and T are not supported here
+ *
+ * NEVER ACCESS THESE METHODS OUTSIDE OF THIS PACKAGE
+ *
+ *
+ */
+
+import javax.vecmath.Matrix4f;
+
+class HallRotation {
+ String rotCode;
+ //int order;
+ Matrix4f seitzMatrix = new Matrix4f();
+ Matrix4f seitzMatrixInv = new Matrix4f();
+
+ HallRotation () {
+ }
+
+ private HallRotation (String code, String matrixData) {
+ rotCode = code;
+ //order = code.charAt(0) - '0';
+ float[] data = new float[16];
+ float[] dataInv = new float[16];
+ data[15] = dataInv[15] = 1f;
+
+ for (int i = 0, ipt = 0; ipt < 11; i++) {
+ int value = 0;
+ switch(matrixData.charAt(i)) {
+ case ' ':
+ ipt++;
+ continue;
+ case '+':
+ case '1':
+ value = 1;
+ break;
+ case '-':
+ value = -1;
+ break;
+ }
+ data[ipt] = value;
+ dataInv[ipt] = -value;
+ ipt++;
+ }
+ seitzMatrix.set(data);
+ seitzMatrixInv.set(dataInv);
+ }
+
+ final static HallRotation lookup(String code) {
+ for (int i = hallRotationTerms.length; --i >= 0;)
+ if (hallRotationTerms[i].rotCode.equals(code))
+ return hallRotationTerms[i];
+ return null;
+ }
+
+ final static HallRotation[] hallRotationTerms = {
+ // in matrix definitions, "+" = 1; "-" = -1;
+ // just a compact way of indicating a 3x3
+ new HallRotation("1_" , "+00 0+0 00+")
+ , new HallRotation("2x" , "+00 0-0 00-")
+ , new HallRotation("2y" , "-00 0+0 00-")
+ , new HallRotation("2z" , "-00 0-0 00+")
+ , new HallRotation("2\'" , "0-0 -00 00-") //z implied
+ , new HallRotation("2\"" , "0+0 +00 00-") //z implied
+ , new HallRotation("2x\'" , "-00 00- 0-0")
+ , new HallRotation("2x\"" , "-00 00+ 0+0")
+ , new HallRotation("2y\'" , "00- 0-0 -00")
+ , new HallRotation("2y\"" , "00+ 0-0 +00")
+ , new HallRotation("2z\'" , "0-0 -00 00-")
+ , new HallRotation("2z\"" , "0+0 +00 00-")
+ , new HallRotation("3x" , "+00 00- 0+-")
+ , new HallRotation("3y" , "-0+ 0+0 -00")
+ , new HallRotation("3z" , "0-0 +-0 00+")
+ , new HallRotation("3*" , "00+ +00 0+0")
+ , new HallRotation("4x" , "+00 00- 0+0")
+ , new HallRotation("4y" , "00+ 0+0 -00")
+ , new HallRotation("4z" , "0-0 +00 00+")
+ , new HallRotation("6x" , "+00 0+- 0+0")
+ , new HallRotation("6y" , "00+ 0+0 -0+")
+ , new HallRotation("6z" , "+-0 +00 00+")
+ };
+}
Added: trunk/Jmol/src/org/jmol/symmetry/HallTranslation.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/HallTranslation.java (rev 0)
+++ trunk/Jmol/src/org/jmol/symmetry/HallTranslation.java 2012-09-14 04:02:09 UTC (rev 17563)
@@ -0,0 +1,202 @@
+/* $RCSfile$
+ * $Author: egonw $
+ * $Date: 2005-11-10 09:52:44 -0600 (Thu, 10 Nov 2005) $
+ * $Revision: 4255 $
+ *
+ * Copyright (C) 2003-2005 Miguel, Jmol Development, http://www.jmol.org
+ *
+ * Contact: jmol-developers@...
+ *
+ * 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.symmetry;
+
+/*
+ * Bob Hanson 9/2006
+ *
+ * references: International Tables for Crystallography Vol. A. (2002)
+ *
+ * http://www.iucr.org/iucr-top/cif/cifdic_html/1/cif_core.dic/Ispace_group_symop_operation_xyz.html
+ * http://www.iucr.org/iucr-top/cif/cifdic_html/1/cif_core.dic/Isymmetry_equiv_pos_as_xyz.html
+ *
+ * LATT : http://macxray.chem.upenn.edu/LATT.pdf thank you, Patrick Carroll
+ *
+ * Hall symbols:
+ *
+ * http://cci.lbl.gov/sginfo/hall_symbols.html
+ *
+ * and
+ *
+ * http://cci.lbl.gov/cctbx/explore_symmetry.html
+ *
+ * (-)L [N_A^T_1] [N_A^T_2] ... [N_A^T_P] V(Nx Ny Nz)
+ *
+ * lattice types S and T are not supported here
+ *
+ * NEVER ACCESS THESE METHODS OUTSIDE OF THIS PACKAGE
+ *
+ *
+ */
+
+import javax.vecmath.Point3i;
+
+class HallTranslation {
+
+ char translationCode = '\0';
+ int rotationOrder;
+ int rotationShift12ths;
+ Point3i vectorShift12ths = new Point3i();
+
+ HallTranslation() {
+ }
+
+ HallTranslation(char translationCode, int order) {
+ for (int i = 0; i < hallTranslationTerms.length; i++) {
+ HallTranslation h = hallTranslationTerms[i];
+ if (h.translationCode == translationCode) {
+ if (h.rotationOrder == 0 || h.rotationOrder == order) {
+ this.translationCode = translationCode;
+ rotationShift12ths = h.rotationShift12ths;
+ vectorShift12ths = h.vectorShift12ths;
+ return;
+ }
+ }
+ }
+ }
+
+ private HallTranslation(char translationCode,
+ Point3i vectorShift12ths) {
+ this.translationCode = translationCode;
+ this.rotationOrder = 0;
+ this.rotationShift12ths = 0;
+ this.vectorShift12ths = vectorShift12ths;
+ }
+
+ private HallTranslation(char translationCode, int order,
+ int rotationShift12ths) {
+ this.translationCode = translationCode;
+ this.rotationOrder = order;
+ this.rotationShift12ths = rotationShift12ths;
+ this.vectorShift12ths = new Point3i();
+ }
+
+ final static String getHallLatticeEquivalent(int latticeParameter) {
+ // SHELX LATT --> Hall term
+ char latticeCode = HallTranslation.getLatticeCode(latticeParameter);
+ boolean isCentrosymmetric = (latticeParameter > 0);
+ return (isCentrosymmetric ? "-" : "") + latticeCode + " 1";
+ }
+
+ final static int getLatticeIndex(char latt) {
+ /*
+ * returns lattice code (1-9, including S and T) for a given lattice type
+ * 1-7 match SHELX codes
+ *
+ */
+ for (int i = 1, ipt = 3; i <= nLatticeTypes; i++, ipt+=3)
+ if (latticeTranslationData[ipt].charAt(0) == latt)
+ return i;
+ return 0;
+ }
+
+ /**
+ *
+ * @param latt SHELX index or character
+ * @return lattice character P I R F A B C S T or \0
+ *
+ */
+ final static char getLatticeCode(int latt) {
+ if (latt < 0)
+ latt = -latt;
+ return (latt == 0 ? '\0' : latt > nLatticeTypes ?
+ getLatticeCode(getLatticeIndex((char)latt))
+ : latticeTranslationData[latt * 3].charAt(0));
+ }
+
+ final static String getLatticeDesignation(int latt) {
+ boolean isCentrosymmetric = (latt > 0);
+ String str = (isCentrosymmetric ? "-" : "");
+ if (latt < 0)
+ latt = -latt;
+ if (latt == 0 || latt > nLatticeTypes)
+ return "";
+ return str + getLatticeCode(latt) + ": "
+ + (isCentrosymmetric ? "centrosymmetric " : "")
+ + latticeTranslationData[latt * 3 + 1];
+ }
+
+ final static String getLatticeDesignation(char latticeCode, boolean isCentrosymmetric) {
+ int latt = getLatticeIndex(latticeCode);
+ if (!isCentrosymmetric)
+ latt = - latt;
+ return getLatticeDesignation(latt);
+ }
+
+ final static String getLatticeExtension(char latt, boolean isCentrosymmetric) {
+ /*
+ * returns a set of rotation terms that are equivalent to the lattice code
+ *
+ */
+ for (int i = 1, ipt = 3; i <= nLatticeTypes; i++, ipt += 3)
+ if (latticeTranslationData[ipt].charAt(0) == latt)
+ return latticeTranslationData[ipt + 2]
+ + (isCentrosymmetric ? " -1" : "");
+ return "";
+ }
+
+ final static String[] latticeTranslationData = {
+ "\0", "unknown", ""
+ ,"P", "primitive", ""
+ ,"I", "body-centered", " 1n"
+ ,"R", "rhombohedral", " 1r 1r"
+ ,"F", "face-centered", " 1ab 1bc 1ac"
+ ,"A", "A-centered", " 1bc"
+ ,"B", "B-centered", " 1ac"
+ ,"C", "C-centered", " 1ab"
+ ,"S", "rhombohedral(S)", " 1s 1s"
+ ,"T", "rhombohedral(T)", " 1t 1t"
+ };
+
+ final static int nLatticeTypes = latticeTranslationData.length/3 - 1;
+
+
+ final static HallTranslation[] hallTranslationTerms = {
+ // all units are 12ths
+ new HallTranslation('a', new Point3i(6, 0, 0))
+ , new HallTranslation('b', new Point3i(0, 6, 0))
+ , new HallTranslation('c', new Point3i(0, 0, 6))
+ , new HallTranslation('n', new Point3i(6, 6, 6))
+ , new HallTranslation('u', new Point3i(3, 0, 0))
+ , new HallTranslation('v', new Point3i(0, 3, 0))
+ , new HallTranslation('w', new Point3i(0, 0, 3))
+ , new HallTranslation('d', new Point3i(3, 3, 3))
+ , new HallTranslation('1', 2, 6)
+ , new HallTranslation('1', 3, 4)
+ , new HallTranslation('2', 3, 8)
+ , new HallTranslation('1', 4, 3)
+ , new HallTranslation('3', 4, 9)
+ , new HallTranslation('1', 6, 2)
+ , new HallTranslation('2', 6, 4)
+ , new HallTranslation('4', 6, 8)
+ , new HallTranslation('5', 6, 10)
+ // extension to handle rhombohedral lattice as primitive
+ , new HallTranslation('r', new Point3i(4, 8, 8))
+ , new HallTranslation('s', new Point3i(8, 8, 4))
+ , new HallTranslation('t', new Point3i(8, 4, 8))
+ };
+}
+
Modified: trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java
===================================================================
--- trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java 2012-09-14 03:02:37 UTC (rev 17562)
+++ trunk/Jmol/src/org/jmol/symmetry/SpaceGroup.java 2012-09-14 04:02:09 UTC (rev 17563)
@@ -139,7 +139,7 @@
boolean doNormalize) {
//from AtomSetCollection.applySymmetry only
if (hallInfo == null && latticeParameter != 0) {
- HallInfo h = new HallInfo(Translation
+ HallInfo h = new HallInfo(HallTranslation
.getHallLatticeEquivalent(latticeParameter));
generateAllOperators(h);
//doNormalize = false; // why this here?
@@ -265,7 +265,7 @@
}
*/
String getLatticeDesignation() {
- return latticeCode + ": " + Translation.getLatticeDesignation(latticeParameter);
+ return latticeCode + ": " + HallTranslation.getLatticeDesignation(latticeParameter);
}
void setLattice(int latticeParameter) {
@@ -275,9 +275,9 @@
// The idea here is that we can represent any LATT number
// as a simple set of rotation/translation operations
this.latticeParameter = latticeParameter;
- latticeCode = Translation.getLatticeCode(latticeParameter);
+ latticeCode = HallTranslation.getLatticeCode(latticeParameter);
if (latticeParameter > 10) { // use negative
- this.latticeParameter = -Translation.getLatticeIndex(latticeCode);
+ this.latticeParameter = -HallTranslation.getLatticeIndex(latticeCode);
}
}
@@ -357,7 +357,7 @@
private void setLattice(char latticeCode, boolean isCentrosymmetric) {
this.latticeCode = latticeCode;
- latticeParameter = Translation.getLatticeIndex(latticeCode);
+ latticeParameter = HallTranslation.getLatticeIndex(latticeCode);
if (!isCentrosymmetric)
latticeParameter = -latticeParameter;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|