How to do inverse atom selection in Bio3D version2.3.0

Issue #715 resolved
Former user created an issue

Hi, I want to make inverse selections in the Bio3D(version 2.3.0) package. However, the argument "inverse' of the atom selection function (atom.select()) seems not supported in this version. It will be great appreciated if anyone could help. Thanks.

Comments (7)

  1. Xinqiu Yao

    Can you post the detail about how you used the function and what output you got that is different from what you expected?

  2. Dailin Li

    bs_inverse <- atom.select(b, 'calpha', inverse=TRUE)
    Error in atom.select(b, "calpha", inverse = TRUE) :
    参数没有用(inverse = TRUE)

    Actually, I have read the source code of the atom.select function in version 2.3.0 and did not find any word that matches “inverse“, which means that the argument “inverse” may be not supported.

  3. Xinqiu Yao

    The latest version should be 2.4-1. Check the output of sessionInfo() and see what version you are using.

    A few things you may consider:

    Check if you have installed multiple versions of bio3d in different places. A simple way is to try remove.packages(“bio3d”) several times until it shows there is no bio3d package installed. Then, re-install bio3d. You may change to another CRAN repository to make sure you get the latest version. For example install.packages('bio3d', repos='https://cloud.r-project.org')

    Check if there is any Rprofile.site or .Rprofile file loaded before a R session starts. These files may source some local files or point to an older bio3d version that override what you have installed.

    Check your work space (e.g., using ls()) and make sure there is no local function named ‘atom.select’ or similar.

  4. Dailin Li

    Thanks for your suggestion, Xinqiu. I have updated to the latest version and the inverse selection is ok now. Thanks again.

  5. Log in to comment