本文整理汇总了C++中Conformer::getId方法的典型用法代码示例。如果您正苦于以下问题:C++ Conformer::getId方法的具体用法?C++ Conformer::getId怎么用?C++ Conformer::getId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Conformer
的用法示例。
在下文中一共展示了Conformer::getId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CalcAllMORSE
std::vector<double> CalcAllMORSE(const ROMol &mol, const Conformer &conf){
int numAtoms = conf.getNumAtoms();
int confId = conf.getId();
std::vector<double> R = getG(32);
std::vector<double> R1;
std::vector<double> R2;
std::vector<double> R3;
std::vector<double> R4;
std::vector<double> R5;
std::vector<double> R6;
std::vector<double> R7;
double *DM = MolOps::get3DDistanceMat(mol,confId);
std::vector<double> Mass = moldata3D.GetRelativeMW(mol);
std::vector<double> RelativePol = moldata3D.GetRelativePol(mol);
std::vector<double> IonPol = moldata3D.GetRelativeIonPol(mol);
std::vector<double> RelativeElectroNeg = moldata3D.GetRelativeENeg(mol);
std::vector<double> RelativeVdW = moldata3D.GetRelativeVdW(mol);
double p;
for (int i = 0; i < R.size(); i++) {
double res1=0.0;
double res2=0.0;
double res3=0.0;
double res4=0.0;
double res5=0.0;
double res6=0.0;
for (int j = 0; j < numAtoms - 1; j++) {
for (int k = j + 1; k < numAtoms; k++) {
if (i==0) {
p= 1;
}
else {
p = sin(R[i] * DM[j * numAtoms + k]) / (R[i] * DM[j * numAtoms + k]);
}
res1 += p;
res2 += Mass[j] * Mass[k] * p;
res3 += RelativeVdW[j] * RelativeVdW[k] * p;
res4 += RelativeElectroNeg[j] * RelativeElectroNeg[k] * p;
res5 += RelativePol[j] * RelativePol[k] * p;
res6 += IonPol[j] * IonPol[k] * p;
}
}
R1.push_back(round( 1000 * res1) / 1000);
R2.push_back(round( 1000 * res2) / 1000);
R3.push_back(round( 1000 * res3) / 1000);
R4.push_back(round( 1000 * res4) / 1000);
R5.push_back(round( 1000 * res5) / 1000);
R6.push_back(round( 1000 * res6) / 1000);
}
// remove the H and change number of Atoms only takes HeavyAtoms
// const ROMol *molnoH = MolOps::removeHs(mol, false, false); // return the copy of the molecule without Hs!
//int numAtomsnoH = molnoH->getNumAtoms();
//std::cout << "nA1:" << numAtoms << ",nA2;" << numAtomsnoH <<"\n";
// double *DMnoH = MolOps::get3DDistanceMat(*molnoH,confId);
std::vector<double> IState = prepareIState(mol,confId); // moldata3D.GetEState2(mol);
for (int i = 0; i < R.size(); i++) {
double res7 = 0.0;
for (int j = 0; j < numAtoms - 1; j++) {
for (int k = j + 1; k < numAtoms; k++) {
if (i==0) {
p= 1;
}
else {
p = sin(R[i] * DM[j * numAtoms + k]) / (R[i] * DM[j * numAtoms + k]);
}
res7 += IState[j] * IState[k] * p;
}
}
R7.push_back(round( 1000 * res7) / 1000);
}
R1.insert(R1.end(),R2.begin(), R2.end());
R1.insert(R1.end(),R3.begin(), R3.end());
R1.insert(R1.end(),R4.begin(), R4.end());
R1.insert(R1.end(),R5.begin(), R5.end());
R1.insert(R1.end(),R6.begin(), R6.end());
R1.insert(R1.end(),R7.begin(), R7.end());
return R1;
}