On Wed, Sep 30, 2020 at 9:45 PM Steven Pak <[email protected]>
wrote:
> Hello,
>
> I have been using RDKIT for some time now, and I could not get a certain
> descriptor that would be super useful for my work. Every other descriptor
> works fine, however, for some reason the following calculations always
> gives me 0:
>
> RDKit::Descriptors::numAtomStereoCenters( rdmol );
>
Does it help to add a check like this before getting stereo properties?
if(!rdmol.hasProp(RDKit::common_properties::_StereochemDone)) {
RDKit::MolOps::assignStereochemistry(rdmol);
}
>
> I did convert the in-house mol information into molecular information that
> is compatible with RDKIT, but for some reason it is not giving me any
> information on stereocenters.
>
> Furthermore, when I print out the SMILES strings
> from RDKit::MolToSmiles(rdmol) with explicit H turned off, it still spits
> out the entire SMILE string that has [H] integrated into the string. I
> would like to turn that off, unless explicit H in RDKIT may mean something
> else.
>
MolToSmiles has the option *allHsExplicit*, but that only determines
whether implicit hydrogens are always indicated in counts. So if you have
a hydrogen-suppressed mol of ethane, that option decides whether you get a
SMILES of "CC" or "[CH3][CH3]". But if you have an all-atom mol, then it
will not suppress them. You need to first convert the hydrogen atoms to
implicit before getting the SMILES.
Because I often want to keep hydrogens as explicit vertices, but don't want
to look at them in the SMILES string I use a wrapper function around
MolToSmiles. The wrapper will create a copy and remove or add explicit
hydrogen atoms, as well as call Kekulize/SetAromaticity, depending on the
options passed in.
Jason
>
> Any help would be appreciated.
>
> Thanks,
> Steven Pak
>
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss