public class CrystalCell extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static double |
MIN_VALID_CELL_SIZE |
Constructor and Description |
---|
CrystalCell() |
CrystalCell(double a,
double b,
double c,
double alpha,
double beta,
double gamma) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkScaleMatrix(javax.vecmath.Matrix4d scaleMatrix)
Given a scale matrix parsed from a PDB entry (SCALE1,2,3 records),
compares it to our calculated Mtranspose matrix to see if they coincide and
returns true if they do.
|
boolean |
checkScaleMatrixConsistency(javax.vecmath.Matrix4d scaleMatrix)
Given a scale matrix parsed from the PDB entry (SCALE1,2,3 records),
checks that the matrix is a consistent scale matrix by comparing the
cell volume to the inverse of the scale matrix determinant (tolerance of 1/100).
|
double |
getA() |
double |
getAlpha() |
double |
getB() |
double |
getBeta() |
double |
getC() |
javax.vecmath.Point3i |
getCellIndices(javax.vecmath.Tuple3d pt)
Get the index of a unit cell to which the query point belongs.
|
double |
getGamma() |
double |
getMaxDimension()
Gets the maximum dimension of the unit cell.
|
javax.vecmath.Matrix3d |
getMTranspose() |
double |
getVolume()
Returns the volume of this unit cell.
|
boolean |
isCellReasonable()
Checks whether the dimensions of this crystal cell are reasonable for protein
crystallography: if all 3 dimensions are below 10.0 the cell
is considered unrealistic and false returned
|
void |
setA(double a) |
void |
setAlpha(double alpha) |
void |
setB(double b) |
void |
setBeta(double beta) |
void |
setC(double c) |
void |
setGamma(double gamma) |
String |
toString() |
javax.vecmath.Matrix4d |
transfToCrystal(javax.vecmath.Matrix4d m)
Transform given Matrix4d in orthonormal basis to the crystal basis using
the PDB axes convention (NCODE=1)
|
void |
transfToCrystal(javax.vecmath.Tuple3d v)
Transforms the given orthonormal basis coordinates into crystal coordinates.
|
void |
transfToOriginCell(javax.vecmath.Tuple3d pt)
Converts the coordinates in pt so that they occur within the (0,0,0) unit cell
|
void |
transfToOriginCell(javax.vecmath.Tuple3d[] points,
javax.vecmath.Tuple3d reference)
Converts a set of points so that the reference point falls in the unit cell.
|
javax.vecmath.Matrix4d[] |
transfToOriginCellCrystal(javax.vecmath.Matrix4d[] ops,
javax.vecmath.Tuple3d reference) |
javax.vecmath.Matrix4d[] |
transfToOriginCellOrthonormal(javax.vecmath.Matrix4d[] ops,
javax.vecmath.Tuple3d reference) |
javax.vecmath.Matrix4d |
transfToOrthonormal(javax.vecmath.Matrix4d m)
Transform given Matrix4d in crystal basis to the orthonormal basis using
the PDB axes convention (NCODE=1)
|
void |
transfToOrthonormal(javax.vecmath.Tuple3d v)
Transforms the given crystal basis coordinates into orthonormal coordinates.
|
public static final double MIN_VALID_CELL_SIZE
public CrystalCell()
public CrystalCell(double a, double b, double c, double alpha, double beta, double gamma)
public double getA()
public void setA(double a)
public double getB()
public void setB(double b)
public double getC()
public void setC(double c)
public double getAlpha()
public void setAlpha(double alpha)
public double getBeta()
public void setBeta(double beta)
public double getGamma()
public void setGamma(double gamma)
public double getVolume()
public javax.vecmath.Point3i getCellIndices(javax.vecmath.Tuple3d pt)
For instance, all points in the unit cell at the origin will return (0,0,0); Points in the unit cell one unit further along the `a` axis will return (1,0,0), etc.
pt
- Input point (in orthonormal coordinates)public void transfToOriginCell(javax.vecmath.Tuple3d pt)
pt
- public void transfToOriginCell(javax.vecmath.Tuple3d[] points, javax.vecmath.Tuple3d reference)
points
- A set of points to transform (in orthonormal coordinates)reference
- The reference point, which is unmodified but which would
be in the unit cell were it to have been transformed. It is safe to
use a member of the points array here.public javax.vecmath.Matrix4d[] transfToOriginCellOrthonormal(javax.vecmath.Matrix4d[] ops, javax.vecmath.Tuple3d reference)
ops
- Set of operations in orthonormal coordinatesreference
- Reference point, which should be in the unit cell after
each operation (also in orthonormal coordinates)public javax.vecmath.Matrix4d[] transfToOriginCellCrystal(javax.vecmath.Matrix4d[] ops, javax.vecmath.Tuple3d reference)
ops
- Set of operations in crystal coordinatesreference
- Reference point, which should be in the unit cell after
each operation (also in crystal coordinates)public javax.vecmath.Matrix4d transfToOrthonormal(javax.vecmath.Matrix4d m)
m
- public void transfToOrthonormal(javax.vecmath.Tuple3d v)
v
- public javax.vecmath.Matrix4d transfToCrystal(javax.vecmath.Matrix4d m)
m
- public void transfToCrystal(javax.vecmath.Tuple3d v)
v
- public javax.vecmath.Matrix3d getMTranspose()
public double getMaxDimension()
public boolean checkScaleMatrixConsistency(javax.vecmath.Matrix4d scaleMatrix)
scaleMatrix
- public boolean checkScaleMatrix(javax.vecmath.Matrix4d scaleMatrix)
scaleMatrix
- public boolean isCellReasonable()
Copyright © 2000–2016 BioJava. All rights reserved.