Re: [Rdkit-discuss] Forcing depiction to match input mol block

2022-03-24 Thread Ádám Baróthi
Hi Greg,

Thank you for the link!
It seems that Huw pasted in the same piece of code as the one you provided.
I managed to fix the issue using the above function.

Would it be worthwhile to add it into the Cookbook, if it's a reocurring
problem for some? I personally never would've thought to check the Chembl
code, and I haven't found anything related on the subject on RDKit sites.

Best,
Adam

Greg Landrum  ezt írta (időpont: 2022. márc. 23.,
Sze, 17:16):

> Hi Adam,
>
> By default the RDKit picks the locations to do wedging. There's no
> built-in function to reapply the wedging from an input mol file (we
> probably should add this), but you can find a good one here, as part of the
> ChEMBL structure pipeline:
>
> https://github.com/chembl/ChEMBL_Structure_Pipeline/blob/master/chembl_structure_pipeline/standardizer.py#L469
>
> -greg
>
>
> On Tue, Mar 22, 2022 at 11:01 AM Ádám Baróthi 
> wrote:
>
>> Hello Everyone,
>>
>> I'm having some trouble trying to depict molecules the exact same way as
>> the input mol block (V2000) was drawn. My main problem is that I've drawn
>> in a wedge bond between atoms 1 and 7 (the right hand side of the
>> cyclopropyl ring), and RDKit depicts the molecule with a wedge bond between
>> atoms 0 and 1 (the left hand side of the cyclohexane ring).
>>
>> Google colab showing the difference between the structures
>> 
>>
>> Is there a way to force the depiction to match the input exactly without
>> having to set the bond types manually?
>>
>> Molecule in question:
>>
>>   ACCLDraw0310522D
>>
>>  11 12  0  0  1  0  0  0  0  0999 V2000
>>15.0356   -8.97260. C   0  0  0  0  0  0  0  0  0  0  0  0
>>16.0593   -8.38150. C   0  0  2  0  0  0  0  0  0  0  0  0
>>17.0831   -8.97260. C   0  0  0  0  0  0  0  0  0  0  0  0
>>17.0831  -10.15470. C   0  0  0  0  0  0  0  0  0  0  0  0
>>16.0593  -10.74570. C   0  0  2  0  0  0  0  0  0  0  0  0
>>15.0356  -10.15470. C   0  0  0  0  0  0  0  0  0  0  0  0
>>16.0593  -11.92690. N   0  0  0  0  0  0  0  0  0  0  0  0
>>16.6510   -7.35670. C   0  0  3  0  0  0  0  0  0  0  0  0
>>15.4680   -7.35670. C   0  0  0  0  0  0  0  0  0  0  0  0
>>17.6738   -6.76620. C   0  0  0  0  0  0  0  0  0  0  0  0
>>18.6967   -7.35670. O   0  0  0  0  0  0  0  0  0  0  0  0
>>   1  2  1  0  0  0  0
>>   2  3  1  0  0  0  0
>>   3  4  1  0  0  0  0
>>   4  5  1  0  0  0  0
>>   5  6  1  0  0  0  0
>>   1  6  1  0  0  0  0
>>   5  7  1  1  0  0  0
>>   2  8  1  1  0  0  0
>>   8  9  1  0  0  0  0
>>   2  9  1  0  0  0  0
>>   8 10  1  0  0  0  0
>>  10 11  1  0  0  0  0
>> M  END
>>
>> Best,
>> Adam
>> ___
>> 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


Re: [Rdkit-discuss] Forcing depiction to match input mol block

2022-03-23 Thread Greg Landrum
Hi Adam,

By default the RDKit picks the locations to do wedging. There's no built-in
function to reapply the wedging from an input mol file (we probably should
add this), but you can find a good one here, as part of the ChEMBL
structure pipeline:
https://github.com/chembl/ChEMBL_Structure_Pipeline/blob/master/chembl_structure_pipeline/standardizer.py#L469

-greg


On Tue, Mar 22, 2022 at 11:01 AM Ádám Baróthi 
wrote:

> Hello Everyone,
>
> I'm having some trouble trying to depict molecules the exact same way as
> the input mol block (V2000) was drawn. My main problem is that I've drawn
> in a wedge bond between atoms 1 and 7 (the right hand side of the
> cyclopropyl ring), and RDKit depicts the molecule with a wedge bond between
> atoms 0 and 1 (the left hand side of the cyclohexane ring).
>
> Google colab showing the difference between the structures
> 
>
> Is there a way to force the depiction to match the input exactly without
> having to set the bond types manually?
>
> Molecule in question:
>
>   ACCLDraw0310522D
>
>  11 12  0  0  1  0  0  0  0  0999 V2000
>15.0356   -8.97260. C   0  0  0  0  0  0  0  0  0  0  0  0
>16.0593   -8.38150. C   0  0  2  0  0  0  0  0  0  0  0  0
>17.0831   -8.97260. C   0  0  0  0  0  0  0  0  0  0  0  0
>17.0831  -10.15470. C   0  0  0  0  0  0  0  0  0  0  0  0
>16.0593  -10.74570. C   0  0  2  0  0  0  0  0  0  0  0  0
>15.0356  -10.15470. C   0  0  0  0  0  0  0  0  0  0  0  0
>16.0593  -11.92690. N   0  0  0  0  0  0  0  0  0  0  0  0
>16.6510   -7.35670. C   0  0  3  0  0  0  0  0  0  0  0  0
>15.4680   -7.35670. C   0  0  0  0  0  0  0  0  0  0  0  0
>17.6738   -6.76620. C   0  0  0  0  0  0  0  0  0  0  0  0
>18.6967   -7.35670. O   0  0  0  0  0  0  0  0  0  0  0  0
>   1  2  1  0  0  0  0
>   2  3  1  0  0  0  0
>   3  4  1  0  0  0  0
>   4  5  1  0  0  0  0
>   5  6  1  0  0  0  0
>   1  6  1  0  0  0  0
>   5  7  1  1  0  0  0
>   2  8  1  1  0  0  0
>   8  9  1  0  0  0  0
>   2  9  1  0  0  0  0
>   8 10  1  0  0  0  0
>  10 11  1  0  0  0  0
> M  END
>
> Best,
> Adam
> ___
> 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


[Rdkit-discuss] Forcing depiction to match input mol block

2022-03-22 Thread Ádám Baróthi
Hello Everyone,

I'm having some trouble trying to depict molecules the exact same way as
the input mol block (V2000) was drawn. My main problem is that I've drawn
in a wedge bond between atoms 1 and 7 (the right hand side of the
cyclopropyl ring), and RDKit depicts the molecule with a wedge bond between
atoms 0 and 1 (the left hand side of the cyclohexane ring).

Google colab showing the difference between the structures


Is there a way to force the depiction to match the input exactly without
having to set the bond types manually?

Molecule in question:

  ACCLDraw0310522D

 11 12  0  0  1  0  0  0  0  0999 V2000
   15.0356   -8.97260. C   0  0  0  0  0  0  0  0  0  0  0  0
   16.0593   -8.38150. C   0  0  2  0  0  0  0  0  0  0  0  0
   17.0831   -8.97260. C   0  0  0  0  0  0  0  0  0  0  0  0
   17.0831  -10.15470. C   0  0  0  0  0  0  0  0  0  0  0  0
   16.0593  -10.74570. C   0  0  2  0  0  0  0  0  0  0  0  0
   15.0356  -10.15470. C   0  0  0  0  0  0  0  0  0  0  0  0
   16.0593  -11.92690. N   0  0  0  0  0  0  0  0  0  0  0  0
   16.6510   -7.35670. C   0  0  3  0  0  0  0  0  0  0  0  0
   15.4680   -7.35670. C   0  0  0  0  0  0  0  0  0  0  0  0
   17.6738   -6.76620. C   0  0  0  0  0  0  0  0  0  0  0  0
   18.6967   -7.35670. O   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0  0  0  0
  2  3  1  0  0  0  0
  3  4  1  0  0  0  0
  4  5  1  0  0  0  0
  5  6  1  0  0  0  0
  1  6  1  0  0  0  0
  5  7  1  1  0  0  0
  2  8  1  1  0  0  0
  8  9  1  0  0  0  0
  2  9  1  0  0  0  0
  8 10  1  0  0  0  0
 10 11  1  0  0  0  0
M  END

Best,
Adam
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss