Class SymmetryAxes
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
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAxis
(javax.vecmath.Matrix4d axis, int order, CESymmParameters.SymmetryType type) Adds a new axis of symmetry to the bottom level of the treevoid
addAxis
(javax.vecmath.Matrix4d axis, List<List<Integer>> superposition, List<Integer> repeats, Integer division) Deprecated.List<javax.vecmath.Matrix4d>
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.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.getElementaryAxis
(int level) getFirstRepeats
(int level) Get the first repeat index of each axis of a specified level.int
int
Get the number of repeats.getRepeatRelation
(int level) Get the indices of participating repeats in Cauchy two-line form.getRepeatRelation
(int level, int firstRepeat) getRepeatsCyclicForm
(int level) getRepeatsCyclicForm
(int level, int firstRepeat) Get the indices of participating repeats in cyclic form.static String
getRepeatsCyclicForm
(List<List<Integer>> cycleForm, List<?> repeats) getRepeatsCyclicForm
(SymmetryAxes.Axis axis, List<?> repeats) javax.vecmath.Matrix4d
getRepeatTransform
(int repeat) Return the transformation that needs to be applied to a repeat in order to superimpose onto repeat 0.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.Return all symmetry axes of of the structure: the set of axes that describe all parts of the structure.void
updateAxis
(Integer index, javax.vecmath.Matrix4d newAxis) Updates an axis of symmetry, after the superposition changed.
-
Constructor Details
-
SymmetryAxes
public SymmetryAxes()Constructor. Initializes variables only.
-
-
Method Details
-
addAxis
@Deprecated public void addAxis(javax.vecmath.Matrix4d axis, List<List<Integer>> superposition, List<Integer> repeats, Integer division) Deprecated.UseaddAxis(Matrix4d, int, SymmetryType)
instead. Repeats and Superposition are now inferred automatically.Adds a new axis of symmetry. The repeats that participate in this axis and their superposition relation should also be indicated.- Parameters:
axis
- the new axis of symmetry foundsuperposition
- repeats participating and superposition relationrepeats
- number of times the transformation is applied to every repeat. index1=repeat, index2=times.division
- number of parts that this axis divides the structure in- Throws:
IllegalArgumentException
- if the repeat relation is in the wrong format: should be double List of equal sizes.
-
addAxis
Adds a new axis of symmetry to the bottom level of the tree- Parameters:
axis
- the new axis of symmetry foundorder
- number of parts that this axis divides the structure intype
- indicates whether the axis has OPEN or CLOSED symmetry
-
updateAxis
Updates an axis of symmetry, after the superposition changed.- Parameters:
index
- old axis indexnewAxis
-
-
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
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
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:
-
getRepeatRelation
-
getRepeatRelation
-
getRepeatsCyclicForm
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:
-
getRepeatsCyclicForm
-
getRepeatsCyclicForm
-
getRepeatsCyclicForm
-
getRepeatsCyclicForm
-
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
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
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
-
getElementaryAxis
-
getNumLevels
public int getNumLevels()
-
addAxis(Matrix4d, int, SymmetryType)
instead.