atom.select is unable to select atoms from prmtop file

Issue #226 resolved
Former user created an issue

I am crating a prmtop file with tleap from AmberTools14 (TestCreatePrmtop.leap). I can read the prmtop file with prmtop and it seems that it is correctly read:

testprmtop <- read.prmtop("testpep.prmtop") testprmtop

Call: read.prmtop(file = "testpep.prmtop")

Class: amber, prmtop

System information: Total number of atoms: 74 Solute residues: 5 Solute molecules: 1

Sequence: AAKGK

But I cannot select atoms from it (I am following the same procedure as in the help of as.pdb.)

crds <- atom.select(testprmtop,"calpha") Error in as.pdb.default(xyz = crd$xyz, elety = prmtop$ATOM_NAME, resno = resno, : 'xyz' must be a numeric vector/matrix

crds <- atom.select.prmtop(testprmtop,"calpha") Error in as.pdb.default(xyz = crd$xyz, elety = prmtop$ATOM_NAME, resno = resno, : 'xyz' must be a numeric vector/matrix

packageDescription("bio3d") Package: bio3d Title: Biological Structure Analysis Version: 2.2-2 Author: Barry Grant, Xin-Qiu Yao, Lars Skjaerven, Julien Ide VignetteBuilder: knitr Imports: parallel, grid Suggests: XML, RCurl, lattice, ncdf, igraph, bigmemory, knitr, testthat (>= 0.9.1) Depends: R (>= 3.1.0) LazyData: yes Description: Utilities to process, organize and explore protein structure, sequence and dynamics data. Features include the ability to read and write structure, sequence and dynamic trajectory data, perform sequence and structure database searches, data summaries, atom selection, alignment, superposition, rigid core identification, clustering, torsion analysis, distance matrix analysis, structure and sequence conservation analysis, normal mode analysis, principal component analysis of heterogeneous structure data, and correlation network analysis from normal mode and molecular dynamics data. In addition, various utility functions are provided to enable the statistical and graphical power of the R environment to work with biological sequence and structural data. Please refer to the URLs below for more information. Maintainer: Barry Grant bjgrant@umich.edu License: GPL (>= 2) URL: http://thegrantlab.org/bio3d/, http://bitbucket.org/Grantlab/bio3d Packaged: 2015-03-03 00:24:17 UTC; xinqyao NeedsCompilation: no Repository: CRAN Date/Publication: 2015-03-03 07:34:13 Built: R 3.2.0; ; 2015-05-04 15:36:53 UTC; unix

Comments (7)

  1. Lars Skjærven

    This bug should be fixed in one of the later bug fixes which has not reached CRAN yet. You can install the latest version with bugfixes with these commands:

    install.packages("devtools")
    library(devtools)
    install_bitbucket("Grantlab/bio3d", subdir = "ver_devel/bio3d/", ref="releases")
    
  2. Juan Eiros

    Hi,

    I wrote some days ago having the same problem, and just now have been trying to install this package with no luck. I am pretty new to R, can you please suggest why I am not able to install the devtools package? This is the error I get when I've tried to do it (I've run the same commands as root, receiving the same error messages)

    > install.packages("devtools")
    Installing package into/home/je714/R/x86_64-redhat-linux-gnu-library/3.1(aslibis unspecified)
    also installing the dependenciesxml2,rversions,git2rtrying URL 'http://cran.rstudio.com/src/contrib/xml2_0.1.1.tar.gz'
    Content type 'application/x-gzip' length 73772 bytes (72 Kb)
    opened URL
    ==================================================
    downloaded 72 Kb
    
    trying URL 'http://cran.rstudio.com/src/contrib/rversions_1.0.1.tar.gz'
    Content type 'application/x-gzip' length 4624 bytes
    opened URL
    ==================================================
    downloaded 4624 bytes
    
    trying URL 'http://cran.rstudio.com/src/contrib/git2r_0.10.1.tar.gz'
    Content type 'application/x-gzip' length 1014817 bytes (991 Kb)
    opened URL
    ==================================================
    downloaded 991 Kb
    
    trying URL 'http://cran.rstudio.com/src/contrib/devtools_1.8.0.tar.gz'
    Content type 'application/x-gzip' length 141487 bytes (138 Kb)
    opened URL
    ==================================================
    downloaded 138 Kb
    
    * installing *source* packagexml2...
    ** packagexml2successfully unpacked and MD5 sums checked
    Package libxml-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libxml-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libxml-2.0' found
    Package libxml-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libxml-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libxml-2.0' found
    Could not find libxml2. Please install libxml2-devel (rpm) or libxml2-dev (deb).
    ERROR: configuration failed for package ‘xml2’
    * removing ‘/home/je714/R/x86_64-redhat-linux-gnu-library/3.1/xml2’
    Warning in install.packages :
      installation of package ‘xml2’ had non-zero exit status
    * installing *source* package ‘git2r’ ...
    ** package ‘git2r’ successfully unpacked and MD5 sums checked
    checking build system type... x86_64-unknown-linux-gnu
    checking host system type... x86_64-unknown-linux-gnu
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables... 
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for library containing inflate... -lz
    checking for library containing SSL_library_init... no
    configure: error: in `/tmp/RtmppfBAwI/R.INSTALL1d0e49bd1c98/git2r':
    configure: error: OpenSSL library required
    See `config.log' for more details
    ERROR: configuration failed for packagegit2r* removing/home/je714/R/x86_64-redhat-linux-gnu-library/3.1/git2rWarning in install.packages :
      installation of packagegit2rhad non-zero exit status
    ERROR: dependencyxml2is not available for packagerversions* removing/home/je714/R/x86_64-redhat-linux-gnu-library/3.1/rversionsWarning in install.packages :
      installation of packagerversionshad non-zero exit status
    ERROR: dependenciesrversions,git2rare not available for packagedevtools* removing/home/je714/R/x86_64-redhat-linux-gnu-library/3.1/devtoolsWarning in install.packages :
      installation of packagedevtoolshad non-zero exit status
    
    The downloaded source packages are in/tmp/Rtmp2Ru1SN/downloaded_packages

    I've tried installing the libxml2 packages that seem to be missing, but I cannot find them with Rstudio.

    Sorry if I'm missing something really obvious.

  3. Lars Skjærven

    Hi Juan, You're on a red hat system right? Can you use yum for installing the missing libraries? i.e.

    yum install openssl-devel.x86_64 libxml2-devel  
    

    Make sure you have the file /usr/lib64/libxml2.so (or something like that) after the installation. Hope it helps. Lars

  4. Juan Eiros

    Hi Lars,

    I forgot to say that in the message, my bad.

    Thanks for your suggestions, they worked perfectly.

    Best Juan

  5. Log in to comment