One note about this.
You need to be careful about the chirality perception, if not explicitly
defined in the structures, expecially for SMILES.
The code from Richard, for example, returns 0 for "CF(Cl)(Br)" even
though the C atom is chiral.
On 1/25/22 1:23 AM, Noel O'Boyle wrote:
See also the docs at
https://open-babel.readthedocs.io/en/latest/Stereochemistry/stereo.html
<https://open-babel.readthedocs.io/en/latest/Stereochemistry/stereo.html>.
On Mon, 24 Jan 2022 at 23:28, Richard Overstreet
<reoverstr...@charter.net <mailto:reoverstr...@charter.net>> wrote:
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 <http://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
<mailto:OpenBabel-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
<https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
<mailto:OpenBabel-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
<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
--
Stefano Forli, PhD
Associate Professor
Dept. of Integrative Structural
and Computational Biology, MB-112A
Scripps Research
10550 North Torrey Pines Road
La Jolla, CA 92037-1000, USA.
tel: +1 (858)784-2055
email: fo...@scripps.edu
https://forlilab.org
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss