public class SymmetryAxes extends Object
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.
Modifier and Type | Class and Description |
---|---|
static class |
SymmetryAxes.Axis
Represents an axis of symmetry
|
Constructor and Description |
---|
SymmetryAxes()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAxis(javax.vecmath.Matrix4d axis,
int order,
CESymmParameters.SymmetryType type)
Adds a new axis of symmetry to the bottom level of the tree
|
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.
|
List<SymmetryAxes.Axis> |
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.
|
SymmetryAxes.Axis |
getElementaryAxis(int level) |
List<Integer> |
getFirstRepeats(int level)
Get the first repeat index of each axis of a specified level.
|
int |
getNumLevels() |
int |
getNumRepeats()
Get the number of repeats.
|
List<List<Integer>> |
getRepeatRelation(int level)
Get the indices of participating repeats in Cauchy two-line form.
|
List<List<Integer>> |
getRepeatRelation(int level,
int firstRepeat) |
List<List<Integer>> |
getRepeatRelation(SymmetryAxes.Axis axis) |
List<List<Integer>> |
getRepeatsCyclicForm(int level) |
List<List<Integer>> |
getRepeatsCyclicForm(int level,
int firstRepeat)
Get the indices of participating repeats in cyclic form.
|
static String |
getRepeatsCyclicForm(List<List<Integer>> cycleForm,
List<?> repeats) |
List<List<Integer>> |
getRepeatsCyclicForm(SymmetryAxes.Axis axis) |
String |
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.
|
List<SymmetryAxes.Axis> |
getSymmetryAxes()
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.
|
public SymmetryAxes()
public void addAxis(javax.vecmath.Matrix4d axis, int order, CESymmParameters.SymmetryType type)
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 symmetrypublic void updateAxis(Integer index, javax.vecmath.Matrix4d newAxis)
index
- old axis indexnewAxis
- public List<javax.vecmath.Matrix4d> getElementaryAxes()
public List<SymmetryAxes.Axis> getElementaryAxesObjects()
public List<List<Integer>> getRepeatRelation(int level)
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.
level
- the axis indexfor an equivalent specification with half the memory
public List<List<Integer>> getRepeatRelation(SymmetryAxes.Axis axis)
public List<List<Integer>> getRepeatRelation(int level, int firstRepeat)
public List<List<Integer>> getRepeatsCyclicForm(int level, int firstRepeat)
Each inner list gives a set of equivalent repeats and should have length equal to the order of the axis' operator.
level
- firstRepeat
- public List<List<Integer>> getRepeatsCyclicForm(SymmetryAxes.Axis axis)
public List<List<Integer>> getRepeatsCyclicForm(int level)
public String getRepeatsCyclicForm(SymmetryAxes.Axis axis, List<?> repeats)
public static String getRepeatsCyclicForm(List<List<Integer>> cycleForm, List<?> repeats)
public javax.vecmath.Matrix4d getRepeatTransform(int repeat)
repeat
- the repeat indexpublic javax.vecmath.Matrix4d getRepeatTransform(int x, int y)
x
- the first repeat index (transformed)y
- the second repeat index (fixed)public List<SymmetryAxes.Axis> getSymmetryAxes()
public int getNumRepeats()
public List<Integer> getFirstRepeats(int level)
level
- level of the tree to cut atpublic SymmetryAxes.Axis getElementaryAxis(int level)
public int getNumLevels()
Copyright © 2000–2018 BioJava. All rights reserved.