Loading...
Searching...
No Matches
structureMapper.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
#ifndef BALL_STRUCTURE_STRUCTUREMAPPER_H
#define BALL_STRUCTURE_STRUCTUREMAPPER_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_CONCEPT_PROCESSOR_H
# include <BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_STRUCTURE_GEOMETRICTRANSFORMATIONS_H
# include <BALL/STRUCTURE/geometricTransformations.h>
#endif
#ifndef BALL_DATATYPE_STRING_H
# include <BALL/DATATYPE/string.h>
#endif
#ifndef BALL_KERNEL_PROTEIN_H
# include <BALL/KERNEL/protein.h>
#endif
#ifndef BALL_KERNEL_ATOM_H
# include <BALL/KERNEL/atom.h>
#endif
#ifndef BALL_MATHS_MATRIX44_H
# include <BALL/MATHS/matrix44.h>
#endif
#ifndef BALL_STRUCTURE_ATOMBIJECTION_H
# include <BALL/STRUCTURE/atomBijection.h>
#endif
#include <vector>
#include <map>
namespace BALL
{
class BALL_EXPORT StructureMapper
: public TransformationProcessor
{
public:
StructureMapper();
StructureMapper(AtomContainer& A, AtomContainer& B);
virtual ~StructureMapper();
void set(AtomContainer& A, AtomContainer& B);
double calculateRMSD();
double calculateRMSD(const AtomBijection& new_bijection);
bool calculateTransformation();
void calculateDefaultBijection(bool limit_to_selection = false);
const AtomBijection& getBijection() const { return bijection_; }
AtomBijection calculateFragmentBijection
(const vector<Fragment*>& A, const vector<Fragment*>& B);
bool mapFragments
(const vector<Fragment*>& A, const vector<Fragment*>& B,
Matrix4x4* transformation, double upper_bound = 8.0, double lower_bound = 2.5);
static Matrix4x4 matchPoints
(const Vector3& w1, const Vector3& w2, const Vector3& w3,
const Vector3& v1, const Vector3& v2, const Vector3& v3);
static Matrix4x4 matchBackboneAtoms(const Residue& r1, const Residue& r2);
Size mapResiduesByBackbone(const list<Residue*>& l1, const list<Residue*>& l2);
vector<vector<Fragment*> >& searchPattern
(vector<Fragment*>& pattern, AtomContainer& composite,
double max_rmsd = 4.0, double max_center_tolerance = 2.0,
double upper_bound = 8.0, double lower_bound = 4.0);
Matrix4x4 mapProteins
(Protein& P1, Protein& P2,
std::map<String, Size>& type_map,
Size& no_matched_ca,
double& rmsd,
double upper_bound = 8.0,
double lower_bound = 4.0,
double tolerance = 0.6);
protected:
// Count the fragments in an AtomContainer -- this is not implemented
// in AtomContainer!
Size countFragments_(const AtomContainer& ac) const;
/*_ The first of two composites - the "original"
*/
AtomContainer* A_;
/*_ The second composites - the "copy" to be mapped
*/
AtomContainer* B_;
/*_ The current atom bijection.
Required for the caclulation of the RMSD.
*/
AtomBijection bijection_;
/*_ The rmsd of the last mapping executed
*/
double rmsd_;
};
} // namespace BALL
#endif // BALL_STRUCTURE_STRUCTUREMAPPER_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
atomBijection.h
atom.h
BALL::AtomBijection
Definition atomBijection.h:47
BALL::AtomContainer
Definition atomContainer.h:32
BALL::Protein
Definition protein.h:30
BALL::Residue
Definition residue.h:38
BALL::StructureMapper::getBijection
const AtomBijection & getBijection() const
Definition structureMapper.h:95
BALL::StructureMapper::matchPoints
static Matrix4x4 matchPoints(const Vector3 &w1, const Vector3 &w2, const Vector3 &w3, const Vector3 &v1, const Vector3 &v2, const Vector3 &v3)
BALL::StructureMapper::set
void set(AtomContainer &A, AtomContainer &B)
BALL::StructureMapper::mapProteins
Matrix4x4 mapProteins(Protein &P1, Protein &P2, std::map< String, Size > &type_map, Size &no_matched_ca, double &rmsd, double upper_bound=8.0, double lower_bound=4.0, double tolerance=0.6)
BALL::StructureMapper::rmsd_
double rmsd_
Definition structureMapper.h:166
BALL::StructureMapper::countFragments_
Size countFragments_(const AtomContainer &ac) const
BALL::StructureMapper::calculateRMSD
double calculateRMSD()
BALL::StructureMapper::A_
AtomContainer * A_
Definition structureMapper.h:153
BALL::StructureMapper::~StructureMapper
virtual ~StructureMapper()
BALL::StructureMapper::StructureMapper
StructureMapper(AtomContainer &A, AtomContainer &B)
BALL::StructureMapper::searchPattern
vector< vector< Fragment * > > & searchPattern(vector< Fragment * > &pattern, AtomContainer &composite, double max_rmsd=4.0, double max_center_tolerance=2.0, double upper_bound=8.0, double lower_bound=4.0)
BALL::StructureMapper::B_
AtomContainer * B_
Definition structureMapper.h:157
BALL::StructureMapper::matchBackboneAtoms
static Matrix4x4 matchBackboneAtoms(const Residue &r1, const Residue &r2)
BALL::StructureMapper::calculateFragmentBijection
AtomBijection calculateFragmentBijection(const vector< Fragment * > &A, const vector< Fragment * > &B)
BALL::StructureMapper::mapResiduesByBackbone
Size mapResiduesByBackbone(const list< Residue * > &l1, const list< Residue * > &l2)
BALL::StructureMapper::mapFragments
bool mapFragments(const vector< Fragment * > &A, const vector< Fragment * > &B, Matrix4x4 *transformation, double upper_bound=8.0, double lower_bound=2.5)
BALL::StructureMapper::calculateDefaultBijection
void calculateDefaultBijection(bool limit_to_selection=false)
BALL::StructureMapper::calculateTransformation
bool calculateTransformation()
BALL::StructureMapper::StructureMapper
StructureMapper()
BALL::StructureMapper::bijection_
AtomBijection bijection_
Definition structureMapper.h:162
BALL::StructureMapper::calculateRMSD
double calculateRMSD(const AtomBijection &new_bijection)
BALL::TransformationProcessor::TransformationProcessor
TransformationProcessor()
common.h
geometricTransformations.h
BALL::Matrix4x4
TMatrix4x4< float > Matrix4x4
Definition matrix44.h:2184
matrix44.h
BALL
Definition constants.h:13
BALL::Size
BALL_SIZE_TYPE Size
Definition COMMON/global.h:114
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
processor.h
protein.h
string.h