Class SmilesValencyChecker

    • Constructor Detail

      • SmilesValencyChecker

        public SmilesValencyChecker()
      • SmilesValencyChecker

        public SmilesValencyChecker​(String atomTypeList)
    • Method Detail

      • unsaturateByDecreasingBondOrder

        public boolean unsaturateByDecreasingBondOrder​(IBond bond)
      • isUnsaturated

        public boolean isUnsaturated​(IBond bond,
                                     IAtomContainer atomContainer)
                              throws CDKException
        Returns whether a bond is unsaturated. A bond is unsaturated if all Atoms in the bond are unsaturated.
        Throws:
        CDKException
      • saturateByIncreasingBondOrder

        public boolean saturateByIncreasingBondOrder​(IBond bond,
                                                     IAtomContainer atomContainer)
                                              throws CDKException
        Tries to saturate a bond by increasing its bond orders by 1.0.
        Returns:
        true if the bond could be increased
        Throws:
        CDKException
      • isSaturated

        public boolean isSaturated​(IBond bond,
                                   IAtomContainer atomContainer)
                            throws CDKException
        Returns whether a bond is saturated. A bond is saturated if both Atoms in the bond are saturated.
        Throws:
        CDKException
      • couldMatchAtomType

        public boolean couldMatchAtomType​(IAtom atom,
                                          double bondOrderSum,
                                          IBond.Order maxBondOrder,
                                          IAtomType type)
        Determines if the atom can be of type AtomType. That is, it sees if this AtomType only differs in bond orders, or implicit hydrogen count.
      • calculateNumberOfImplicitHydrogens

        public int calculateNumberOfImplicitHydrogens​(IAtom atom,
                                                      double bondOrderSum,
                                                      IBond.Order maxBondOrder,
                                                      int neighbourCount)
                                               throws CDKException
        Calculates the number of hydrogens that can be added to the given atom to fullfil the atom's valency. It will return 0 for PseudoAtoms, and for atoms for which it does not have an entry in the configuration file.
        Throws:
        CDKException
      • couldMatchAtomType

        public boolean couldMatchAtomType​(IAtomContainer container,
                                          IAtom atom,
                                          IAtomType type)
        Determines if the atom can be of type AtomType.