Package org.openscience.cdk.hash
Enum BasicAtomEncoder
- java.lang.Object
-
- java.lang.Enum<BasicAtomEncoder>
-
- org.openscience.cdk.hash.BasicAtomEncoder
-
- All Implemented Interfaces:
Serializable
,Comparable<BasicAtomEncoder>
,AtomEncoder
public enum BasicAtomEncoder extends Enum<BasicAtomEncoder> implements AtomEncoder
Enumeration of atom encoders for seeding atomic hash codes. Generally these encoders return the direct value or a prime number if that value is null. These encoders are considered basic as the values generated are all in the same range. Better encoding can be achieved by assigning discrete values a section of the prime number table. However, In practice using a pseudorandom number generator to distribute the encoded values provides a good distribution.- Author:
- John May
- See Also:
ConjugatedAtomEncoder
, Prime numbers archive- Source code:
- main
- Belongs to CDK module:
- hash
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ATOMIC_NUMBER
Encode the atomic number of an atom.BOND_ORDER_SUM
Encode the explicit bond order sum of an atom.FORMAL_CHARGE
Encode the formal charge of an atom, allowing distinction of different protonation states.FREE_RADICALS
Encode the orbital hybridization of an atom.MASS_NUMBER
Encode the mass number of an atom, allowing distinction of isotopes.N_CONNECTED_ATOMS
Encode the number of explicitly connected atoms (degree).ORBITAL_HYBRIDIZATION
Encode the orbital hybridization of an atom.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BasicAtomEncoder
valueOf(String name)
Returns the enum constant of this type with the specified name.static BasicAtomEncoder[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.openscience.cdk.hash.AtomEncoder
encode
-
-
-
-
Enum Constant Detail
-
ATOMIC_NUMBER
public static final BasicAtomEncoder ATOMIC_NUMBER
Encode the atomic number of an atom.- See Also:
IElement.getAtomicNumber()
-
MASS_NUMBER
public static final BasicAtomEncoder MASS_NUMBER
Encode the mass number of an atom, allowing distinction of isotopes.- See Also:
IIsotope.getMassNumber()
-
FORMAL_CHARGE
public static final BasicAtomEncoder FORMAL_CHARGE
Encode the formal charge of an atom, allowing distinction of different protonation states.- See Also:
IAtomType.getFormalCharge()
-
N_CONNECTED_ATOMS
public static final BasicAtomEncoder N_CONNECTED_ATOMS
Encode the number of explicitly connected atoms (degree).
-
BOND_ORDER_SUM
public static final BasicAtomEncoder BOND_ORDER_SUM
Encode the explicit bond order sum of an atom.- See Also:
IAtomContainer.getBondOrderSum(IAtom)
-
ORBITAL_HYBRIDIZATION
public static final BasicAtomEncoder ORBITAL_HYBRIDIZATION
Encode the orbital hybridization of an atom.- See Also:
IAtomType.getHybridization()
-
FREE_RADICALS
public static final BasicAtomEncoder FREE_RADICALS
Encode the orbital hybridization of an atom.
-
-
Method Detail
-
values
public static BasicAtomEncoder[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BasicAtomEncoder c : BasicAtomEncoder.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BasicAtomEncoder valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-