Class RandomGenerator


  • public class RandomGenerator
    extends Object
    RandomGenerator is a generator of constitutional isomers. It needs to be provided with a starting constitution and it makes random moves in constitutional space from there. This generator was first suggested by J.-L. Faulon [Faulon, J. L.. Journal of Chemical Information and Computer Sciences. 1996. 36].

    Unlike the VicinitySampler, this methods does not sample the full Faulon vicinity.

    See Also:
    VicinitySampler
    Source code:
    main
    Belongs to CDK module:
    structgen
    Keywords:
    structure generator
    • Constructor Detail

      • RandomGenerator

        public RandomGenerator​(IAtomContainer molecule)
        Constructs a RandomGenerator with a given starting structure.
        Parameters:
        molecule - The starting structure
    • Method Detail

      • proposeStructure

        public IAtomContainer proposeStructure()
        Proposes a structure which can be accepted or rejected by an external entity. If rejected, the structure is not used as a starting point for the next random move in structure space.
        Returns:
        A proposed molecule
      • acceptStructure

        public void acceptStructure()
        Tell the RandomGenerator to accept the last structure that had been proposed.
      • mutate

        public void mutate​(IAtomContainer ac)
        Randomly chooses four atoms and alters the bonding pattern between them according to rules described in "Faulon, JCICS 1996, 36, 731".
      • setMolecule

        public void setMolecule​(IAtomContainer molecule)
        Assigns a starting structure to this generator.
        Parameters:
        molecule - a starting structure for this generator
      • getMolecule

        public IAtomContainer getMolecule()
        Returns the molecule which reflects the current state of this stochastic structure generator.
        Returns:
        The molecule