When creating a molecule, I can set a stereocenter by setting the chiralTag
to be clockwise or counterclockwise, and get back the absolute chirality

int atoms [5] = {7, 6, 6, 8, 9};
RDKit::RWMol *mol = new RDKit::RWMol();
for (int i : atoms) {
RDKit::Atom atom(i);
mol->addAtom(&atom);
}
mol->addBond(0, 1, RDKit::Bond::SINGLE);
mol->addBond(1, 2, RDKit::Bond::SINGLE);
mol->addBond(1,3, RDKit::Bond::SINGLE);
mol->addBond(1, 4, RDKit::Bond::SINGLE);

std::cout << RDKit::MolToSmiles(*mol, true) << std::endl;


mol->getAtomWithIdx(1)->setChiralTag(RDKit::Atom::CHI_TETRAHEDRAL_CW);
RDKit::MolOps::sanitizeMol(*mol);
RDKit::MolOps::assignStereochemistry(*mol);
std::cout << RDKit::MolToSmiles(*mol, true) << std::endl;
std::string cipCode;
mol->getAtomWithIdx(1)->getProp(RDKit::common_properties::_CIPCode,
cipCode);
std::cout << cipCode << std::endl;

returns

CC(N)(O)F
C[C@](N)(O)F
S


How could I do the reverse?  Given the absolute chirality in terms of the
CIP code, how can I assign the chirality such that it propagates to the
smiles string?  If I replace the line with "setChiralTag" with

mol->getAtomWithIdx(1)->setProp(RDKit::common_properties::_ChiralityPossible,
1);
mol->getAtomWithIdx(1)->setProp(RDKit::common_properties::_CIPCode, "S");

then I see no chirality in the returned smiles string.


Jason
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to