You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for such a useful package -- I've found it much easier to use than some of the alternatives.
m_add_label prints a label, but if given m_vector3 coordinates, the label prints at the wrong position.
The following reprex shows this, using the example code from the help file. Here, I print 2 labels, at different positions (I just changed the signs of the coordinates and label colors) but the labels end up in the same position.
The positioning seems to work fine when given a residue number, but I'd like to be able to place labels outside of the molecular structure and connect them to the relevant location with an arrow. Also, m_vector3 works fine in other situations.
The text was updated successfully, but these errors were encountered:
Thank you for using this broken package.
I have just noticed that 3Dmol has been upgrade to v2.x and has many break changes.
I don't have time to upgrade r3dmol for now, but there is a very tricky way to partially accomplish your goal
style<- m_style_label(
backgroundColor="#666666",
backgroundOpacity=0.9
)
style$screenOffset<-list(x=0, y=100) # Add this option with a X and Y. Z did not work.
r3dmol() %>%
m_add_model(data=pdb_6zsl, format="pdb") %>%
m_add_label(
text="Label",
sel= m_vector3(3, 0, 1),
style=style
) |>
m_add_arrow(
start= m_vector3(3, 10, 1),
end= m_sel(resi=3),
spec= m_shape_spec(color="green")
) |>
m_zoom_to()
Based on the view, the arrow's end coordinates don't always seem to be in the same fixed position as the label. So maybe you need to have several attempts at the coordinates to get an optimal value.
Thank you for such a useful package -- I've found it much easier to use than some of the alternatives.
m_add_label
prints a label, but if givenm_vector3
coordinates, the label prints at the wrong position.The following reprex shows this, using the example code from the help file. Here, I print 2 labels, at different positions (I just changed the signs of the coordinates and label colors) but the labels end up in the same position.
The positioning seems to work fine when given a residue number, but I'd like to be able to place labels outside of the molecular structure and connect them to the relevant location with an arrow. Also,
m_vector3
works fine in other situations.The text was updated successfully, but these errors were encountered: