Class Hydrogenize
java.lang.Object
chemaxon.calculations.hydrogenize.Hydrogenize
- All Implemented Interfaces:
StereoConstants
Addition and removal of explicit hydrogens or lone pairs.
- Since:
- Marvin 2.4, 04/24/2000
-
Field Summary
Fields inherited from interface chemaxon.struc.StereoConstants
ANTI, ATOMSTEREO_EITHER, ATOMSTEREO_MASK, ATOMSTEREO_NONE, ATOMSTEREO_SPECIFIC, CHIRALITY_M, CHIRALITY_MASK, CHIRALITY_P, CHIRALITY_r, CHIRALITY_R, CHIRALITY_s, CHIRALITY_S, CHIRALITYSUPPORT_ALL, CHIRALITYSUPPORT_ALL_POSSIBLE, CHIRALITYSUPPORT_NONE, CHIRALITYSUPPORT_SELECTED, CIS, CIS_TRANS, CTUMASK, CTUNKNOWN, CTUNSPEC, DBS_ALL, DBS_MARKED, DBS_NONE, ENDO, EXO, PARITY_ALLENE, PARITY_EITHER, PARITY_EVEN, PARITY_MASK, PARITY_NONE, PARITY_ODD, PARITY_TETRAHEDRAL, PARITY_UNSPEC, STGRP_ABS, STGRP_AND, STGRP_NONE, STGRP_OR, SYN, TRANS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deprecated, for removal: This API element is subject to removal in a future version.static boolean
addHAtoms
(MoleculeGraph m, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitHToExplicit(MoleculeGraph, MolAtom[])
insteadstatic boolean
addHAtoms
(MoleculeGraph m, MolAtom[] atoms, int flags) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitHToExplicit(MoleculeGraph, MolAtom[], int)
insteadstatic boolean
addLonePairs
(MoleculeGraph m, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[])
insteadstatic boolean
Converts explicit Hydrogen atoms of the molecule to implicit.static boolean
convertExplicitHToImplicit
(MoleculeGraph m, int flags) Converts explicit Hydrogen atoms of the molecule to implicit.static boolean
convertExplicitHToImplicit
(MoleculeGraph m, MolAtom[] atoms, int flags) Converts explicit Hydrogen atoms attached to the specified atoms of the molecule to implicit.static boolean
convertExplicitHToImplicit
(MoleculeGraph m, MolAtom[] atoms, int flags, boolean check) Converts explicit Hydrogen atoms attached to the specified atoms of a molecule to implicit.static boolean
Converts explicit lone pairs from a molecule to implicit.static boolean
Converts implicit Hydrogen atoms of the molecule to explicit.static boolean
convertImplicitHToExplicit
(MoleculeGraph m, MolAtom[] atoms) Converts implicit Hydrogen atoms of the specified atoms in a molecule to explicit.static boolean
convertImplicitHToExplicit
(MoleculeGraph m, MolAtom[] atoms, int flags) Converts implicit Hydrogen atoms of the specified atoms in a molecule to explicit.static boolean
convertImplicitLonePairsToExplicit
(MoleculeGraph m, MolAtom[] atoms) Convert implicit lone pairs of the atoms of a molecule to explicit.static boolean[]
getImplicitizableHList
(Molecule m, int flags) Gets which atom is an implicitizable hydrogen.static boolean
isBridgeHeadAtom
(MoleculeGraph mol, int atom) Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 5.11.1, replaced byTopologyUtil.isBridgeHeadAtom(MoleculeGraph, int)
static boolean
Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph)
insteadstatic boolean
removeHAtoms
(MoleculeGraph m, int flags) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph, int)
insteadstatic boolean
removeHAtoms
(MoleculeGraph m, MolAtom[] atoms, int flags) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph, MolAtom[], int)
insteadstatic boolean
removeHAtoms
(MoleculeGraph m, MolAtom[] atoms, int flags, boolean check) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
insteadstatic boolean
Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitLonePairsToImplicit(MoleculeGraph)
instead
-
Constructor Details
-
Hydrogenize
public Hydrogenize()
-
-
Method Details
-
addHAtoms
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean addHAtoms(MoleculeGraph m, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitHToExplicit(MoleculeGraph, MolAtom[])
insteadAdds Hydrogen atoms to specified atoms in a molecule. Same asconvertImplicitHToExplicit(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
Converts implicit Hydrogen atoms of the specified atoms in a molecule to explicit. Same asconvertImplicitHToExplicit(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(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean addHAtoms(MoleculeGraph m) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitHToExplicit(MoleculeGraph)
insteadAdds Hydrogen atoms to all atoms in a molecule. Same asconvertImplicitHToExplicit(m)
.- Parameters:
m
- the molecule to add Hydrogen atoms to.- Returns:
- true if Hydrogen atoms were successfully added
-
convertImplicitHToExplicit
Converts implicit Hydrogen atoms of the molecule to explicit. Same asconvertImplicitHToExplicit(m, null, 0)
.- Parameters:
m
- the molecule to add Hydrogen atoms to.- Returns:
- true if Hydrogen atoms were successfully added
-
addHAtoms
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean addHAtoms(MoleculeGraph m, MolAtom[] atoms, int flags) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitHToExplicit(MoleculeGraph, MolAtom[], int)
insteadAdds Hydrogen atoms to specified atoms in a molecule. Same asconvertImplicitHToExplicit(m, atoms, flags)
.- Parameters:
m
- the molecule to add Hydrogen atoms to.atoms
- the atoms to add Hydrogen atoms to, null for allflags
- set this flag toMoleculeGraph.OMIT_POSTCLEAN
to include partial clean after Hydrogen atom addition.- Returns:
- true if Hydrogen atoms were successfully added
-
convertImplicitHToExplicit
Converts 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 allflags
- set this flag toMoleculeGraph.OMIT_POSTCLEAN
to exclude partial clean after Hydrogen atom addition.- Returns:
- true if Hydrogen atoms were successfully added
-
removeHAtoms
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean removeHAtoms(MoleculeGraph m, int flags) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph, int)
insteadRemoves 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
Converts explicit Hydrogen atoms of the molecule to implicit.- Parameters:
m
- the molecule to remove Hydrogen atoms from.flags
- the flags to specify special removal conditions, seeconvertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
for the details.- Returns:
- true if specified Hydrogen atoms were successfully removed.
-
removeHAtoms
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean removeHAtoms(MoleculeGraph m) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph)
insteadRemoves 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:
-
convertExplicitHToImplicit
Converts explicit Hydrogen atoms of the molecule to implicit. Same asconvertExplicitHToImplicit(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:
-
removeHAtoms
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean removeHAtoms(MoleculeGraph m, MolAtom[] atoms, int flags) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph, MolAtom[], int)
insteadRemoves Hydrogen atoms from specified atoms of a molecule.- Parameters:
m
- the molecule to remove Hydrogen atoms from.atoms
- the subset of atoms to include ornull
for allflags
- to use special removal conditions
-
convertExplicitHToImplicit
Converts 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 ornull
for allflags
- the flags to specify special removal conditions, seeconvertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
for the details.
-
convertExplicitHToImplicit
public static boolean convertExplicitHToImplicit(MoleculeGraph m, MolAtom[] atoms, int flags, boolean check) Converts 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 ornull
for allflags
- the flags to specify special removal conditions:- 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(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean removeHAtoms(MoleculeGraph m, MolAtom[] atoms, int flags, boolean check) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitHToImplicit(MoleculeGraph, MolAtom[], int, boolean)
insteadRemoves Hydrogen atoms from specified atoms of a molecule.- Parameters:
m
- the molecule to remove Hydrogen atoms from.atoms
- the subset of atoms to include ornull
for allflags
- 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:
-
convertImplicitLonePairsToExplicit
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(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean addLonePairs(MoleculeGraph m, MolAtom[] atoms) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertImplicitLonePairsToExplicit(MoleculeGraph, MolAtom[])
insteadAdds 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
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(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean removeLonePairs(MoleculeGraph m) Deprecated, for removal: This API element is subject to removal in a future version.since Marvin 5.11, useconvertExplicitLonePairsToImplicit(MoleculeGraph)
insteadRemoves 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(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public static boolean isBridgeHeadAtom(MoleculeGraph mol, int atom) Deprecated, for removal: This API element is subject to removal in a future version.as of Marvin 5.11.1, replaced byTopologyUtil.isBridgeHeadAtom(MoleculeGraph, int)
Test whether the given atom is bridgehead.- Parameters:
mol
- moleculeatom
- atom to check- Returns:
- true if the given atom is bridgehead else false
-
getImplicitizableHList
Gets which atom is an implicitizable hydrogen.- 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.
-
convertImplicitHToExplicit(MoleculeGraph)
instead