◆ Adjustment
Enum values that control the adjustHydrogen function's behavior.
Enumerator |
---|
Add | Only add hydrogens to underbonded atoms.
|
Remove | Only remove hydrogens from overbonded atoms.
|
AddAndRemove | Add hydrogens to underbonded atoms and remove hydrogens from overbonded atoms.
|
◆ removeAllHydrogens()
static void removeAllHydrogens |
( |
RWMolecule & |
molecule | ) |
|
|
static |
Remove all hydrogen atoms from molecule.
◆ adjustHydrogens() [1/2]
Add/remove hydrogens on molecule to satisfy valency.
◆ adjustHydrogens() [2/2]
Add/remove hydrogens on atom to satisfy valency.
◆ valencyAdjustment()
static int valencyAdjustment |
( |
const RWAtom & |
atom | ) |
|
|
static |
- Returns
- The number of bonds that need to be added or removed from atom to satisfy valency. A positive number indicates the number of bonds to add, a negative number indicates the number of bonds that need to be removed.
◆ extraHydrogenIndices()
static int extraHydrogenIndices |
( |
const RWAtom & |
atom, |
|
|
int |
numberOfHydrogens, |
|
|
std::vector< size_t > & |
indices |
|
) |
| |
|
static |
Obtain the indices of hydrogens that can be removed from atom.
- Parameters
-
atom | The atom from which to prune hydrogens. |
numberOfHydrogens | The maximum number of hydrogens to prune. |
indices | A vector that will be appended with the indices of the hydrogens to remove. |
- Returns
- The number of hydrogen indices appended to indices.
- Note
- This function modifies neither atom nor its parent molecule. It only pushes the indices of hydrogens to remove to the end of indices.
◆ generateNewHydrogenPositions()
static void generateNewHydrogenPositions |
( |
const RWAtom & |
atom, |
|
|
int |
numberOfHydrogens, |
|
|
std::vector< Vector3 > & |
positions |
|
) |
| |
|
static |
Generate positions for numberOfHydrogens hydrogens bonded to atom.
- Parameters
-
positions | Vector of positions that will be appended with numberOfHydrogens hydrogen locations. |
- Note
- There is nothing intelligent going on here. The new positions are randomly oriented and have a length that is the sum of atom's and hydrogen's covalent radii. Effort is made to prevent overlap with other bonded atoms, but this is not guaranteed.
◆ perceiveHybridization()
static Core::AtomHybridization perceiveHybridization |
( |
const RWAtom & |
atom | ) |
|
|
static |
Perceive the geometry / hybridization bonded to atom. Ideally, the client should cache the hybridization number by calling setHybridization() later
◆ generateNewBondVector()
static Vector3 generateNewBondVector |
( |
const RWAtom & |
atom, |
|
|
std::vector< Vector3 > & |
currentVectors, |
|
|
Core::AtomHybridization |
hybridization |
|
) |
| |
|
static |
Generate a new bond vector (unit length)
The documentation for this class was generated from the following file: