private double getAtomicChargeIncrement ( IAtomContainer ac , int atomPosition , double [ ] ElEn , int as ) throws CDKException { IAtom [ ] allAtoms = null ; IAtom target = null ; double incrementedCharge = 0 ; double radiusTarget = 0 ; target = ac . getAtom ( atomPosition ) ; //logger.debug("ATOM "+target.getSymbol()+" AT POSITION "+atomPosition); allAtoms = AtomContainerManipulator . getAtomArray ( ac ) ; double tmp = 0 ; double radius = 0 ; String symbol = null ; IAtomType type = null ; try { symbol = target . getSymbol ( ) ; type = factory . getAtomType ( symbol ) ; if ( getCovalentRadius ( symbol , ac . getMaximumBondOrder ( target ) ) > 0 ) { radiusTarget = getCovalentRadius ( symbol , ac . getMaximumBondOrder ( target ) ) ; } else { radiusTarget = type . getCovalentRadius ( ) ; } } catch ( Exception ex1 ) { logger . debug ( ex1 ) ; throw new CDKException ( "Problems with AtomTypeFactory due to " + ex1 . getMessage ( ) , ex1 ) ; } for ( int a = 0 ; a < allAtoms . length ; a ++ ) { if ( ! target . equals ( allAtoms [ a ] ) ) { tmp = 0 ; symbol = allAtoms [ a ] . getSymbol ( ) ; try { type = factory . getAtomType ( symbol ) ; } catch ( Exception ex1 ) { logger . debug ( ex1 ) ; throw new CDKException ( "Problems with AtomTypeFactory due to " + ex1 . getMessage ( ) , ex1 ) ; } if ( getCovalentRadius ( symbol , ac . getMaximumBondOrder ( allAtoms [ a ] ) ) > 0 ) { radius = getCovalentRadius ( symbol , ac . getMaximumBondOrder ( allAtoms [ a ] ) ) ; } else { radius = type . getCovalentRadius ( ) ; } tmp = ( ElEn [ a + ( ( as - 1 ) * allAtoms . length ) ] - ElEn [ atomPosition + ( ( as - 1 ) * allAtoms . length ) ] ) ; tmp = tmp * ( ( radius * radius ) + ( radiusTarget * radiusTarget ) ) ; tmp = tmp / ( calculateSquaredDistanceBetweenTwoAtoms ( target , allAtoms [ a ] ) ) ; incrementedCharge += tmp ; //if(actualStep==1) //logger.debug("INDU: particular atom "+symbol+ ", radii: "+ radius+ " - " + radiusTarget+", dist: "+calculateSquaredDistanceBetweenTwoAtoms(target, allAtoms[a])); } } incrementedCharge = 0.172 * incrementedCharge ; //logger.debug("Increment: " +incrementedCharge); return incrementedCharge ; }
Gets the atomicChargeIncrement attribute of the InductivePartialCharges object .