Package chemaxon.calculations.nmr
Class Multiplet
java.lang.Object
chemaxon.calculations.nmr.Multiplet
Class for NMR multiplets.
- Since:
- 5.7
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAtom
(int index) Adds a new atom to this multiplet.void
addCouplingConstants
(double[] couplings) Adds a new coupling constant array.void
convert
(double scaleForShift, double scaleForCoupling) Multiplies the parameters of this multiplet (unit conversion).void
Generates the line positions and intensities of this multiplet.int
Returns the number of atoms in the multiplet.int
getAtomIndex
(int i) Returns the index of the ith atom of this multiplet.int[]
Returns the indices of the atoms of this multiplet.int[]
double[]
getCouplingConstants
(int i) Returns the coupling constants of the ith atom in this multiplet.double[]
getCouplingConstants
(int i, NMRSpectrum.Unit unit) Returns the coupling constants of the ith atom in this multiplet.boolean
Returns whether spin-spin couplings are taken into account.double
Returns the default value of the multiplet function.double
Returns the upper end of this multiplet.double
Returns the lower end of this multiplet.double
Returns the freuency in MHz.double
Returns the scaling parameter for the function of this multiplet.double
Returns the half-width of the NMR lines.double
getIntensity
(int i) Returns the intensity of the ith line.int[]
Returns the intensity pattern of this multiplet.double[]
Returns the local maximum places of the multiplet in ascending order.int[]
getMultiplicities
(int i) Returns the multiplicities of the ith atom of the multiplet.int
Returns the net intensity of this multiplet which corresponds to the number of atoms in the multiplet.int
Returns the number of NMR lines in this multiplet.double[]
Returns the array of peak upper ends.double
getPeakDomainMax
(int i) Returns the upper end of the ith peak.double[]
Returns the array of peak lower ends.double
getPeakDomainMin
(int i) Returns the lower end of the ith peak.double
getPosition
(int i) Returns the position of the ith NMR line.double
getShift()
Returns the chemical shift.double
Returns the estimated error of the chemical shift.chemaxon.calculations.nmr.NMRCoefficient.ErrorClassification
Returns error classification of the chemical shift.getUnit()
Return the unit.double
getValueAt
(double location) Returns the value of the multiplet function at a given point.void
setAtomIndex
(int i, int index) Sets the index of the ith atom of this multiplet.void
setAtomIndices
(int[] atomIndices) sets the indices of the atoms of this multiplet.void
setCouplingNeeded
(boolean couplingNeeded) Sets whether spin-spin couplings are taken into account.void
setDomainMax
(double domainMax) Sets the upper end of this multiplet.void
setDomainMin
(double domainMin) Sets the lower end of this multiplet.void
setFunctionScale
(double functionScale) Sets the scaling parameter for the function of this multiplet.void
setHalfWidth
(double halfWidth) Sets the half-width of the NMR lines.void
setIntensity
(int i, double intensity) Sets the intensity of the ith NMR line.void
setPeakDomainMax
(double[] peakDomainMax) Sets the array of peak upper ends.void
setPeakDomainMax
(int i, double value) Sets the upper end of the ith peak.void
setPeakDomainMin
(double[] peakDomainMin) Sets the array of peak lower ends.void
setPeakDomainMin
(int i, double value) Sets the lower end of the ith peak.void
setPosition
(int i, double position) Sets the position of the ith NMR line.void
setShift
(double shift) Sets the chemical shift.void
setShiftError
(double shiftError) Sets the estimated error of the chemical shift.void
setShiftErrorClassification
(chemaxon.calculations.nmr.NMRCoefficient.ErrorClassification shiftErrorClassification) Sets error classification of the chemical shift.toString()
-
Constructor Details
-
Multiplet
public Multiplet(boolean couplingNeeded) Constructor.- Parameters:
couplingNeeded
- True if spin-spin couplings are taken into account.
-
-
Method Details
-
generateMultiplet
public void generateMultiplet()Generates the line positions and intensities of this multiplet. -
getMultiplicities
public int[] getMultiplicities(int i) Returns the multiplicities of the ith atom of the multiplet.- Parameters:
i
- means that the ith atom of this multiplet is examined.- Returns:
- Multiplicities of the ith atom of the multiplet.
-
addAtom
public void addAtom(int index) Adds a new atom to this multiplet.- Parameters:
index
- Index of the atom to be added.
-
convert
public void convert(double scaleForShift, double scaleForCoupling) Multiplies the parameters of this multiplet (unit conversion).- Parameters:
scaleForShift
- Multiplicative factor for chemical shift-like quantities.scaleForCoupling
- Multiplicative factor for coupling constant-like quantities.
-
getShift
public double getShift()Returns the chemical shift.- Returns:
- Chemical shift.
-
setShift
public void setShift(double shift) Sets the chemical shift.- Parameters:
shift
- Chemical shift.
-
getNetIntensity
public int getNetIntensity()Returns the net intensity of this multiplet which corresponds to the number of atoms in the multiplet.- Returns:
- Net intensity.
-
getAtomCount
public int getAtomCount()Returns the number of atoms in the multiplet.- Returns:
- NUmber of atoms.
-
getNumberOfLines
public int getNumberOfLines()Returns the number of NMR lines in this multiplet.- Returns:
- Number of NMR lines.
-
getPosition
public double getPosition(int i) Returns the position of the ith NMR line.- Parameters:
i
- Number of the NMR line.- Returns:
- Position of the ith NMR line.
-
setPosition
public void setPosition(int i, double position) Sets the position of the ith NMR line.- Parameters:
i
- Number of the NMR line.position
- Position of the ith NMR line.
-
getIntensity
public double getIntensity(int i) Returns the intensity of the ith line.- Parameters:
i
- Number of the NMR line.- Returns:
- Intensity of the ith line.
-
setIntensity
public void setIntensity(int i, double intensity) Sets the intensity of the ith NMR line.- Parameters:
i
- Number of the NMR line.intensity
- Intensity of the ith NMR line.
-
getIntesityPattern
public int[] getIntesityPattern()Returns the intensity pattern of this multiplet.- Returns:
- Array of intensity pattern or empty array if there are no NMR lines in this multiplet.
-
getAtomIndices
public int[] getAtomIndices()Returns the indices of the atoms of this multiplet.- Returns:
- Atom indices in this multiplet.
-
setAtomIndices
public void setAtomIndices(int[] atomIndices) sets the indices of the atoms of this multiplet.- Parameters:
atomIndices
- Atom indices in this multiplet.
-
getAtomIndex
public int getAtomIndex(int i) Returns the index of the ith atom of this multiplet.- Returns:
- ith atom index in this multiplet.
-
setAtomIndex
public void setAtomIndex(int i, int index) Sets the index of the ith atom of this multiplet. -
getDomainMin
public double getDomainMin()Returns the lower end of this multiplet.- Returns:
- Lower end.
-
setDomainMin
public void setDomainMin(double domainMin) Sets the lower end of this multiplet.- Parameters:
domainMin
- Lower end.
-
getDomainMax
public double getDomainMax()Returns the upper end of this multiplet.- Returns:
- Upper end.
-
setDomainMax
public void setDomainMax(double domainMax) Sets the upper end of this multiplet.- Parameters:
domainMax
- Upper end.
-
getPeakDomainMin
public double[] getPeakDomainMin()Returns the array of peak lower ends.- Returns:
- Array of peak lower ends.
-
setPeakDomainMin
public void setPeakDomainMin(double[] peakDomainMin) Sets the array of peak lower ends. Input array is cloned.- Parameters:
peakDomainMin
- Array of peak lower ends.
-
getPeakDomainMax
public double[] getPeakDomainMax()Returns the array of peak upper ends.- Returns:
- Array of peak upper ends.
-
setPeakDomainMax
public void setPeakDomainMax(double[] peakDomainMax) Sets the array of peak upper ends. Input array is cloned.- Parameters:
peakDomainMax
- Array of peak upper ends.
-
getPeakDomainMin
public double getPeakDomainMin(int i) Returns the lower end of the ith peak.- Parameters:
i
- Peak index.- Returns:
- Lower end of the ith peak or Double.NaN if there is a problem.
-
setPeakDomainMin
public void setPeakDomainMin(int i, double value) Sets the lower end of the ith peak.- Parameters:
i
- Peak index.value
- New lower end.
-
getPeakDomainMax
public double getPeakDomainMax(int i) Returns the upper end of the ith peak.- Parameters:
i
- Peak index.- Returns:
- Upper end of the ith peak or Double.NaN if there is a problem.
-
setPeakDomainMax
public void setPeakDomainMax(int i, double value) Sets the upper end of the ith peak.- Parameters:
i
- Peak index.value
- New upper end.
-
getHalfWidth
public double getHalfWidth()Returns the half-width of the NMR lines.- Returns:
- Half-width.
-
setHalfWidth
public void setHalfWidth(double halfWidth) Sets the half-width of the NMR lines.- Parameters:
halfWidth
- Half-width.
-
getCouplingNeeded
public boolean getCouplingNeeded()Returns whether spin-spin couplings are taken into account.- Returns:
- True if spin-spin couplings are taken into account.
-
setCouplingNeeded
public void setCouplingNeeded(boolean couplingNeeded) Sets whether spin-spin couplings are taken into account.- Parameters:
couplingNeeded
- True if spin-spin couplings are taken into account.
-
getCouplingConstants
public double[] getCouplingConstants(int i) Returns the coupling constants of the ith atom in this multiplet.- Parameters:
i
- atom index- Returns:
- Coupling constants of the ith atom in this multiplet.
-
getCouplingConstants
Returns the coupling constants of the ith atom in this multiplet.- Parameters:
i
- atom indexunit
- reuqested unit- Returns:
- Coupling constants of the ith atom in this multiplet.
-
getAtomMap
public int[] getAtomMap() -
getUnit
Return the unit.- Returns:
- unit
-
getFrequency
public double getFrequency()Returns the freuency in MHz.- Returns:
- frequency
-
addCouplingConstants
public void addCouplingConstants(double[] couplings) Adds a new coupling constant array.- Parameters:
couplings
- Array of coupling constants.
-
toString
-
getFunctionScale
public double getFunctionScale()Returns the scaling parameter for the function of this multiplet.- Returns:
- Multiplet function scaling parameter.
-
setFunctionScale
public void setFunctionScale(double functionScale) Sets the scaling parameter for the function of this multiplet.- Parameters:
functionScale
- Multiplet function scaling parameter.
-
getValueAt
public double getValueAt(double location) Returns the value of the multiplet function at a given point.- Parameters:
location
- The point where the function has to be evaluated.- Returns:
- Value of the function.
-
getDefaultValue
public double getDefaultValue()Returns the default value of the multiplet function.- Returns:
- Default value of multiplet function.
-
getLocalMaximumPlaces
public double[] getLocalMaximumPlaces()Returns the local maximum places of the multiplet in ascending order.- Returns:
- Local maximum places.
-
getShiftError
public double getShiftError()Returns the estimated error of the chemical shift.- Returns:
- Chemical shift error.
-
setShiftError
public void setShiftError(double shiftError) Sets the estimated error of the chemical shift.- Parameters:
shiftError
- Chemical shift error.
-
getShiftErrorClassification
public chemaxon.calculations.nmr.NMRCoefficient.ErrorClassification getShiftErrorClassification()Returns error classification of the chemical shift.- Returns:
- Chemical shift error classification.
-
setShiftErrorClassification
public void setShiftErrorClassification(chemaxon.calculations.nmr.NMRCoefficient.ErrorClassification shiftErrorClassification) Sets error classification of the chemical shift.- Parameters:
shiftErrorClassification
- Chemical shift error classification.
-