You could do something like this in python. Not sure how reliable this
is but it is a start. This could also be ported over to c++ too.
from openbabel import openbabel
obconversion = openbabel.OBConversion()
obconversion.SetInAndOutFormats("xyz", "xyz")
mol = openbabel.OBMol()
obconversion.ReadFile(mol, "demo.xyz")
N_chiral=0
mol_atoms = openbabel.OBMolAtomIter(mol)
for atom in mol_atoms:
if atom.IsChiral():
N_chiral += 1
print(N_chiral)
Best,
Richard
On 1/24/22 04:20, Jan Hummel via OpenBabel-discuss wrote:
Dear OpenBabel team!
How do I calculate the number of chiral centers in OpenBabel and
OBDotNet?
I found a ‘obchiral’ command line tool in an earlier OpenBabel
version, but it seems to not be distributed anymore?
Thank you very much for a short answer!
Best regards,
Jan Hummel
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss