Class AtomContainerBondPermutor

  • All Implemented Interfaces:
    Iterator<IAtomContainer>

    public class AtomContainerBondPermutor
    extends AtomContainerPermutor
    This class allows the user to iterate through the set of all possible permutations of the bond order in a given atom container. This provides a means to check the dependency of an algorithm's results on the bond order of the input atom container.

    Typical use:

     AtomContainerBondPermutor permutor = new AtomContainerBondPermutor(container);
     while (permutor.hasNext()) {
       IAtomContainer permutedContainer = permutor.next();
       ...
     }
    Author:
    maclean
    Source code:
    main
    Belongs to CDK module:
    standard
    Keywords:
    permutation
    Created on:
    2009-09-09
    • Constructor Detail

      • AtomContainerBondPermutor

        public AtomContainerBondPermutor​(IAtomContainer atomContainer)
        A permutor wraps the original atom container, and produces cloned (and permuted!) copies on demand.
        Parameters:
        atomContainer - the atom container to permute
    • Method Detail

      • containerFromPermutation

        public IAtomContainer containerFromPermutation​(int[] permutation)
        Description copied from class: AtomContainerPermutor
        Convert a permutation (expressed as a list of numbers) into a permuted atom container. This will differ depending on the desired effect of the permutation (atoms or bonds, for example).
        Specified by:
        containerFromPermutation in class AtomContainerPermutor
        Returns:
        the atom container corresponding to this permutation