OEConfBase

class OEConfBase : public OEMolBase

OEConfBase is the generic conformer base class. It is an abstract base class which defines the interface for conformer implementations. Coordinates can be stored in OEHalfFloat (16-bit), float (32-bit), double (64-bit), or long double (>= 64-bit). The precision is determined by the constructor argument given to OEMol, taken from the OEMCMolType namespace. The default is 32-bit float.

The following methods are publicly inherited from OEMolBase:

operator=

GetDimension

NumBonds

operator bool

GetEnergy

NumGroups

Clear

GetGroup

OrderAtoms

ClearCoords

GetGroups

OrderBonds

Compress

GetMaxAtomIdx

ResetPerceived

Count

GetMaxBondIdx

SetCoords

CreateCopy

GetTitle

SetDimension

DeleteAtom

HasPerceived

SetEnergy

DeleteBond

IsDataType

SetPerceived

DeleteGroup

IsDeleted

SetRxn

GetAtom

IsRxn

SetTitle

GetAtoms

NewAtom

Sweep

GetBond

NewBond

UnCompress

GetBonds

NewGroup

GetCoords

NumAtoms

The following methods are publicly inherited from OEBase:

operator=

GetData

IsDataType

operator+=

GetDataIter

SetBaseData

AddBaseData

GetDataType

SetBoolData

AddData

GetDoubleData

SetData

Clear

GetFloatData

SetDoubleData

CreateCopy

GetIntData

SetFloatData

DeleteData

GetStringData

SetIntData

GetBoolData

HasData

SetStringData

AddAtom

AddAtom(atom: OEAtomBase) -> None
AddAtom(rhs: OEAtomBase, atom: OEAtomBase) -> None

OEConfBase.AddAtom is a helper method that the OEMCMolBase can call as an adjunct to OEMolBase.NewAtom on the molecule which contains the conformers.

Warning

This should not be called by a primary user.

AddBond

AddBond(bond: OEBondBase) -> None

OEConfBase.AddBond is a helper method that the OEMCMolBase can call as an adjunct to OEMolBase.NewBond on the molecule which contains the conformers.

Warning

This should not be called by a primary user.

Delete

Delete() -> None

The OEConfBase.Delete method is equivalent to call OEMCMolBase.DeleteConf from the parent molecule. It removes the current conformer from the OEMCMolBase object containing it. These functions do not invalidate current OEIter objects, and all calls to OEMCMolBase.GetConfs called after the call to OEConfBase.Delete will not contain the deleted conformer.

ClearCoords

ClearCoords() -> None

Clears the coordinates, clears perception flags and sets the coordinate dimension to 0

GetCoords

GetCoords() -> {idx : (x_0, y_0, z_0), ... }

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.

GetCoords(arg2: OEHalfFloat) -> bool
GetCoords(arg2: OEFloatArray) -> bool
GetCoords(arg2: OEDoubleArray) -> bool
GetCoords(OEDoubleArray: int) -> bool
GetCoords(atom: OEAtomBase) -> (x: float, y: float, z: float)

Fills the array passed into the function with a copy of the coordinates of the conformer. The array passed in should be at least of length OEConfBase.GetMaxAtomIdx * 3. The coordinates of each atom in the conformer will begin at coords[atom->GetIdx()*3] in the array. Changes made to the array after this function call will have no effect on the conformer.

GetCoords(arg2: OEAtomBase, arg3: OEHalfFloat) -> bool
GetCoords(arg2: OEAtomBase, arg3: OEFloatArray) -> bool
GetCoords(arg2: OEAtomBase, arg3: OEDoubleArray) -> bool
GetCoords(arg2: OEAtomBase, OEDoubleArray: int) -> bool

Fills the coords array with the coordinates of the OEAtomBase object. The coords array should be at least of length 3. Changes made to the coord array after this function call will have no effect on the conformer.

GetIdx

GetIdx() -> int

Returns the index of the conformer. This value is assigned by OEChem when a conformer is created. The conformer index is unique for the conformation of a given molecule, and is stable (not reused) for the lifetime of that OEMCMolBase. These values may not be assigned sequentially, and may contain gaps. Conformer indices are guaranteed to be less than OEMCMolBase.GetMaxConfIdx. Conformer indices are typically only used for efficiently storing data in arrays externally to the OEMCMolBase. The arrays can be conveniently indexed via OEConfBase.GetIdx. For iterating across the conformers of a molecule, use OEMCMolBase.GetConfs and for keeping track of a particular conformer use the conformer pointer OEConfBase*.

GetMCMol

GetMCMol() -> OEMol

Returns the associated multi-conformer molecule that is serving as the container for the OEConfBase.

GetTitle

GetTitle() -> str

OEConfBase objects can have their own title. However, if they do not, they will report the title of their parent OEMCMolBase when the OEConfBase.GetTitle method is called.

GetTorsion

GetTorsion(arg2: OETorsion) -> float
GetTorsion(a: OEAtomBase, b: OEAtomBase, c: OEAtomBase,
           d: OEAtomBase) -> float

Returns the torsion value in the conformer. The torsion can be defined by either an OETorsion object, or by four OEAtomBase objects.

GetTransform

GetTransform() -> OETrans

Returns an OETrans, which is a container of all the transformations which have been applied to the OEConfBase. This function is particularly useful when the internal representation of coordinates may not be Cartesian.

HasTitle

HasTitle() -> bool

Returns whether this conformer has a title set.

IsDeleted

IsDeleted() -> bool

OEConfBase.IsDeleted is a helper function which assists other classes in maintaining functionality after an OEConfBase has been deleted.

See also

SetCoords

SetCoords(arg2: OEHalfFloat) -> bool
SetCoords(arg2: OEFloatArray) -> bool
SetCoords(arg2: OEDoubleArray) -> bool
SetCoords(OEDoubleArray: int) -> bool

Sets the coordinates of a conformer. The coords parameter is expected to be an array of size OEConfBase.GetMaxAtomIdx * 3. This array should contain 3 coordinates for each atom, and they should be located in the array passed in at coords[atom->GetIdx() * 3 + i], where i ranges from 0 to 3. An internal copy of the coordinates is stored in the OEConfBase that is independent of the coords array.

SetCoords(arg2: OEAtomBase, arg3: OEHalfFloat) -> bool
SetCoords(arg2: OEAtomBase, arg3: OEFloatArray) -> bool
SetCoords(arg2: OEAtomBase, arg3: OEDoubleArray) -> bool
SetCoords(arg2: OEAtomBase, OEDoubleArray: int) -> bool

Sets to coordinates of a single atom in the OEConfBase. The array passed in should be of length 3 and should contain the new coordinates of the atom. An internal copy of the coordinates is stored in the OEConfBase which is independent of the coords array.

SetTorsion

SetTorsion(arg2: OETorsion) -> None
SetTorsion(a: OEAtomBase, b: OEAtomBase, c: OEAtomBase,
           d: OEAtomBase, radians: float) -> None

Sets torsion value in the conformer. The torsion can be defined by either an OETorsion object, or by four OEAtomBase objects

Transform

Transform(arg2: OETrans) -> None
Transform(arg2: OETransBase) -> None

Applies the geometric transformation specified in the OETransBase object or the series of geometric transformations specified in the OETrans container to the OEConfBase. These functions permanently change the coordinates of the OEConfBase.