本文整理汇总了C++中OBMol::IsChiral方法的典型用法代码示例。如果您正苦于以下问题:C++ OBMol::IsChiral方法的具体用法?C++ OBMol::IsChiral怎么用?C++ OBMol::IsChiral使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OBMol
的用法示例。
在下文中一共展示了OBMol::IsChiral方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tmpStr
extern "C" unsigned int
ob_is_chiral (char *molfile)
{
OBMol mol;
OBConversion conv;
string tmpStr (molfile);
istringstream molstream (tmpStr);
int chiral = 0;
conv.SetInAndOutFormats ("MDL", "MDL");
conv.Read (&mol, &molstream);
mol.FindChiralCenters ();
chiral = mol.IsChiral ()? 1 : 0;
return (chiral);
}
示例2: WriteReport
bool WriteReport(ostream &ofs,OBMol &mol)
{
char buffer[BUFF_SIZE];
ofs << "FILENAME: " << mol.GetTitle() << endl;
ofs << "MASS: ";
sprintf(buffer, "%5.4f", mol.GetMolWt());
ofs << buffer << endl;
ofs << "EXACT MASS: ";
sprintf(buffer, "%5.7f", mol.GetExactMass());
ofs << buffer << endl;
if (mol.GetTotalCharge() != 0)
{
ofs << "TOTAL CHARGE: ";
sprintf(buffer, "%d", mol.GetTotalCharge());
ofs << buffer << endl;
}
if (mol.GetTotalSpinMultiplicity() != 1)
{
ofs << "TOTAL SPIN: ";
sprintf(buffer, "%d", mol.GetTotalSpinMultiplicity());
ofs << buffer << endl;
}
ofs << "INTERATOMIC DISTANCES" << endl;
WriteDistanceMatrix(ofs, mol);
ofs << endl << endl << "ATOMIC CHARGES" << endl;
WriteCharges(ofs, mol);
ofs << endl << endl << "BOND ANGLES" << endl;
WriteAngles(ofs, mol);
ofs << endl << endl << "TORSION ANGLES" << endl;
WriteTorsions(ofs, mol);
if (mol.IsChiral())
{
ofs << endl << endl << "CHIRAL ATOMS" << endl;
WriteChiral(ofs, mol);
}
if (mol.HasData(obCommentData)) {
ofs << endl << endl << "COMMENTS" << endl;
OBCommentData *cd = (OBCommentData*)mol.GetData(obCommentData);
ofs << cd->GetData() << endl;
}
ofs << endl << endl;
return(true);
}