本文整理汇总了C++中AtomIterator::setPosition方法的典型用法代码示例。如果您正苦于以下问题:C++ AtomIterator::setPosition方法的具体用法?C++ AtomIterator::setPosition怎么用?C++ AtomIterator::setPosition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AtomIterator
的用法示例。
在下文中一共展示了AtomIterator::setPosition方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resetRotations
void IMGDock::resetRotations()
{
current_conformation_ = vector < int > (current_conformation_.size(), 0);
int atom = 0;
for (AtomIterator it = ligand_->beginAtom(); +it; it++, atom++)
{
it->setPosition(original_atom_positions_[atom]);
}
}
示例2: moveProbeGroup_
void GridAnalysis::moveProbeGroup_(const Vector3& destination)
{
TMatrix4x4<float> M;
Vector3 translation_vector = destination-center_;
M.setTranslation(translation_vector);
for (AtomIterator it = probe_group_.beginAtom(); +it; it++)
{
it->setPosition(M*it->getPosition());
}
center_ = destination;
}
示例3: translateLigand
void IMGDock::translateLigand(Vector3& v)
{
TMatrix4x4<float> M;
M.setTranslation(v);
// transform all atoms of the ligand
for (AtomIterator it = ligand_->beginAtom(); it != ligand_->endAtom(); it++)
{
it->setPosition(M*it->getPosition());
}
}
示例4: rotateProbeGroup_
void GridAnalysis::rotateProbeGroup_(int axis, int degree)
{
TMatrix4x4<float> M;
TAngle<float> angle(degree, false);
Vector3 axis_vector(axis == 0, axis == 1, axis == 2);
M.setRotation(angle, axis_vector);
for (AtomIterator it = probe_group_.beginAtom(); it != probe_group_.endAtom(); it++)
{
it->setPosition(M*(it->getPosition()-center_)+center_);
}
}
示例5: rotateLigand
void IMGDock::rotateLigand(int a, int degree)
{
TMatrix4x4<float> M;
TAngle<float> angle(degree, false);
Vector3 axis(a == 0, a == 1, a == 2);
M.setRotation(angle, axis);
const Vector3& origin = scoring_function_->getLigandCenter();
for (AtomIterator it = ligand_->beginAtom(); it != ligand_->endAtom(); it++)
{
it->setPosition(M*(it->getPosition()-origin)+origin);
}
}
示例6: mapLigandOntoReferenceLigand
void DockingAlgorithm::mapLigandOntoReferenceLigand()
{
if (!scoring_function_)
{
Log.error()<<"Error DockingAlgorithm::mapLigandOntoReferenceLigand() : ScoringFunction not set!"<<endl;
return;
}
AtomContainer* ligand = scoring_function_->getLigand();
if (!ligand)
{
Log.error()<<"Error DockingAlgorithm::mapLigandOntoReferenceLigand() : Ligand not set!"<<endl;
return;
}
if (!reference_ligand_)
{
Log.error()<<"Error DockingAlgorithm::mapLigandOntoReferenceLigand() : Reference ligand not set!"<<endl;
return;
}
Timer timer;
timer.start();
double lower_bound = 2;
double upper_bound = 5;
double tolerance = 1;
Size no_matched_atoms = 0;
double rmsd = 0;
Matrix4x4 T = mapCompounds(*ligand, *reference_ligand_, no_matched_atoms, rmsd, upper_bound, lower_bound, tolerance);
for (AtomIterator it = ligand->beginAtom(); +it; it++)
{
it->setPosition(T*it->getPosition());
}
timer.stop();
Log.level(10)<<"superposing ligand: "<<timer.getClockTime()<<" seconds"<<endl;
}