[R] How to draw chemical structures with R?

Luigi Marongiu m@rong|u@|u|g| @end|ng |rom gm@||@com
Tue Dec 6 07:26:08 CET 2022


Thanks, I will.

On Tue, Dec 6, 2022 at 7:21 AM Jeff Newmiller <jdnewmil using dcn.davis.ca.us> wrote:
>
> I have never seen this package mentioned on this list. You should contact the package maintainer.
>
> On December 5, 2022 9:59:34 PM PST, Luigi Marongiu <marongiu.luigi using gmail.com> wrote:
> >Thanks for the tip! I think the problem is all Java-based, the SMILES
> >structure comes from the example in the template, it should work.
> >There is something missing in the execution...
> >
> >On Tue, Dec 6, 2022 at 3:12 AM LMH <lmh_users-groups using molconn.com> wrote:
> >>
> >> Just my opinion, but I think you would be better off to draw the structures using a drawing program
> >> like MarvinSketch (free, java based) and save the structure as a SMILES file, MOL file, or SDF. You
> >> should be able to import any of those into R. A program like MarvinSketch will check the structure
> >> for errors as you draw it and keep to standardized formats.
> >>
> >> By the way, I see no error in the SMILEA string for the structure in your expamle so your error is
> >> not in the drawing part of the process. Even so, I try to keep to well established tools for basic
> >> tasks and Marvin as is well established as it gets.
> >>
> >> I would look for an example of what you are trying and see if you can get the example to work.
> >>
> >> LMH
> >>
> >>
> >> Luigi Marongiu wrote:
> >> > Hello,'
> >> > I have seen from this link
> >> > https://cran.r-project.org/web/packages/rcdk/vignettes/using-rcdk.html
> >> > that there is a way to draw chemical structures using R via rcdk package.
> >> > I tried to draw a simple structure but I got an error. What is it
> >> > missing? What is the correct syntax?
> >> > Thanks
> >> >
> >> > ```
> >> > library(rcdk)
> >> > smile <- 'c1ccccc1CC(=O)C(N)CC1CCCCOC1'
> >> > mol <- parse.smiles(smile)[[1]]
> >> > view.molecule.2d(mol)
> >> >> Error in view.molecule.2d(mol) : java.lang.NoSuchMethodError: <init>
> >> > ```
> >> >
> >> > ______________________________________________
> >> > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >> > https://stat.ethz.ch/mailman/listinfo/r-help
> >> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> >> > and provide commented, minimal, self-contained, reproducible code.
> >> >
> >>
> >
> >
>
> --
> Sent from my phone. Please excuse my brevity.



-- 
Best regards,
Luigi



More information about the R-help mailing list