本文整理汇总了C++中PDB::getResidueNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ PDB::getResidueNumber方法的具体用法?C++ PDB::getResidueNumber怎么用?C++ PDB::getResidueNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDB
的用法示例。
在下文中一共展示了PDB::getResidueNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
sw3.start();
for(unsigned int j=0;j<ntest;j++)rmsd->calc_DDistDRef_Rot_DRotDPos( r_run, derivatives,DDistDRef, Rotation , DRotDPos, squared);
sw3.stop();
cout<<"WITH ROTATION MATRIX DERIVATIVE: \n"<<sw3<<endl;
Matrix<std::vector<Vector> > DRotDRef(3,3);
Stopwatch sw4;
sw4.start();
for(unsigned int j=0;j<ntest;j++)rmsd->calc_DDistDRef_Rot_DRotDPos_DRotDRef( r_run, derivatives ,DDistDRef, Rotation , DRotDPos, DRotDRef, squared);
sw4.stop();
cout<<"WITH ROTATION MATRIX DERIVATIVE OF REEFERENCE: \n"<<sw4<<endl;
// duplicate the atoms
unsigned s=r_run.size();
for (unsigned int i=0;i<s;i++){r_run.push_back(r_run[i]);r_ref.push_back(r_ref[i]);r_al.push_back(r_al[i]);r_disp.push_back(r_disp[i]);}
}
}
// Task 9: check the rotation
if(std::find(task.begin(), task.end(), 9)!=task.end()){
cout<<"Task 9: dump some pdbs so to check if all makes sense when using inverse transform. In particular positions_aligned.pdb should overlap with reference_centered.pdb "<<endl;
rmsd->clear();
rmsd->set(align, displace, ref,type,remove_com,normalize_weights );
// dump the reference
ofstream myfile;
myfile.open ("reference.pdb");
std::vector<AtomNumber> at=pdb.getAtomNumbers();
std::vector<Vector> pos=pdb.getPositions();
unsigned k=0;
for(std::vector<AtomNumber>::iterator i=at.begin(); i!=at.end(); i++){
myfile<<"ATOM";
myfile.width(7);myfile<<std::right<<(*i).serial()<<" ";
myfile.width(4);myfile<<std::left<<pdb.getAtomName(*i);
myfile.width(4);myfile<<std::right<<pdb.getResidueName(*i)<<" A";
myfile.width(4);myfile<<std::right<<pdb.getResidueNumber(*i)<<" ";
myfile.setf( std::ios::fixed, std:: ios::floatfield );
myfile.width(8);myfile.precision(3); myfile<<std::right<<pos[k][0]*10;
myfile.width(8);myfile.precision(3); myfile<<std::right<<pos[k][1]*10;
myfile.width(8);myfile.precision(3); myfile<<std::right<<pos[k][2]*10<<" 1.00 1.00\n";
k++;
}
myfile.close();
// dump the position
myfile.open ("positions.pdb");
at=pdbrun.getAtomNumbers();
std::vector<Vector> runpos=pdbrun.getPositions();
k=0;
for(std::vector<AtomNumber>::iterator i=at.begin(); i!=at.end(); i++){
myfile<<"ATOM";
myfile.width(7);myfile<<std::right<<(*i).serial()<<" ";
myfile.width(4);myfile<<std::left<<pdbrun.getAtomName(*i);
myfile.width(4);myfile<<std::right<<pdbrun.getResidueName(*i)<<" A";
myfile.width(4);myfile<<std::right<<pdbrun.getResidueNumber(*i)<<" ";
myfile.setf( std::ios::fixed, std:: ios::floatfield );
myfile.width(8);myfile.precision(3); myfile<<std::right<<runpos[k][0]*10;
myfile.width(8);myfile.precision(3); myfile<<std::right<<runpos[k][1]*10;
myfile.width(8);myfile.precision(3); myfile<<std::right<<runpos[k][2]*10<<" 1.00 1.00\n";
k++;
}
myfile.close();
// now do the alignment
Tensor Rotation;
Matrix<std::vector<Vector> > DRotDPos(3,3);
std::vector<Vector> DDistDRef;
std::vector<Vector> alignedpos;
std::vector<Vector> centeredpos;
std::vector<Vector> centeredref;