@ Override public IAtomContainer containerFromPermutation ( int [ ] permutation ) { try { IAtomContainer permutedContainer = ( IAtomContainer ) atomContainer . clone ( ) ; IAtom [ ] atoms = new IAtom [ atomContainer . getAtomCount ( ) ] ; for ( int i = 0 ; i < atomContainer . getAtomCount ( ) ; i ++ ) { atoms [ permutation [ i ] ] = permutedContainer . getAtom ( i ) ; } permutedContainer . setAtoms ( atoms ) ; return permutedContainer ; } catch ( CloneNotSupportedException c ) { return null ; } }
Generate the atom container with this permutation of the atoms .