Пример #1
0
	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
0
	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
0
	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
0
	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
0
	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
0
	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;
	}