Class CrossoverMachine

  • public class CrossoverMachine
    extends Object
    Modified molecular structures by applying crossover operator on a pair of parent structures and generate a pair of offspring structures. Each of the two offspring structures inherits a certain fragments from both of its parents.
    Source code:
    Belongs to CDK module:
    • Field Detail


        public static final int SPLIT_MODE_RADNDOM
        Indicates that crossover is using SPLIT_MODE_RADNDOM mode.
        See Also:
        Constant Field Values

        public static final int SPLIT_MODE_DEPTH_FIRST
        Indicates that crossover is using SPLIT_MODE_DEPTH_FIRST mode.
        See Also:
        Constant Field Values

        public static final int SPLIT_MODE_BREADTH_FIRST
        Indicates that crossover is using SPLIT_MODE_BREADTH_FIRST mode.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CrossoverMachine

        public CrossoverMachine()
        Constructs a new CrossoverMachine operator.
    • Method Detail

      • doCrossover

        public List<IAtomContainer> doCrossover​(IAtomContainer dad,
                                                IAtomContainer mom)
                                         throws CDKException
        Performs the n point crossover of two IAtomContainer. Precondition: The atoms in the molecules are ordered by properties to preserve (e. g. atom symbol). Due to its randomized nature, this method fails in around 3% of all cases. A CDKException with message "Could not mate these properly" will then be thrown.
        The children.
        CDKException - if it was not possible to form offsprings.