public static IAtom getAtomById ( IAtomContainer ac , String id ) throws CDKException { for ( int i = 0 ; i < ac . getAtomCount ( ) ; i ++ ) { if ( ac . getAtom ( i ) . getID ( ) != null && ac . getAtom ( i ) . getID ( ) . equals ( id ) ) return ac . getAtom ( i ) ; } throw new CDKException ( "no suc atom" ) ; }
Returns an atom in an atomcontainer identified by id