Hi everyone,
I'm evaluating my fragment-based coordinate generation method.
I want to measure the error of bond lengths and angles, but I have a
problem in getting corresponding ones from two molecules.
What I want to do is like this:
// mol1: ground truth loaded from SDF
// mol2: predicted molecule structure loaded from SDF
OBMol mol1, mol2;
// Display the length of each bond
for (int idx = 0; idx < mol1.NumBonds(); ++idx) {
OBBond *bond1 = mol1.GetBond(idx);
OBBond *bond2 = mol2.GetBond(idx);
// these assertion fails
assert(bond1->GetBeginAtom()->GetAtomicNum()
== bond2->GetBeginAtom()->GetAtomicNum());
assert(bond1->GetEndAtom()->GetAtomicNum()
== bond2->GetEndAtom()->GetAtomicNum());
cout << bond1->GetLength() << "," << bond2->GetLength() << endl;
}
The problem is that the bonds are not ordered properly.
When I execute the code above, the assertions fail.
So n-th bond in mol1 was different from n-th bond in mol2.
I also have a similar problem for angles.
If I can get something like "canonical order of bonds", I can compare
the length of each bond correctly.
However, I don't know how to do it.
Does anyone have a good idea to get corresponding bonds and angles?
Thanks,
Naruki
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel