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:
Source code:
Belongs to CDK module:
structure generator
  • Constructor Details

    • RandomGenerator

      public RandomGenerator(IAtomContainer molecule)
      Constructs a RandomGenerator with a given starting structure.
      molecule - The starting structure
  • Method Details

    • 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.
      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.
      molecule - a starting structure for this generator
    • getMolecule

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