Class BiologicalAssemblyTransformation
java.lang.Object
org.biojava.nbio.structure.quaternary.BiologicalAssemblyTransformation
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<BiologicalAssemblyTransformation>
public class BiologicalAssemblyTransformation
extends Object
implements Cloneable, Comparable<BiologicalAssemblyTransformation>, Serializable
The transformation needed for generation of biological assemblies
from the contents of a PDB/mmCIF file. It contains both the actual
transformation (rotation+translation) and the chain identifier to
which it should be applied.
- Author:
- Peter Rose, Andreas Prlic, rickb, Jose Duarte
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorCopy Constructor -
Method Summary
Modifier and TypeMethodDescriptioncombine(BiologicalAssemblyTransformation matrix1, BiologicalAssemblyTransformation matrix2) Returns the combination (product) of two biological assembly transformations.intstatic List<BiologicalAssemblyTransformation> fromMultiXML(String xml) Returns the chain identifier (asym id) that this transformation should be applied to.getId()Returns the identifier for this biological assembly transformation.javax.vecmath.Matrix4dReturn the transformation (both rotational and translational component) as a 4x4 transformation matrix.booleanTells whether this transformation is in identity.static StringrotMatrixToString(javax.vecmath.Matrix4d m) voidsetChainId(String chainId) Sets the chain identifier (asym id) that this transformation should be applied to.voidSets the identifier for this biological assembly transformation.voidsetRotationMatrix(double[][] m) voidsetTransformationMatrix(javax.vecmath.Matrix4d transformation) Sets the transformation using a 4x4 transformation matrixvoidsetTranslation(double[] t) toString()toXML()voidtoXML(PrettyXMLWriter xml) voidtransformPoint(double[] point) Applies the transformation to given point.static StringtranslVecToString(javax.vecmath.Matrix4d m)
-
Constructor Details
-
BiologicalAssemblyTransformation
public BiologicalAssemblyTransformation()Default Constructor -
BiologicalAssemblyTransformation
Copy Constructor- Parameters:
src-
-
-
Method Details
-
setId
Sets the identifier for this biological assembly transformation. This is usually the model number used in the biological assembly files.- Parameters:
id-
-
getId
Returns the identifier for this biological assembly transformation.- Returns:
- biological assembly transformation identifier
-
setChainId
Sets the chain identifier (asym id) that this transformation should be applied to.- Parameters:
chainId-
-
getChainId
Returns the chain identifier (asym id) that this transformation should be applied to.- Returns:
- chain identifier
-
setTransformationMatrix
Sets the transformation using a 4x4 transformation matrix- Parameters:
transformation-
-
getTransformationMatrix
Return the transformation (both rotational and translational component) as a 4x4 transformation matrix. The transformation is in orthonormal (cartesian coordinates). If required to be converted to crystal coordinates then useCrystalCell.transfToCrystal(Matrix4d)Note that this is a reference to the variable, thus it remains linked to this object's transformation field. The user must deep copy it if need changing it.- Returns:
- 4x4 transformation matrix
-
setRotationMatrix
-
setTranslation
-
transformPoint
Applies the transformation to given point. -
combine
public static BiologicalAssemblyTransformation combine(BiologicalAssemblyTransformation matrix1, BiologicalAssemblyTransformation matrix2) Returns the combination (product) of two biological assembly transformations.- Parameters:
matrix1-matrix2-- Returns:
- combined transformation
-
isIdentity
Tells whether this transformation is in identity.- Returns:
-
toXML
- Throws:
IOException
-
toXML
- Throws:
IOException
-
fromXML
public static BiologicalAssemblyTransformation fromXML(String xml) throws SAXException, IOException, ParserConfigurationException -
fromMultiXML
public static List<BiologicalAssemblyTransformation> fromMultiXML(String xml) throws ParserConfigurationException, SAXException, IOException -
toString
-
rotMatrixToString
-
translVecToString
-
compareTo
- Specified by:
compareToin interfaceComparable<BiologicalAssemblyTransformation>
-