Hi Marina,

I assume you are using this SDF file:

http://zinc11.docking.org/fget.pl?l=0&z=57393683&f=d

which contains 3D coordinates and no wedge bond information. If this is the case, you will need to call MolOps::assignStereochemistryFrom3D() <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#af8d126c8da82e0ee29d586e615f26e8e> to assign the chiral tags before accessing them.

If you are also interested in E/Z double bond stereochemistry you will need the following three calls before accessing stereochemistry descriptors:

MolOps:: <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#af8d126c8da82e0ee29d586e615f26e8e>detectBondStereochemistry <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#a992d63a45590b287f310a88228659991> (*mol) MolOps:: <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#af8d126c8da82e0ee29d586e615f26e8e>assignStereochemistryFrom3D <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#af8d126c8da82e0ee29d586e615f26e8e> (*mol) MolOps:: <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#af8d126c8da82e0ee29d586e615f26e8e>assignStereochemistry <http://www.rdkit.org/docs/cppapi/namespaceRDKit_1_1MolOps.html#abae38bdd181c070deee55a4d3ee12885> (*mol);

Hope that helps, cheers
p.

On 12/12/17 18:18, Marina Garcia de Lomana wrote:

Hi,
I am using the following C++ script to read a molecule from a SD file (with defined stereochemistry), but the information about the stereochemistry gets lost. The file I am using is from glucose (ZINC03833800; http://zinc.docking.org/substance/3833800) When I check the chiral information of the atoms, all of them have the chiral tag 0.

How can I keep the stereo information?

SCRIPT:

|std::fstream infilestr; infilestr.open(in_file_name.c_str( )); RDKit::SDMolSupplier mol_supplier( in_file_name , true ); for (unsigned i = 0; i < mol_supplier.length(); ++i) { RDKit::ROMOL_SPTR mol(mol_supplier[i]); if (!mol){ std::cout << "Error, molecule not found!" << std::endl; continue; } for (unsigned int j = 0; j < mol->getNumAtoms(); j++){ RDKit::Atom* atom = mol->getAtomWithIdx(j); std::cout << "Chirality atom " << j+1 << ": " << atom->getChiralTag() << std::endl; } std::string usmiles = RDKit::MolToSmiles (*mol); std::cout << "Mol: " << usmiles << std::endl; } |


OUTPUT FOR GLUCOSE (ZINC03833800):

Chirality atom 1: 0
Chirality atom 2: 0
Chirality atom 3: 0
Chirality atom 4: 0
Chirality atom 5: 0
Chirality atom 6: 0
Chirality atom 7: 0
Chirality atom 8: 0
Chirality atom 9: 0
Chirality atom 10: 0
Chirality atom 11: 0
Chirality atom 12: 0
Mol: OCC1OC(O)C(O)C(O)C1O



------------------------------------------------------------------------------
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

------------------------------------------------------------------------------
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