@ Override public DescriptorValue calculate ( IAtomContainer atomContainer ) { IAtomContainer ac = null ; try { ac = ( IAtomContainer ) atomContainer . clone ( ) ; } catch ( CloneNotSupportedException e ) { return getDummyDescriptorValue ( e ) ; } int carbonCount = 0 ; int heteroCount = 0 ; for ( IAtom atom : ac . atoms ( ) ) { if ( ! Elements . HYDROGEN . getSymbol ( ) . equals ( atom . getSymbol ( ) ) ) { if ( Elements . CARBON . getSymbol ( ) . equals ( atom . getSymbol ( ) ) ) { carbonCount ++ ; } else { heteroCount ++ ; } } } double mLogP = 1.46 + 0.11 * carbonCount - 0.11 * heteroCount ; return new DescriptorValue ( getSpecification ( ) , getParameterNames ( ) , getParameters ( ) , new DoubleResult ( mLogP ) , getDescriptorNames ( ) ) ; }
Calculates the Mannhold LogP for an atom container .