private static double deltavPhosphorous ( IAtom atom , IAtomContainer atomContainer ) { if ( ! atom . getSymbol ( ) . equals ( "P" ) ) return - 1 ; List < IAtom > connected = atomContainer . getConnectedAtomsList ( atom ) ; int conditions = 0 ; if ( connected . size ( ) == 4 ) conditions ++ ; for ( IAtom connectedAtom : connected ) { if ( connectedAtom . getSymbol ( ) . equals ( "O" ) && atomContainer . getBond ( atom , connectedAtom ) . getOrder ( ) == IBond . Order . DOUBLE ) conditions ++ ; if ( atomContainer . getBond ( atom , connectedAtom ) . getOrder ( ) == IBond . Order . SINGLE ) conditions ++ ; } if ( conditions == 5 ) return 2.22 ; return - 1 ; }
Checks whether the P atom is in a PO environment .