Re: [Rdkit-discuss] Functions to call to generate wedge information when given 3D coordinates (C++)

2017-04-07 Thread Shubbey McBean
Thanks for the response, Greg!

When I set  cleanIt=false, I get the same results as if I didn't call
assignStereoChemistry() at all.  In this case, the fused ring example
(cases 1 and 2 in the GitHub thread) look correct, but, as you noted, the
third case looks wrong.

So I guess the question is, why is the stereo cleanup removing the
stereochemistry in my fused ring example?  With hydrogens showing, I'd
expect to have case 1 showing up/down wedges on H and case 2 showing
down/down or up/up. It does this when cleanIt=false (or when I don't call
assignStereoChemistry).

Much appreciated,

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


[Rdkit-discuss] Functions to call to generate wedge information when given 3D coordinates (C++)

2017-04-06 Thread Shubbey McBean
Hello again!

RDKit nicely provides several functions to accept molecule input under the
FileParsers module.  For example, we have MolFileToMol(), MolBlockToMol(),
Mol2FileToMol(), and so forth.  Each of these parses the input and then
does various cleanup to generate stereochemistry and such.

In my case, my input is passed simply as raw molecule information (elems +
3D coordinates). So I generate the molecule manually, as follows:

RWMol mol;
// my info in atom and bond structs
for(int i=0;isetAtomPos(i, RDGeom::Point3D(atom[i].x,atom[i].y,atom[i].z));
  }
  mol.addConformer(confp,true);

At this point I have a molecule but it isn't cleaned up.  My question is,
what is the most concise order of operations I need to generate a 2D
depiction, including wedge information, from this setup?  I have tried a
few different approaches and am getting mixed results-- some approaches
produce better results than others, but it isn't consistent (one method may
get a better result on one molecule, but worse on another).  I posted more
about this in a bug report (may not be a bug) here:
https://github.com/rdkit/rdkit/issues/1379

So here is an example of something I've tried:

Kekulize(mol);
assignChiralTypesFrom3D(mol);
assignStereochemistry(mol,true,true);
compute2DCoords(mol);

const Conformer  = mol.getConformer();
WedgeMolBonds(mol,);

As noted in the github post, the assignStereochemistry() part can sometimes
cause wedging to disappear completely.  I chose this particular order by
groking through the FileParser routines to see how they handled molecules
post-3D input.

I feel like I am overcomplicating this.  Is there a recommended approach?

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


[Rdkit-discuss] Question about WedgeMolBonds

2017-02-24 Thread Shubbey McBean
Hi, I am using WedgeMolBonds() to label converted 3D->2D conformations,
roughly:

  // ... read in 3D mol
  assignChiralTypesFrom3D(mol);
  assignStereochemistry(mol,true,true);
  WedgeMolBonds(mol,());
  compute2DCoords(...)

However, this does not produce an accurate result.  In order to "fix" this,
I need to reverse the last two calls (calling the 3D->2D _before_
WedgeMolBonds). This seems counter-intuitive to me.  Is there something
that the compute2DCoords() is doing that makes it a dependency for
WedgeMolBonds()?  Or am I going about this the wrong way?  The specifics of
my situation make it preferable to order things as stated, but it's not a
deal-breaker.  Mostly I am just a bit stuck as to what is going on here.

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