Package chemaxon.calculations.nmr
Class NMRSpectrum
java.lang.Object
chemaxon.calculations.nmr.NMRSpectrum
- All Implemented Interfaces:
chemaxon.calculations.nmr.Spectrum
Class for the representation of NMR spectra.
- Since:
- 5.7
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Nucleus enumeration type.static enum
Unit enumeration type. -
Field Summary
Modifier and TypeFieldDescriptionprotected double
Scale factor for NMR spectrum function scaling. -
Constructor Summary
ConstructorDescriptionNMRSpectrum
(Molecule mol) Constructor.NMRSpectrum
(Molecule mol, NMRSpectrum.Nucleus nucleusType) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Computes the scaling factor for the unscaled NMR spectrum function.protected void
computeFunctionScale
(double aimedMaxValue, double[] places) Returns the atom indices of the NMR active nuclei.double[][]
Returns coupling constants.double[][]
Returns coupling constants in the given unit.double
double
Returns the upper end of the spectrum.double
Returns the lower end of the spectrum.double
Returns the NMR measurement frequency in MHz unit.protected double
double
Returns NMR half-width.double
getIntegralValueAt
(double location) Returns the value of the NMR integral function at a given x point.double[]
static double[]
Returns the array of meaningful NMR measurement frequencies in MHz.Returns the molecule under examination.getName()
Returns the name of the NMR spectrum.Returns the nucleus type string.Returns the type of the nucleus under examination.int
Returns number of the NMR active nuclei.double
Maximal y value of the NMR spectrum function.double
Minimal y value of the NMR spectrum function.double
getRawValueAt
(double location) Returns the value of the unscaled NMR spectrum function at a given x point.Shift[]
Returns chemical shifts.protected Molecule
getUnit()
Returns the unit type.double
getValueAt
(double location) Returns the value of the NMR spectrum function at a given x point.boolean
Returns whether spin-spin couplings are taken into account.boolean
Returns implicit hydrogen mode.void
setCouplingConstants
(double[][] couplingConstants) Sets coupling constants.void
setCouplingNeeded
(boolean couplingNeeded) Sets whether spin-spin couplings are taken into account.void
setDomainMax
(double domainMax) Sets the upper end of the spectrum.void
setDomainMin
(double domainMin) Sets the lower end of the spectrum.void
setFrequency
(double frequency) Sets the NMR measurement frequency.void
setHalfWidth
(double halfWidth) Sets NMR half-width.void
setImplicitHydrogenMode
(boolean implicitHydrogenMode) Sets implicit hydrogen mode.void
setMultiplets
(Multiplet[] multiplets) SetsMultiplet
array of the spectrum.void
Sets the name of the NMR spectrumvoid
setNumberOfNMRActiveNuclei
(int numberOfNMRActiveNuclei) Sets number of the NMR active nuclei.void
Sets chemical shifts.void
setUnit
(NMRSpectrum.Unit unit) Sets the unit type.
-
Field Details
-
functionScale
protected double functionScaleScale factor for NMR spectrum function scaling.
-
-
Constructor Details
-
NMRSpectrum
Constructor. Default nucleus setting is 13C NMR.- Parameters:
mol
- Input molecule, needs to be explicitly hydrogenized in case of 1H NMR.
-
NMRSpectrum
Constructor.- Parameters:
mol
- Input molecule, needs to be explicitly hydrogenized in case of 1H NMR.nucleusType
-NMRSpectrum.Nucleus
-
-
Method Details
-
getMolecule
Returns the molecule under examination.- Returns:
- Molecule under examination.
-
getStrictMolecule
-
getNumberOfNMRActiveNuclei
public int getNumberOfNMRActiveNuclei()Returns number of the NMR active nuclei.- Returns:
- Number of NMR active nuclei.
-
setNumberOfNMRActiveNuclei
public void setNumberOfNMRActiveNuclei(int numberOfNMRActiveNuclei) Sets number of the NMR active nuclei.- Parameters:
numberOfNMRActiveNuclei
- Number of NMR active nuclei.
-
getShifts
Returns chemical shifts.- Returns:
- Array of chemical shifts.
-
setShifts
Sets chemical shifts.- Parameters:
shifts
- Array of chemical shifts.
-
getAtomIndexes
Returns the atom indices of the NMR active nuclei.- Returns:
- Atom indices.
-
getCouplingConstants
public double[][] getCouplingConstants()Returns coupling constants.- Returns:
- Array of coupling constants.
-
getCouplingConstants
Returns coupling constants in the given unit.- Parameters:
unit
- Unit requested.- Returns:
- Coupling constant array in the requested unit.
-
setCouplingConstants
public void setCouplingConstants(double[][] couplingConstants) Sets coupling constants.- Parameters:
couplingConstants
- Array of coupling constants.
-
getNucleusType
Returns the type of the nucleus under examination.- Returns:
NMRSpectrum.Nucleus
.
-
getNucleusString
Returns the nucleus type string.- Returns:
- Nucleus type string.
-
isImplicitHydrogenMode
public boolean isImplicitHydrogenMode()Returns implicit hydrogen mode.- Returns:
- Returns true if implicit hydrogen mode is used.
-
setImplicitHydrogenMode
public void setImplicitHydrogenMode(boolean implicitHydrogenMode) Sets implicit hydrogen mode.- Parameters:
implicitHydrogenMode
- True if implicit hydrogen mode is needed.
-
getFrequency
public double getFrequency()Returns the NMR measurement frequency in MHz unit.- Returns:
- NMR frequency.
-
setFrequency
public void setFrequency(double frequency) Sets the NMR measurement frequency. Frequency should be given in MHz unit.- Parameters:
frequency
- NMR frequency.
-
getHalfWidth
public double getHalfWidth()Returns NMR half-width.- Returns:
- NMR half-width.
-
setHalfWidth
public void setHalfWidth(double halfWidth) Sets NMR half-width.- Parameters:
halfWidth
- NMR half-width.
-
getUnit
Returns the unit type.- Returns:
NMRSpectrum.Unit
-
setUnit
Sets the unit type.- Parameters:
unit
-NMRSpectrum.Unit
-
isCouplingNeeded
public boolean isCouplingNeeded()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.
-
getMeaningfulFrequencies
public static double[] getMeaningfulFrequencies()Returns the array of meaningful NMR measurement frequencies in MHz.- Returns:
- NMR measurement frequency array.
-
getLocalMaximumPlaces
public double[] getLocalMaximumPlaces()- Specified by:
getLocalMaximumPlaces
in interfacechemaxon.calculations.nmr.Spectrum
-
getDomainMin
public double getDomainMin()Returns the lower end of the spectrum.- Returns:
- Lower end of the spectrum.
-
setDomainMin
public void setDomainMin(double domainMin) Sets the lower end of the spectrum.- Parameters:
domainMin
- Lower end of the spectrum.
-
getDomainMax
public double getDomainMax()Returns the upper end of the spectrum.- Returns:
- Upper end of the spectrum.
-
setDomainMax
public void setDomainMax(double domainMax) Sets the upper end of the spectrum.- Parameters:
domainMax
- Upper end of the spectrum.
-
getName
Returns the name of the NMR spectrum.- Returns:
- spectrum name
-
setName
Sets the name of the NMR spectrum -
getValueAt
public double getValueAt(double location) Returns the value of the NMR spectrum function at a given x point.- Parameters:
location
- x value where the function is evaluated.- Returns:
- Value of the NMR spectrum function at a given point.
-
getRawValueAt
public double getRawValueAt(double location) Returns the value of the unscaled NMR spectrum function at a given x point.- Parameters:
location
- x value where the function is evaluated.- Returns:
- Value of the unscaled NMR spectrum function at a given point.
-
getIntegralValueAt
public double getIntegralValueAt(double location) Returns the value of the NMR integral function at a given x point.- Parameters:
location
- x value where the function is evaluated.- Returns:
- Value of the NMR integral function at a given point.
-
getMultiplets
- Specified by:
getMultiplets
in interfacechemaxon.calculations.nmr.Spectrum
-
setMultiplets
SetsMultiplet
array of the spectrum.- Parameters:
multiplets
- NewMultiplet
array.
-
getDefaultValue
public double getDefaultValue()- Specified by:
getDefaultValue
in interfacechemaxon.calculations.nmr.Spectrum
-
getRangeMax
public double getRangeMax()Maximal y value of the NMR spectrum function.- Returns:
- Maximal y value.
-
getRangeMin
public double getRangeMin()Minimal y value of the NMR spectrum function.- Returns:
- Minimal y value.
-
computeFunctionScale
public void computeFunctionScale()Computes the scaling factor for the unscaled NMR spectrum function. As a result the maxima of the spectrum and integral functions are the same and correspond to the number of NMR active nuclei. -
computeFunctionScale
protected void computeFunctionScale(double aimedMaxValue, double[] places) -
getFunctionScale
protected double getFunctionScale()
-