public final class Canon extends Object
InChINumbersTools
.
IAtomContainer m = ...; int[][] g = GraphUtil.toAdjList(m); // obtain canon labelling long[] labels = Canon.label(m, g); // obtain symmetry classes long[] labels = Canon.symmetry(m, g);
Modifier and Type  Method and Description 

static long[] 
basicInvariants(IAtomContainer container,
int[][] graph)

static long[] 
basicInvariants(IAtomContainer container,
int[][] graph,
int flav)
Generate the initial invariants for each atom in the
container . 
static long[] 
label(IAtomContainer container,
int[][] g)
Compute the canonical labels for the provided structure.

static long[] 
label(IAtomContainer container,
int[][] g,
Comparator<IAtom> cmp)
Compute the canonical labels for the provided structure.

static long[] 
label(IAtomContainer container,
int[][] g,
int opts)
Compute the canonical labels for the provided structure.

static long[] 
label(IAtomContainer container,
int[][] g,
long[] initial)
Compute the canonical labels for the provided structure.

static long[] 
symmetry(IAtomContainer container,
int[][] g)
Compute the symmetry classes for the provided structure.

static long[] 
symmetry(IAtomContainer container,
int[][] g,
int opts)
Compute the symmetry classes for the provided structure.

public static long[] label(IAtomContainer container, int[][] g, int opts)
InChINumbersTools
but is computationally much more expensive.container
 structureg
 adjacency list graph representationopts
 canonical generation options see CanonOpts
EquivalentClassPartitioner
,
InChINumbersTools
public static long[] label(IAtomContainer container, int[][] g)
InChINumbersTools
but is computationally much more expensive.container
 structureg
 adjacency list graph representationEquivalentClassPartitioner
,
InChINumbersTools
public static long[] label(IAtomContainer container, int[][] g, long[] initial)
InChINumbersTools
but is computationally much more expensive.container
 structureg
 adjacency list graph representationinitial
 initial seed invariantsEquivalentClassPartitioner
,
InChINumbersTools
public static long[] label(IAtomContainer container, int[][] g, Comparator<IAtom> cmp)
cmp
allowing arbitary properties to be distinguished or ignored.container
 structureg
 adjacency list graph representationcmp
 comparator to compare atomspublic static long[] symmetry(IAtomContainer container, int[][] g, int opts)
EquivalentClassPartitioner
gives more accurate symmetry perception but
this method is very quick and in practise successfully portions the
majority of chemical structures.container
 structureg
 adjacency list graph representationopts
 canonical generation options see CanonOpts
EquivalentClassPartitioner
public static long[] symmetry(IAtomContainer container, int[][] g)
EquivalentClassPartitioner
gives more accurate symmetry perception but
this method is very quick and in practise successfully portions the
majority of chemical structures.container
 structureg
 adjacency list graph representationEquivalentClassPartitioner
,
basicInvariants(IAtomContainer, int[][], int)
public static long[] basicInvariants(IAtomContainer container, int[][] graph)
container
 an atom container to generate labels forgraph
 graph representation (adjacency list)basicInvariants(IAtomContainer, int[][], int)
public static long[] basicInvariants(IAtomContainer container, int[][] graph, int flav)
container
.
The labels use the invariants described in (Weininger, David et. al.. Journal of Chemical Information and Computer
Sciences. 1989. 29).
The bits in the low 32bits are: 0000000000xxxxXXXXeeeeeeescchhhh
where:
[O]C=O
where both oxygens have no hydrogens and a single
connection but the atoms are not equivalent. Including a better
initial partition is more expensivecontainer
 an atom container to generate labels forgraph
 graph representation (adjacency list)flav
 bit mask canon flavor (see CanonOpts
)NullPointerException
 an atom had unset atomic number, hydrogen
count or formal chargeCopyright © 2021. All rights reserved.