Ok, here's an initial proof-of-concept implementation that, I think, does
the basics of what you're looking for.
Hopefully there's enough there to get you started:
https://gist.github.com/greglandrum/f447708cbdb71f2193ca147ca503934d

I will likely play around with this a bit more and turn it into a blog
post...

-greg



On Tue, Aug 20, 2019 at 11:36 AM Greg Landrum <greg.land...@gmail.com>
wrote:

> I actually had a bit of inspiration while waiting for a connecting flight
> and think I will have a little demo of this ready in a day or so.
>
> -greg
>
> On Tue, 20 Aug 2019 at 03:29, Greg Landrum <greg.land...@gmail.com> wrote:
>
>> This is a great problem, but it's certainly not a trivial one.
>>
>> It's a bit of a triviality, but here's at least a demo of how to draw the
>> R groups with the dummies as "attachment points":
>> https://gist.github.com/greglandrum/f7e310045542ab71447351a8043bbf3f
>>
>>
>> -greg
>>
>>
>> On Sun, Aug 18, 2019 at 2:43 PM ken <k...@postinbox.com> wrote:
>>
>>> Hello,
>>>
>>> I am trying to build a 2-D R-group grid (or table, or spreadsheet),
>>> where the row headers contain R1 values and the column headers contain R2
>>> values (or vice versa).  Compounds that have given R1 and R2 groups would
>>> be represented on the table as a filled cell that intersects those R1 and
>>> R2. For example, the input could be an SD file containing the following
>>> three compounds:
>>>
>>> The desired output grid from the sd file would look something like this
>>> ("Y" can be replaced with cell formatting or some other indicator):
>>>
>>> The closest thing to this that I have been able to find is the "SAR
>>> Matrix" (https://f1000research.com/articles/3-113/v2), but the code
>>> that was used to generate the matrices does not appear to be available.
>>> Does anyone happen to have such code or know how I can generate it? I
>>> imagine the first step would be to perform an R-group decomposition, but
>>> I'm not sure what to do from there.
>>>
>>> I started to see if I could build the program from scratch, but then I
>>> thought that someone must've done this before and I shouldn't needlessly
>>> reinvent it.  I've been (re)learning Python for the past year or so and I
>>> *think* I have a pretty good handle on the language, but I wouldn't
>>> mind putting said learning to the test on a "real" project, so if anyone
>>> has a solution that outputs something that even vaguely resembles the
>>> desired grid/matrix, maybe I can modify it to fit my needs.
>>>
>>> At some point, I would need the grid to be editable in Word, but I'll
>>> cross that bridge when I get to it...
>>>
>>> Thank you in advance for your help,
>>> Ken
>>> _______________________________________________
>>> 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