public class Distances
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALPHACARBON |
static int |
CLOSEST |
static int |
CLOSESTHEAVY |
Constructor and Description |
---|
Distances() |
Modifier and Type | Method and Description |
---|---|
static Atom |
findClosestAtom(Structure s,
IndexSet atomset,
IndexSet referenceset)
Returns the atom from a given atom set that is closest to a reference set of atoms
|
static PointList |
findFrameWhereClosest(Trajectory t,
int atomindex1,
int atomindex2)
Returns the frame in which two atoms are closest to each other in a simulation
|
static PointList |
findFrameWhereMostDistant(Trajectory t,
int atomindex1,
int atomindex2)
Returns the frame in which two atoms are most distant from each other in a simulation
|
static Jama.Matrix |
getAtomicDistanceMatrix(Structure s)
Calculates the distance matrix of all atoms in a structure
|
static Jama.Matrix |
getAtomicDistanceMatrix(Structure s,
IndexSet indices)
Calculates the distance matrix of atoms of given indices in a structure
|
static Jama.Matrix |
getAtomicDistanceMatrix(Structure s,
IndexSet indices1,
IndexSet indices2)
Calculates the distance matrix between two sets of atoms
|
static IndexSet |
getAtomIndicesInRadius(Structure s,
Atom atom,
double radius)
Returns the index set of atoms in a structure that are closer to a reference atom than a given radius
|
static IndexSet |
getAtomIndicesInRadius(Structure s,
IndexSet referenceindices,
double radius)
Returns the index set of atoms in a structure that are closer to a reference set of atoms than a given radius
|
static IndexSet |
getAtomIndicesInRadius(Structure s,
IndexSet atomIndices,
IndexSet referenceIndices,
double radius)
Returns the index set of atoms from a set of atoms that are closer to a reference set than a given radius
|
static IndexSet |
getAtomIndicesInRadius(Structure s,
Point3D point,
double radius)
Returns the index set of atoms in a structure that are closer to a reference point than a given radius
|
static Jama.Matrix |
getContactMatrix(PointList points,
double cutoff)
Calculates the contact matrix from a point list
|
static Jama.Matrix |
getContactMatrix(Structure s,
int distanceBetween,
double cutoff)
Calculates the contact matrix of residues in a structure by the given method
|
static Jama.Matrix |
getContactOfMeanMatrix(Trajectory t,
int distanceBetween,
double cutoff)
Calculates the contact matrix based on the mean residue distance matrix in a trajectory
|
static Jama.Matrix |
getDistanceMatrix(PointList points)
Calculates the distance matrix from a point list
|
static double |
getDistanceOfAtomToAtomSet(Structure s,
int atomindex,
IndexSet referenceset)
Calculates the distance of an atom to a reference set of atoms (i.e.
|
static double |
getDistanceOfTwoAtomSets(Structure s,
IndexSet indices1,
IndexSet indices2)
Calculates the distance between two sets of atoms (i.e.
|
static double |
getDistanceRange(Trajectory t,
int atomindex1,
int atomindex2)
Returns the range (max-min) of the distance of two atoms in a trajectory
|
static java.util.ArrayList<java.lang.Double> |
getDistanceTimeSeries(Trajectory t,
IndexSet indices1,
IndexSet indices2)
Returns the time series of the distance of two sets of atoms in a trajectory
|
static java.util.ArrayList<java.lang.Double> |
getDistanceTimeSeries(Trajectory t,
int atomindex,
IndexSet referenceset)
Returns the time series of the distance of a single atom and a set of atoms in a trajectory
|
static java.util.ArrayList<java.lang.Double> |
getDistanceTimeSeries(Trajectory t,
int atomindex1,
int atomindex2)
Returns the time series of the distance of two atoms in a trajectory
|
static FrameIndexSet |
getFramesWhereAtomIsCloseToPoint(Trajectory t,
int atomindex,
Point3D point,
double cutoff)
Returns the list of frames in the trajectory where an atoms is closer to a reference point than a given cutoff
|
static FrameIndexSet |
getFramesWhereAtomIsDistantFromPoint(Trajectory t,
int atomindex,
Point3D point,
double cutoff)
Returns the list of frames in the trajectory where an atoms is more distant from a reference point than a given cutoff
|
static FrameIndexSet |
getFramesWhereAtomsAreClose(Trajectory t,
int atomindex1,
int atomindex2,
double cutoff)
Returns the list of frames in a trajectory where two atoms are closer to each other than the given cutoff
|
static FrameIndexSet |
getFramesWhereAtomsAreDistant(Trajectory t,
int atomindex1,
int atomindex2,
double cutoff)
Returns the list of frames in a trajectory where two atoms are more distant from each other than the given cutoff
|
static Jama.Matrix |
getFrequencyContactMatrix(Trajectory t,
int distanceBetween,
double cutoff,
double frequency)
Calculates the contact matrix of residues where two residues are said to be in contact if they are in contact
in at least the given percentage of frames of the trajectory
|
static double |
getMaximalDistance(Trajectory t,
int atomindex1,
int atomindex2)
Returns the maximal distance of two atoms in a trajectory
|
static Jama.Matrix |
getMeanAtomicDistanceMatrix(Trajectory t)
Calculates the mean distance matrix of all atoms in a trajectory
|
static Jama.Matrix |
getMeanAtomicDistanceMatrix(Trajectory t,
IndexSet indices)
Calculates the mean distance matrix of atoms of given indices in a trajectory
|
static double |
getMeanDistance(Trajectory t,
int atomindex1,
int atomindex2)
Returns the mean of the distance of two atoms in a trajectory
|
static Jama.Matrix |
getMeanResidueDistanceMatrix(Trajectory t,
int distanceBetween)
Calculates the mean distance matrix of residues in a trajectory by the given method
|
static double |
getMinimalDistance(Trajectory t,
int atomindex1,
int atomindex2)
Returns the minimal distance of two atoms in a trajectory
|
static Jama.Matrix |
getResidueDistanceMatrix(Structure s,
int distanceBetween)
Calculates the distance matrix of residues in a structure by the given method
|
static double |
getVarianceOfDistance(Trajectory t,
int atomindex1,
int atomindex2)
Returns the variance of the distance of two atoms in a trajectory
|
public static final int ALPHACARBON
public static final int CLOSEST
public static final int CLOSESTHEAVY
public static Jama.Matrix getDistanceMatrix(PointList points)
points
- point listpublic static Jama.Matrix getAtomicDistanceMatrix(Structure s)
s
- structurepublic static Jama.Matrix getAtomicDistanceMatrix(Structure s, IndexSet indices)
s
- structureindices
- index setpublic static Jama.Matrix getAtomicDistanceMatrix(Structure s, IndexSet indices1, IndexSet indices2)
s
- structureindices1
- index set 1indices2
- index set 2public static Jama.Matrix getResidueDistanceMatrix(Structure s, int distanceBetween)
s
- structuredistanceBetween
- which atoms are used for calculating the distances (ALPHACARBON: alpha carbon atoms,
CLOSEST: closest atoms of two residues, CLOSESTHEAVY: closest heavy atoms of two residues)public static Jama.Matrix getMeanAtomicDistanceMatrix(Trajectory t)
t
- trajecotrypublic static Jama.Matrix getMeanAtomicDistanceMatrix(Trajectory t, IndexSet indices)
t
- trajecotryindices
- index setpublic static Jama.Matrix getMeanResidueDistanceMatrix(Trajectory t, int distanceBetween)
t
- trajectorydistanceBetween
- which atoms are used for calculating the distances (ALPHACARBON: alpha carbon atoms,
CLOSEST: closest atoms of two residues, CLOSESTHEAVY: closest heavy atoms of two residues)public static Jama.Matrix getContactMatrix(PointList points, double cutoff)
points
- point listcutoff
- distance cutoffpublic static Jama.Matrix getContactMatrix(Structure s, int distanceBetween, double cutoff)
s
- structuredistanceBetween
- which atoms are used for calculating the distances (ALPHACARBON: alpha carbon atoms,
CLOSEST: closest atoms of two residues, CLOSESTHEAVY: closest heavy atoms of two residues)cutoff
- distance cutoffpublic static Jama.Matrix getContactOfMeanMatrix(Trajectory t, int distanceBetween, double cutoff)
t
- trajectorydistanceBetween
- which atoms are used for calculating the distances (ALPHACARBON: alpha carbon atoms,
CLOSEST: closest atoms of two residues, CLOSESTHEAVY: closest heavy atoms of two residues)cutoff
- distance cutoffpublic static Jama.Matrix getFrequencyContactMatrix(Trajectory t, int distanceBetween, double cutoff, double frequency)
t
- trajectorydistanceBetween
- which atoms are used for calculating the distances (ALPHACARBON: alpha carbon atoms,
CLOSEST: closest atoms of two residues, CLOSESTHEAVY: closest heavy atoms of two residues)cutoff
- distance cutofffrequency
- minimal frequency of frames in which two residues are in contactpublic static java.util.ArrayList<java.lang.Double> getDistanceTimeSeries(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static java.util.ArrayList<java.lang.Double> getDistanceTimeSeries(Trajectory t, int atomindex, IndexSet referenceset)
t
- trajectoryatomindex
- index of atomreferenceset
- index set of reference atomspublic static java.util.ArrayList<java.lang.Double> getDistanceTimeSeries(Trajectory t, IndexSet indices1, IndexSet indices2)
t
- trajectoryindices1
- first index setindices2
- second index setpublic static double getMeanDistance(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static double getVarianceOfDistance(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static double getMinimalDistance(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static double getMaximalDistance(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static double getDistanceRange(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static IndexSet getAtomIndicesInRadius(Structure s, Point3D point, double radius)
s
- structurepoint
- reference pointradius
- distance radiuspublic static IndexSet getAtomIndicesInRadius(Structure s, Atom atom, double radius)
s
- structureatom
- reference atomradius
- distance radiuspublic static IndexSet getAtomIndicesInRadius(Structure s, IndexSet referenceindices, double radius)
s
- structurereferenceindices
- index set of reference atomsradius
- distance radiuspublic static IndexSet getAtomIndicesInRadius(Structure s, IndexSet atomIndices, IndexSet referenceIndices, double radius)
s
- structureatomIndices
- index set of atoms testedreferenceIndices
- index set of reference atomsradius
- distance radiuspublic static PointList findFrameWhereClosest(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static PointList findFrameWhereMostDistant(Trajectory t, int atomindex1, int atomindex2)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atompublic static double getDistanceOfAtomToAtomSet(Structure s, int atomindex, IndexSet referenceset)
s
- structureatomindex
- index of atomreferenceset
- index set of reference atomspublic static double getDistanceOfTwoAtomSets(Structure s, IndexSet indices1, IndexSet indices2)
s
- structureindices1
- first index setindices2
- second index setpublic static Atom findClosestAtom(Structure s, IndexSet atomset, IndexSet referenceset)
s
- structureatomset
- index set of atomsreferenceset
- index set of reference atomspublic static FrameIndexSet getFramesWhereAtomsAreClose(Trajectory t, int atomindex1, int atomindex2, double cutoff)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atomcutoff
- distance cutoffpublic static FrameIndexSet getFramesWhereAtomsAreDistant(Trajectory t, int atomindex1, int atomindex2, double cutoff)
t
- trajectoryatomindex1
- index of first atomatomindex2
- index of second atomcutoff
- distance cutoffpublic static FrameIndexSet getFramesWhereAtomIsCloseToPoint(Trajectory t, int atomindex, Point3D point, double cutoff)
t
- trajectoryatomindex
- index of atompoint
- reference pointcutoff
- distance cutoffpublic static FrameIndexSet getFramesWhereAtomIsDistantFromPoint(Trajectory t, int atomindex, Point3D point, double cutoff)
t
- trajectoryatomindex
- index of atompoint
- reference pointcutoff
- distance cutoff