Package org.bmdrc.nmr

Examples of org.bmdrc.nmr.Nmr1dUnit


    private Nmr1dUnit __getPeakInACDFormat(String theFileInformation) {

        String[] theSplitedString = theFileInformation.split(this.TAB_STRING);
        String[] theRangeArray = null;
        Nmr1dUnit thePeak = new Nmr1dUnit();

        if (theSplitedString.length == 6) {
            theRangeArray = theSplitedString[5].substring(1, theSplitedString[5].length() - 1).split(this.SPACE_STRING);
        } else {
            for (int theIndexOfRange = 6; !theSplitedString[theIndexOfRange].contains("["); theIndexOfRange++) {
                theRangeArray = theSplitedString[theIndexOfRange].substring(1, theSplitedString[theIndexOfRange].length() - 1).split(this.SPACE_STRING);
            }
        }

        thePeak.setChemicalShift(Double.parseDouble(theSplitedString[this.CHEMICAL_SHIFT_1D_INDEX_IN_ACD]));
        thePeak.setMinOfRange(Double.parseDouble(theRangeArray[this.MIN_CHEMICAL_SHIFT_1D_IN_ACD]));
        thePeak.setMaxOfRange(Double.parseDouble(theRangeArray[this.MAX_CHEMICAL_SHIFT_1D_IN_ACD]));
        thePeak.setIntensity(Double.parseDouble(theSplitedString[this.INTENSITY_1D_INDEX_IN_ACD]));

        return thePeak;
    }
View Full Code Here


        return Integer.toString(this.INCORRECT_ATOM_NUMBER);
    }

    private Nmr1dUnit __generatePeakInformation(String[] thePeakInformationArray, List<String> theExperimentEnvironmentList) {
        Nmr1dUnit thePeak = new Nmr1dUnit();

        thePeak.setChemicalShift(Double.parseDouble(thePeakInformationArray[this.CHEMICAL_SHIFT_INDEX]));
        thePeak.setIntensity(this.__convertIntensityValue(thePeakInformationArray[this.INTENSITY_INDEX]));
        thePeak.setAnnotatedAtomNumber(Integer.parseInt(thePeakInformationArray[this.ANNOTATED_ATOM_NUMBER_INDEX]));
        thePeak.setTemperature(theExperimentEnvironmentList.get(this.TEMPERATURE_INDEX));
        thePeak.setFieldStrength(theExperimentEnvironmentList.get(this.FIELD_STRENGTH_INDEX));
        thePeak.setSolvent(theExperimentEnvironmentList.get(this.SOLVENT_INDEX).trim());

        return thePeak;
    }
View Full Code Here

    private int __getIndexOfPeakDistribution(double theChemicalShift) {
        return (int) (theChemicalShift / this.getInterval());
    }

    private void __generateReferenceCorrlationTable() {
        Nmr1dUnit the1dPeak = new Nmr1dUnit();

        this.setReferenceCorrelationTable(new HashMap<String, Nmr1dUnit>());

        the1dPeak.setRange(0.8, 1.0);
        this.setReferenceCorrelationTable().put("PrimaryAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.2, 1.4);
        this.setReferenceCorrelationTable().put("SecondaryAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.4, 1.7);
        this.setReferenceCorrelationTable().put("TertiaryAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.2, 2.5);
        this.setReferenceCorrelationTable().put("AromaticAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.0, 4.0);
        this.setReferenceCorrelationTable().put("AlkylChloride", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.5, 4.0);
        this.setReferenceCorrelationTable().put("AlkylBromide", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.5, 4.0);
        this.setReferenceCorrelationTable().put("AlkylIoidide", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(4.0, 4.5);
        this.setReferenceCorrelationTable().put("AlkylFluoride", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 3.9);
        this.setReferenceCorrelationTable().put("Ether", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 3.9);
        this.setReferenceCorrelationTable().put("EsterROOCH2R", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(0.5, 6.0);
        this.setReferenceCorrelationTable().put("Alchol", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 4.0);
        this.setReferenceCorrelationTable().put("CarbonBoundAlchol", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.1, 2.6);
        this.setReferenceCorrelationTable().put("Ketone", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.1, 2.6);
        this.setReferenceCorrelationTable().put("EsterRCH2COOR", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(9.0, 10.0);
        this.setReferenceCorrelationTable().put("Aldehyde", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(4.6, 5.0);
        this.setReferenceCorrelationTable().put("Alkene", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(6.0, 9.5);
        this.setReferenceCorrelationTable().put("Benzyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(10.0, 13.0);
        this.setReferenceCorrelationTable().put("Carboxylic", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(4.0, 7.7);
        this.setReferenceCorrelationTable().put("Phenyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.0, 5.0);
        this.setReferenceCorrelationTable().put("Amine", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(5.0, 9.0);
        this.setReferenceCorrelationTable().put("Amide", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.4, 3.1);
        this.setReferenceCorrelationTable().put("Alkynyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(5.2, 5.7);
        this.setReferenceCorrelationTable().put("Vinylic", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.6, 1.9);
        this.setReferenceCorrelationTable().put("Allylic", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 3.3);
        this.setReferenceCorrelationTable().put("Methoxy", new Nmr1dUnit(the1dPeak));
    }
View Full Code Here

        List<Integer> theSolventIndexList = this.__getSolventIndexList(theMolecule);
        Nmr1dUnitList thePeakList = new Nmr1dUnitList();

        for (String theSpectrumPeak : thePeakInformationArrayInFile) {
            String[] theSplitedInformation = theSpectrumPeak.split(";");
            Nmr1dUnit thePeak = new Nmr1dUnit();

            thePeak.setAnnotatedAtomNumber(Integer.parseInt(theSplitedInformation[this.INDEX_OF_ATOM_NUMBER_IN_NMRSHIFTDB]));
            thePeak.setChemicalShift(Double.parseDouble(theSplitedInformation[this.INDEX_OF_CHEMICAL_SHIFT_IN_NMRSHIFTDB]));
            try {
                thePeak.setSolvent(theSolventList.get(theSolventIndexList.indexOf(theSpectrumNumber)));
            } catch (ArrayIndexOutOfBoundsException e) {
                e.printStackTrace();
                System.err.println(theKey + " " + theSpectrumNumber + " " + theMolecule.getProperty(this.KEY_VALUE_OF_NMRSHIFTDB2_ID).toString());
            }
            thePeakList.addPeak(thePeak);
View Full Code Here

    private Nmr1dUnitList __getChemicalShiftRangeList(int theTolerence) {
        Nmr1dUnitList theChemicalShiftRangeList = new Nmr1dUnitList();

        for (int di = 0, dEnd = this.getPeakDistributionList().size(); di < dEnd; di++) {
            if (this.getPeakDistributionList().get(di) <= theTolerence && this.getPeakDistributionList().get(di) != 0) {
                Nmr1dUnit theChemicalShiftRange = this.__setChemicalShiftRange(di);

                theChemicalShiftRangeList.addPeak(theChemicalShiftRange);
            }
        }
View Full Code Here

        return theChemicalShiftRangeList;
    }

    private Nmr1dUnit __setChemicalShiftRange(int theIndex) {
        Nmr1dUnit theChemicalShiftRange = new Nmr1dUnit();

        theChemicalShiftRange.setMinOfRange(this.MINIMUM_CHEMICAL_SHIFT + (this.getInterval() * theIndex));
        theChemicalShiftRange.setMaxOfRange(this.MINIMUM_CHEMICAL_SHIFT + (this.getInterval() * (theIndex + 1)));

        return theChemicalShiftRange;
    }
View Full Code Here

    public List<FunctionalGroupList> setFunctionalGroupListInMoleculeSet() {
        return itsFunctionalGroupListInMoleculeSet;
    }

    private void __generateReferenceCorrlationTable() {
        Nmr1dUnit the1dPeak = new Nmr1dUnit();

        this.setReferenceCorrelationTable(new HashMap<String, Nmr1dUnit>());

        the1dPeak.setRange(0.8, 1.0);
        this.setReferenceCorrelationTable().put("PrimaryAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.2, 1.4);
        this.setReferenceCorrelationTable().put("SecondaryAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.4, 1.7);
        this.setReferenceCorrelationTable().put("TertiaryAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.2, 2.5);
        this.setReferenceCorrelationTable().put("AromaticAlkyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.0, 4.0);
        this.setReferenceCorrelationTable().put("AlkylChloride", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.5, 4.0);
        this.setReferenceCorrelationTable().put("AlkylBromide", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.5, 4.0);
        this.setReferenceCorrelationTable().put("AlkylIoidide", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(4.0, 4.5);
        this.setReferenceCorrelationTable().put("AlkylFluoride", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 3.9);
        this.setReferenceCorrelationTable().put("Ether", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 3.9);
        this.setReferenceCorrelationTable().put("EsterROOCH2R", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(0.5, 6.0);
        this.setReferenceCorrelationTable().put("Alchol", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 4.0);
        this.setReferenceCorrelationTable().put("CarbonBoundAlchol", new Nmr1dUnit(the1dPeak));
       
        the1dPeak.setRange(2.1, 2.6);
        this.setReferenceCorrelationTable().put("Ketone", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(2.1, 2.6);
        this.setReferenceCorrelationTable().put("EsterRCH2COOR", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(9.0, 10.0);
        this.setReferenceCorrelationTable().put("Aldehyde", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(4.6, 5.0);
        this.setReferenceCorrelationTable().put("Alkene", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(6.0, 9.5);
        this.setReferenceCorrelationTable().put("Benzyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(10.0, 13.0);
        this.setReferenceCorrelationTable().put("Carboxylic", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(4.0, 7.7);
        this.setReferenceCorrelationTable().put("Phenyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.0, 5.0);
        this.setReferenceCorrelationTable().put("Amine", new Nmr1dUnit(the1dPeak));

        //---------------------------------------------------- Start
        the1dPeak.setRange(1.0, 5.0);
        this.setReferenceCorrelationTable().put("PrimaryAmine", new Nmr1dUnit(the1dPeak));
       
        the1dPeak.setRange(1.0, 5.0);
        this.setReferenceCorrelationTable().put("SecondaryAmine", new Nmr1dUnit(the1dPeak));
        //---------------------------------------------------- End
        the1dPeak.setRange(5.0, 9.0);
        this.setReferenceCorrelationTable().put("Amide", new Nmr1dUnit(the1dPeak));
        //---------------------------------------------------- Start
        the1dPeak.setRange(5.0, 9.0);
        this.setReferenceCorrelationTable().put("Primary_Amide_N", new Nmr1dUnit(the1dPeak));
       
        the1dPeak.setRange(5.0, 9.0);
        this.setReferenceCorrelationTable().put("Secondary_Amide_N", new Nmr1dUnit(the1dPeak));
        //---------------------------------------------------- End
        the1dPeak.setRange(2.4, 3.1);
        this.setReferenceCorrelationTable().put("Alkynyl", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(5.2, 5.7);
        this.setReferenceCorrelationTable().put("Vinylic", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(1.6, 1.9);
        this.setReferenceCorrelationTable().put("Allylic", new Nmr1dUnit(the1dPeak));

        the1dPeak.setRange(3.3, 3.3);
        this.setReferenceCorrelationTable().put("Methoxy", new Nmr1dUnit(the1dPeak));
    }
View Full Code Here

        List<Integer> theSolventIndexList = this.__getSolventIndexList(theMolecule);
        Nmr1dUnitList thePeakList = new Nmr1dUnitList();

        for (String theSpectrumPeak : thePeakInformationArrayInFile) {
            String[] theSplitedInformation = theSpectrumPeak.split(";");
            Nmr1dUnit thePeak = new Nmr1dUnit();

            thePeak.setAnnotatedAtomNumber(Integer.parseInt(theSplitedInformation[this.INDEX_OF_ATOM_NUMBER_IN_NMRSHIFTDB]));
            thePeak.setChemicalShift(Double.parseDouble(theSplitedInformation[this.INDEX_OF_CHEMICAL_SHIFT_IN_NMRSHIFTDB]));
            try {
                thePeak.setSolvent(theSolventList.get(theSolventIndexList.indexOf(theSpectrumNumber)));
            } catch (ArrayIndexOutOfBoundsException e) {
                e.printStackTrace();
                System.err.println(theKey + " " + theSpectrumNumber + " " + theMolecule.getProperty(this.KEY_VALUE_OF_NMRSHIFTDB2_ID).toString());
            }
            thePeakList.addPeak(thePeak);
View Full Code Here

        return theOutlierMoleculeSet;
    }

    private boolean __isOutlierMolecule(int theMoleculeIndex, String theFunctionalGroup) {
        Nmr1dUnitList theCheckPeakList = this.__getPeakListInMoleculeContainFunctionalGroup(theMoleculeIndex, theFunctionalGroup);
        Nmr1dUnit theShiftRangeInReferenceCorrelationTable = this.getReferenceCorrelationTable().get(theFunctionalGroup);

        for (int li = 0, lEnd = theCheckPeakList.getPeakList().size(); li < lEnd; li++) {
            if (!this.__isShiftInRange(theCheckPeakList.getPeak(li), theFunctionalGroup)) {
                return true;
            }
View Full Code Here

        return false;
    }

    private boolean __isMatchedMolecule(int theMoleculeIndex, String theFunctionalGroup) {
        Nmr1dUnitList theCheckPeakList = this.__getPeakListInMoleculeContainFunctionalGroup(theMoleculeIndex, theFunctionalGroup);
        Nmr1dUnit theShiftRangeInReferenceCorrelationTable = this.getReferenceCorrelationTable().get(theFunctionalGroup);

        for (int li = 0, lEnd = theCheckPeakList.getPeakList().size(); li < lEnd; li++) {
            if (this.__isShiftInRange(theCheckPeakList.getPeak(li), theFunctionalGroup)) {
                return true;
            }
View Full Code Here

TOP

Related Classes of org.bmdrc.nmr.Nmr1dUnit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.