Class Hydrogenize

    • Constructor Detail

      • Hydrogenize

        public Hydrogenize()
    • Method Detail

      • addHAtoms

        @Deprecated
        public static boolean addHAtoms​(MoleculeGraph m,
                                        MolAtom[] atoms)
        Deprecated.
        since Marvin 5.11 use convertImplicitHToExplicit(MoleculeGraph, MolAtom[]) instead
        Adds Hydrogen atoms to specified atoms in a molecule. Same as convertImplicitHToExplicit(m, atoms).
        Parameters:
        m - the molecule to add Hydrogen atoms to.
        atoms - the atoms to add Hydrogen atoms to, null for all
        Returns:
        true if Hydrogen atoms were successfully added
      • convertImplicitHToExplicit

        public static boolean convertImplicitHToExplicit​(MoleculeGraph m,
                                                         MolAtom[] atoms)
        Convert implicit Hydrogen atoms of the specified atoms in a molecule to explicit. Same as convertImplicitHToExplicit(m, atoms, 0).
        Parameters:
        m - the molecule to add Hydrogen atoms to.
        atoms - the atoms to add Hydrogen atoms to, null for all
        Returns:
        true if Hydrogen atoms were successfully added
      • addHAtoms

        @Deprecated
        public static boolean addHAtoms​(MoleculeGraph m)
        Deprecated.
        since Marvin 5.11 use convertImplicitHToExplicit(MoleculeGraph) instead
        Adds Hydrogen atoms to all atoms in a molecule. Same as convertImplicitHToExplicit(m).
        Parameters:
        m - the molecule to add Hydrogen atoms to.
        Returns:
        true if Hydrogen atoms were successfully added
      • convertImplicitHToExplicit

        public static boolean convertImplicitHToExplicit​(MoleculeGraph m)
        Convert implicit Hydrogen atoms of the molecule to explicit. Same as convertImplicitHToExplicit(m, null, 0).
        Parameters:
        m - the molecule to add Hydrogen atoms to.
        Returns:
        true if Hydrogen atoms were successfully added
      • addHAtoms

        @Deprecated
        public static boolean addHAtoms​(MoleculeGraph m,
                                        MolAtom[] atoms,
                                        int flags)
        Deprecated.
        since Marvin 5.11 use convertImplicitHToExplicit(MoleculeGraph, MolAtom[], int) instead
        Adds Hydrogen atoms to specified atoms in a molecule. Same as convertImplicitHToExplicit(m, atoms, flags).
        Parameters:
        m - the molecule to add Hydrogen atoms to.
        atoms - the atoms to add Hydrogen atoms to, null for all
        flags - set this flag to MoleculeGraph.OMIT_POSTCLEAN to include partial clean after Hydrogen atom addition.
        Returns:
        true if Hydrogen atoms were successfully added
      • convertImplicitHToExplicit

        public static boolean convertImplicitHToExplicit​(MoleculeGraph m,
                                                         MolAtom[] atoms,
                                                         int flags)
        Convert implicit Hydrogen atoms of the specified atoms in a molecule to explicit.
        Parameters:
        m - the molecule to add Hydrogen atoms to.
        atoms - the atoms to add Hydrogen atoms to, null for all
        flags - set this flag to MoleculeGraph.OMIT_POSTCLEAN to exclude partial clean after Hydrogen atom addition.
        Returns:
        true if Hydrogen atoms were successfully added
      • removeHAtoms

        @Deprecated
        public static boolean removeHAtoms​(MoleculeGraph m,
                                           int flags)
        Deprecated.
        since Marvin 5.11 use convertExplicitHToImplicit(MoleculeGraph, int) instead
        Removes Hydrogen atoms from atoms in a molecule.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        flags - to use special removal conditions set
        Returns:
        true if specified Hydrogen atoms were successfully removed.
        See Also:
        convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
      • convertExplicitHToImplicit

        public static boolean convertExplicitHToImplicit​(MoleculeGraph m,
                                                         int flags)
        Convert explicit Hydrogen atoms of the molecule to implicit.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        flags - to use special removal conditions set
        Returns:
        true if specified Hydrogen atoms were successfully removed.
        See Also:
        convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
      • removeHAtoms

        @Deprecated
        public static boolean removeHAtoms​(MoleculeGraph m)
        Deprecated.
        since Marvin 5.11 use convertExplicitHToImplicit(MoleculeGraph) instead
        Removes Hydrogen atoms from a molecule. Besides lonely and wedged H atoms, bound (to non-Hydrogen atom and without Hydrogen bond), non-isotope, neutral, non-radical, non-mapped H atoms are also removed.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        Returns:
        true if Hydrogen atoms were successfully removed.
        See Also:
        MolAtom.isImplicitizableH(int)
      • convertExplicitHToImplicit

        public static boolean convertExplicitHToImplicit​(MoleculeGraph m)
        Convert explicit Hydrogen atoms of the molecule to implicit. Same as convertExplicitHToImplicit(m, MolAtom.LONELY_H | MolAtom.WEDGED_H | MolAtom.METALCONNECTED_H). Besides lonely and wedged H atoms, bound (to non-Hydrogen atom and without Hydrogen bond), non-isotope, neutral, non-radical, non-mapped H atoms are also removed.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        Returns:
        true if Hydrogen atoms were successfully removed.
        See Also:
        MolAtom.isImplicitizableH(int)
      • removeHAtoms

        @Deprecated
        public static boolean removeHAtoms​(MoleculeGraph m,
                                           MolAtom[] atoms,
                                           int flags)
        Deprecated.
        since Marvin 5.11 use convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int) instead
        Removes Hydrogen atoms from specified atoms of a molecule.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        atoms - the subset of atoms to include or null for all
        flags - to use special removal conditions
        See Also:
        removeHAtoms(MoleculeGraph, MolAtom[], int, boolean)
      • convertExplicitHToImplicit

        public static boolean convertExplicitHToImplicit​(MoleculeGraph m,
                                                         MolAtom[] atoms,
                                                         int flags)
        Convert explicit Hydrogen atoms attached to the specified atoms of the molecule to implicit.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        atoms - the subset of atoms to include or null for all
        flags - to use special removal conditions
        See Also:
        removeHAtoms(MoleculeGraph, MolAtom[], int, boolean)
      • convertExplicitHToImplicit

        public static boolean convertExplicitHToImplicit​(MoleculeGraph m,
                                                         MolAtom[] atoms,
                                                         int flags,
                                                         boolean check)
        Convert explicit Hydrogen atoms attached to the specified atoms of a molecule to implicit.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        atoms - the subset of atoms to include or null for all
        flags - to use special removal conditions set this flag to:
        • MolAtom.ALL_H for including any Hydrogen atom for removal.
        • MolAtom.LONELY_H for including lonely Hydrogen atom(s) for removal. Hydrogen atoms with only Hydrogen bonds counted as lonely.
        • MolAtom.ISOTOPE_H for including Hydrogen isotope(s) for removal.
        • MolAtom.CHARGED_H for including charged Hydrogen atom(s) for removal.
        • MolAtom.RADICAL_H for including radical Hydrogen atom(s) for removal.
        • MolAtom.MAPPED_H for including mapped Hydrogen atom(s) for removal.
        • MolAtom.WEDGED_H for including Hydrogen atom(s) with wedge bonds for removal.
        • MolAtom.HCONNECTED_H for including Hydrogen atom(s) connected to another Hydrogen atom only for removal.
        • MolAtom.METALCONNECTED_H for including Hydrogen atom(s) connected to metal atoms.
        • MolAtom.HBONDED_H for including Hydrogen atom(s) having a Hydrogen bond connected to them for removal.
        • MolAtom.CTSPECIFIC_H for including to remove the Hydrogen atom(s) connecting alone to one side of a double bond with specified CIS or TRANS stereo information.
        • MolAtom.POLYMERENDGROUP_H for including Hydrogen atom(s) which have a neighbor that is in an Sgroup (not DataSgroup or SuperatomSgroup).
        • MolAtom.SGROUPEND_H for including Hydrogen atom(s) which have a neighbor that is in SuperatomSgroup.
        • MolAtom.VALENCEERROR_H for including Hydrogen atom(s) connected to an atom with valence error.
        • MolAtom.SGROUP_H for including Hydrogen atom(s) which are in one element Sgroups.
        • MolAtom.BRIDGEHEAD_H for including Hydrogen atom which is connected to a bridgehead atom.
        check - checks if the given atoms belong to the given molecule.
        Returns:
        true if specified Hydrogen atoms were successfully removed.
        See Also:
        MolAtom.ALL_H, MolAtom.LONELY_H, MolAtom.ISOTOPE_H, MolAtom.CHARGED_H, MolAtom.RADICAL_H, MolAtom.MAPPED_H, MolAtom.WEDGED_H, MolAtom.HCONNECTED_H, MolAtom.METALCONNECTED_H, MolAtom.HBONDED_H, MolAtom.CTSPECIFIC_H, MolAtom.POLYMERENDGROUP_H, MolAtom.SGROUPEND_H, MolAtom.VALENCEERROR_H, MolAtom.SGROUP_H, MolAtom.BRIDGEHEAD_H
      • removeHAtoms

        @Deprecated
        public static boolean removeHAtoms​(MoleculeGraph m,
                                           MolAtom[] atoms,
                                           int flags,
                                           boolean check)
        Deprecated.
        since Marvin 5.11 use convertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean) instead
        Removes Hydrogen atoms from specified atoms of a molecule.
        Parameters:
        m - the molecule to remove Hydrogen atoms from.
        atoms - the subset of atoms to include or null for all
        flags - to use special removal conditions set this flag to:
        • MolAtom.ALL_H for including any Hydrogen atom for removal.
        • MolAtom.LONELY_H for including lonely Hydrogen atom(s) for removal. Hydrogen atoms with only Hydrogen bonds counted as lonely.
        • MolAtom.ISOTOPE_H for including Hydrogen isotope(s) for removal.
        • MolAtom.CHARGED_H for including charged Hydrogen atom(s) for removal.
        • MolAtom.RADICAL_H for including radical Hydrogen atom(s) for removal.
        • MolAtom.MAPPED_H for including mapped Hydrogen atom(s) for removal.
        • MolAtom.WEDGED_H for including Hydrogen atom(s) with wedge bonds for removal.
        • MolAtom.HCONNECTED_H for including Hydrogen atom(s) connected to another Hydrogen atom only for removal.
        • MolAtom.CTSPECIFIC_H for including to remove the Hydrogen atom(s) connecting alone to one side of a double bond with specified CIS or TRANS stereo information.
        • MolAtom.POLYMERENDGROUP_H for including Hydrogen atom(s) which have a neighbor that is in an Sgroup (not DataSgroup or SuperatomSgroup).
        • MolAtom.SGROUPEND_H for including Hydrogen atom(s) which have a neighbor that is in SuperatomSgroup.
        • MolAtom.VALENCEERROR_H for including Hydrogen atom(s) connected to an atom with valence error.
        • MolAtom.SGROUP_H for including Hydrogen atom(s) which are in one element Sgroups.
        • MolAtom.BRIDGEHEAD_H for including Hydrogen atom which is connected to a bridgehead atom.
        check - checks if the given atoms belong to the given molecule.
        Returns:
        true if specified Hydrogen atoms were successfully removed.
        See Also:
        MolAtom.ALL_H, MolAtom.LONELY_H, MolAtom.ISOTOPE_H, MolAtom.CHARGED_H, MolAtom.RADICAL_H, MolAtom.MAPPED_H, MolAtom.WEDGED_H, MolAtom.HCONNECTED_H, MolAtom.CTSPECIFIC_H, MolAtom.POLYMERENDGROUP_H, MolAtom.SGROUPEND_H, MolAtom.VALENCEERROR_H, MolAtom.SGROUP_H, MolAtom.BRIDGEHEAD_H
      • convertImplicitLonePairsToExplicit

        public static boolean convertImplicitLonePairsToExplicit​(MoleculeGraph m,
                                                                 MolAtom[] atoms)
        Convert implicit lone pairs of the atoms of a molecule to explicit.
        Parameters:
        m - the molecule to add lone pairs to.
        atoms - the atoms to include for lone pair addition, null for all
        Returns:
        true if lone pairs were successfully added false otherwise
      • addLonePairs

        @Deprecated
        public static boolean addLonePairs​(MoleculeGraph m,
                                           MolAtom[] atoms)
        Deprecated.
        since Marvin 5.11 use convertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[]) isntead
        Adds lone pairs to atoms of a molecule.
        Parameters:
        m - the molecule to add lone pairs to.
        atoms - the atoms to include for lone pair addition, null for all
        Returns:
        true if lone pairs were successfully added false otherwise
      • convertExplicitLonePairsToImplicit

        public static boolean convertExplicitLonePairsToImplicit​(MoleculeGraph m)
        Converts explicit lone pairs from a molecule to implicit.
        Parameters:
        m - the molecule to remove lone pairs from.
        Returns:
        true if lone pairs were successfully removed false otherwise.
      • removeLonePairs

        @Deprecated
        public static boolean removeLonePairs​(MoleculeGraph m)
        Deprecated.
        since Marvin 5.11 use convertExplicitLonePairsToImplicit(MoleculeGraph) instead
        Removes lone pairs from a molecule.
        Parameters:
        m - the molecule to remove lone pairs from.
        Returns:
        true if lone pairs were successfully removed false otherwise.
      • isBridgeHeadAtom

        @Deprecated
        public static boolean isBridgeHeadAtom​(MoleculeGraph mol,
                                               int atom)
        Deprecated.
        as of Marvin 5.11.1, replaced by TopologyUtil.isBridgeHeadAtom(MoleculeGraph, int)
        Test whether the given atom is bridgehead.
        Parameters:
        mol - molecule
        atom - atom to check
        Returns:
        true if the given atom is bridgehead else false
      • getImplicitizableHList

        public static boolean[] getImplicitizableHList​(Molecule m,
                                                       int flags)
        Gets which atom is an implicitizable hydrogen.
        Parameters:
        m -
        flags -
        Returns:
        a boolean array. The i-th element of the array is true if the i-th atom of the molecule is an implicitizable hydrogen.