Class CIPLigandRule

All Implemented Interfaces:
Comparator<ILigand>, ISequenceSubRule<ILigand>

public class CIPLigandRule extends Object implements ISequenceSubRule<ILigand>
Compares to ILigands based on CIP sequences sub rules. The used CIP sub rules are:
  1. MassNumberRule
  2. AtomicNumberRule
Source code:
Belongs to CDK module:
  • Constructor Details

    • CIPLigandRule

      public CIPLigandRule()
  • Method Details

    • compare

      public int compare(ILigand ligand1, ILigand ligand2)
      Compares two ligands according to the particular sequence sub rule. It returns 1 if ligand1 takes precedence over ligand2, -1 if ligand2 takes precedence over ligand1, and 0 if they are equal.
      Specified by:
      compare in interface Comparator<ILigand>
      Specified by:
      compare in interface ISequenceSubRule<ILigand>
      ligand1 - the first of the two ligands to compare
      ligand2 - the second of the two ligands to compare
      1 if ligand1 is of higher precedence than ligand2, -1 if ligand2 is of higher precedence than ligan1, and 0 if they have equal precedence