Skip to content
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

Can function m_sel() select by eleno please? #56

Open
bioboot opened this issue Oct 30, 2024 · 5 comments
Open

Can function m_sel() select by eleno please? #56

bioboot opened this issue Oct 30, 2024 · 5 comments

Comments

@bioboot
Copy link

bioboot commented Oct 30, 2024

I would like to select atoms based on element number (first number of ATOM records). This would be similar to resi currently.

Something like:

model |>   m_set_style(
    sel = m_sel(eleno = 2:6 ),
    style = m_style_sphere() )

Thank you!

@swsoyee
Copy link
Owner

swsoyee commented Oct 30, 2024

Hi, I can't install r3dmol in my current working computer, but you can try the following code:

model |>   m_set_style(
    sel = m_sel(index = 2:6 ),
    style = m_style_sphere() )

Ref: https://3dmol.csb.pitt.edu/doc/AtomSelectionSpec.html#index

@bioboot
Copy link
Author

bioboot commented Oct 30, 2024

Thank you, I get:

Error in m_sel(index = 2:6) : unused argument (index = 2:6)

I am using r3dmol_0.1.2

@swsoyee
Copy link
Owner

swsoyee commented Oct 30, 2024

Thank you for your report.
The index argument was added from 3Dmol.js v2.0.0, but r3dmol is still using the old version of 3Dmol.js v1.7.0. So the index argument are not support in r3dmol.

@bioboot
Copy link
Author

bioboot commented Oct 30, 2024

Thank you, what is update plan/timeline? Just wondering if I should code around this limitation or sit tight and wait for v2 in r3dmol. Thanks again!

@swsoyee
Copy link
Owner

swsoyee commented Oct 31, 2024

Since the structure has changed significantly starting from v2.0.0, there are currently no plans to upgrade. Apologize for the inconvenience, but if possible, please consider alternative solutions to achieve your goals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants