📄 xlogpdescriptor.java
字号:
} } }else if (bondCount == 3) { // N sp3 if (hsCount == 0) { //if (rs.contains(atomi)&&ringSize>3) { if (atomi.getFlag(CDKConstants.ISAROMATIC)|| (rs.contains(atomi)&& ((Integer)atomi.getProperty(CDKConstants.PART_OF_RING_OF_SIZE)).intValue()>3 && getPiSystemsCount(ac,atomi)>=1)){ if (getAtomTypeXCount(ac, atomi) == 0) { xlogP += 0.881; //logger.debug("XLOGP: 51 0.881"); } else { xlogP -= 0.01; //logger.debug("XLOGP: 53 -0.01"); } } else { if (getAtomTypeXCount(ac, atomi) == 0) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP += 0.159; //logger.debug("XLOGP: 49 0.159"); } if (getPiSystemsCount(ac, atomi) > 0) { xlogP += 0.761; //logger.debug("XLOGP: 50 0.761"); } } else { xlogP -= 0.239; //logger.debug("XLOGP: 52 -0.239"); } } }else if (hsCount == 1) { if (getAtomTypeXCount(ac, atomi) == 0) {// like pyrrole if (atomi.getFlag(CDKConstants.ISAROMATIC)|| (rs.contains(atomi)&& ((Integer)atomi.getProperty(CDKConstants.PART_OF_RING_OF_SIZE)).intValue()>3 && getPiSystemsCount(ac,atomi)>=2)) { xlogP += 0.545; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 46 0.545"); } else { if (getPiSystemsCount(ac, atomi) == 0) { xlogP -= 0.112; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 44 -0.112"); } if (getPiSystemsCount(ac, atomi) > 0) { xlogP += 0.166; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 45 0.166"); } } } else { if (rs.contains(atomi)) { xlogP += 0.153; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 48 0.153"); } else { xlogP += 0.324; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 47 0.324"); } } }else if (hsCount == 2) { if (getAtomTypeXCount(ac, atomi) == 0) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP -= 0.534; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 41 -0.534"); } if (getPiSystemsCount(ac, atomi) == 1) { xlogP -= 0.329; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 42 -0.329"); } if (checkAminoAcid!=0){ checkAminoAcid+=1;} } else { xlogP -= 1.082; hBondDonors.add(new Integer(i)); //logger.debug("XLOGP: 43 -1.082"); } } } } } } if (symbol.equals("O")) { if (bondCount == 1 && maxBondOrder==2.0) { xlogP -= 0.399; if (!getPresenceOfHydroxy(ac,atomi)){ hBondAcceptors.add(new Integer(i)); } //logger.debug("XLOGP: 75 A=O -0.399"); }else if(bondCount == 1 && hsCount==0 && (getPresenceOfNitro(ac,atomi) || getPresenceOfCarbonil(ac,atomi)==1) || getPresenceOfSulfat(ac,atomi)){ xlogP -= 0.399; if (!getPresenceOfHydroxy(ac,atomi)){ hBondAcceptors.add(new Integer(i)); } //logger.debug("XLOGP: 75 A=O -0.399"); }else if (bondCount >= 1) { if (hsCount == 0 && bondCount==2) { if (getAtomTypeXCount(ac, atomi) == 0) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP += 0.084; //logger.debug("XLOGP: 72 R-O-R 0.084"); } if (getPiSystemsCount(ac, atomi) > 0) { xlogP += 0.435; //logger.debug("XLOGP: 73 R-O-R.1 0.435"); } }else if (getAtomTypeXCount(ac, atomi) == 1) { xlogP += 0.105; //logger.debug("XLOGP: 74 R-O-X 0.105"); } }else{ if (getAtomTypeXCount(ac, atomi) == 0) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP -= 0.467; hBondDonors.add(new Integer(i)); hBondAcceptors.add(new Integer(i)); //logger.debug("XLOGP: 69 R-OH -0.467"); } if (getPiSystemsCount(ac, atomi) == 1) { xlogP += 0.082; hBondDonors.add(new Integer(i)); hBondAcceptors.add(new Integer(i)); //logger.debug("XLOGP: 70 R-OH.1 0.082"); } }else if (getAtomTypeXCount(ac, atomi) == 1) { xlogP -= 0.522; hBondDonors.add(new Integer(i)); hBondAcceptors.add(new Integer(i)); //logger.debug("XLOGP: 71 X-OH -0.522"); } } } } if (symbol.equals("S")) { if ((bondCount == 1 && maxBondOrder==2) || (bondCount == 1 && atomi.getFormalCharge()==-1)) { xlogP -= 0.148; //logger.debug("XLOGP: 78 A=S -0.148"); }else if (bondCount == 2) { if (hsCount == 0) { xlogP += 0.255; //logger.debug("XLOGP: 77 A-S-A 0.255"); } else { xlogP += 0.419; //logger.debug("XLOGP: 76 A-SH 0.419"); } }else if (bondCount == 3) { if (getOxygenCount(ac, atomi) >= 1) { xlogP -= 1.375; //logger.debug("XLOGP: 79 A-SO-A -1.375"); } }else if (bondCount == 4) { if (getDoubleBondedOxygenCount(ac, atomi) >= 2) { xlogP -= 0.168; //logger.debug("XLOGP: 80 A-SO2-A -0.168"); } } } if (symbol.equals("P")) { if (getDoubleBondedSulfurCount(ac, atomi) >= 1 && bondCount>=4) { xlogP += 1.253; //logger.debug("XLOGP: 82 S=PA3 1.253"); }else if (getOxygenCount(ac,atomi)>=1 || getDoubleBondedOxygenCount(ac, atomi) == 1 && bondCount>=4) { xlogP -= 0.447; //logger.debug("XLOGP: 81 O=PA3 -0.447"); } } if (symbol.equals("F")) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP += 0.375; //logger.debug("XLOGP: 83 F.0 0.512"); }else if (getPiSystemsCount(ac, atomi) == 1) { xlogP += 0.202; //logger.debug("XLOGP: 84 F.1 0.202"); } } if (symbol.equals("Cl")) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP += 0.512; //logger.debug("XLOGP: 85 Cl.0 0.512"); }else if (getPiSystemsCount(ac, atomi) >= 1) { xlogP += 0.663; //logger.debug("XLOGP: 86 Cl.1 0.663"); } } if (symbol.equals("Br")) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP += 0.85; //logger.debug("XLOGP: 87 Br.0 0.85"); }else if (getPiSystemsCount(ac, atomi) == 1) { xlogP += 0.839; //logger.debug("XLOGP: 88 Br.1 0.839"); } } if (symbol.equals("I")) { if (getPiSystemsCount(ac, atomi) == 0) { xlogP += 1.05; //logger.debug("XLOGP: 89 I.0 1.05"); }else if (getPiSystemsCount(ac, atomi) == 1) { xlogP += 1.109; //logger.debug("XLOGP: 90 I.1 1.109"); } }// Halogen pair 1-3 int halcount=getHalogenCount(ac, atomi); if ( halcount== 2) { xlogP += 0.137; //logger.debug("XLOGP: Halogen 1-3 pair 0.137"); }else if (halcount==3){ xlogP += (3*0.137); //logger.debug("XLOGP: Halogen 1-3 pair 0.411"); }else if (halcount==4){ xlogP += (6*0.137); //logger.debug("XLOGP: Halogen 1-3 pair 1.902"); }// sp2 Oxygen 1-5 pair if (getPresenceOfCarbonil(ac, atomi) == 2) {// sp2 oxygen 1-5 pair if(!rs.contains(atomi)) { xlogP += 0.580; //logger.debug("XLOGP: sp2 Oxygen 1-5 pair 0.580"); } } } //logger.debug("XLOGP: Before Correction:"+xlogP); List path=null; SimpleGraph moleculeGraph=null; int [][] pairCheck=null;// //logger.debug("Acceptors:"+hBondAcceptors.size()+" Donors:"+hBondDonors.size()); if (hBondAcceptors.size()>0 && hBondDonors.size()>0){ moleculeGraph=MoleculeGraphs.getMoleculeGraph(ac); pairCheck=initializeHydrogenPairCheck(new int[atomCount][atomCount]); } for (int i=0; i<hBondAcceptors.size();i++){ for (int j=0; j<hBondDonors.size();j++){ if (checkRingLink(rs,ac,ac.getAtom(((Integer)hBondAcceptors.get(i)).intValue())) || checkRingLink(rs,ac,ac.getAtom(((Integer)hBondDonors.get(j)).intValue()))){ path=BFSShortestPath.findPathBetween(moleculeGraph,ac.getAtom(((Integer)hBondAcceptors.get(i)).intValue()), ac.getAtom(((Integer)hBondDonors.get(j)).intValue()));// //logger.debug(" Acc:"+checkRingLink(rs,ac,atoms[((Integer)hBondAcceptors.get(i)).intValue()])// +" S:"+atoms[((Integer)hBondAcceptors.get(i)).intValue()].getSymbol()// +" Nr:"+((Integer)hBondAcceptors.get(i)).intValue()// +" Don:"+checkRingLink(rs,ac,atoms[((Integer)hBondDonors.get(j)).intValue()])// +" S:"+atoms[((Integer)hBondDonors.get(j)).intValue()].getSymbol()// +" Nr:"+((Integer)hBondDonors.get(j)).intValue()// +" i:"+i+" j:"+j+" path:"+path.size()); if (checkRingLink(rs,ac,ac.getAtom(((Integer)hBondAcceptors.get(i)).intValue())) && checkRingLink(rs,ac,ac.getAtom(((Integer)hBondDonors.get(j)).intValue()))){ if (path.size()==3 && pairCheck[((Integer)hBondAcceptors.get(i)).intValue()][((Integer)hBondDonors.get(j)).intValue()]==0){ xlogP += 0.429; pairCheck[((Integer)hBondAcceptors.get(i)).intValue()][((Integer)hBondDonors.get(j)).intValue()]=1; pairCheck[((Integer)hBondDonors.get(j)).intValue()][((Integer)hBondAcceptors.get(i)).intValue()]=1; //logger.debug("XLOGP: Internal HBonds 1-4 0.429"); } }else{ if (path.size()==4 && pairCheck[((Integer)hBondAcceptors.get(i)).intValue()][((Integer)hBondDonors.get(j)).intValue()]==0){ xlogP += 0.429; pairCheck[((Integer)hBondAcceptors.get(i)).intValue()][((Integer)hBondDonors.get(j)).intValue()]=1; pairCheck[((Integer)hBondDonors.get(j)).intValue()][((Integer)hBondAcceptors.get(i)).intValue()]=1; //logger.debug("XLOGP: Internal HBonds 1-5 0.429"); } } } } } if (checkAminoAcid>1){// alpha amino acid QueryAtomContainer aminoAcid = QueryAtomContainerCreator.createBasicQueryContainer( createAminoAcid(ac.getBuilder()) ); Iterator bonds = aminoAcid.bonds(); IAtom bondAtom0=null; IAtom bondAtom1=null; while (bonds.hasNext()) { IBond bond = (IBond) bonds.next(); bondAtom0=bond.getAtom(0); bondAtom1=bond.getAtom(1); if ((bondAtom0.getSymbol().equals("C") && bondAtom1.getSymbol().equals("N")) || (bondAtom0.getSymbol().equals("N") && bondAtom1.getSymbol().equals("C"))&& bond.getOrder()==1){ aminoAcid.removeBond(bondAtom0,bondAtom1); aminoAcid.addBond(new AnyOrderQueryBond((IQueryAtom)bondAtom0,(IQueryAtom)bondAtom1,1)); break; } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -