Class NMRExporter


  • @PublicAPI
    public class NMRExporter
    extends Object
    Class for NMR spectrum export.
    Since:
    5.8
    • Constructor Detail

      • NMRExporter

        public NMRExporter()
    • Method Detail

      • export

        public static double[][] export​(NMRSpectrum spectrum,
                                        double xMin,
                                        double xMax,
                                        double resolution)
        Returns the x-y point pairs of an NMR spectrum. Only the nonzero parts are sampled.
        Parameters:
        spectrum - NMR spectrum to export.
        xMin - Minimal x value.
        xMax - Maximal x value.
        resolution - Sampling resolution.
        Returns:
        Spectrum x and y values. The two rows of the output array correspond to the x and y values, respectively.
      • exportToMol

        public static Molecule exportToMol​(NMRSpectrum spectrum)
                                    throws IOException
        Returns a molecule with its NMR spectrum property. The default property name is 1H NMR or 13C NMR.
        Parameters:
        spectrum - NMR spectrum to export.
        Returns:
        Molecule with NMR spectrum property.
        Throws:
        IOException
      • exportToMol

        public static Molecule exportToMol​(NMRSpectrum spectrum,
                                           String propertyName)
                                    throws IOException
        Returns a molecule with its NMR spectrum property.
        Parameters:
        spectrum - NMR spectrum to export.
        propertyName - Name of the NMR property.
        Returns:
        Molecule with NMR spectrum property.
        Throws:
        IOException
      • exportToJcampDX

        public static String exportToJcampDX​(NMRSpectrum spectrum)
                                      throws IOException
        Exports the NMR spectrum into JCAMP-DX format. The default number of spectrum points is 8192.
        Parameters:
        spectrum - NMR spectrum to export.
        Returns:
        String representation of the spectrum in JCAMP-DX format.
        Throws:
        IOException
      • exportToJcampDX

        public static String exportToJcampDX​(NMRSpectrum spectrum,
                                             int numberOfPoints)
                                      throws IOException
        Exports the NMR spectrum into JCAMP-DX format.
        Parameters:
        spectrum - NMR spectrum to export.
        numberOfPoints - Number of spectrum points.
        Returns:
        String representation of the spectrum in JCAMP-DX format.
        Throws:
        IOException