Re: [Rdkit-discuss] High-quality matplotlib drawing?

2019-08-07 Thread Greg Landrum
That's an interesting question. I think there probably are some ways of tweaking this and improving things, but I don't have a convenient way to test. If you can share the python (+data) you used to construct that PDF I will see if I can come up with a solution. -greg On Thu, Aug 8, 2019 at

[Rdkit-discuss] High-quality matplotlib drawing?

2019-08-07 Thread Wout Bittremieux
Dear RDKit team, I'm trying to draw a molecule on a spectrum plot from Matplotlib using MolToImage. This is some abbreviated code: ``` import matplotlib.pyplot as plt from rdkit import Chem from rdkit.Chem import Draw fig, ax = plt.subplots() ax.plot(...) im =

Re: [Rdkit-discuss] GetSubstructMatches() as smiles

2019-08-07 Thread Andrew Dalke
On Aug 7, 2019, at 13:08, Paolo Tosco wrote: > You can use > > Chem.MolFragmentToSmiles(mol, match) > > where match is a tuple of atom indices returned by GetSubstructMatch(). Note however that if only the atom indices are given then Chem.MolFragmentToSmiles() will include all bonds which

Re: [Rdkit-discuss] GetSubstructMatches() as smiles

2019-08-07 Thread Paolo Tosco
Hi Mel, You can use Chem.MolFragmentToSmiles(mol, match) where match is a tuple of atom indices returned by GetSubstructMatch(). Cheers, p. > On 7 Aug 2019, at 11:36, Melissa Adasme wrote: > > Dear rdkitters, > > I'm trying to find substructures (query molecules built from SMARTS) matching

[Rdkit-discuss] GetSubstructMatches() as smiles

2019-08-07 Thread Melissa Adasme
Dear rdkitters, I'm trying to find substructures (query molecules built from SMARTS) matching my molecules (SMILES). I found the GetSubstructMatches() method which works pretty well returning the indices of matching atoms in my molecule. I wonder if there is a way to directly obtain the SMILES