FindPotentialStereo missing from Java Wrappers
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 65/100
Direzione di ricerca
Start by locating the SWIG interface for the Java bindings and inspect the existing RDKFuncs, ROMol, and RWMol wrappers for findPotentialStereoBonds. Compare their patterns with the C++ API and the Python FindPotentialStereo example. Done means Java exposes findPotentialStereo(ROMol), StereoInfo and its enums/accessors, and the StereoInfo_Vect collection.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
MolOps::findPotentialStereo() (introduced in RDKit 2020.09) is not wrapped in the Java bindings. Only the older findPotentialStereoBonds(ROMol) and findPotentialStereoBonds(ROMol, boolean) are available. The method is also absent from ROMol and RWMol. This has been confirmed against the newer KNIME 5.8 RDKit Java bindings in addition to the KNIME 5.2 RDKit bindings.
Background
The RDKit documentation describes two algorithms for identifying potential stereocenters/stereobonds:
- The legacy
AssignStereochemistry()approach, which sets the_ChiralityPossibleproperty on atoms it recognises as potential stereocenters. - The newer
FindPotentialStereo()approach, which is both more accurate (particularly for para-stereochemistry) and faster, and is intended to become the default in a future RDKit version.
The key accuracy improvement is the correct identification of para-stereocenters — atoms whose four substituents are constitutionally identical (same graph topology) but differ in the stereochemistry of sub-substituents, as illustrated in the RDKit documentation.
Concrete example
Using the molecule CC(Cl)(F)C(F)C(Cl)(F)C (canonical SMILES: CC(F)(Cl)C(F)C(C)(F)Cl; this is the structure on the RHS of the figure at https://www.rdkit.org/docs/RDKit_Book.html#identification-of-potential-stereoatoms-stereobonds):
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import FindPotentialStereo
mol = Chem.MolFromSmiles('CC(Cl)(F)C(F)C(Cl)(F)C')
AllChem.AssignStereochemistry(mol, cleanIt=True, force=True, flagPossibleStereoCenters=True)
print('Legacy _ChiralityPossible:')
for atom in mol.GetAtoms():
if atom.HasProp('_ChiralityPossible'):
print(f' Atom {atom.GetIdx()} ({atom.GetSymbol()})')
# Output:
# Atom 1 (C)
# Atom 6 (C)
print('FindPotentialStereo:')
for info in FindPotentialStereo(mol):
print(f' centeredOn={info.centeredOn}, type={info.type}, specified={info.specified}')
# Output:
# centeredOn=1, type=Atom_Tetrahedral, specified=Unspecified
# centeredOn=4, type=Atom_Tetrahedral, specified=Unspecified
# centeredOn=6, type=Atom_Tetrahedral, specified=Unspecified
As documented in the above link, and demonstrated here in the code snippet using the Python bindings, the legacy _ChiralityPossible approach finds only atoms 1 and 6 (the two terminal carbons). It misses atom 4, the central carbon, which is a para-stereocenter — its two branches (C(Cl)(F)C on each side) are constitutionally identical but differ in the stereochemistry of their sub-substituents. FindPotentialStereo correctly identifies all three stereocenters.
Impact
Without FindPotentialStereo in the Java bindings, Java code reliant on finding potential stereocentres is forced to fall back to the legacy _ChiralityPossible detection and will silently under-enumerate stereoisomers for molecules containing para-stereocenters.
What would need to be wrapped
Based on the C++ API, the following would need to be added to the SWIG interface:
RDKFuncs.findPotentialStereo(ROMol)— the main method- A
StereoInfoclass with accessors forcenteredOn,type,specified, andpossibleTypes - A
StereoInfo_Vectcollection type - A
Chirality.StereoTypeenum (Atom,Bond,Unspecified) - A
Chirality.StereoDescriptorenum for thepossibleTypesfield
RDKit version confirmed affected
KNIME 5.2 - 5.8 RDKit Java bindings (checked RDKFuncs, ROMol, and RWMol classes).
- Lingua principale
- HTML
- Stelle
- 3.6k
- Fork
- 1.1k
- Merge medio
- 3g 8h
- PR unite (30g)
- 44
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rdkit/rdkit
-
Clarify mol_from_smiles vs qmol_from_smarts for substruct_count queries in Postgresql cartridge Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 65/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
-
Improve depiction of RNA Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
microsoft/magentic-ui#588 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
alexgorbatchev/simple-ptt#3 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
CorrelAid/formtransform#44 ·