Package org.openscience.cdk

Examples of org.openscience.cdk.MoleculeSet


    private final int CONNECTED_ATOM_INDEX_IN_HYDROGEN = 0;
    private final int INCORRECT_ATOM_NUMBER = -1;
    private final int VALUE_INDEX_IN_SFE_FILE = 1;

    public NMRShiftDB() {
        this.setMoleculeSet(new MoleculeSet());
        this.setHydrogenPeakListByMolecules(new TwoDimensionList<Nmr1dUnitList>());
        this.setCarbonPeakListByMolecules(new TwoDimensionList<Nmr1dUnitList>());
        this.setMPEOEListByMolecules(new TwoDimensionList<Double>());
        this.setCDEAPListByMolecules(new TwoDimensionList<Double>());
        this.__generateHydrogenSpectrumKeyList();
View Full Code Here


    private void __sortUsualMolecule(File theMoleculeFile, boolean theExistedTempFile) {
        IMoleculeSet theMoleculeSet = SDFReader.openMoleculeFile(theMoleculeFile);
        StringBuilder theTempMoleculeFilePath = new StringBuilder();
        int theNumberOfMolecule = 0;

        this.setMoleculeSet(new MoleculeSet());

        for (int mi = 0, mEnd = theMoleculeSet.getMoleculeCount(); mi < mEnd; mi++) {
            if (this.__isUsualMolecule(theMoleculeSet.getMolecule(mi))) {
                this.setMoleculeSet().addMolecule(theMoleculeSet.getMolecule(mi));
            }
View Full Code Here

    public void deleteTempDirectory() {
        Module.deleteDirectory(new File(this.TOTAL_TEMP_DIR));
    }

    public void writeChemicalShiftAndMpeoeAndCdeapBySDFormat(String theResultFilePath, String theFunctionalGroup) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();

        for (int li = 0, lEnd = this.getHydrogenPeakListByMolecules().size(); li < lEnd; li++) {
            theMoleculeSet.add(this.__getChemicalShiftAndMpeoeAndCdeapBySDFormat(this.getHydrogenPeakListByMolecules().get(li), li, theFunctionalGroup));
        }

        SDFWriter.writeSDFile(theMoleculeSet, new File(theResultFilePath));
    }
View Full Code Here

        SDFWriter.writeSDFile(theMoleculeSet, new File(theResultFilePath));
    }

    private IMoleculeSet __getChemicalShiftAndMpeoeAndCdeapBySDFormat(List<Nmr1dUnitList> thePeak2dList, int theMoleculeIndex, String theFunctionalGroup) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();

        for (Nmr1dUnitList thePeakList : thePeak2dList) {
            theMoleculeSet.add(this.__getChemicalShiftAndMpeoeAndCdeapBySDFormat(thePeakList, theMoleculeIndex, theFunctionalGroup));
        }

        return theMoleculeSet;
    }
View Full Code Here

        return theMoleculeSet;
    }

    private IMoleculeSet __getChemicalShiftAndMpeoeAndCdeapBySDFormat(Nmr1dUnitList thePeakList, int theMoleculeIndex, String theFunctionalGroup) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();
        List<String> theFunctionalGroupList = this.__getFunctionalGroupList(this.getMoleculeSet().getMolecule(theMoleculeIndex));

        for (Nmr1dUnit thePeak : thePeakList.getPeakList()) {
            if (thePeak.getAnnotatedAtomNumber() != this.INCORRECT_ATOM_NUMBER) {
                int theFunctionalGroupIndex = this.__getFunctionalGroupIndex(thePeak.getAnnotatedAtomNumber(), theMoleculeIndex);

                if (theFunctionalGroupList.contains(theFunctionalGroup)) {
                    theMoleculeSet.addMolecule(this.__getChemicalShiftAndMpeoeAndCdeapBySDFormat(thePeak, theMoleculeIndex));
                }
            }
        }

        return theMoleculeSet;
View Full Code Here

        return theStringBuilder.toString();
    }

    public IMoleculeSet findMatchedMoleculeForChemicalShiftAndMpeoeAndCdeap(double theChemicalShift, double theMpeoe, double theCdeap) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();

        for (int mi = 0, mEnd = this.getMoleculeSet().getMoleculeCount(); mi < mEnd; mi++) {
            if (this.__isMatchedMoleculeForChemicalShiftAndMpeoeAndCdeap(mi, theChemicalShift, theMpeoe, theCdeap)) {
                theMoleculeSet.addMolecule(this.getMoleculeSet().getMolecule(mi));
            }
        }

        return theMoleculeSet;
    }
View Full Code Here

        theResultFilePath.append(theFunctionalGroup).append(this.UNDER_BAR).append(theSolvent).append(this.MOLECULE_SUFFIX);
        SDFWriter.writeSDFile(theMoleculeSet, new File(theResultFilePath.toString()));
    }

    private IMoleculeSet __getHoseCodeDescriptorBySolventForSDForamt(String theFunctionalGroup, String theSolvent, int theHoseCodeLevel) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();

        for (int mi = 0, mEnd = this.getHydrogenPeakListByMolecules().size(); mi < mEnd; mi++) {
            if (this.__calculateMolecularWeight(this.getMoleculeSet().getMolecule(mi)) > 200) {
                for (Nmr1dUnitList thePeakList : this.getHydrogenPeakListByMolecules().get(mi)) {
                    theMoleculeSet.add(this.__getHoseCodeDescriptorBySolventForSDForamt(thePeakList, theHoseCodeLevel, theFunctionalGroup, mi, theSolvent));
                }
            }
        }

        return theMoleculeSet;
View Full Code Here

        return theMoleculeSet;
    }

    private IMoleculeSet __getHoseCodeDescriptorBySolventForSDForamt(Nmr1dUnitList thePeakList, int theHoseCodeLevel, String theFunctionalGroup, int theMoleculeIndex, String theSolvent) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();
        List<String> theFunctionalGroupList = this.__getFunctionalGroupList(this.getMoleculeSet().getMolecule(theMoleculeIndex));
        NMRShiftDBSolventList theSolventList = new NMRShiftDBSolventList();
        List<Integer> theUsedAtomNumberList = new ArrayList<Integer>();

        for (Nmr1dUnit thePeak : thePeakList.getPeakList()) {
            if (!theSolvent.equals(theSolventList.modifyStandardSolventName(thePeak.getSolvent()))) {
                return new MoleculeSet();
            } else if (thePeak.getAnnotatedAtomNumber() != this.INCORRECT_ATOM_NUMBER && !theUsedAtomNumberList.contains(thePeak.getAnnotatedAtomNumber())) {
                int theFunctionalGroupIndex = this.__getFunctionalGroupIndex(thePeak.getAnnotatedAtomNumber(), theMoleculeIndex);

                if (theFunctionalGroupList.get(theFunctionalGroupIndex).equals(theFunctionalGroup)) {
                    theMoleculeSet.addMolecule(this.__getHoseCodeDescriptorBySDFormat(thePeak, theHoseCodeLevel, theMoleculeIndex));
                    theUsedAtomNumberList.add(thePeak.getAnnotatedAtomNumber());
                }
            }
        }
View Full Code Here

    private final String REGEX_DIVIDED_BETWEEN_FUNCTIONAL_GROUPS = "\t";
    private final String SPACE_STRING = " ";
    private final String EMPTY_STRING = "";

    public PeakDistributionCalculator() {
        this.setMoleculeSet(new MoleculeSet());
        this.setFunctionalGroup(new String());
        this.setInterval(0);
        this.setHydrogenChemicalShiftDataInMoleculeSet(new ArrayList<Nmr1dUnitList>());
        this.setFunctionalGroupListInMoleculeSet(new ArrayList<FunctionalGroupList>());
        this.__generateReferenceCorrlationTable();
View Full Code Here

        return theChemicalShiftRange;
    }

    private IMoleculeSet __getMoleculeSetHavingNumberUnderTolerenceInPeakDistribution(Nmr1dUnitList theChemicalShiftRangeList) {
        IMoleculeSet theMoleculeSet = new MoleculeSet();

        for (int hi = 0, hEnd = this.getHydrogenChemicalShiftDataInMoleculeSet().size(); hi < hEnd; hi++) {
            if (this.__isMoleculeInRange(theChemicalShiftRangeList, hi)) {
                this.getMoleculeSet().getMolecule(hi).setProperty(this.KEY_VALUE_OF_MOLECULE_IN_TOLERENCE, this.__getPropertyValueInMatchedShift(theChemicalShiftRangeList, hi));
                theMoleculeSet.addMolecule(this.getMoleculeSet().getMolecule(hi));
            }
        }

        return theMoleculeSet;
    }
View Full Code Here

TOP

Related Classes of org.openscience.cdk.MoleculeSet

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.