-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
visualization with view.molecule.2d
fails with an <init>
error message
#152
Comments
I confirm the same ...
SessionInfo:
Java version:
|
I can try a few other JVMs.
Edit: I tried R with java8 and java 21. They work fine |
Looks like theres a different code path for OSX vs Windows/Linux @rajarshi any chance you can take a look at this one? ![]() |
Okay I can replicate this. looks like a type error in the initialization call. I don't remember any changes to this recently though so its a bit odd not to have surfaced much earlier.... In my view rcdk should move away from having special compiled Java classes as the extra compilation steps make everything much harder. I also would move away from Java-GUIs for the same reason and move VIZ into base R via PNG/ SVG/files. @egonw and @schymane - are you heavily reliant on the Java AWT bits?
|
Note: You can also use the Depict Package for viz. devtools::install_github("CDK-R/depict")
library(depict)
cxSMILES = "O=C(*)Oc1ccc(cc1)C(C)(C)c1ccc(O*)cc1 |Sg:n:0,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20::ht| Poly(bisphenol-A-carbonate"
mol <- parse_smiles(cxSMILES)
depiction() |>
set_zoom(2) |>
depict(mol) |>
get_image() |>
grid::rasterGrob() |>
grid::grid.draw()
|
Ok cool we thought about the depict package yesterday but weren't sure and used the inbuilt one instead. We don't think we're heavily reliant on the AWT parts... |
So we tried to use your depict code to visualize and that didn't work for us either :-(
(I get the same irrespective of how "mol" was created, but the mol is creating valid output in other areas ... ) |
Can you show me how you are getting mol? e.g. did you paste my exact code? The class/type of |
you could try doing mol[[1]] (Its probably coming in as a list)
…On Thu, May 2, 2024 at 7:55 AM zachcp ***@***.***> wrote:
Can you show me how you are getting mol? e.g. did you paste my exact code?
The class/type of mol is wrong.
—
Reply to this email directly, view it on GitHub
<#152 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAIMOIINFWDN5KUCYUAXZLZAJHWTAVCNFSM6AAAAABHA57S7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJQG4ZTCMJXGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
ahh
|
Given this code (in RStudio):
The last code fails with this exception:
Screenshots
If applicable, add screenshots to help explain your problem.
System:
The text was updated successfully, but these errors were encountered: