public interface AtomContainerDiscretePartitionRefiner extends DiscretePartitionRefiner
There are a couple of ways to use it - firstly, get the automorphisms.
IAtomContainer ac = ... // get an atom container somehow AtomContainerDiscretePartitionRefiner refiner = PartitionRefinement.forAtoms().create() PermutationGroup autG = refiner.getAutomorphismGroup(ac); for (Permutation automorphism : autG.all()) { ... // do something with the permutation }
Another is to check an atom container to see if it is canonical:
IAtomContainer ac = ... // get an atom container somehow AtomContainerDiscretePartitionRefiner refiner = PartitionRefinement.forAtoms().create() if (refiner.isCanonical(ac)) { ... // do something with the atom container }Note that it is not necessary to call
refine(IAtomContainer)
before
either of these methods. However if both the group and the canonical check
are required, then the code should be:
AtomContainerDiscretePartitionRefiner refiner = PartitionRefinement.forAtoms().create() refiner.refine(ac); boolean isCanon = refiner.isCanonical(); PermutationGroup autG = refiner.getAutomorphismGroup();This way, the refinement is not carried out multiple times.
Modifier and Type | Method and Description |
---|---|
PermutationGroup |
getAutomorphismGroup(IAtomContainer atomContainer)
Gets the automorphism group of the atom container.
|
PermutationGroup |
getAutomorphismGroup(IAtomContainer atomContainer,
Partition initialPartition)
Get the automorphism group of the molecule given an initial partition.
|
PermutationGroup |
getAutomorphismGroup(IAtomContainer atomContainer,
PermutationGroup group)
Speed up the search for the automorphism group using the automorphisms in
the supplied group.
|
Partition |
getAutomorphismPartition(IAtomContainer atomContainer)
Get the automorphism partition (equivalence classes) of the atoms.
|
boolean |
isCanonical(IAtomContainer atomContainer)
Checks if the atom container is canonical.
|
void |
refine(IAtomContainer atomContainer)
Refine an atom container, which has the side effect of calculating
the automorphism group.
|
void |
refine(IAtomContainer atomContainer,
Partition partition)
Refine an atom partition based on the connectivity in the atom container.
|
firstIsIdentity, getAutomorphismGroup, getAutomorphismPartition, getBest, getFirst
void refine(IAtomContainer atomContainer)
DiscretePartitionRefiner.getAutomorphismGroup()
instead of getAutomorphismGroup(IAtomContainer)
otherwise the
refine method will be called twice.atomContainer
- the atomContainer to refinevoid refine(IAtomContainer atomContainer, Partition partition)
atomContainer
- the atom container to usepartition
- the initial partition of the atomsboolean isCanonical(IAtomContainer atomContainer)
refine(org.openscience.cdk.interfaces.IAtomContainer)
first.atomContainer
- the atom container to checkPermutationGroup getAutomorphismGroup(IAtomContainer atomContainer)
AtomDiscretePartitionRefiner.ignoreElements
flag in the constructor.atomContainer
- the atom container to usePermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, PermutationGroup group)
atomContainer
- the atom container to usegroup
- the group of known automorphismsPermutationGroup getAutomorphismGroup(IAtomContainer atomContainer, Partition initialPartition)
atomContainer
- the atom container to useinitialPartition
- an initial partition of the atomsPartition getAutomorphismPartition(IAtomContainer atomContainer)
atomContainer
- the molecule to calculate equivalence classes forCopyright © 2021. All rights reserved.