Class SymmetryAxes


  • public class SymmetryAxes
    extends Object
    Data Structure that stores all the symmetry axis that describe the symmetry of a structure. Generalizes to all types of symmetry, the classic ones (Cn, Dn) and any hierarchical or local symmetries.

    Hierarchical symmetry can be visualized as a tree, where each level has a fixed branching factor. Each level of the tree is associated with a transformation operator, whose order determines the degree of nodes at that level of the tree. Leaves of the tree implicitly represent aligned repeats (indexed 0 to n-1), so care must be taken to keep external references to the repeats (e.g. rows of a MultipleAlignment in the same order implied by the tree.

    Each node of the tree specifies an alignment between those repeats below each of its children. It is also associated with a symmetry axis, which is calculated based on the associated operator as well as any parent operators. It also stores the parts of the structure (symmetric units) involved in each axis, in addition to the way to calculate them.

    This is intended to provide a general axis support for the multiple repeat alignment optimization and the axis display in Jmol. This object is related to a MultipleAlignment object that defines the symmetric units.

    Since:
    4.2.0
    Author:
    Aleix Lafita
    • Constructor Detail

      • SymmetryAxes

        public SymmetryAxes()
        Constructor. Initializes variables only.
    • Method Detail

      • addAxis

        public void addAxis​(javax.vecmath.Matrix4d axis,
                            int order,
                            CESymmParameters.SymmetryType type)
        Adds a new axis of symmetry to the bottom level of the tree
        Parameters:
        axis - the new axis of symmetry found
        order - number of parts that this axis divides the structure in
        type - indicates whether the axis has OPEN or CLOSED symmetry
      • updateAxis

        public void updateAxis​(Integer index,
                               javax.vecmath.Matrix4d newAxis)
        Updates an axis of symmetry, after the superposition changed.
        Parameters:
        index - old axis index
        newAxis -
      • getElementaryAxes

        public List<javax.vecmath.Matrix4d> getElementaryAxes()
        Return the operator for all elementary axes of symmetry of the structure, that is, the axes stored in the List as unique and from which all the symmetry axes are constructed.
        Returns:
        axes elementary axes of symmetry.
      • getElementaryAxesObjects

        public List<SymmetryAxes.AxisgetElementaryAxesObjects()
        Return all elementary axes of symmetry of the structure, that is, the axes stored in the List as unique and from which all the symmetry axes are constructed.
        Returns:
        axes elementary axes of symmetry.
      • getRepeatRelation

        public List<List<Integer>> getRepeatRelation​(int level)
        Get the indices of participating repeats in Cauchy two-line form.

        Returns two lists of the same length. The first gives a list of all repeat indices which are aligned at the specified level of symmetry (e.g. 0 through the degree of this level). The second list gives the corresponding repeats after applying the operator once.

        Parameters:
        level - the axis index
        Returns:
        the double List of repeat relations, or null if the level is invalid
        See Also:
        for an equivalent specification with half the memory
      • getRepeatsCyclicForm

        public List<List<Integer>> getRepeatsCyclicForm​(int level,
                                                        int firstRepeat)
        Get the indices of participating repeats in cyclic form.

        Each inner list gives a set of equivalent repeats and should have length equal to the order of the axis' operator.

        Parameters:
        level -
        firstRepeat -
        Returns:
      • getRepeatTransform

        public javax.vecmath.Matrix4d getRepeatTransform​(int repeat)
        Return the transformation that needs to be applied to a repeat in order to superimpose onto repeat 0.
        Parameters:
        repeat - the repeat index
        Returns:
        transformation matrix for the repeat
      • getRepeatTransform

        public javax.vecmath.Matrix4d getRepeatTransform​(int x,
                                                         int y)
        Return the transformation that needs to be applied to repeat x in order to superimpose onto repeat y.
        Parameters:
        x - the first repeat index (transformed)
        y - the second repeat index (fixed)
        Returns:
        transformation matrix for the repeat x
      • getSymmetryAxes

        public List<SymmetryAxes.AxisgetSymmetryAxes()
        Return all symmetry axes of of the structure: the set of axes that describe all parts of the structure. This combines the elementary axes to generate all possible axes. The axes are returned in the repeat degrees.
        Returns:
        axes all symmetry axes of the structure.
      • getNumRepeats

        public int getNumRepeats()
        Get the number of repeats. This is equal to the product of all degrees.
        Returns:
        Number of repeats (leaves of the tree).
      • getFirstRepeats

        public List<IntegergetFirstRepeats​(int level)
        Get the first repeat index of each axis of a specified level.
        Parameters:
        level - level of the tree to cut at
        Returns:
        List of first Repeats of each index, sorted in ascending order