本文整理汇总了C++中Molecule::getHBA1方法的典型用法代码示例。如果您正苦于以下问题:C++ Molecule::getHBA1方法的具体用法?C++ Molecule::getHBA1怎么用?C++ Molecule::getHBA1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Molecule
的用法示例。
在下文中一共展示了Molecule::getHBA1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readMoleculeFile
void readMoleculeFile(const char* fileName)
{
//
// Input parser conversion functionality for Open babel
//
OpenBabel::OBConversion obConversion;
obConversion.SetInFormat("SDF");
//
// Open the file, split the current molecule into Molecule Data (prefix)
// and Our Data (Suffix)
//
std::ifstream infile;
infile.open(fileName);
std::string name = "UNKNOWN";
std::string prefix = "";
std::string suffix = "";
while(splitMolecule(infile, name, prefix, suffix))
{
//
// If the name of molecule is not given, overwrite it with the name of the file.
//
if (name == "UNKNOWN")
{
name = "#### ";
name += fileName;
name += " ####";
}
if (g_debug_output) std::cerr << "Name: " << std::endl << name << std::endl;
if (g_debug_output) std::cerr << "Prefix: " << std::endl << prefix << std::endl;
if (g_debug_output) std::cerr << "Suffix: " << std::endl << suffix << std::endl;
// Create and parse using Open Babel
OpenBabel::OBMol* mol = new OpenBabel::OBMol();
bool notAtEnd = obConversion.ReadString(mol, prefix);
// Assign all needed data to the molecule (comment data)
Molecule* local = createLocalMolecule(mol, fileName[0] == 'l' ? LINKER : RIGID,
name, suffix);
// calculate the molecular weight, H donors and acceptors and the plogp
local->openBabelPredictLipinski();
// add to logfile
if (local->islipinskiPredicted())
{
std::ofstream logfile("synth_log_initial_fragments_logfile.txt",
std::ofstream::out | std::ofstream::app); // append
logfile << fileName << "\nMolWt = " << local->getMolWt() << "\n";
logfile << "HBD = " << local->getHBD() << "\n";
logfile << "HBA1 = " << local->getHBA1() << "\n";
logfile << "logP = " << local->getlogP() << "\n";
logfile << std::endl;
logfile.close();
}
else std::cerr << "Main: predictLipinski failed somehow!" << endl;
if (g_debug_output) std::cout << "Local: " << *local << "|" << std::endl;
// Add to the linker or rigid list as needed.
addMolecule(fileName[0], local);
}
}