Package org.jmol.symmetry
Class SpaceGroupFinder
- java.lang.Object
-
- org.jmol.symmetry.SpaceGroupFinder
-
public class SpaceGroupFinder extends java.lang.Object
A relatively simple space group finder given a unit cell. The unit cell is used to reduce the options involving hexagonal, tetragonal, and cubic groups. See https://stokes.byu.edu/iso/findsymform.php for finding the space group given no unit cell information.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
SpaceGroupFinder.SGAtom
-
Field Summary
Fields Modifier and Type Field Description private SpaceGroupFinder.SGAtom[]
atoms
private static javajs.util.BS[]
bsGroupOps
private static javajs.util.BS[]
bsOpGroups
private static int
GROUP_COUNT
private static java.lang.String[]
groupNames
private static int
MAX_COUNT
maximum allowable supercellprivate int
nAtoms
private static int
OP_COUNT
private static SymmetryOperation[]
ops
private static java.lang.String[]
opXYZ
private javajs.util.P3
pt
private static java.io.BufferedReader
rdr
private static float
SLOP0001
tolerance for fractional coord andprivate static float
SLOP001
tolerance for fractional coord andprivate static float
SLOP0014
maximum allowable distance fx, fy ,fz for atom finder
-
Constructor Summary
Constructors Constructor Description SpaceGroupFinder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
approx0(float f)
private boolean
approx000(float f)
private boolean
approx0014(float f)
private int
approxInt(float finv)
private boolean
checkBasis(javajs.util.BS uncheckedOps, javajs.util.BS bsPoints, javajs.util.BS targets)
SymmetryInterface
checkSupercell(Viewer vwr, SymmetryInterface uc, javajs.util.BS bsPoints, int abc, javajs.util.P3 scaling)
Look for a supercell and adjust lattice down if necessary.private void
dumpBasis(javajs.util.BS ops, javajs.util.BS bs1, javajs.util.BS bsPoints)
private void
filterGroups(javajs.util.BS bsGroups, SymmetryInterface uc)
Remove possibilities based on unit cells.private int
findEquiv(int iop, SymmetryOperation op, int i, javajs.util.BS bsPoints, javajs.util.P3 pt, boolean andClear)
java.lang.Object
findSpaceGroup(Viewer vwr, javajs.util.BS atoms0, java.lang.String opXYZ0, SymmetryInterface uc, boolean asString)
private java.lang.Object
getGroupsWithOp(java.lang.String opXYZ0)
private static java.lang.String[]
getList(Viewer vwr, java.lang.Object me, java.lang.String[] list, java.lang.String fileName)
private static SymmetryOperation
getOp(int iop)
private boolean
latticeShift(javajs.util.P3 a, javajs.util.P3 b)
Look for true {1 0 0}, {0 1 0}, {0 0 1} difference.private static boolean
loadData(Viewer vwr, java.lang.Object me)
static void
main(java.lang.String[] args)
private void
removeDuplicates(javajs.util.BS bs)
private static int
scanTo(int i, java.lang.String num)
(package private) javajs.util.P3
toFractional(Atom a, SymmetryInterface uc)
-
-
-
Field Detail
-
MAX_COUNT
private static final int MAX_COUNT
maximum allowable supercell- See Also:
- Constant Field Values
-
SLOP0014
private static final float SLOP0014
maximum allowable distance fx, fy ,fz for atom finder
-
SLOP001
private static final float SLOP001
tolerance for fractional coord and- See Also:
- Constant Field Values
-
SLOP0001
private static final float SLOP0001
tolerance for fractional coord and- See Also:
- Constant Field Values
-
GROUP_COUNT
private static int GROUP_COUNT
-
OP_COUNT
private static int OP_COUNT
-
bsOpGroups
private static javajs.util.BS[] bsOpGroups
-
bsGroupOps
private static javajs.util.BS[] bsGroupOps
-
groupNames
private static java.lang.String[] groupNames
-
opXYZ
private static java.lang.String[] opXYZ
-
ops
private static SymmetryOperation[] ops
-
rdr
private static java.io.BufferedReader rdr
-
atoms
private SpaceGroupFinder.SGAtom[] atoms
-
nAtoms
private int nAtoms
-
pt
private javajs.util.P3 pt
-
-
Method Detail
-
findSpaceGroup
public java.lang.Object findSpaceGroup(Viewer vwr, javajs.util.BS atoms0, java.lang.String opXYZ0, SymmetryInterface uc, boolean asString)
-
removeDuplicates
private void removeDuplicates(javajs.util.BS bs)
-
dumpBasis
private void dumpBasis(javajs.util.BS ops, javajs.util.BS bs1, javajs.util.BS bsPoints)
-
checkBasis
private boolean checkBasis(javajs.util.BS uncheckedOps, javajs.util.BS bsPoints, javajs.util.BS targets)
-
filterGroups
private void filterGroups(javajs.util.BS bsGroups, SymmetryInterface uc)
Remove possibilities based on unit cells. No attempt is made to permute axes. Rhombohedral groups are never included. orthorhombic = 16 - 74 (a, b, c, 90, 90, 90) tetragonal = 75 - 142 (a, a, c, 90, 90, 90) trigonal = 143 - 194 (a, a, c, 90, 90, 120) cubic = 195 - 230 (a, a, a, 90, 90, 90)- Parameters:
bsGroups
-uc
-
-
scanTo
private static int scanTo(int i, java.lang.String num)
-
getGroupsWithOp
private java.lang.Object getGroupsWithOp(java.lang.String opXYZ0)
-
toFractional
javajs.util.P3 toFractional(Atom a, SymmetryInterface uc)
-
getOp
private static SymmetryOperation getOp(int iop)
-
checkSupercell
public SymmetryInterface checkSupercell(Viewer vwr, SymmetryInterface uc, javajs.util.BS bsPoints, int abc, javajs.util.P3 scaling)
Look for a supercell and adjust lattice down if necessary.- Parameters:
vwr
-uc
-bsPoints
-abc
- 1==a, 2==b, 3==cscaling
- set to [na, nb, nc]- Returns:
- revised unit cell
-
approx0
private boolean approx0(float f)
-
approx000
private boolean approx000(float f)
-
approx0014
private boolean approx0014(float f)
-
approxInt
private int approxInt(float finv)
-
findEquiv
private int findEquiv(int iop, SymmetryOperation op, int i, javajs.util.BS bsPoints, javajs.util.P3 pt, boolean andClear)
-
latticeShift
private boolean latticeShift(javajs.util.P3 a, javajs.util.P3 b)
Look for true {1 0 0}, {0 1 0}, {0 0 1} difference. This comes from issues with SimpleCell.unitize and our methods here, I think.- Parameters:
a
-b
-- Returns:
- true if a lattice shift
-
main
public static void main(java.lang.String[] args)
-
loadData
private static boolean loadData(Viewer vwr, java.lang.Object me)
-
getList
private static java.lang.String[] getList(Viewer vwr, java.lang.Object me, java.lang.String[] list, java.lang.String fileName) throws java.io.IOException
- Throws:
java.io.IOException
-
-