OEDesignUnit
Attention
This API is currently available in C++ and Python.
class OEDesignUnit : public OESystem::OEBase
This is a container class derived from OEBase that holds all molecules needed to construct a model-ready biomolecular system.
Constructors
OEDesignUnit() -> OEDesignUnit
OEDesignUnit(rhs: OEDesignUnit) -> OEDesignUnit
OEDesignUnit(target: Union[OEGraphMol,OEMol,OEQMol],
siteResidues: OEStringVector,
solvent: Union[OEGraphMol,OEMol,OEQMol]=OEGraphMol(),
cofactors: Union[OEGraphMol,OEMol,OEQMol]=OEGraphMol(),
targetID: int) -> OEDesignUnit
OEDesignUnit(target: Union[OEGraphMol,OEMol,OEQMol],
ligand: Union[OEGraphMol,OEMol,OEQMol],
solvent: Union[OEGraphMol,OEMol,OEQMol]=OEGraphMol(),
cofactors: Union[OEGraphMol,OEMol,OEQMol]=OEGraphMol(),
targetID: int) -> OEDesignUnit
Default constructor.
Molecule constructors
Note
Molecule constructors are intended for already prepared molecules. They requires a target structure, as well as either a ligand or a list of binding site residues. Solvent and co-factors are optional, and are only set if the molecules passed are valid. The target molecule is not split into components and no structure preparation take place. A title will be generated based on the names of the provided molecules, but can be set manually afterwards.
OEDesignUnit(const OEChem::OEMolBase& target,
const OEChem::OEMolBase& ligand,
const OEChem::OEMolBase& solvent = OEChem::OEGraphMol(),
const OEChem::OEMolBase& cofactors = OEChem::OEGraphMol(),
const unsigned targetID = OEDesignUnitComponents::Protein)
Target-ligand constructor
OEDesignUnit(const OEChem::OEMolBase& target,
const std::vector<std::string>& siteResidues,
const OEChem::OEMolBase& solvent = OEChem::OEGraphMol(),
const OEChem::OEMolBase& cofactors = OEChem::OEGraphMol(),
const unsigned targetID = OEDesignUnitComponents::Protein)
Apo target constructor
operator=
Assignment operator.
operator bool
Clear
Clear() -> None
Resets the OEDesignUnit object to its initial state. This method deletes all internally stored molecules, and clears any OEBase data from the object.
CreateCopy
CreateCopy() -> OEDesignUnit
Deep copy constructor that returns a copy of the object. The memory for the returned OEDesignUnit object is dynamically allocated and owned by the caller.
GetComponent
GetComponent(molecule: Union[OEGraphMol,OEMol,OEQMol],
componentID: int) -> bool
Returns a const reference to the molecule on the OEDesignUnit that is associated with the input componentID. Note that this function only works for single molecule components (e.g. protein, ligand, etc). This function requires an empty OEMolBase or it will clear the incoming molecule.
GetComponentID
GetComponentID(componentTag: str) -> int
Returns the internal unsigned integer representation of the componentTag string from the OEDesignUnit object.
GetComponentTag
GetComponentTag(componentID: int) -> str
Returns the string tag representation of the componentID unsigned integer from the OEDesignUnit object.
GetComponents
GetComponents(mol: Union[OEGraphMol,OEMol,OEQMol],
componentMask: int, bondCovalent: bool = True,
pred: OEUnaryAtomPred = OEIsTrueAtom()) -> bool
The function creates a single output mol from the components
given in the componentMask bit mask. The bit mask can be
constructed using unsigned integers stored in the
OEDesignUnitComponents namespace. The
function returns a boolean value to alert if the operation was
successful. Note that this function only works for a list of components (e.g. other_ligands, excipients, etc).
The optional predicate can be used to subset some of the components
in the specified bit mask. The predicate does not have to be complete,
e.g. two water molecules can be specified to subset the solvent category,
but that will not subset the protein component also included in that mask.
In essence the predicate is checked to see if it matches part of a design unit
component and only in this case does it take effect.
GetComponentsWithin
GetComponentsWithin(mol: Union[OEGraphMol,OEMol,OEQMol],
componentMask: int, withinMask: int,
dist: float = 5.0, includeSelf: bool = False,
bondCovalent: bool = True) -> bool
The function creates a single output mol from the components
given in the componentMask bit mask that fall within a dist
distance of components given in the withinMask bit mask. All bit
masks can be constructed using unsigned integers stored in the
OEDesignUnitComponents namespace. If the
boolean bondCovalent flag is set, all components that should be
covalently bonded will have bonded added in the output mol. The
function returns a boolean value to alert if the operation was
successful.
GetDataType
GetDataType() -> void
This pure virtual function is used to perform run-time type
identification. The value returned by the method should be
equivalent to the value returned by OEGetDataType
using the OEDesignUnit derived class type as the template argument.
GetIDs
GetIDs() -> OEUIntVector
Returns a vector of the component IDs stored on the OEDesignUnit object.
GetLigand
GetLigand(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the ligand molecule in the OEDesignUnit object.
lig = oechem.OEGraphMol()
if not du.GetLigand(lig):
oechem.OEThrow.Fatal("Error: Could not extract ligand from the OEDesignUnit.")
oechem.OEWriteMolecule(ofs, lig)
Whole example script can be downloaded from here.
GetMetal
GetMetal(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the metal in the OEDesignUnit object.
GetNucleicAcid
GetNucleicAcid(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the nucleic acid molecule in the OEDesignUnit object.
GetPDBMetaData
GetPDBMetaData(mol: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the PDB metadata in the OEDesignUnit object.
See also
OEResidueToString function.
GetPackingResidues
GetPackingResidues(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the packing residue molecule in the OEDesignUnit object.
GetProtein
GetProtein(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the protein molecule in the OEDesignUnit object. Note that this function requires an empty OEMolBase or it will clear the incoming molecule.
GetReceptor
GetReceptor() -> OEReceptor
Returns a reference to the receptor on the OEDesignUnit object.
GetSiteResidues
GetSiteResidues() -> OEStringVector
Returns a vector of the site residue strings stored on the OEDesignUnit object. This function calls the OEResidueToString function with “:” delimiter.
GetSolvent
GetSolvent(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the solvent molecule in the OEDesignUnit object.
GetStructureQuality
GetStructureQuality() -> OEStructureQuality
Returns the OEStructureQuality class stored on the OEDesignUnit object.
See also
OEStructureQuality class
GetTransform
GetTransform(trans: OETrans) -> bool
Returns success based on a valid copy of the input OETrans object in the OEDesignUnit object.
See also
OETrans class
GetTaggedComponents
GetTaggedComponents(componentMask: int) -> Iterable[Tuple[int, OEMolBase]]
Returns an OEIter of all molecules and
corresponding molecular tags stored on the OEDesignUnit
object. A bit mask of desired components can be constructed from
constants in the OEDesignUnitComponents
namespace and be passed in via the componentMask argument.
GetTags
GetTags() -> OEStringVector
Returns a vector of the tags of the molecules stored on the OEDesignUnit object.
GetTarget
GetTarget(molecule: Union[OEGraphMol,OEMol,OEQMol]) -> bool
Returns success based on a valid copy of the target molecule in the OEDesignUnit object.
GetTargetComponentID
GetTargetComponentID() -> int
Returns the component ID from the
OEDesignUnitComponents namespace of the
target molecule on the OEDesignUnit object.
GetTargetComponentTag
GetTargetComponentTag() -> str
Returns the string tag of the title of the OEDesignUnit object.
GetTitle
GetTitle() -> str
Returns the title of the OEDesignUnit object.
GetAltLoc
GetAltLoc() -> str
Returns the alternate location code used to generate the OEDesignUnit.
HasAltLoc
HasAltLoc(OEDesignUnit self) -> bool
Checks that the alternate locations flag on the OEDesignUnit object has been set.
HasComponent
HasComponent(componentID: int) -> bool
Checks that a molecule given by the componentID from the
OEDesignUnitComponents namespace has been
set on the OEDesignUnit object.
HasLigand
HasLigand() -> bool
Checks that the ligand molecule of the OEDesignUnit object has been set.
HasMetal
HasMetal() -> bool
Checks that the metal molecule of the OEDesignUnit object has been set.
HasNucleicAcid
HasNucleicAcid() -> bool
Checks that the nucleic acid molecule of the OEDesignUnit object has been set.
HasPDBMetaData
HasPDBMetaData() -> bool
Checks that the PDB metadata of the OEDesignUnit object has been set.
HasPackingResidues
HasPackingResidues() -> bool
Checks that the packing residue molecule of the OEDesignUnit object has been set.
HasProtein
HasProtein() -> bool
Checks that the protein molecule of the OEDesignUnit object has been set.
HasReceptor
HasReceptor() -> bool
Checks that the OEDesignUnit object contains a valid receptor.
HasSiteResidues
HasSiteResidues() -> bool
Checks that the site residues of the OEDesignUnit object has been set.
HasSolvent
HasSolvent() -> bool
Checks that the solvent molecule of the OEDesignUnit object has been set.
HasStructureQuality
HasStructureQuality() -> bool
Checks that the internal OEStructureQuality object stored on the OEDesignUnit has been set.
HasTransform
HasTransform() -> bool
Checks that the internal OETrans object stored on the OEDesignUnit has been set.
HasTarget
HasTitle
IsDataType
IsDataType(arg2: void) -> bool
Returns whether the type is the same as the instance this method is called on.
SetTitle
SetTitle(title: str) -> bool
Sets the title of the OEDesignUnit object.
SetSiteResidues
SetSiteResidues(siteResidues: OEResidueVector,
threshold: float = 0.80, addBox: float = 2.0,
rearrangeComponents: bool = False,
siteSize: float = 5.0) -> bool
SetSiteResidues sets site residues from OEResidue objects, updates site-based components, and regenerates site-dependent interaction and style data.
SetSiteResidues requires residues that are present in the current target component. SetSiteResidues returns False if siteResidues is empty, or if any residue in siteResidues is not found in the target.
SetSiteResidues uses the optional parameters as follows:
The
thresholdoption defines the minimum heavy-atom fraction of the current ligand that must fall inside the site box. Setting the value to 0.0 skips the ligand coverage validation.The
addBoxoption expands the site box before ligand coverage is evaluated.The
rearrangeComponentsoption controls whether components are re-arranged in the design unit based on whether the ligand coverage validation is true or false. SettingrearrangeComponentstoFalsecauses SetSiteResidues to returnFalsewhen ligand coverage is belowthreshold. Setting the value toTrue, allows component reassignment when ligand coverage is belowthreshold. The current ligand is moved toOtherLigandsand cofactors are moved toOtherCofactors. The list ofOtherLigandsis then evaluated, and the best ligand that meetsthresholdcan be promoted into the ligand component, with correspondingOtherCofactorsmoved to theCofactorscomponent.siteSizecontrols how site-associated cofactors are determined.
Note
SetSiteResidues preserves an existing receptor only when at least one new site residue overlaps the previous site-residue set. SetSiteResidues clears the receptor when no overlap is found.
ClearReceptor
ClearReceptor() -> bool
Clears the stored OEReceptor object.
ClearComponent
ClearComponent(componentTag: str, listIndex: int = -1) -> bool ClearComponent(componentID: int, listIndex: int = -1) -> boolClears a specified component. The listIndex is intended for listComponents, e.g. co-factors. If the listIndex is -1 the entire list is removed, otherwise only the co-factor with the given index is removed.