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

📄 ipbonddescriptor.java

📁 化学图形处理软件
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
		      }
		      if (EE_1 > 1.140026)
		      {
		        if (RES_c2 <= 8.987296) { result = 08.7; /* 4.0/2.0 */}
		        else if (RES_c2 > 8.987296) { result = 08.2; /* 4.0/1.0 */}
		      }
		    }
		  }
		}
		return result;
	}
	
	/**
	 * tree desicion for the Acetyl_EthylWithoutHetero
	 * 
	 * @param resultsH Array which contains the results of each descriptor
	 * @return the result
	 */
	private double getAcetyl_EthylWithoutHetero(double[] resultsH) {
		double result = 0.0;
		double SE_1 = resultsH[0];
		double SCH_1 = resultsH[1];
		double SE_2  = resultsH[2];
		double SCH_2 = resultsH[3];
		double RES_c1  = resultsH[4];
		double RES_c2  = resultsH[5];
		
		if (SCH_2 <= -0.099464)
		{
		  if (SCH_2 <= -0.105819)
		  {
		    if (SCH_2 <= -0.119363)
		    {
		      if (SE_1 <= 9.394861) { result = 10.1; /* 3.0/1.0 */}
		      else if (SE_1 > 9.394861)
		      {
		        if (SE_1 <= 9.394917) { result = 09.9; /* 7.0/1.0 */}
		        else if (SE_1 > 9.394917) { result = 10.0; /* 8.0/5.0 */}
		      }
		    }
		    if (SCH_2 > -0.119363)
		    {
		      if (RES_c1 <= 1.484081)
		      {
		        if (RES_c1 <= 0)
		        {
		          if (SE_1 <= 9.269669) { result = 07.9; /* 2.0/1.0 */}
		          else if (SE_1 > 9.269669) { result = 09.8; /* 3.0/1.0 */}
		        }
		        if (RES_c1 > 0) { result = 07.9; /* 2.0/1.0 */}
		      }
		      if (RES_c1 > 1.484081) { result = 09.3; /* 11.0/3.0 */}
		    }
		  }
		  if (SCH_2 > -0.105819)
		  {
		    if (SE_2 <= 7.851763) { result = 09.4; /* 14.0/8.0 */}
		    else if (SE_2 > 7.851763)
		    {
		      if (SCH_2 <= -0.103062)
		      {
		        if (SE_1 <= 9.426247) { result = 09.2; /* 5.0/1.0 */}
		        else if (SE_1 > 9.426247) { result = 09.1; /* 8.0/3.0 */}
		      }
		      if (SCH_2 > -0.103062)
		      {
		        if (RES_c2 <= 0)
		        {
		          if (SE_1 <= 8.054504) { result = 09.1; /* 5.0/3.0 */}
		          else if (SE_1 > 8.054504) { result = 09.0; /* 5.0/1.0 */}
		        }
		        if (RES_c2 > 0) { result = 09.1; /* 20.0/8.0 */}
		      }
		    }
		  }
		}
		if (SCH_2 > -0.099464)
		{
		  if (SCH_2 <= -0.081738)
		  {
		    if (SCH_1 <= -0.084268)
		    {
		      if (SE_1 <= 7.951729)
		      {
		        if (RES_c1 <= 1.113294)
		        {
		          if (SCH_1 <= -0.10278) { result = 08.1; /* 2.0/1.0 */}
		          else if (SCH_1 > -0.10278)
		          {
		            if (SE_2 <= 7.953333) { result = 07.3; /* 2.0/1.0 */}
		            else if (SE_2 > 7.953333) { result = 09.4; /* 5.0/1.0 */}
		          }
		        }
		        if (RES_c1 > 1.113294) { result = 09.1; /* 3.0 */}
		      }
		      if (SE_1 > 7.951729)
		      {
		        if (SE_2 <= 7.97973)
		        {
		          if (SCH_1 <= -0.088386) { result = 09.0; /* 3.0/1.0 */}
		          else if (SCH_1 > -0.088386) { result = 08.9; /* 17.0/5.0 */}
		        }
		        if (SE_2 > 7.97973)
		        {
		          if (SE_1 <= 8.012483)
		          {
		            if (SCH_2 <= -0.084268) { result = 08.8; /* 64.0/33.0 */}
		            else if (SCH_2 > -0.084268)
		            {
		              if (SE_2 <= 8.038205) { result = 08.4; /* 3.0/1.0 */}
		              else if (SE_2 > 8.038205) { result = 08.8; /* 2.0/1.0 */}
		            }
		          }
		          if (SE_1 > 8.012483)
		          {
		            if (SE_2 <= 8.012573)
		            {
		              if (SE_2 <= 7.984696) { result = 08.6; /* 2.0 */}
		              else if (SE_2 > 7.984696)
		              {
		                if (SE_2 <= 7.989665) { result = 08.9; /* 4.0 */}
		                else if (SE_2 > 7.989665) { result = 07.7; /* 4.0/2.0 */}
		              }
		            }
		            if (SE_2 > 8.012573)
		            {
		              if (SCH_1 <= -0.096308) { result = 09.0; /* 2.0/1.0 */}
		              else if (SCH_1 > -0.096308) { result = 08.8; /* 11.0/6.0 */}
		            }
		          }
		        }
		      }
		    }
		    if (SCH_1 > -0.084268)
		    {
		      if (SCH_2 <= -0.090532)
		      {
		        if (SCH_1 <= -0.076605) { result = 08.9; /* 5.0/2.0 */}
		        else if (SCH_1 > -0.076605)
		        {
		          if (RES_c1 <= 0) { result = 08.7; /* 2.0/1.0 */}
		          else if (RES_c1 > 0)
		          {
		            if (SE_2 <= 7.883167) { result = 09.0; /* 18.0/9.0 */}
		            else if (SE_2 > 7.883167) { result = 08.5; /* 2.0/1.0 */}
		          }
		        }
		      }
		      if (SCH_2 > -0.090532)
		      {
		        if (SCH_1 <= -0.082029) { result = 08.6; /* 17.0/13.0 */}
		        else if (SCH_1 > -0.082029)
		        {
		          if (SCH_1 <= -0.073651) { result = 08.5; /* 6.0/3.0 */}
		          else if (SCH_1 > -0.073651)
		          {
		            if (RES_c1 <= 1.484392)
		            {
		              if (SCH_1 <= -0.073401)
		              {
		                if (SE_1 <= 8.113674) { result = 08.3; /* 3.0 */}
		                else if (SE_1 > 8.113674) { result = 08.4; /* 2.0 */}
		              }
		              if (SCH_1 > -0.073401) { result = 08.3; /* 2.0 */}
		            }
		            if (RES_c1 > 1.484392) { result = 08.4; /* 6.0/1.0 */}
		          }
		        }
		      }
		    }
		  }
		  if (SCH_2 > -0.081738)
		  {
		    if (SCH_1 <= -0.077122)
		    {
		      if (RES_c1 <= 0)
		      {
		        if (RES_c2 <= 1.484392)
		        {
		          if (SCH_1 <= -0.079198) { result = 09.0; /* 5.0/2.0 */}
		          else if (SCH_1 > -0.079198) { result = 09.3; /* 2.0/1.0 */}
		        }
		        if (RES_c2 > 1.484392)
		        {
		          if (SE_2 <= 8.084905) { result = 08.7; /* 2.0/1.0 */}
		          else if (SE_2 > 8.084905) { result = 08.0; /* 2.0/1.0 */}
		        }
		      }
		      if (RES_c1 > 0)
		      {
		        if (SCH_1 <= -0.084728)
		        {
		          if (SCH_2 <= -0.075912) { result = 08.6; /* 6.0/1.0 */}
		          else if (SCH_2 > -0.075912) { result = 08.4; /* 6.0 */}
		        }
		        if (SCH_1 > -0.084728) { result = 08.0; /* 2.0/1.0 */}
		      }
		    }
		    if (SCH_1 > -0.077122)
		    {
		      if (SCH_2 <= -0.070275)
		      {
		        if (SCH_2 <= -0.079606)
		        {
		          if (RES_c1 <= 1.484392) { result = 08.3; /* 3.0/1.0 */}
		          else if (RES_c1 > 1.484392) { result = 07.4; /* 2.0/1.0 */}
		        }
		        if (SCH_2 > -0.079606)
		        {
		          if (RES_c1 <= 1.484392)
		          {
		            if (SCH_2 <= -0.072617) { result = 08.1; /* 8.0/2.0 */}
		            else if (SCH_2 > -0.072617) { result = 08.2; /* 4.0/1.0 */}
		          }
		          if (RES_c1 > 1.484392)
		          {
		            if (SE_1 <= 8.083771) { result = 08.2; /* 2.0 */}
		            else if (SE_1 > 8.083771) { result = 08.1; /* 10.0/2.0 */}
		          }
		        }
		      }
		      if (SCH_2 > -0.070275)
		      {
		        if (SE_2 <= 8.178282) { result = 08.5; /* 2.0/1.0 */}
		        else if (SE_2 > 8.178282)
		        {
		          if (SE_1 <= 8.193598) { result = 08.1; /* 3.0/1.0 */}
		          else if (SE_1 > 8.193598) { result = 07.8; /* 2.0/1.0 */}
		        }
		      }
		    }
		  }
		}

		
		
		return result;
		
	}
	/**
	 * Get the reactions obtained with ionization.
	 * The energy is set as property
	 * 
	 * @return The IReactionSet value
	 */
	public IReactionSet getReactionSet() throws CDKException{
		return reactionSet;
	}
	
	/**
	 * Calculate the necessary descriptors for pi systems without heteroatom
	 * 
	 * @param atomContainer The IAtomContainer
	 * @return     Array with the values of the descriptors.
	 * @throws CDKException 
	 */
	private double[] calculatePiSystDescriptor(IBond bond, IAtomContainer atomContainer) throws CDKException {
		double[] results = new double[6];
		IAtom positionC = bond.getAtom(0);
		IAtom positionX = bond.getAtom(1);
    	
		/*0_1*/
		SigmaElectronegativityDescriptor descriptor1 = new SigmaElectronegativityDescriptor();
		results[0]= ((DoubleResult)descriptor1.calculate(positionC, atomContainer).getValue()).doubleValue();
    	/*1_1*/
		PartialSigmaChargeDescriptor descriptor2 = new PartialSigmaChargeDescriptor();
		results[1]= ((DoubleResult)descriptor2.calculate(positionC, atomContainer).getValue()).doubleValue();
		
		/*0_2*/
		SigmaElectronegativityDescriptor descriptor3 = new SigmaElectronegativityDescriptor();
		results[2]= ((DoubleResult)descriptor3.calculate(positionX, atomContainer).getValue()).doubleValue();
    	/*1_2*/
		PartialSigmaChargeDescriptor descriptor4 = new PartialSigmaChargeDescriptor();
		results[3]= ((DoubleResult)descriptor4.calculate(positionX, atomContainer).getValue()).doubleValue();
		
		/*  */
		ResonancePositiveChargeDescriptor descriptor5 = new ResonancePositiveChargeDescriptor();
		DoubleArrayResult dar = ((DoubleArrayResult)descriptor5.calculate(bond, atomContainer).getValue());
		results[4] = dar.get(0);
		results[5] = dar.get(1);
    		
    		
		return results;
	}
	/**
	 * Calculate the necessary descriptors for pi conjugated systems without heteroatom
	 * 
	 * @param atomContainer The IAtomContainer
	 * @return     Array with the values of the descriptors.
	 * @throws CDKException 
	 */
	private double[] calculateCojugatedPiSystDescriptor(IBond bond, IAtomContainer atomContainer, IAtomContainer conjugatedSys) throws CDKException {
		double[] results = new double[3];
		
		results[0] = 0.0;
		results[1] = 0.0;
		results[2] = 0.0;
		
		/*calculation of the atomic descriptors*/
		Iterator atomIt = conjugatedSys.atoms();
		while(atomIt.hasNext()){
			IAtom atomsss = (IAtom) atomIt.next();
			
			PartialPiChargeDescriptor descriptor1 = new PartialPiChargeDescriptor();
			double result1 = ((DoubleResult)descriptor1.calculate(atomsss,atomContainer).getValue()).doubleValue();
			
			
			
			if(result1 > results[0])
				results[0] = result1;
			
			SigmaElectronegativityDescriptor descriptor2 = new SigmaElectronegativityDescriptor();
			double result2 = ((DoubleResult)descriptor2.calculate(atomsss,atomContainer).getValue()).doubleValue();
			results[2] += result2;
			
		}
		
		Iterator bondIt = conjugatedSys.bonds();
		while(bondIt.hasNext()){
			IBond bondsss = (IBond) bondIt.next();
			try{
			ResonancePositiveChargeDescriptor descriptor5 = new ResonancePositiveChargeDescriptor();
			DoubleArrayResult dar = ((DoubleArrayResult)descriptor5.calculate(bondsss,atomContainer).getValue());
			
			
			double result1 = dar.get(0);
			double resutt2 = dar.get(1);
			double result12 = (result1+resutt2);
			
			double resultT = 0;
			if(result12 != 0)
				resultT = result12/2;
			
			results[1] += resultT;
			
			
			} catch (Exception exc)
			{
				continue;
			}
		}
		if(results[1] != 0)
			results[1] = results[1]/conjugatedSys.getAtomCount();
		
		if(results[2] != 0)
			results[2] = results[2]/conjugatedSys.getAtomCount();
		
		return results;
	}
	
	 /**
     * Gets the parameterNames attribute of the IPBondDescriptor object.
     *
     * @return    The parameterNames value
     */
    public String[] getParameterNames() {
        return new String[0];
    }


    /**
     * Gets the parameterType attribute of the IPBondDescriptor object.
     *
     * @param  name  Description of the Parameter
     * @return       An Object of class equal to that of the parameter being requested
     */
    public Object getParameterType(String name) {
        return null;
    }
}

⌨️ 快捷键说明

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