⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xlogpdescriptor.java

📁 化学图形处理软件
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("O")) {                bond = ac.getBond(neighbour, atom);                if (chargeFlag && neighbour.getFormalCharge()==-1 && bond.getOrder() ==1){                    odbcounter += 1;                }                if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {                    if (bond.getOrder() == 2.0) {                        odbcounter += 1;                    }                }            }        }        return odbcounter;    }    /**     *  Gets the doubleBondedSulfurCount attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The doubleBondedSulfurCount value     */    private int getDoubleBondedSulfurCount(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        IBond bond = null;        int sdbcounter = 0;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("S")) {                if (atom.getFormalCharge()==1 && neighbour.getFormalCharge()==-1){                    sdbcounter+=1;                }                bond = ac.getBond(neighbour, atom);                if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {                    if (bond.getOrder() == 2.0) {                        sdbcounter += 1;                    }                }            }        }        return sdbcounter;    }    /**     *  Gets the doubleBondedNitrogenCount attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The doubleBondedNitrogenCount value     */    private int getDoubleBondedNitrogenCount(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        IBond bond = null;        int ndbcounter = 0;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("N")) {                bond = ac.getBond(neighbour, atom);                if (!neighbour.getFlag(CDKConstants.ISAROMATIC)) {                    if (bond.getOrder() == 2.0) {                        ndbcounter += 1;                    }                }            }        }        return ndbcounter;    }    /**     *  Gets the aromaticNitrogensCount attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The aromaticNitrogensCount value     */    private int getAromaticNitrogensCount(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        int narocounter = 0;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("N") && ((Boolean)neighbour.getProperty("IS_IN_AROMATIC_RING")).booleanValue()) {                        narocounter += 1;            }        }        return narocounter;    }    // a piSystem is a double or triple or aromatic bond:    /**     *  Gets the piSystemsCount attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The piSystemsCount value     */    private int getPiSystemsCount(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        int picounter = 0;        java.util.List bonds=null;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            bonds = ac.getConnectedBondsList(neighbour);            for (int j = 0; j < bonds.size(); j++) {                IBond bond = (IBond)bonds.get(j);                if (bond.getOrder()>1.0 && bond.getConnectedAtom(neighbour)!=atom                        && !neighbour.getSymbol().equals("P")                        && !neighbour.getSymbol().equals("S")){                    picounter += 1;                }/*else if (bonds[j].getConnectedAtom(neighbours[i])!=atom						&& !neighbours[i].getSymbol().equals("P")						&& !neighbours[i].getSymbol().equals("S") && bonds[j].getConnectedAtom(neighbours[i]).getFlag(CDKConstants.ISAROMATIC)){					picounter += 1;				}*/            }        }        return picounter;    }    /**     *  Gets the presenceOf Hydroxy group attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The presenceOfCarbonil value     */    private boolean getPresenceOfHydroxy(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        IAtom neighbour0 = (IAtom)ac.getConnectedAtomsList(atom).get(0);        java.util.List first = null;        if (neighbour0.getSymbol().equals("C")) {            first = ac.getConnectedAtomsList(neighbour0);            for (int i = 0; i < first.size(); i++) {                IAtom conAtom = (IAtom)first.get(i);                if (conAtom.getSymbol().equals("O")) {                    if(ac.getBond(neighbour0, conAtom).getOrder()==1){                        if (ac.getConnectedBondsCount(conAtom)>1 && getHydrogenCount(ac,conAtom)==0){                            return false;                        }else{                            return true;                        }                    }                }            }        }        return false;    }    /**     *  Gets the presenceOfN=O attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The presenceOfNitor [boolean]     */    private boolean getPresenceOfNitro(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        java.util.List second = null;        IBond bond = null;        //int counter = 0;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("N")) {                second = ac.getConnectedAtomsList(neighbour);                for (int b = 0; b < second.size(); b++) {                    IAtom conAtom = (IAtom)second.get(b);                    if (conAtom.getSymbol().equals("O")) {                        bond = ac.getBond(neighbour, conAtom);                        if (bond.getOrder() == 2.0) {                            return true;                        }                    }                }            }        }        return false;    }    /**     *  Gets the presenceOfSulfat A-S(O2)-A attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The presenceOfSulfat [boolean]     */    private boolean getPresenceOfSulfat(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        //org.openscience.cdk.interfaces.IAtom[] second = null;        //IBond bond = null;        //int counter = 0;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("S") && getOxygenCount(ac,neighbour)>=2 && ac.getConnectedBondsCount(neighbour)==4){                return true;            }        }        return false;    }    /**     *  Gets the presenceOfCarbonil attribute of the XLogPDescriptor object.     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The presenceOfCarbonil value     */    private int getPresenceOfCarbonil(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List neighbours = ac.getConnectedAtomsList(atom);        java.util.List second = null;        IBond bond = null;        int counter = 0;        for (int i = 0; i < neighbours.size(); i++) {            IAtom neighbour = (IAtom)neighbours.get(i);            if (neighbour.getSymbol().equals("C")) {                second = ac.getConnectedAtomsList(neighbour);                for (int b = 0; b < second.size(); b++) {                    IAtom conAtom = (IAtom)second.get(b);                    if (conAtom.getSymbol().equals("O")) {                        bond = ac.getBond(neighbour, conAtom);                        if (bond.getOrder() == 2.0) {                            counter +=1;                        }                    }                }            }        }        return counter;    }    /**     *  Gets the ifCarbonIsHydrophobic attribute of the XLogPDescriptor object.     *  C must be sp2 or sp3 and, for all distances C-1-2-3 only C atoms are permitted     *     *@param  ac    Description of the Parameter     *@param  atom  Description of the Parameter     *@return       The ifCarbonIsHydrophobic value     */    private boolean getIfCarbonIsHydrophobic(IAtomContainer ac, org.openscience.cdk.interfaces.IAtom atom) {        java.util.List first = ac.getConnectedAtomsList(atom);        java.util.List second = null;        java.util.List third = null;        //org.openscience.cdk.interfaces.IAtom[] fourth = null;        if (first.size() > 0) {            for (int i = 0; i < first.size(); i++) {                IAtom firstAtom = (IAtom)first.get(i);                if (firstAtom.getSymbol().equals("C") || firstAtom.getSymbol().equals("H")) {                } else {                    return false;                }                second = ac.getConnectedAtomsList(firstAtom);                if (second.size() > 0) {                    for (int b = 0; b < second.size(); b++) {                        IAtom secondAtom = (IAtom)second.get(b);                        if (secondAtom.getSymbol().equals("C") || secondAtom.getSymbol().equals("H")) {                        } else {                            return false;                        }                        third = ac.getConnectedAtomsList(secondAtom);                        if (third.size() > 0) {                            for (int c = 0; c < third.size(); c++) {                                IAtom thirdAtom = (IAtom)third.get(c);                                if (thirdAtom.getSymbol().equals("C") || thirdAtom.getSymbol().equals("H")) {                                } else {                                    return false;                                }                                //fourth = ac.getConnectedAtoms(third[c]);                                //if (fourth.length > 0) {                                //	for (int d = 0; d < fourth.length; d++) {                                //		if (fourth[d].getSymbol().equals("C") || fourth[d].getSymbol().equals("H")) {                                //		} else {                                //			return false;                                //		}                                //	}                                //} else {                                //	return false;                 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -