Great. That seems to work.
Thanks!

On Tue, Jan 16, 2024 at 2:59 PM John Mayfield <john.wilkinson...@gmail.com>
wrote:

> Velusamy is correct. The primary storage of stereochemistry is via Stereo
> elements.
>
> The bond display only controls the bond display, your code would do what
> you want if you generated the coordinates first and then cleared the bond
> display/stereo info but since you didn't have the coordinates from the
> SMILES these get automatically computed for you.
>
> Best,
> John
>
> On Mon, 15 Jan 2024 at 18:26, Velusamy Velu <kool.v...@gmail.com> wrote:
>
>> The 3rd line below works for me.
>>
>> final SmilesParser PARSER = new 
>> SmilesParser(SilentChemObjectBuilder.getInstance());
>> IAtomContainer mol = PARSER.parseSmiles("C[C@@H](C(=O)O)N");
>> mol.setStereoElements(new ArrayList<>());
>>
>> Thanks
>>
>> Velusamy K. Velu
>> 614-323-9649
>> <https://peruselab.com/>  <https://www.linkedin.com/in/vkvelu/>
>> <https://twitter.com/PeruseLab>  <https://www.facebook.com/PeruseLab/>
>>
>>
>> On Mon, Jan 15, 2024 at 11:09 AM Tim Dudgeon <tdudgeon...@gmail.com>
>> wrote:
>>
>>> What is the best approach to clear stereochemistry from a molecule.
>>> I think I was told to use:
>>>
>>>        for (IBond bond : mol.bonds()) {
>>>             bond.setStereo(IBond.Stereo.NONE);
>>>             bond.setDisplay(IBond.Display.Solid);
>>>         }
>>>
>>> But if I use this for a molecule generated from SMILES it still is
>>> depicted with a wedge bond.
>>>
>>> IAtomContainer mol = smilesParser.parseSmiles("C[C@@H](C(=O)O)N");
>>>
>>> for (IBond bond : mol.bonds()) {
>>>     bond.setStereo(IBond.Stereo.NONE);
>>>     bond.setDisplay(IBond.Display.Solid);
>>> }
>>> DepictionGenerator dg = new DepictionGenerator().withSize(512, 512)
>>>                 .withAtomColors();
>>> dg.depict(mol).writeTo("mol.png");
>>> _______________________________________________
>>> Cdk-user mailing list
>>> Cdk-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>>
>> _______________________________________________
>> Cdk-user mailing list
>> Cdk-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/cdk-user
>>
>
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to