Greg,
Thanks for the clarification.

On Fri, Feb 11, 2022 at 3:19 PM Greg Landrum <greg.land...@gmail.com> wrote:

> Oh, you want the layout itself changed, not just the orientation.
>
> No, there's nothing in place to do that and adding such a thing would be
> extremely non-trivial.
>
> -greg
>
>
> On Fri, Feb 11, 2022 at 3:49 PM Tim Dudgeon <tdudgeon...@gmail.com> wrote:
>
>> Hi Greg,
>> yes, but my situation is that the X dimension is much larger than the Y
>> and most of the time things are aligned nicely. But not always. Here is an
>> example.
>> OC(C(=O)NC=1C=CC=CC1NS(=O)(=O)C=2C=CC(F)=CC2)C=3C=CC=NC3
>> [image: image.png]
>> Clearly there is potential to lay this out using more of the X dimension
>> and less of the Y.
>>
>> Tim
>>
>> On Fri, Feb 11, 2022 at 1:57 PM Greg Landrum <greg.land...@gmail.com>
>> wrote:
>>
>>> Hi Tim,
>>>
>>> That's a nice one.
>>>
>>> For people not familiar with the problem:
>>> The RDKit coordinate generation prefers aligning molecules with the X
>>> axis; this can lead to "sub-optimal" drawings if your drawing canvas is
>>> taller than it is wide.
>>>
>>> One easy solution is to just generate coordinates as usual and then
>>> rotate them to favor the Y axis if your canvas is larger along Y.
>>> Here's a gist showing how to do that:
>>> https://gist.github.com/greglandrum/12b793b240d27e3c0899c9c6c62d4f30
>>>
>>> -greg
>>>
>>>
>>> On Fri, Feb 11, 2022 at 10:20 AM Tim Dudgeon <tdudgeon...@gmail.com>
>>> wrote:
>>>
>>>> At Dave Cosgrove's suggestion I raise this as a new topic, though it
>>>> was touched on briefly recently.
>>>>
>>>> I'd like to know if it's possible to depict a molecule in a way that
>>>> takes into account the dimensions of the box it will appear in. In my case
>>>> I have a rectangle that is short and wide (aspect ratio of 1:3) and the
>>>> molecules are typically compressed because of the lack of available height.
>>>> So is it possible to make the layout engine aware of the bounds it has
>>>> available (e.g. in my example short and wide)?
>>>>
>>>> Thanks
>>>> Tim
>>>> _______________________________________________
>>>> Rdkit-discuss mailing list
>>>> Rdkit-discuss@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>>
>>>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to