Giter VIP home page Giter VIP logo

raymolecule's People

Contributors

matthewhirschey avatar tylermorganwall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

raymolecule's Issues

error with new version for toon shading

Dear Dr Morgan-Wall,

I am sorry to bother you. I am just having a bit of trouble with the latest version or raymolecule. With the latest version the example Raymolecule code at https://github.com/tylermorganwall/raymolecule for using using the cel-shading and the toon shading no longer seem to work. They used to but now if I run for example,

shiny_toon_material = material_list(type="toon_phong",
toon_levels=,
toon_outline_width=0.1)
get_example_molecule("morphine") |>
read_sdf() |>
generate_full_scene(pathtrace=FALSE, material_vertex = shiny_toon_material) |>
render_model(width=800,height=800,background="grey66")

It gives an error "-Error in apply(single_obj$vertices, 2, range) :
dim(X) must have a positive length

Basically anything on https://github.com/tylermorganwall/raymolecule with a black background still works but the ones with a grey background don’t - unless I use the old version of Rayshader on my laptop.

I have tried to work it out but I’m stuck.

Many thanks

Oliver

Noise and 360 views

Hello,
the package is awesome. Could you please explain how can I make the 360 view video with raymolecule?
Also, there'll always have some noise in the image? how much can we remove?

read_pdb fails in Linux when using a gzip compressed file in R 4.1.0

An example of this error:

> p = read_pdb("1kys.pdb.gz")
Error in readChar(con, nchars = 6) : invalid UTF-8 input in readChar()
In addition: Warning message:
In readChar(con, nchars = 6) : truncating string with embedded nuls

Seems like the issue is in

con = file(filename,"rb")
, where the PDB file is read using:

con = file(filename,"rb")

Subsequently, it fails when trying to execute:

type = trimws(readChar(con,nchars=6))

Not sure if it is an issue with the new version of R (which I've updated today), or "raymolecule" (which I've installed today).

FWIW, when trying to read the file w/o using "rb", it works:

> con = file("1kys.pdb.gz")
> readChar(con, n = 6)
[1] "HEADER"

As a reference. here is my sessionInfo() output

> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/liblapack.so.3

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_0.5.1     stringr_1.4.0     dplyr_1.0.6       purrr_0.3.4      
 [5] readr_1.4.0       tidyr_1.1.3       tibble_3.1.2      ggplot2_3.3.3    
 [9] tidyverse_1.3.1   raymolecule_0.3.2

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.6          lubridate_1.7.10    lattice_0.20-44    
 [4] prettyunits_1.1.1   ps_1.6.0            assertthat_0.2.1   
 [7] rprojroot_2.0.2     utf8_1.2.1          cellranger_1.1.0   
[10] R6_2.5.0            backports_1.2.1     reprex_2.0.0       
[13] httr_1.4.2          pillar_1.6.1        rlang_0.4.11.9000  
[16] readxl_1.3.1        curl_4.3.1          rstudioapi_0.13    
[19] callr_3.7.0         raster_3.4-10       desc_1.3.0         
[22] devtools_2.4.1      munsell_0.5.0       broom_0.7.6        
[25] modelr_0.1.8        compiler_4.1.0      pkgconfig_2.0.3    
[28] pkgbuild_1.2.0      tidyselect_1.1.1    rayrender_0.21.2   
[31] codetools_0.2-18    fansi_0.4.2         crayon_1.4.1       
[34] dbplyr_2.1.1        withr_2.4.2         grid_4.1.0         
[37] jsonlite_1.7.2      gtable_0.3.0        lifecycle_1.0.0    
[40] PeriodicTable_0.1.2 DBI_1.1.1           magrittr_2.0.1     
[43] scales_1.1.1        stringi_1.6.2       cli_2.5.0          
[46] cachem_1.0.5        fs_1.5.0            remotes_2.3.0      
[49] sp_1.4-5            testthat_3.0.2      xml2_1.3.2         
[52] ellipsis_0.3.2      generics_0.1.0      vctrs_0.3.8        
[55] tools_4.1.0         glue_1.4.2          rayimage_0.5.1     
[58] hms_1.1.0           processx_3.5.2      pkgload_1.2.1      
[61] parallel_4.1.0      fastmap_1.1.0       colorspace_2.0-1   
[64] sessioninfo_1.1.1   rvest_1.0.0         memoise_2.0.0      
[67] haven_2.4.1         usethis_2.0.1 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.