Package org.jmol.symmetry
Class SpaceGroupFinder
java.lang.Object
org.jmol.symmetry.SpaceGroupFinder
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.sp
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SpaceGroupFinder.SGAtom[]
private static javajs.util.BS[]
private static javajs.util.BS[]
private static int
private static String[]
private static final int
maximum allowable supercellprivate int
private static int
private static SymmetryOperation[]
private static String[]
private javajs.util.P3
private static BufferedReader
private static final float
tolerance for fractional coord andprivate static final float
tolerance for fractional coord andprivate static final float
maximum allowable distance fx, fy ,fz for atom finder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate 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) 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, float[] params) 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) findSpaceGroup
(Viewer vwr, javajs.util.BS atoms0, String xyzList, float[] unitCellParams, SymmetryInterface uc, boolean asString, boolean isAssign) private Object
getGroupsWithOps
(String xyzList, float[] unitCellParams, boolean isAssign) Find all space groups that match EXACTLY or contain all of the operations specified.private static String[]
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
static void
private void
removeDuplicates
(javajs.util.BS bs) private static int
(package private) javajs.util.P3
toFractional
(Atom a, SymmetryInterface uc)
-
Field Details
-
MAX_COUNT
private static final int MAX_COUNTmaximum allowable supercell- See Also:
-
SLOP0014
private static final float SLOP0014maximum allowable distance fx, fy ,fz for atom finder -
SLOP001
private static final float SLOP001tolerance for fractional coord and- See Also:
-
SLOP0001
private static final float SLOP0001tolerance for fractional coord and- See Also:
-
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
-
opXYZ
-
ops
-
rdr
-
atoms
-
nAtoms
private int nAtoms -
pt
private javajs.util.P3 pt
-
-
Constructor Details
-
SpaceGroupFinder
public SpaceGroupFinder()
-
-
Method Details
-
findSpaceGroup
public Object findSpaceGroup(Viewer vwr, javajs.util.BS atoms0, String xyzList, float[] unitCellParams, SymmetryInterface uc, boolean asString, boolean isAssign) - Parameters:
vwr
-atoms0
-xyzList
-unitCellParams
-uc
-asString
-isAssign
-- Returns:
- SpaceGroup or null if isAssign, spacegroup information map if
-
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, float[] params) 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
-params
-
-
scanTo
-
getGroupsWithOps
Find all space groups that match EXACTLY or contain all of the operations specified. Operation need not be in Jmol-canonical form. For instance, "1-x,-y,-z" will be matched to "-x,-y,-z". Could be the result of spacegroup(nameOrXYZList, unitcellParametersArray) or MODELKIT ASSIGN SPACEGROUP "nameOrXYZList" other than P1- Parameters:
xyzList
- a semicolon-separated list of possible space groups, such as "-x,-y,-z;x,-y,-z" or a space group ID such as "133:2"; if a list, prefixing or postfixing the list with "&" or joining with "&" indicates that a partial match is desired, returning a list of names of space groups that have at least the specified operationsunitCellParams
-isAssign
- from ModelKit- Returns:
- an array of space group IDs if not isAssign and not "="; a SpaceGroup or null if isAssign; a single space group ID as a string if "=" and a string starting and ending with "?" if an xyz operator is of an invalid form.
-
toFractional
-
getOp
-
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
-
loadData
-
getList
private static String[] getList(Viewer vwr, Object me, String[] list, String fileName) throws IOException - Throws:
IOException
-