-
Notifications
You must be signed in to change notification settings - Fork 36
Mapping2Proteins
dstoeckel edited this page Mar 16, 2015
·
2 revisions
As shown in our utility protein_mapper.C (source/APPLICATIONS/UTILITIES/) a transformation between the c-alpha atoms of two proteins can be computed via
#include <BALL/STRUCTURE/structureMapper.h>
#include <BALL/MATHS/matrix44.h>
map<String, Position> type_map;
type_map["ALA"] = 0;
type_map["GLY"] = 0;
type_map["VAL"] = 0;
type_map["LEU"] = 0;
type_map["ILE"] = 0;
type_map["SER"] = 0;
type_map["CYS"] = 0;
type_map["THR"] = 0;
type_map["MET"] = 0;
type_map["PHE"] = 0;
type_map["TYR"] = 0;
type_map["TRP"] = 0;
type_map["PRO"] = 0;
type_map["HIS"] = 0;
type_map["LYS"] = 0;
type_map["ARG"] = 0;
type_map["ASP"] = 0;
type_map["GLU"] = 0;
type_map["ASN"] = 0;
type_map["GLN"] = 0;
double upper = 8.0;
double lower = 4.0;
double tolerance = 0.6;
Matrix4x4 T;
StructureMapper mapper;
Size no_ca;
double rmsd;
// determine Transformation of the c-alpha atoms
T = mapper.mapProteins(protein1, protein2, type_map, no_ca, rmsd, upper, lower, tolerance);
// apply
mapper.setTransformation(T);
protein1.apply(mapper);For small (ligand) molecules, the mapping becomes more difficult as you may have to solve a graph similarity problem. If you know the correspondig atoms, you can create an AtomBijection and pass it to the mapper (see here).