class OEBind
This class represents OEBind
OEBind() OEBind(const OEBind &rhs) OEBind(const OEChem::OEMolBase &protein)
Besides the default and copy constructors, OEBind includes a constructor
that takes the protein to be used in binding calculations. Constructing
an OEBind object with the protein is identical to using the default
constructor and then calling SetProtein.
OEBind &operator=(const OEBind &rhs)
Assignment operator.
bool Bind(const OEChem::OEMolBase &ligand, OEBindResults &results) OESystem::OEIterBase< OEBindResults > *Bind(const OEChem::OEMCMolBase &ligand)
Calculate full binding results, including Coulombic terms. For a single molecule,
pass in the molecule and the OEBindResults class will be filled in. The following is a simple example of how Bind is used.
Bind runs through the steps shown in the SimpleBind section, and also takes these addition steps.
float OriginalOuterDielectric = _zap.GetOuterDielectric();
_zap.SetOuterDielectric(_zap.GetInnerDielectric());
float *uniform_prot_pot = new float[patoms];
_zap.SetMolecule(_protein);
_zap.CalcAtomPotentials(uniform_prot_pot);
float *uniform_lig_pot = new float[latoms];
_zap.SetMolecule(ligand);
_zap.CalcAtomPotentials(uniform_lig_pot);
float *uniform_cmplx_pot = new float[catoms];
_zap.SetMolecule(cmplx);
_zap.CalcAtomPotentials(uniform_cmplx_pot);
resultsImpl->complexZapEnergy = 0.5f*(ecp+ecl);
// interaction terms
// protein - free
float cp = 0.0f;
for (OEIter<OEAtomBase> atom=_protein.GetAtoms();atom;++atom)
cp+=uniform_prot_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->unboundProteinCoulombEnergy = 0.5f*cp;
// ligand - free
float cl = 0.0f;
for (OEIter<OEAtomBase> atom=ligand.GetAtoms();atom;++atom)
cl+=uniform_lig_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->unboundLigandCoulombEnergy = 0.5f*cl;
// protein - bound
float ccp = 0.0f;
for (OEIter<OEAtomBase> atom=cmplx.GetAtoms(!OEIsLigandAtom());atom;++atom)
ccp+=uniform_cmplx_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->boundProteinCoulombEnergy = 0.5f*ccp;
// ligand - bound
float ccl = 0.0f;
for (OEIter<OEAtomBase> atom=cmplx.GetAtoms(OEIsLigandAtom());atom;++atom)
ccl+=uniform_cmplx_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->boundLigandCoulombEnergy = 0.5f*ccl;
resultsImpl->complexCoulombEnergy = 0.5f*(ccp+ccl);
resultsImpl->c_bind=OECalculateCoulombicBinding(_protein, ligand,
_zap.GetInnerDielectric());
_zap.SetOuterDielectric(OriginalOuterDielectric);
const OEZap &GetZap() const
OEZap &GetZap()
Get a reference to the internal OEZap object contained in an OEBind instance. With the non-const version, you can adjust OEZap parameters that affect the OEBind calculation. For example, to use and OEBind object with a specific grid spacing:
Note that some properties of the OEZap object are not controllable via this mechanism.
bool SetProtein(const OEChem::OEMolBase &protein)
Set the protein molecule to be used by the OEBind object. Note that the protein should have radii and partial charges pre-calculated before passing to SetProtein.
bool SetZap(const OEZap &zap)
Update the internal OEZap object. Note that some properties of the OEZap object are not controllable via this mechanism.
bool SimpleBind(const OEChem::OEMolBase &ligand, OESimpleBindResults &results) OESystem::OEIterBase< OESimpleBindResults >* SimpleBind(const OEChem::OEMCMolBase &ligand)
Calculate simple Zap bind results, without the Coulombic terms. See the
discussion in Section 3.5 about the differences between
OEBind::Bind and OEBind::SimpleBind. See Section
4.5 to see all the values available in
OESimpleBindResults.
The following is how SimpleBind is calculated. Note that the _protein has already been set and the ligand is passed in as an argument.
OEMol cmplx(_protein);
OEAddMols(cmplx, ligand);
_zap.SetFocusTarget(ligand);
float *prot_pot = new float[patoms];
_zap.SetMolecule(_protein);
_zap.CalcAtomPotentials(prot_pot);
float *lig_pot = new float[latoms];
_zap.SetMolecule(ligand);
_zap.CalcAtomPotentials(lig_pot);
float *cmplx_pot = new float[catoms];
_zap.SetMolecule(cmplx);
_zap.CalcAtomPotentials(cmplx_pot);
// protein - free
float ep=0.0f;
for (OEIter<OEAtomBase> atom=_protein.GetAtoms();atom;++atom)
ep+=prot_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->unboundProteinZapEnergy = 0.5f*ep;
// ligand - free
float el=0.0f;
for (OEIter<OEAtomBase> atom=ligand.GetAtoms();atom;++atom)
el+=lig_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->unboundLigandZapEnergy = 0.5f*el;
// protein - bound
float ecp = 0.0f;
for (OEIter<OEAtomBase> atom=cmplx.GetAtoms(!OEIsLigandAtom());atom;++atom)
ecp+=cmplx_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->boundProteinZapEnergy = 0.5f*ecp;
// ligand - bound
float ecl = 0.0f;
for (OEIter<OEAtomBase> atom=cmplx.GetAtoms(OEIsLigandAtom());atom;++atom)
ecl+=cmplx_pot[atom->GetIdx()]*(float)atom->GetPartialCharge();
resultsImpl->boundLigandZapEnergy = 0.5f*ecl;
Additionally, both the SimpleBind and Bind functions calculate area contributions using the following algorithm.
The constant AREA_TO_ENERGY is set to 0.0423 kT per square Angstrom.
// area analysis
OEArea area;
x=area.GetArea(ligand);
results->unboundLigandArea = x;
results->unboundLigandAreaEnergy = x*AREA_TO_ENERGY;
x=area.GetArea(protein);
results->unboundProteinArea = x;
results->unboundProteinAreaEnergy = x*AREA_TO_ENERGY;
x=area.GetArea(cmplx);
results->complexArea = x;
results->complexAreaEnergy = x*AREA_TO_ENERGY;
float *atom_area = new float [cmplx.GetMaxAtomIdx()];
area.GetArea(cmplx, atom_area);
float bpa=0.0f;
for (OEIter<OEAtomBase> atom=cmplx.GetAtoms(!OEIsLigandAtom());atom;++atom)
bpa += atom_area[atom->GetIdx()];
results->boundProteinArea = bpa;
results->boundProteinAreaEnergy = bpa*AREA_TO_ENERGY;
float bla=0.0f;
for (OEIter<OEAtomBase> atom=cmplx.GetAtoms(OEIsLigandAtom());atom;++atom)
bla += atom_area[atom->GetIdx()];
results->boundLigandArea = bla;
results->boundLigandAreaEnergy = bla*AREA_TO_ENERGY;