Package org.jmol.util
Class Tensor
java.lang.Object
org.jmol.util.Tensor
- Author:
- Bob Hanson hansonr@stolaf.edu 6/30/2013, Simone Sturniolo
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble[][]
int
int
int
float[]
V3[]
boolean
boolean
boolean
boolean
int
int
float[]
double[][]
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionTensor()
Although this constructor is public, to be a valid tensor, one must invoke one of the "setFrom" methods. -
Method Summary
Modifier and TypeMethodDescriptionfloat
anisotropy = directed distance from (center of two closest) to (the furthest)float
asymmetry = deviation from a symmetric tensorfloat
getFactoredValue
(int i) Returns a factored eigenvalue; thermal ellipsoids use sqrt(abs(eigenvalue)) for ellipsoid axes; others use just use abs(eigenvalue); all cases get factored by typeFactorreturns an object of the specified type, including "eigenvalues", "eigenvectors", "asymmetric", "symmetric", "trace", "indices", and "type"boolean
static boolean
isFloatInfo
(String infoType) float
isotropy()
isotropy = average of eigenvaluesboolean
isSelected
(BS bsSelected, int iAtom) float
reduced anisotropy = largest difference from isotropy (may be negative)void
setAtomIndexes
(int index1, int index2) setFromAsymmetricTensor
(double[][] asymmetricTensor, String type, String id) Standard constructor for QM tensorssetFromAxes
(V3[] axes) Standard constructor for ellipsoids based on axessetFromEigenVectors
(T3[] eigenVectors, float[] eigenValues, String type, String id, Tensor t) Standard constructor for charge and iso.setFromThermalEquation
(double[] coefs, String id) standard constructor for thermal ellipsoids convention beta (see http://www.iucr.org/iucr-top/comm/cnom/adp/finrepone/finrepone.html)Note that type may be null here to skip type initialization and allow later setting of type; this should be used with care.float
skew()
a measure of asymmetry.float
span()
width of the signal; |e2 - e0|toString()
-
Field Details
-
id
-
type
-
iType
public int iType -
TYPE_OTHER
public static final int TYPE_OTHER- See Also:
-
TYPE_ISO
public static final int TYPE_ISO- See Also:
-
TYPE_ADP
public static final int TYPE_ADP- See Also:
-
TYPE_TLS_U
public static final int TYPE_TLS_U- See Also:
-
TYPE_TLS_R
public static final int TYPE_TLS_R- See Also:
-
TYPE_MS
public static final int TYPE_MS- See Also:
-
TYPE_EFG
public static final int TYPE_EFG- See Also:
-
TYPE_ISC
public static final int TYPE_ISC- See Also:
-
TYPE_CHARGE
public static final int TYPE_CHARGE- See Also:
-
TYPE_QUADRUPOLE
public static final int TYPE_QUADRUPOLE- See Also:
-
TYPE_RAMAN
public static final int TYPE_RAMAN- See Also:
-
TYPE_CSA
public static final int TYPE_CSA- See Also:
-
asymMatrix
public double[][] asymMatrix -
symMatrix
public double[][] symMatrix -
eigenVectors
-
eigenValues
public float[] eigenValues -
parBorU
public float[] parBorU -
altType
-
isIsotropic
public boolean isIsotropic -
forThermalEllipsoid
public boolean forThermalEllipsoid -
eigenSignMask
public int eigenSignMask -
modelIndex
public int modelIndex -
atomIndex1
public int atomIndex1 -
atomIndex2
public int atomIndex2 -
isModulated
public boolean isModulated -
isUnmodulated
public boolean isUnmodulated
-
-
Constructor Details
-
Tensor
public Tensor()Although this constructor is public, to be a valid tensor, one must invoke one of the "setFrom" methods. These had been static, but it turns out when that is the case, then JavaScript versions cannot be modularized to omit this class along with Eigen. So the general full constructor would look something like: new Tensor().setFrom...(....)
-
-
Method Details
-
isFloatInfo
-
getInfo
returns an object of the specified type, including "eigenvalues", "eigenvectors", "asymmetric", "symmetric", "trace", "indices", and "type"- Parameters:
infoType
-- Returns:
- Object or null
-
isotropy
public float isotropy()isotropy = average of eigenvalues- Returns:
- isotropy
-
span
public float span()width of the signal; |e2 - e0|- Returns:
- unitless; >= 0
-
skew
public float skew()a measure of asymmetry.- Returns:
- range [-1, 1]
-
anisotropy
public float anisotropy()anisotropy = directed distance from (center of two closest) to (the furthest)- Returns:
- unitless number
-
reducedAnisotropy
public float reducedAnisotropy()reduced anisotropy = largest difference from isotropy (may be negative)- Returns:
- unitless number
-
asymmetry
public float asymmetry()asymmetry = deviation from a symmetric tensor- Returns:
- range [0,1]
-
copyTensor
-
setFromAsymmetricTensor
Standard constructor for QM tensors- Parameters:
asymmetricTensor
-type
-id
-- Returns:
- this
-
setFromEigenVectors
public Tensor setFromEigenVectors(T3[] eigenVectors, float[] eigenValues, String type, String id, Tensor t) Standard constructor for charge and iso.- Parameters:
eigenVectors
-eigenValues
-type
-id
-t
-- Returns:
- this
-
setFromAxes
Standard constructor for ellipsoids based on axes- Parameters:
axes
-- Returns:
- Tensor
-
setFromThermalEquation
standard constructor for thermal ellipsoids convention beta (see http://www.iucr.org/iucr-top/comm/cnom/adp/finrepone/finrepone.html)- Parameters:
coefs
-id
-- Returns:
- this
-
setType
Note that type may be null here to skip type initialization and allow later setting of type; this should be used with care.- Parameters:
type
-- Returns:
- "this" for convenience only
-
getFactoredValue
public float getFactoredValue(int i) Returns a factored eigenvalue; thermal ellipsoids use sqrt(abs(eigenvalue)) for ellipsoid axes; others use just use abs(eigenvalue); all cases get factored by typeFactor- Parameters:
i
-- Returns:
- factored eigenvalue
-
setAtomIndexes
public void setAtomIndexes(int index1, int index2) -
isSelected
-
isEquiv
-
toString
-