Class SpaceGroupFinder

java.lang.Object
org.jmol.symmetry.SpaceGroupFinder

public class SpaceGroupFinder extends 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.sp
  • Field Details

    • MAX_COUNT

      private static final int MAX_COUNT
      maximum allowable supercell
      See Also:
    • 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:
    • SLOP0001

      private static final float SLOP0001
      tolerance 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

      private static String[] groupNames
    • opXYZ

      private static String[] opXYZ
    • ops

      private static SymmetryOperation[] ops
    • rdr

      private static BufferedReader rdr
    • atoms

      private SpaceGroupFinder.SGAtom[] 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

      private static int scanTo(int i, String num)
    • getGroupsWithOps

      private Object getGroupsWithOps(String xyzList, float[] unitCellParams, boolean isAssign)
      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 operations
      unitCellParams -
      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

      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==c
      scaling - 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(String[] args)
    • loadData

      private static boolean loadData(Viewer vwr, Object me)
    • getList

      private static String[] getList(Viewer vwr, Object me, String[] list, String fileName) throws IOException
      Throws:
      IOException