# Class Measurement

java.lang.Object
org.jmol.modelset.Measurement

Direct Known Subclasses:
  `MeasurementPending`

public class Measurement extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`short`
`colix`
`int`
`count`
`int[]`
`countPlusIndices`
`float`
`fixedValue`
`int`
`index`
`boolean`
`inFront`
`boolean`
`isHidden`
`boolean`
`isTrajectory`
`boolean`
`isValid`
`boolean`
`isVisible`
`short`
`labelColix`
`int`
`mad`
`int`
`modelIndex`
`ModelSet`
`ms`
`static final int`
`NMR_DC`
`static final int`
`NMR_JC`
`static final int`
`NMR_NOE_OR_J`
`static final int`
`NMR_NOT`
`String`
`property`
`Point3fi[]`
`pts`
`P3`
`renderArc`
`A4`
`renderAxis`
`String`
`strFormat`
`Text`
`text`
`String`
`thisID`
`TickInfo`
`tickInfo`
`int`
`traceX`
`int`
`traceY`
`String`
`units`
`float`
`value`

## Constructor Summary

Constructors
Constructor
Description
`Measurement()`

## Method Summary

Modifier and Type
Method
Description
`static int`
`find(Lst<Measurement> measurements, Measurement m)`
`static String`
`fixUnits(String u)`
`float`
`fixValue(String units, boolean andRound)`
`void`
`formatMeasurement(String units)`
`void`
`formatMeasurementAs(String strFormat, String units, boolean useDefault)`
`static float`
`fromUnits(float dist, String units)`
`Point3fi`
`getAtom(int n)`
`int`
`getAtomIndex(int n)`
`String`
`getDistanceFormatForState()`
`String`
`getInfoAsString(String units)`
`String`
`getLabel(int i, boolean asBitSet, boolean withModelIndex)`
`int`
`getLastIndex()`
`float`
`getMeasurement(Point3fi[] pts)`
`String`
`getMeasurementScript(String sep, boolean withModelIndex)`
Used by MouseManager and Picking Manager to build the script
`float`
`getPropMeasurement(Point3fi[] pts)`
`String`
`getString()`
`String`
`getStringDetail()`
`boolean`
`isConnected(Atom[] atoms, int count)`
`boolean`
`isInRange(RadiusData radiusData, float value)`
`boolean`
`isIntramolecular(Atom[] atoms, int count)`
`boolean`
`isMin(Map<String,Integer> htMin)`
`boolean`
`isTainted()`
`static boolean`
`isUnits(String s)`
`boolean`
`isValid()`
`static int`
`nmrType(String units)`
`void`
`reformatDistanceIfSelected(boolean isDefault)`
`void`
`refresh(Point3fi[] pts)`
`boolean`
`sameAs(int i, int j)`
`boolean`
`sameAsPoints(int[] indices, Point3fi[] points)`
`void`
`setCount(int count)`
`protected void`
`setCountM(int count)`
`void`
`setFromMD(MeasurementData md, boolean andText)`
`Measurement`
`setM(ModelSet modelSet, Measurement m, float value, short colix, String strFormat, int index)`
`void`
`setModelIndex(int modelIndex)`
`Measurement`
`setPoints(ModelSet modelSet, int[] indices, Point3fi[] points, TickInfo tickInfo)`
`String`
`toString()`
`static float`
`toUnits(float dist, String units, boolean andRound)`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### ms

public ModelSet ms

### thisID

public String thisID

### index

public int index

### isVisible

public boolean isVisible

### isHidden

public boolean isHidden

### isTrajectory

public boolean isTrajectory

### isValid

public boolean isValid

### colix

public short colix

### labelColix

public short labelColix

### mad

public int mad

### tickInfo

public TickInfo tickInfo

### traceX

public int traceX

### traceY

public int traceY

### count

public int count

### countPlusIndices

public int[] countPlusIndices

### pts

public Point3fi[] pts

### value

public float value

### property

public String property

### strFormat

public String strFormat

### units

public String units

### text

public Text text

### renderAxis

public A4 renderAxis

### renderArc

public P3 renderArc

### fixedValue

public float fixedValue

### inFront

public boolean inFront

### modelIndex

public int modelIndex

### NMR_NOT

public static final int NMR_NOT

See Also:
  - Constant Field Values

### NMR_DC

public static final int NMR_DC

See Also:
  - Constant Field Values

### NMR_JC

public static final int NMR_JC

See Also:
  - Constant Field Values

### NMR_NOE_OR_J

public static final int NMR_NOE_OR_J

See Also:
  - Constant Field Values

## Constructor Details

### Measurement

public Measurement()

## Method Details

### isTainted

public boolean isTainted()

### setM

public Measurement setM(ModelSet modelSet, Measurement m, float value, short colix, String strFormat, int index)

### setPoints

public Measurement setPoints(ModelSet modelSet, int[] indices, Point3fi[] points, TickInfo tickInfo)

### setCount

public void setCount(int count)

### setCountM

protected void setCountM(int count)

### getAtomIndex

public int getAtomIndex(int n)

### getAtom

public Point3fi getAtom(int n)

### getLastIndex

public int getLastIndex()

### getString

public String getString()

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getStringDetail

public String getStringDetail()

### refresh

public void refresh(Point3fi[] pts)

### getMeasurementScript

public String getMeasurementScript(String sep, boolean withModelIndex)
Used by MouseManager and Picking Manager to build the script

Parameters:
  `sep` -
  `withModelIndex` - is needed for points only
Returns:
  ((1}) ({2})....

### formatMeasurementAs

public void formatMeasurementAs(String strFormat, String units, boolean useDefault)

### formatMeasurement

public void formatMeasurement(String units)

### reformatDistanceIfSelected

public void reformatDistanceIfSelected(boolean isDefault)

### fixValue

public float fixValue(String units, boolean andRound)

Parameters:
  `units` - final units
  `andRound` -
Returns:
  float value

### nmrType

public static int nmrType(String units)

### sameAsPoints

public boolean sameAsPoints(int[] indices, Point3fi[] points)

### sameAs

public boolean sameAs(int i, int j)

### getPropMeasurement

public float getPropMeasurement(Point3fi[] pts)

### getMeasurement

public float getMeasurement(Point3fi[] pts)

### getLabel

public String getLabel(int i, boolean asBitSet, boolean withModelIndex)

### setModelIndex

public void setModelIndex(int modelIndex)

### isValid

public boolean isValid()

### find

public static int find(Lst<Measurement> measurements, Measurement m)

### isConnected

public boolean isConnected(Atom[] atoms, int count)

### getInfoAsString

public String getInfoAsString(String units)

### isInRange

public boolean isInRange(RadiusData radiusData, float value)

### isIntramolecular

public boolean isIntramolecular(Atom[] atoms, int count)

### isMin

public boolean isMin(Map<String,Integer> htMin)

### isUnits

public static boolean isUnits(String s)

### toUnits

public static float toUnits(float dist, String units, boolean andRound)

### fromUnits

public static float fromUnits(float dist, String units)

### fixUnits

public static String fixUnits(String u)

### getDistanceFormatForState

public String getDistanceFormatForState()

### setFromMD

public void setFromMD(MeasurementData md, boolean andText)