Package org.openscience.cdk.structgen
Class RandomGenerator
java.lang.Object
org.openscience.cdk.structgen.RandomGenerator
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:
- main
- Belongs to CDK module:
- structgen
- Keywords:
- structure generator
-
Constructor Summary
ConstructorsConstructorDescriptionRandomGenerator
(IAtomContainer molecule) Constructs a RandomGenerator with a given starting structure. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Tell the RandomGenerator to accept the last structure that had been proposed.Returns the molecule which reflects the current state of this stochastic structure generator.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".Proposes a structure which can be accepted or rejected by an external entity.void
setMolecule
(IAtomContainer molecule) Assigns a starting structure to this generator.
-
Constructor Details
-
RandomGenerator
Constructs a RandomGenerator with a given starting structure.- Parameters:
molecule
- The starting structure
-
-
Method Details
-
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
Randomly chooses four atoms and alters the bonding pattern between them according to rules described in "Faulon, JCICS 1996, 36, 731". -
setMolecule
Assigns a starting structure to this generator.- Parameters:
molecule
- a starting structure for this generator
-
getMolecule
Returns the molecule which reflects the current state of this stochastic structure generator.- Returns:
- The molecule
-