public static float calculate ( IAtomContainer query , IAtomContainer target ) throws CDKException { float [ ] mom1 = generateMoments ( query ) ; float [ ] mom2 = generateMoments ( target ) ; float sum = 0 ; for ( int i = 0 ; i < mom1 . length ; i ++ ) { sum += Math . abs ( mom1 [ i ] - mom2 [ i ] ) ; } return ( float ) ( 1.0 / ( 1.0 + sum / 12.0 ) ) ; }
Evaluate the 3D similarity between two molecules .