Resets a molecule to its initial state. This method deletes all
atoms (OEAtomBase) and bonds
(OEBondBase) that are part of the
molecule. Following an OEMolBase.Clear, the
atom and bond indices assigned to new atoms and bonds may not be
unique with those assigned prior to the
OEMolBase.Clear.

Deletes an atom from a molecule. All bonds connected to the
specified atom are also automatically deleted. Following an atom
deletion, the specified OEAtomBase pointer, and
the OEBondBase pointers of any incident bonds,
are no longer valid and should not be used. The atom index
associated with the atom, and the bond indices of any incident
bonds, are no longer recognized by the
OEMolBase, but the indices of all other atoms
and bonds remain stable, and are unaffected by this call.

Note

After deleting atoms or bonds, it may be necessary to call the
OEFindRingAtomsAndBonds and
OEAssignAromaticFlags functions to update the
‘in ring’ and ‘aromatic’ properties of the atoms and bonds in
the modified molecule.

Deletes a bond from a molecule. Following a bond deletion, the
specified OEBondBase pointer is no longer valid
and should not be used. The bond index associated with the bond
is no longer recognized by the OEMolBase, but
the indices of all other bonds remain stable, and are unaffected
by this call.

Note

After deleting atoms or bonds, it may be necessary to call the
OEFindRingAtomsAndBonds and
OEAssignAromaticFlags functions to update the
‘in ring’ and ‘aromatic’ properties of the atoms and bonds in
the modified molecule.

Returns an iterator over all the atoms of a molecule. By
default, this returns all the atoms of the molecule in the order
they were created. The ordering of the atoms returned by
OEMolBase.GetAtoms may be modified by
OEMolBase.OrderAtoms.

Returns an iterator over all the bonds of a molecule. By
default, this returns all the bonds of the molecule in the order
they were created. The ordering of the bonds returned by
OEMolBase.GetBonds may be modified by
OEMolBase.OrderBonds.

Returns a Python dictionary of the coordinates of this
molecule. The dictionary is keyed off the index of the
OEAtomBase as returned by
OEAtomBase.GetIdx. The values will always
be a 3-element tuple of floating point values. Note, the
dictionary will not contain entries for deleted atoms, making
it significantly easier to use than the following
OEFloatArray overloads. This also means the keys of the
dictionary are not always guaranteed to be contiguous
integers.

Note

The overload that returns a dictionary is for convenience
over performance as it is significantly more
pythonic. However, if the floating point values are not
needed in Python and just being passed to another OpenEye
toolkit function, using the following overloads with
OEFloatArray objects will be significantly faster.

Fills the specified array of floating point values with the
Cartesian coordinates of all of the atoms in the molecule. The
array argument must point to an array of at least
3* OEMolBase.GetMaxAtomIdx()
elements. The X, Y and Z coordinates for the atom with index ‘i’
will be placed at offsets 3*i, 3*i+1 and 3*i+2
respectively.

Fills the specified array of floating point values with the
Cartesian coordinates of the specified atom. This array must be
large enough to hold at least three values, corresponding to the
X, Y and Z values for the given atom.

Returns the ‘dimensionality’ property of a molecule. The default value is
zero, for unknown or no coordinates, 2 for 2-dimensional
coordinates (such as depictions) and 3 for 3-dimensional
coordinates.
The ‘dimensionality’ property of a molecule may be
set using the OEMolBase.SetDimension
method.

This property is typically set by the appropriate
molecular file format reader (0 for SMILES, 3 for MOL2 and 2 or
3 for MDL SD files etc...) or by calling the
OESetDimensionFromCoords function.

Returns the ‘energy’ property of a molecule. The default value is
0.0. The ‘energy’ property of a molecule may be set using the
OEMolBase.SetEnergy method. Higher values
indicate higher energies and therefore less-favorable or
more-strained structures.

Retrieves the first group of a molecule that matches the
specified group predicate (OEUnaryPredicate).
If the molecule does not contain a group that matches, a NULL pointer,
(OEGroupBase*)0, is returned.

Returns a lower bound on the maximum atom index. All atom indices
returned by OEAtomBase.GetIdx on atoms
belonging to this molecule are guaranteed to be less than this
value. Obviously, the returned result is always greater than or
equal to OEMolBase.NumAtoms.

Returns a lower bond on the maximum bond index. All bond indices
returned by OEBondBase.GetIdx on bonds
belonging to this molecule are guaranteed to be less than this
value. Obviously, the returned result is always greater than or
equal to OEMolBase.NumBonds.

Determines whether the molecule represents a
reaction/transform. A true returned value indicates that the
molecule represents a reaction, while false indicates the
molecule is a simple connection table. The default value is
false. The reaction property of a molecule may be set using
the OEMolBase.SetRxn method.

Creates a new atom in the molecule by specifying the element
number from the OEElemNo namespace.
This method does not create any bonds, and the returned created
atom is always disconnected.

OEAtomBase*NewAtom(constOEAtomBase&)=0

Creates a new atom in the molecule and copies the atomic
properties of the specified atom (atomic number, formal charge,
implicit hydrogen count, etc...)
This method does not create any bonds, and the returned created
atom is always disconnected.

Creates a new bond in the molecule. The ‘src’, ‘dst’ and ‘order’
arguments are used to specify the begin atom, the end atom and
the bond order of the new bond.
This method returns a pointer to the newly created
OEBondBase object.
The atoms specified as ‘src’ and ‘dst’ atoms must belong to the
current molecule.
Additionally, a NULL pointer,
(OEAtomBase*)0, may be
passed as either the begin or end atom (but not both), allowing
that atom to be specified later using
OEBondBase.SetBgn or
OEBondBase.SetEnd respectively.
This helps when creating molecules for applications in which the
ordering of atoms and/or bonds is significant.

Reorders the atoms of the molecule.
This method modifies the order in which the atoms are visited by
the iterator returned by OEMolBase.GetAtoms.
This method does not affect the atom indices of any of the atoms
of the molecule.
This method does not affect the ordering of any other iterator,
including bonds over a molecule (OEMolBase.GetBonds) ,
bonds over an atom (OEAtomBase.GetBonds) or
neighboring atoms over an atom (OEAtomBase.GetAtoms).

Reorders the bonds of a molecule.
This method modifies the order in which the bonds are visited by
the iterator returned by OEMolBase.GetBonds.
This method does not affect the bond indices of any of the bonds
of the molecule.
This method does not affect the ordering of any other iterator,
including atoms over a molecule (OEMolBase.GetAtoms),
bonds over an atom (OEAtomBase.GetBond) or
neighboring atoms over atom (OEAtomBase.GetAtoms).

Sets the Cartesian coordinates for all of the atoms in a molecule.
The array argument must point to an array of at least
3* OEMolBase.GetMaxAtomIdx()
elements.
The X, Y and Z coordinates for the atom with index ‘i’, should be
placed at offsets 3*i, 3*i+1 and 3*i+2 respectively.

Sets the Cartesian coordinates of the specified atom to the
values specified by the floating point array.
The array argument must point to array of at least three values,
representing the X, Y and Z Cartesian coordinates of the atom,
respectively.

Sets the ‘dimensionality’ property of a molecule.
The default value is zero.
The ‘dimensionality’ property of a molecule may be retrieved using
the OEMolBase.GetDimension method.
This property is typically set by the appropriate molecular file
format reader, or by calling the
OESetDimensionFromCoords function.

The ‘dimensionality’ property represents the dimensionality of
the coordinates.
This has the default value zero, for unknown or no coordinates,
2 for 2-dimensional coordinates (such as depictions) and 3 for
3-dimensional coordinates.
This property is typically set by the file format reader
indicating the dimensionality of the input file (0 for
SMILES, 3 for MOL2 and 2 or 3 for MDL SD files
etc...)

A boolean value that determines whether the given property is
perceived.

Warning

The perception flags are used for performance in order to avoid
perceiving properties that have already been calculated.
It should be set to be ‘true’ only by the function that
calculates the given property.