[med-svn] [r-cran-bio3d] 01/06: New upstream version 2.3-3

Andreas Tille tille at debian.org
Sun Oct 1 05:56:47 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-bio3d.

commit dc60a348310e2d41b37dcc588974d64bf72a48ad
Author: Andreas Tille <tille at debian.org>
Date:   Fri Sep 22 23:30:54 2017 +0200

    New upstream version 2.3-3
---
 DESCRIPTION                   |   6 +-
 MD5                           |  71 ++++++++--------
 R/atom.select.pdb.R           |  14 +++-
 R/atom2ele.R                  |  65 ++++++++++++--
 R/cnapath.R                   |   4 +-
 R/community.aln.R             |   6 ++
 R/get.pdb.R                   |  14 ++--
 R/hmmer.R                     |  10 +++
 R/pdbs2sse.R                  |  42 ++++++++--
 R/plot.blast.R                |   2 +-
 R/plot.dmat.R                 |  14 ++--
 R/plot.matrix.loadings.R      |  86 ++++++++++---------
 R/plot.pca.scree.R            |   2 +-
 R/read.cif.R                  |   2 +-
 R/read.pdb.R                  |   2 +-
 R/uniprot.R                   |  26 +++++-
 build/vignette.rds            | Bin 203 -> 203 bytes
 inst/doc/bio3d_vignettes.html | 191 ++++++++++++++++++++++++++++++++++--------
 man/atom.select.Rd            |   4 +-
 man/atom2ele.Rd               |  16 ++--
 man/bio3d.package.Rd          |   4 +-
 man/cna.Rd                    |   6 +-
 man/cnapath.Rd                |   6 ++
 man/community.aln.Rd          |   7 +-
 man/community.tree.Rd         |   5 ++
 man/identify.cna.Rd           |   5 ++
 man/layout.cna.Rd             |   5 ++
 man/mustang.Rd                |   6 ++
 man/network.amendment.Rd      |   7 +-
 man/plot.cna.Rd               |  11 +--
 man/plot.matrix.loadings.Rd   |   4 +-
 man/plot.pca.Rd               |   2 +-
 man/print.cna.Rd              |   5 ++
 man/prune.cna.Rd              |   5 ++
 man/vmd.cna.Rd                |   5 ++
 src/init.c                    |  28 +++++++
 src/read_cif.cpp              |  14 ++--
 37 files changed, 522 insertions(+), 180 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index dc34fed..bfb355c 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: bio3d
 Title: Biological Structure Analysis
-Version: 2.3-1
+Version: 2.3-3
 Authors at R: c(person("Barry", "Grant", role=c("aut", "cre"),
                      email="bjgrant at umich.edu"),
              person("Xin-Qiu", "Yao", role="aut"),
@@ -33,6 +33,6 @@ License: GPL (>= 2)
 URL: http://thegrantlab.org/bio3d/, http://bitbucket.org/Grantlab/bio3d
 RoxygenNote: 5.0.1
 NeedsCompilation: yes
-Packaged: 2016-11-10 20:41:30 UTC; xinqyao
+Packaged: 2017-07-29 19:26:07 UTC; xinqyao
 Repository: CRAN
-Date/Publication: 2016-11-12 00:26:53
+Date/Publication: 2017-07-31 04:23:33 UTC
diff --git a/MD5 b/MD5
index 65af844..3dd64bd 100644
--- a/MD5
+++ b/MD5
@@ -1,4 +1,4 @@
-0bf2def862cc66ab68ad907102f170fe *DESCRIPTION
+94d1337ffd1bfa6669482d35d098dbaa *DESCRIPTION
 068f656b098eb007fd78d661305ef372 *NAMESPACE
 150254df26c48e15dead1d2f56b585aa *NEWS
 4cb5dfe4fa115e3d65a9e6b7a6e3c22a *R/RcppExports.R
@@ -20,9 +20,9 @@ ef880390ae3f58420b0ab4121506c05b *R/angle.xyz.R
 a178e265e7a83136b94398d6d2e85411 *R/as.xyz.R
 1ad61b9c92f5e0abc66f15a97831b1ef *R/atom.select.R
 05c3ac3502d26d964bad1216c25fb724 *R/atom.select.mol2.R
-9ff27773f38387019cea6fd52c0bec6b *R/atom.select.pdb.R
+c87e5ffd9a2481698200875e09758034 *R/atom.select.pdb.R
 472881c06fa417e3342cd7d3f6dbb00a *R/atom.select.prmtop.R
-35ef25bf95af456136017aaa2d6361f1 *R/atom2ele.R
+6452eb305af0761adbd1a0e58d661ee7 *R/atom2ele.R
 17a8373e8df1a455dc17192f295bfb21 *R/atom2mass.R
 48a555c4bee0d0dd3c02418713af7a87 *R/atom2xyz.R
 0c8a1dadda8ce2e8a2a9ca2de0125dd7 *R/basename.pdb.R
@@ -43,12 +43,12 @@ ecaa84fd34f5e9c4953e20e2b6cdb1fa *R/cmap.pdb.R
 59bd3ce7f893392b424cb7625b6a5b38 *R/cna.R
 7c5098bfa91b96cfb2847c7794883862 *R/cna.dccm.R
 9e9013afedba0d15614f9e2d24460cfb *R/cna.ensmb.R
-d09bd7f4548b9323d92a1393106e02f6 *R/cnapath.R
+e95aebe6dee5710736cfebec105f89b9 *R/cnapath.R
 6624ac64efb374dd2e0896326ea811f9 *R/com.R
 e00189a7a762151be9f33223a236a63c *R/com.pdb.R
 c2fdd1f28bdef7d151e51b340a84f278 *R/com.xyz.R
 786907c3ba7816f42bb9bfbc44222405 *R/combine.select.R
-9dd223e4ad43c7cbae3dc65c5ffab9d3 *R/community.aln.R
+91fd179042f9509178d913f245625f2a *R/community.aln.R
 464f4b247ec3a11136a67e51a30931e4 *R/community.tree.R
 6b063f818fa98667191a4069019c216d *R/consensus.R
 0530ddc97b7d04bcb2612fc117af0210 *R/conserv.R
@@ -84,12 +84,12 @@ ee379599d8254472d6df82f8ff595439 *R/fit.xyz.R
 228a1e2d7bae2b06cb955dc2849228e8 *R/gap.inspect.R
 7e1043b7e2ece35717f40879ceeeef54 *R/geostas.R
 dcc1ac571943fd8938107e7dc5810bea *R/get.blast.R
-fb83cdc895cff79e35fc5ed430ff1a8f *R/get.pdb.R
+41a1e8d12c0efd27858a761de5cac412 *R/get.pdb.R
 57ea1abd333be1e8716f20d9e921b334 *R/get.seq.R
 47addc7fcd0744086985af22e2b862cd *R/gnm.R
 1ab7a0ea647f9cbd5794af9d3636cd0f *R/gnm.pdbs.R
 a4650a718115f929a223abf936958772 *R/hclustplot.R
-c6e9b743a78a1a49988dd076ecc00fd9 *R/hmmer.R
+a53d00985896874a17b4ab33fe8e66ed *R/hmmer.R
 a1c7b2c881e3b27c86678708818782d4 *R/identify.cna.R
 9face02e76a999d40e7d3c8f47d45565 *R/inner.prod.R
 b8eaf3135026219319f713351f3913d6 *R/inspect.connectivity.R
@@ -132,27 +132,27 @@ c653c556af553f30ddaeaf2466a69a49 *R/pdb2aln.ind.R
 73b60736a0202c98388c651784e1de25 *R/pdbaln.R
 13dc32cf8bba028bd221a1f250f419a7 *R/pdbfit.R
 83d54906090e2647ed608e7c40016275 *R/pdbs2pdb.R
-b2eaa46739cd4fd096a5a9a3a4b36c56 *R/pdbs2sse.R
+52008285c2a3d82504a914ae54b7fef9 *R/pdbs2sse.R
 3a9e52c15521ad9349e878e392d9aa1c *R/pdbseq.R
 c21018b2947b440db299dab4b3cb8cb1 *R/pdbsplit.R
 7758d93051e9c763dc940893213f357f *R/pfam.R
-c8a8078b304b5af5caedc480513d683d *R/plot.blast.R
+d3d0ceccd8b62bb6a6c61a05fc7d1a8e *R/plot.blast.R
 86be6e01618d198115bcd4b59e8da3ae *R/plot.cmap.R
 8e807e4562b5728018421aa1bbc5a6c5 *R/plot.cna.R
 5f37909e7127bfda49e14dbc8e9ce4f7 *R/plot.core.R
 5f709eb4d16951b94a3ef1b860522ec2 *R/plot.dccm.R
-9979be9ad91ac27290c418f60879a1d7 *R/plot.dmat.R
+b797ea804a7649c70974d5ce7d28ca81 *R/plot.dmat.R
 8fe618fdd7b9d92e61002bdc0f35f774 *R/plot.enma.R
 6fefa0e9f50ecc5b96f07ee771004193 *R/plot.fasta.R
 dccf527bd23922cbef6ff1209b9496b0 *R/plot.fluct.R
 76eb4ca559a6d9c93d795cfb3b9f0262 *R/plot.geostas.R
 dae1f890d18936dffe91bdf08830e114 *R/plot.hmmer.R
-9f02d885953132501f4dcb805d3a5b51 *R/plot.matrix.loadings.R
+96ce31a0a82978d5e81866671c00f772 *R/plot.matrix.loadings.R
 119543f73aa719e47a54ee1b1418fc94 *R/plot.nma.R
 0d553d0c777fba08972d519c854d12d0 *R/plot.pca.R
 ceca3cfe8aadbc4ac81d8cb23ef8f665 *R/plot.pca.loadings.R
 a0110652e10e3b8634be2998e54c7a7d *R/plot.pca.score.R
-0d12278d413198ae0111ea4d7551ac29 *R/plot.pca.scree.R
+1ae081a21e5b24c73f7a4cb6357410bf *R/plot.pca.scree.R
 b44899b6b43adf43fd010a9faf160ddc *R/plot.rmsip.R
 8e198ecfacb7f24eca13082d1ca19dcb *R/plotb3.R
 6d64ba753c41667a9f45f73810b978d9 *R/print.cna.R
@@ -173,7 +173,7 @@ c3e0309c5679e3bfdd83644968393fdc *R/pymol.dccm.R
 b12b22bdec4c126357e534ff1073f124 *R/pymol.modes.R
 87e828e384ca81311ee8a3c9438f2d8a *R/pymol.pdbs.R
 3984d7d3b5806f8cfc9fa847f78e7a97 *R/read.all.R
-9f6bdd1a8a590160d3332b26b28c85cf *R/read.cif.R
+e8f8663bfb20eea4c7eeafab6c729c88 *R/read.cif.R
 23e0e05cbb55e57f91cf69b331f9b39a *R/read.crd.R
 e992c6a2601ea9188eb30f15d2023d4e *R/read.crd.amber.R
 5e91c75f612d033c3edf6eaf88312661 *R/read.crd.charmm.R
@@ -182,7 +182,7 @@ fc5751a6dc90b7345c5cff9b2f2dbb2c *R/read.fasta.R
 b5e41ccb83eae90706940efee43ec066 *R/read.fasta.pdb.R
 bc664fc717b560c83a3eee4d6972e4f7 *R/read.mol2.R
 939dc1d01b3f020852b236112224a849 *R/read.ncdf.R
-2235456b5d2949e93a9add1011275d2a *R/read.pdb.R
+b23630ea3657e24d520aba1c585e8f49 *R/read.pdb.R
 5c81d409990b6eba721cc160a833446e *R/read.pdb2.R
 69b73edb0238dabf39cd14f0afe45190 *R/read.pdcBD.R
 c88e499f2e478f7e15453c19374e344e *R/read.pqr.R
@@ -215,7 +215,7 @@ d657629f5eb86376fa71a061b78f5305 *R/trim.mol2.R
 7b98249fa3e185d3ced241d3168a7f29 *R/trim.pdbs.R
 7f585f9541a0e392a23eb381d6653e36 *R/trim.xyz.R
 8d3ccf7b583e943a9e46c3c4af39267f *R/unbound.R
-05ee998067a81e37b1bb90dd57a2cec2 *R/uniprot.R
+72c5a4d149aeeb907ec7e4cc45e2ae60 *R/uniprot.R
 d5d3df69651197f3f0547daf0e613d1a *R/var.xyz.R
 6edf654c5a36ccb0db5f5226b2d40616 *R/vec2resno.R
 b323eb922cf8f9036d515e605b7cda1e *R/vmd.R
@@ -232,7 +232,7 @@ b1e0b5a0e37995a494cf65c7b7cb78b7 *R/write.ncdf.R
 a97c9312ea73b4e105a583707d4a5578 *R/write.pqr.R
 9e57938c5fa7ce30265b29e8750f4810 *R/xyz2atom.R
 0570c07b3d70b481b86a372c6ce51c3e *README.md
-257e290940c1800a9e65c36375ea11d4 *build/vignette.rds
+77a9ec06ea12a41b867b53c9df693449 *build/vignette.rds
 b4187321783b82378e3f9be255107088 *data/aa.index.rda
 01158334e1c54f122a6af1da25b2b636 *data/aa.table.rda
 7d55fffdd06d238f83012dffdab1d452 *data/atom.index.rda
@@ -248,7 +248,7 @@ ff5d52ecf3f780cbc5c693e87895aacb *data/transducin.RData
 b7e58ea62baf621f669d3afd84de90f2 *demo/pdb.R
 b50546f526b9da77fa3d599ccc8f5fdf *inst/CITATION
 e241b7f611abf8631129416b2b2a6fca *inst/doc/bio3d_vignettes.Rmd
-df559495f52dda889594f09f4b26ec12 *inst/doc/bio3d_vignettes.html
+cfd0135b02809c9c97a2e1107aa93bac *inst/doc/bio3d_vignettes.html
 ea4074c1ad01d8237901b03688f91fec *inst/examples/1dpx.pdb
 83ea2593e2c4021492c564f437f0072f *inst/examples/1hel.pdb
 7275ccf3f0ab303ae18f01617f420056 *inst/examples/aspirin.mol2
@@ -281,14 +281,14 @@ b938b57f3b0f1e5bc88dc3064a0617dd *man/as.fasta.Rd
 d6679f1b0071a4f44ed95ad3ab34d771 *man/as.pdb.Rd
 9be4f170fa002fb27e8e94ebbb440e95 *man/as.select.Rd
 83141303adc7a82321f5513341f8731b *man/atom.index.Rd
-81588a5093af0625b320a8600654d096 *man/atom.select.Rd
-23fe0870a6905ae93b736a629a0453f9 *man/atom2ele.Rd
+658a6c85465558259800c328d6760367 *man/atom.select.Rd
+4789893b56ab5844a4cee73d0e7ecd03 *man/atom2ele.Rd
 c50d66e01ab90e135a211081f819a63c *man/atom2mass.Rd
 7e752beacb85941f5ef50ee69a8dc7da *man/atom2xyz.Rd
 71788475bc11e8b02f7ee4390ba439e7 *man/basename.pdb.Rd
 29c5ac74c5b69f1fabfa396f54592f46 *man/bhattacharyya.Rd
 2b016053e31cdc45a613b567ba314ea9 *man/binding.site.Rd
-2b5a6bb93ec25533dabbd794e059c376 *man/bio3d.package.Rd
+fc0491e180a9e2a62ddeae370ccd5470 *man/bio3d.package.Rd
 dbd7e0074496cc7b17b14d530c12ffdf *man/biounit.Rd
 b66ee654b1cfeff0e61dbb99a941816f *man/blast.pdb.Rd
 9ca205b70db6da407022e6e8e3df592b *man/bounds.Rd
@@ -299,12 +299,12 @@ afe7d0d6de120d2726d007f0de001e35 *man/chain.pdb.Rd
 2fa034ee371c6082702a19c92b70eb79 *man/check.utility.Rd
 bae1ae7de8d02f12ef172259d1ad5159 *man/clean.pdb.Rd
 50145f84891c5406caad22c710ddb110 *man/cmap.Rd
-42b07b4b18a323232e523c64719ccb8f *man/cna.Rd
-3e497ddd0033da41b633654227c2c400 *man/cnapath.Rd
+2e82f99707bca0de88d834437bbe1966 *man/cna.Rd
+2e51971335af2f4370bd0f577d25b13b *man/cnapath.Rd
 529d9997941a9a428056c8b0f7c7fc88 *man/com.Rd
 1cea06bfbdd42f7234addcff9a7b820d *man/combine.select.Rd
-b2a66f4e076d9b75aad962c9ef3fa63d *man/community.aln.Rd
-23d2b887c294f24d2d44f4ff4f2a48c7 *man/community.tree.Rd
+332514f3cf7e7a8084b8f67ebd1e9905 *man/community.aln.Rd
+a8470946f6d83580eb0eafb829c00ef4 *man/community.tree.Rd
 a452eb11788c87bb9691a661d345d056 *man/consensus.Rd
 d75b4dd2fd167c244c62d2f2dcd51967 *man/conserv.Rd
 2b82724e66f9241d2447506aa0aeba67 *man/convert.pdb.Rd
@@ -340,7 +340,7 @@ c0b016d83d68c06b6b5cbbd70c4cce19 *man/get.seq.Rd
 0b96e2e65c1d4d7d70d37835c687892b *man/gnm.Rd
 1560274da20f8df6d1c90ada44a2f53d *man/hclustplot.Rd
 4a8c497678fe1377758fb8b05fa4b756 *man/hmmer.Rd
-c232e1bdebd66cae5f828d2323117a43 *man/identify.cna.Rd
+3a544b62978e2a29fb2dffb4d5fdebd3 *man/identify.cna.Rd
 d1db147f827dd27adec412411efb1b7b *man/inner.prod.Rd
 a6e0dbb5bbbdd54641f51a13468365ac *man/inspect.connectivity.Rd
 86678483ad473128779e86d25f800840 *man/is.gap.Rd
@@ -348,15 +348,15 @@ fce94b808315219a039e5fd5087aff28 *man/is.mol2.Rd
 b70ea5b1c25fdc58287a5a2f92f507a1 *man/is.pdb.Rd
 5b8b6e9f18c4acf77ea4e8fc1231a6c8 *man/is.select.Rd
 f2cd959d3b0bd3cd16ddff0f00318276 *man/is.xyz.Rd
-c0de93930aa66fa8e4f2dc5d267bd078 *man/layout.cna.Rd
+e968ceae59f9b694df97a5520e72582d *man/layout.cna.Rd
 060c0199ec1ba752ab79d7a43456209c *man/lbio3d.Rd
 dfc9ecca8b182ebcb04eb06fa4457614 *man/lmi.Rd
 7ba02458e721a3eb7791c88c4ad76138 *man/load.enmff.Rd
 8cf75bfa87062538b1dd73a3d3032938 *man/mask.dccm.Rd
 1638a12b0d2a05ef9fb6462ca359c9ec *man/mktrj.Rd
 80013dfda9be3aff846a2ca0f83004df *man/motif.find.Rd
-874c9fbf41886445c602ed54be101f98 *man/mustang.Rd
-fdee512206556da58aecce50be359a27 *man/network.amendment.Rd
+7a246d11a3a422ddae6316e19e8e0f37 *man/mustang.Rd
+0ab1fcc8dc037069f0b39c8dacf49433 *man/network.amendment.Rd
 71ad2ee50aa734cec2af2cc417da5ed2 *man/nma.Rd
 393d48481b2a670707acef6fb4c8c2f8 *man/nma.pdb.Rd
 f85b2a512ca1799199147b58d226fd56 *man/nma.pdbs.Rd
@@ -382,7 +382,7 @@ be07bd16023323140f3c24b9cf048cb4 *man/pdbseq.Rd
 6d07b414a2896edf8527005aea0cb728 *man/pfam.Rd
 d4d0f0a5b0cd78d1068838bea9582675 *man/plot.bio3d.Rd
 c2fc3a3fc68b25960fadfc01856d6891 *man/plot.cmap.Rd
-b4205f8a9752ff4f15325126e00b3176 *man/plot.cna.Rd
+793093db1e67a5565b4cf0e44176259e *man/plot.cna.Rd
 b93f1f7706d412ea33d044ff0b331375 *man/plot.core.Rd
 e983addd2c909060b66007af0df30909 *man/plot.dccm.Rd
 b25abe5c5c275ff51d8b8249cfea136a *man/plot.dmat.Rd
@@ -391,17 +391,17 @@ a14759a107ac7956f786117a70be390f *man/plot.fasta.Rd
 7138ba6823879c2483e3a8cea972aeb9 *man/plot.fluct.Rd
 1d336234f2c664954aa84a2241c4b9dc *man/plot.geostas.Rd
 a3f5d4c511425d3eda4cc9f50b73923a *man/plot.hmmer.Rd
-7a25f93cd3c5ae730f8892684c265564 *man/plot.matrix.loadings.Rd
+f7f5a8f59c15ca7c81fa2d5935120809 *man/plot.matrix.loadings.Rd
 cde80be2caee0007d3aae194170a4373 *man/plot.nma.Rd
-2824401b7330fc6cc510a970c431570a *man/plot.pca.Rd
+799f03f06c73b55b22b68cae1ed24d1c *man/plot.pca.Rd
 c6d01fbaab9a9a055e0358186a5215d8 *man/plot.pca.loadings.Rd
 ae438e3711efafcf3b92f50cbc4ce171 *man/plot.rmsip.Rd
-7b93481e8d7deb00308d62920c829f7c *man/print.cna.Rd
+9bfd37b1c5f9d02e728eac2ec64b91a0 *man/print.cna.Rd
 5199c78f35bcb8aade5e662e4cbf968e *man/print.core.Rd
 fbd2570538e2c23bd7a8992291f3ea23 *man/print.fasta.Rd
 9cd68565f972204cd7a130537019529b *man/print.xyz.Rd
 84648862fc42e524d2136b413f71b251 *man/project.pca.Rd
-94fa11c7e6b05efcd66b02b7aed0d899 *man/prune.cna.Rd
+7c4cc0978c045b12e39747381f5912be *man/prune.cna.Rd
 926abf6f9dc6d6491ac33d13a806cd1c *man/pymol.Rd
 bbcd9a2272643a6a21624b9ac529026d *man/read.all.Rd
 debe46ba72c904999884f3341ab3e0bf *man/read.cif.Rd
@@ -443,7 +443,7 @@ e11dfa2cce7b480f56e0153a82d9dd91 *man/torsion.pdb.Rd
 5b47c79a744b28a32b02971a6a8d1f22 *man/uniprot.Rd
 8d1f856736a9fb3121a0dc347b65d70c *man/var.xyz.Rd
 77cc057f3957a606eb0f899a98170541 *man/vec2resno.Rd
-bbe32ca06597f6b299b4d02e8056d20e *man/vmd.cna.Rd
+b165570929bf5809cd68200e20f6c578 *man/vmd.cna.Rd
 2180250f10d808b67fb61cb50fea8e91 *man/vmd_colors.Rd
 1bd7706fbadf8fc9c50b0d6b66bc4fc8 *man/wrap.tor.Rd
 5a7e2af1e926232bd2a33395e2b6e438 *man/write.crd.Rd
@@ -458,7 +458,8 @@ d30ec79397c9c31e5639212e3287dd58 *src/RcppExports.cpp
 1358a5ca323fe8cbd5883151808c2838 *src/convert.h
 4311765ab076cb1f4b1e96adc4b29c18 *src/gzstream.cpp
 c32e16a810b222875c935750f705e675 *src/gzstream.h
-d96c80140a7bb93655067b4554868bcf *src/read_cif.cpp
+899d1d889ddc7fe6034162407729af4f *src/init.c
+07e1ee9e938472e8029dad83dd1fce1f *src/read_cif.cpp
 6580911a047279f2ce6cba55b91b9779 *src/read_crd.cpp
 399ca8db09731613ece456c7ab4209e5 *src/read_pdb.cpp
 fbac5722a584bdd47928b5ffebfba3c4 *src/read_prmtop.cpp
diff --git a/R/atom.select.pdb.R b/R/atom.select.pdb.R
index be08eb5..14a42ae 100644
--- a/R/atom.select.pdb.R
+++ b/R/atom.select.pdb.R
@@ -105,8 +105,18 @@
 }
 
 .match.segid <- function(pdb, segid) {
-  if(!is.character(segid))
-    stop("'segid' must be a character vector")
+  # segid should be NA or a character vector
+  if(!all(is.na(segid))) {
+    if(!is.character(segid[ !is.na(segid) ]))
+      stop("'segid' must be a character vector")
+  }
+
+  ## NA and '' are treated the same 
+  if(any(segid=="", na.rm=TRUE))
+    segid[ segid == "" ] = NA
+  if(any(pdb$atom$segid == "", na.rm=TRUE))
+    pdb$atom$segid[ pdb$atom$segid == "" ] = NA
+  
   pdb$atom$segid %in% segid
 }
 
diff --git a/R/atom2ele.R b/R/atom2ele.R
index cd2770d..615fe3a 100644
--- a/R/atom2ele.R
+++ b/R/atom2ele.R
@@ -8,28 +8,77 @@ atom2ele.default <- function(x, elety.custom=NULL, rescue=TRUE, ...){
     inds <- unlist(lapply(elety.custom, is.factor))
     elety.custom[inds] <- lapply(elety.custom[inds], as.character)
   }
-  atom.index <- rbind(elety.custom[,c("name","symb")], atom.index[,c("name","symb")])
+  atom.index <- rbind(elety.custom[,c("name","symb")], bio3d::atom.index[,c("name","symb")])
   # Why atom names starting by "H" are directly converted to "H" as follow?
   # x[substr(x,1,1) == "H"] <- "H"
   symb <- atom.index[match(x, atom.index[,"name"]), "symb"]
   is.unknown <- is.na(symb)
   if(any(is.unknown)) {
     if(rescue) {
-      symb[is.unknown] <- substr(x[is.unknown],1,1)
-      warning(paste("\n\tunknown element: mapped ", x[is.unknown], " to ", symb[is.unknown], sep=""))
+        ## vector of unknown elements
+        unknowns <- unique(x[is.unknown])
+        symb2 <- rep(NA, length(unknowns))
+        names(symb2) <- unknowns
+
+        ## format element names before matching
+        spl <- strsplit(unknowns, "")
+        totest <- lapply(spl, function(b) {
+            ## remove numbering from atom name (e.g. FE2, C4A)
+            inds <- grep("[^0-9]", b)
+            if(length(inds) == 0) return(b)
+            j <- bounds(inds)[1, c("start", "end")]
+            b <- b[j[1]:j[2]]
+
+            ## First char to upper, remaining to lower case
+            new <- NULL
+            for(i in 1:length(b)){
+                new <- c(new, ifelse(i==1, toupper(b[i]), tolower(b[i])))
+            }
+            return(paste(new, collapse=""))
+        })
+
+        ## match with bio3d::elements$symb
+        totest <- unlist(totest)
+        if(any(totest %in% bio3d::elements$symb)) {
+            symb2[unknowns[totest %in% bio3d::elements$symb]] <-
+                totest[totest %in% bio3d::elements$symb]
+        }
+
+        ## try with first character to see if it matches elements$symb
+        if(any(is.na(symb2))) {
+            na.inds <- which(is.na(symb2))
+            totest <- toupper(substr(names(symb2[na.inds]), 1, 1))
+
+            if(any(totest %in% bio3d::elements$symb)) {
+                rplc <- names(symb2[na.inds])[totest %in% bio3d::elements$symb]
+                symb2[rplc] <- totest[totest %in% bio3d::elements$symb]
+            }
+        }
+        
+        ## stop with error in case of un-mapped elements
+        if(any(is.na(symb2))) {
+            stop("\telements could not be determined for: ",
+                 paste(names(symb2)[is.na(symb2)], collapse=", "))
+        }
+
+        ## inform user on mapped elements
+        warning(paste("\n\tmapped element ", names(symb2), " to ", symb2, sep=""))
+        
+        ## include matched elements to original symbol vector
+        symb[is.unknown] <- symb2[ x[is.unknown] ]
     }
     else {
-      stop(paste("\n\tatom2symb: element of '", x[is.unknown], "' unknown", sep=""))
+      stop("\telements could not be determined for: ",
+           paste(unique(x[is.unknown]), collapse=", "))
     }
   }
   symb <- unlist(symb)
   return(symb)
 }
 
-atom2ele.pdb <- function(pdb, inds, elety.custom=NULL, rescue=TRUE, ...){
+atom2ele.pdb <- function(pdb, inds=NULL, ...){
   if(!is.null(inds))
-    pdb <- trim.pdb(pdb, inds)
+    pdb <- trim(pdb, inds)
   atom.names <- pdb$atom[,"elety"]
-  symb <- atom2ele.default(atom.names, elety.custom, rescue, ...)
-  return(symb)
+  return(atom2ele.default(atom.names, ...))
 }
diff --git a/R/cnapath.R b/R/cnapath.R
index 45ce087..139b8fb 100644
--- a/R/cnapath.R
+++ b/R/cnapath.R
@@ -73,7 +73,7 @@ cnapath <- function(cna, from, to=NULL, k=10, collapse=TRUE, ncore=NULL, ...) {
   k0 <- igraph::get.shortest.paths(graph, from, to, output='both', ...)
   
   # if no shortest path found, network contains isolated parts.
-  if(length(k0$vpath[[1]]) == 0) {
+  if(length(k0$vpath[[1]]) <= 1) {
      cat("  No path found.\n", 
          "  Please check if the network contains isolated parts!\n\n", sep="")
      return(NULL)
@@ -122,7 +122,7 @@ cnapath <- function(cna, from, to=NULL, k=10, collapse=TRUE, ncore=NULL, ...) {
        # Suppress warnings because some nodes are intentionally isolated 
        spurPath <- suppressWarnings(igraph::get.shortest.paths(g, spurNode, to, output='both'), ...)
 
-       if(length(spurPath$vpath[[1]]) > 0 ) {
+       if(length(spurPath$vpath[[1]]) > 1 ) {
           vpath = c(rootPath, as.integer(spurPath$vpath[[1]][-1]))
           if(!contains.path(B, vpath)) {
              spurPath$epath <- as.integer(igraph::E(graph, path=as.integer(spurPath$vpath[[1]])))
diff --git a/R/community.aln.R b/R/community.aln.R
index dccd100..3911de8 100644
--- a/R/community.aln.R
+++ b/R/community.aln.R
@@ -30,6 +30,10 @@
 #'   # Needs MUSCLE installed - testing excluded
 #'   if(check.utility("muscle")) {
 #'
+#'     if (!requireNamespace("igraph", quietly = TRUE)) {
+#'       message('Need igraph installed to run this example')
+#'     } else {
+#'
 #'     ## Fetch PDB files and split to chain A only PDB files
 #'     ids <- c("1tnd_A", "1tag_A")
 #'     files <- get.pdb(ids, split = TRUE, path = tempdir())
@@ -70,6 +74,8 @@
 #'        plot(x, layout=layout.cna(x, pdb=pdb, k=3)[, 1:2])) )
 #'
 #'     par(op)     
+#'
+#'     }
 #'   }
 #' }
 #' @keywords analysis
diff --git a/R/get.pdb.R b/R/get.pdb.R
index 0b6b76a..769a452 100644
--- a/R/get.pdb.R
+++ b/R/get.pdb.R
@@ -7,13 +7,13 @@
 
     # Parallelized by parallel package (Tue Oct 15 15:23:36 EDT 2013)
     ncore <- setup.ncore(ncore)
-    if(ncore > 4) {
+    if(ncore > 1) {
        # To avoid too frequent access to PDB server
        if(!split) {
-          warning("Exceed maximum ncore (=4) to access PDB server. Use ncore=4")
-          ncore <- setup.ncore(ncore = 4)
+          warning("Multiple-core access to PDB server is not allowed. Reset ncore=1")
+          ncore <- setup.ncore(ncore = 1)
        } else {
-          setup.ncore(ncore = 4)
+          setup.ncore(ncore = 1)
        }
     }
 
@@ -37,7 +37,7 @@
     }
     ids4 <- unique(ids4)
     pdb.files <- paste(ids4, ".", format, ifelse(gzip, ".gz", ""), sep = "")
-    get.files <- file.path("http://www.rcsb.org/pdb/files", pdb.files)
+    get.files <- file.path("https://files.rcsb.org/download", pdb.files)
     if (URLonly) 
         return(get.files)
     put.files <- file.path(path, pdb.files)
@@ -49,7 +49,7 @@
     if(ncore > 1) {
        rtn <- unlist(mclapply(1:length(pdb.files), function(k) {
           if (!file.exists(sub(".gz$", "", put.files[k])) | overwrite ) {
-            rtn <- try(download.file(get.files[k], put.files[k], method='internal', quiet = !verbose), silent = TRUE)
+            rtn <- try(download.file(get.files[k], put.files[k], quiet = !verbose), silent = TRUE)
             if(inherits(rtn, "try-error")) {
                rtn <- 1
                file.remove(put.files[k])
@@ -67,7 +67,7 @@
     } else {
        for (k in 1:length(pdb.files)) {
          if (!file.exists(sub(".gz$", "", put.files[k])) | overwrite ) {
-           rt <- try(download.file(get.files[k], put.files[k], method='internal', quiet = !verbose), silent=TRUE)
+           rt <- try(download.file(get.files[k], put.files[k], quiet = !verbose), silent=TRUE)
            rtn[k] <- rt
            if(inherits(rt, "try-error")) {
               rtn[k] <- 1
diff --git a/R/hmmer.R b/R/hmmer.R
index cc20230..37cfdaf 100644
--- a/R/hmmer.R
+++ b/R/hmmer.R
@@ -153,6 +153,15 @@
   ##  unique(XML::xpathSApply(x, 'pdbs', XML::xmlToList))
   ##}
 
+  ## workaround for 'act_site' tags that can not be parsed
+  ## XML Parsing Error: not well-formed, e.g. for 1h1h_A
+  ## type = hmmscan and pdb = pfam
+  if(grepl("act_site", hmm)) {
+      lines <- unlist(strsplit(hmm, "\n"))
+      actsite.inds <- grep("act_site", lines)
+      hmm <- paste(lines[-seq(actsite.inds[1], actsite.inds[2])],
+                   collapse="\n")
+  }
 
   xml <- XML::xmlParse(hmm)
   resurl <- XML::xpathSApply(xml, '//data', XML::xpathSApply, '@*')
@@ -193,6 +202,7 @@
   data$pdb.id <- data$acc
   data$bitscore <- data$score
   data$mlog.evalue <- -log(data$evalue)
+  data$mlog.evalue[is.infinite(data$mlog.evalue)] <- -log(.Machine$double.xmin)
 
   out <- list(hit.tbl = data,
               url = resurl)
diff --git a/R/pdbs2sse.R b/R/pdbs2sse.R
index b1d14b8..cc92586 100644
--- a/R/pdbs2sse.R
+++ b/R/pdbs2sse.R
@@ -50,15 +50,29 @@
       out <- list()
       out$sse <- sse2
       
-      out$helix$start <- h[, "start"]
-      out$helix$end <- h[, "end"]
-      out$helix$length <- h[, "length"]
-      out$helix$chain <- chain[ bounds(h.inds)[, "start"] ]
+      if(length(h.inds)>0) {
+        out$helix$start <- h[, "start"]
+        out$helix$end <- h[, "end"]
+        out$helix$length <- h[, "length"]
+        out$helix$chain <- chain[ bounds(h.inds)[, "start"] ]
+      } else {
+        out$helix$start <- NULL
+        out$helix$end <- NULL
+        out$helix$length <- NULL
+        out$helix$chain <- NULL
+      }
 
-      out$sheet$start <- e[, "start"]
-      out$sheet$end <- e[, "end"]
-      out$sheet$length <- e[, "length"]
-      out$sheet$chain <- chain[ bounds(e.inds)[, "start"] ]
+      if(length(e.inds)>0) {
+        out$sheet$start <- e[, "start"]
+        out$sheet$end <- e[, "end"]
+        out$sheet$length <- e[, "length"]
+        out$sheet$chain <- chain[ bounds(e.inds)[, "start"] ]
+      } else {
+        out$sheet$start <- NULL
+        out$sheet$end <- NULL
+        out$sheet$length <- NULL
+        out$sheet$chain <- NULL
+      }
 
       out$call <- cl
       class(out) <- "sse"
@@ -118,6 +132,12 @@
         sse.aln$helix$length <- new.sse[,"length"]
         sse.aln$helix$chain <- chain.sse
       }
+    } else {
+        h.inds <- NULL
+        sse.aln$helix$start  <- NULL
+        sse.aln$helix$end    <- NULL
+        sse.aln$helix$length <- NULL
+        sse.aln$helix$chain <- NULL
     }
 
     ## Sheets
@@ -143,6 +163,12 @@
         sse.aln$sheet$length <- new.sse[,"length"]
         sse.aln$sheet$chain <- chain.sse
       }
+    } else {
+        e.inds <- NULL
+        sse.aln$sheet$start  <- NULL
+        sse.aln$sheet$end    <- NULL
+        sse.aln$sheet$length <- NULL
+        sse.aln$sheet$chain <- NULL
     }
 
     ## SSE vector
diff --git a/R/plot.blast.R b/R/plot.blast.R
index c81f1e6..f9d3641 100644
--- a/R/plot.blast.R
+++ b/R/plot.blast.R
@@ -121,7 +121,7 @@ function(x, cutoff=NULL, cut.seed=NULL, cluster=TRUE, mar=c(2, 5, 1, 1), cex=1.5
         
         legend("topleft", rownames(tbl), col=cols,  pch=15, ncol=3,
                cex=cex*0.8, box.lwd = .5, box.lty=2, box.col = "grey50", bg = "white")
-
+        box()
     }
 
 
diff --git a/R/plot.dmat.R b/R/plot.dmat.R
index 4879956..cf95602 100644
--- a/R/plot.dmat.R
+++ b/R/plot.dmat.R
@@ -67,19 +67,23 @@ function(x,
   
   z <- as.matrix(as.data.frame(t(x)))
   nums <- seq(1,ncol(x),by=axis.tick.space)
-  a2 <- resnum.2[nums]
-  
-  if(flip) {
-    z=as.matrix(rev(as.data.frame(t(x)))); a2 <- rev(resnum.2[nums])
+    
+  if(flip) { 
+    ylim = c(ncol(z),1) 
+  } else { 
+    ylim = c(1,ncol(z)) 
   }
+
   image(x=1:ncol(x),
         y=1:nrow(x),
         z=z,
+        zlim=zlim,
         col=col, yaxt="n", xaxt="n", ...)
         #xlab="Residue Number", ylab="Residue Number")
 
   axis(side=1, at=nums, labels=resnum.1[nums])
-  axis(side=2, at=nums, labels=a2)
+  axis(side=2, at=nums, labels=resnum.2[nums])
+  
   if(grid)
     grid(grid.nx ,grid.ny, col=grid.col)
   box()
diff --git a/R/plot.matrix.loadings.R b/R/plot.matrix.loadings.R
index 049aa1e..d4d743a 100644
--- a/R/plot.matrix.loadings.R
+++ b/R/plot.matrix.loadings.R
@@ -20,6 +20,7 @@
 #'    or a \sQuote{pdb} object as obtained from \code{\link{read.pdb}} to show secondary
 #'    structural elements along x- and y-axis.
 #' @param mask.n the number of elements from the diagonal to be masked from output. 
+#' @param plot logical, if FALSE no plot will be shown.
 #' @param ... additional arguments passed to \code{\link{plot.dccm}}.
 #'
 #' @return Plot and also returns a numeric matrix containing the loadings.
@@ -37,7 +38,7 @@
 #' \dontrun{
 #'    attach(transducin)
 #'    gaps.res <- gap.inspect(pdbs$ali)
-#'    sse <- bounds.sse(pdbs$sse[1, gaps.res$f.inds])
+#'    sse <- pdbs$sse[1, gaps.res$f.inds]
 #'
 #'    # calculate modes
 #'    modes <- nma(pdbs, ncore=NULL)
@@ -56,14 +57,15 @@
 #'    plot.matrix.loadings(pc, sse=sse, mask.n=10)
 #'
 #' }
-plot.matrix.loadings <- function(x, pc=1, resno=NULL, sse=NULL, mask.n=0, ...) {
+plot.matrix.loadings <- function(x, pc=1, resno=NULL, sse=NULL, mask.n=0, plot=TRUE, ...) {
    
    if(!inherits(x, 'pca') && grepl('pca.array', x$call))
       stop('Input x must be a "pca" object obtained from "pca.array()".')
 
    args.plot.dccm <- formals(plot.dccm)
    dots <- list(...)
-   args <- dots[names(dots) %in% names(args.plot.dccm)]
+#   args <- dots[names(dots) %in% names(args.plot.dccm)]
+   args <- dots
    if('segment.min' %in% names(dots))
       segment.min <- dots$segment.min
    else
@@ -112,47 +114,49 @@ plot.matrix.loadings <- function(x, pc=1, resno=NULL, sse=NULL, mask.n=0, ...) {
   
    args$x <- lmat
 
-   do.call(plot.dccm, args)
+   if(plot) {
+     do.call(plot.dccm, args)
 
-   ## add grids
-   draw.sse.grid <- function(sse) {
-      # vertical
-      grid.segments( x0 = sse$start,
-                     y0 = switch(show, full=1, upper=N, lower=1),
-                     x1 = sse$start,
-                     y1 = switch(show, full=N, upper=sse$start, lower=sse$start),
-                     gp=gpar(col="gray80", lty=2, lwd=0.3), default.units = "native",
-                     vp=vpPath("plot_01.toplevel.vp", "plot_01.panel.1.1.vp") )
-      # horizental
-      grid.segments( x0 = switch(show, full=1, upper=1, lower=N),
-                     y0 = sse$start,
-                     x1 = switch(show, full=N, upper=sse$start, lower=sse$start),
-                     y1 = sse$start,
-                     gp=gpar(col="gray80", lty=2, lwd=0.3), default.units = "native",
-                     vp=vpPath("plot_01.toplevel.vp", "plot_01.panel.1.1.vp") )
-   }
+     ## add grids
+     draw.sse.grid <- function(sse) {
+        # vertical
+        grid.segments( x0 = sse$start,
+                       y0 = switch(show, full=1, upper=N, lower=1),
+                       x1 = sse$start,
+                       y1 = switch(show, full=N, upper=sse$start, lower=sse$start),
+                       gp=gpar(col="gray80", lty=2, lwd=0.3), default.units = "native",
+                       vp=vpPath("plot_01.toplevel.vp", "plot_01.panel.1.1.vp") )
+        # horizental
+        grid.segments( x0 = switch(show, full=1, upper=1, lower=N),
+                       y0 = sse$start,
+                       x1 = switch(show, full=N, upper=sse$start, lower=sse$start),
+                       y1 = sse$start,
+                       gp=gpar(col="gray80", lty=2, lwd=0.3), default.units = "native",
+                       vp=vpPath("plot_01.toplevel.vp", "plot_01.panel.1.1.vp") )
+     }
 
-   if(!is.null(sse)) {
-   	  if(length(sse$helix$start) > 0) {
-        ## dont have a pdb$helix$length
-        if( is.null(sse$helix$length) )
-          sse$helix$length <- (sse$helix$end+1)-sse$helix$start
+     if(!is.null(sse)) {
+     	  if(length(sse$helix$start) > 0) {
+          ## dont have a pdb$helix$length
+          if( is.null(sse$helix$length) )
+            sse$helix$length <- (sse$helix$end+1)-sse$helix$start
 
-          inds <- which(sse$helix$length >= segment.min)
-#          sse$helix$start <- match(sort(sse$helix$start[inds]), resno)
-#          sse$helix$end <- match(sort(sse$helix$end[inds]), resno)
-          draw.sse.grid(sse$helix)
-      }
-      if(length(sse$sheet$start) > 0) {
-        ## dont have a pdb$sheet$length
-        if( is.null(sse$sheet$length) )
-          sse$sheet$length <- (sse$sheet$end+1)-sse$sheet$start
+            inds <- which(sse$helix$length >= segment.min)
+  #          sse$helix$start <- match(sort(sse$helix$start[inds]), resno)
+  #          sse$helix$end <- match(sort(sse$helix$end[inds]), resno)
+            draw.sse.grid(sse$helix)
+        }
+        if(length(sse$sheet$start) > 0) {
+          ## dont have a pdb$sheet$length
+          if( is.null(sse$sheet$length) )
+            sse$sheet$length <- (sse$sheet$end+1)-sse$sheet$start
 
-          inds <- which(sse$sheet$length >= segment.min)
-#          sse$sheet$start <- match(sort(sse$sheet$start[inds]), resno)
-#          sse$sheet$end <- match(sort(sse$sheet$end[inds]), resno)
-          draw.sse.grid(sse$sheet)
-      }
+            inds <- which(sse$sheet$length >= segment.min)
+  #          sse$sheet$start <- match(sort(sse$sheet$start[inds]), resno)
+  #          sse$sheet$end <- match(sort(sse$sheet$end[inds]), resno)
+            draw.sse.grid(sse$sheet)
+        }
+     }
    }
    invisible( lmat )
-}
\ No newline at end of file
+}
diff --git a/R/plot.pca.scree.R b/R/plot.pca.scree.R
index f5d509c..2186b67 100644
--- a/R/plot.pca.scree.R
+++ b/R/plot.pca.scree.R
@@ -2,7 +2,7 @@
 function(x, y=NULL, type="o", pch=18,
          main="", sub="",
          xlim=c(0,20), ylim=NULL, 
-         ylab="Proporton of Variance (%)",
+         ylab="Proportion of Variance (%)",
          xlab="Eigenvalue Rank",
          axes=TRUE, ann=par("ann"),
          col=par("col"), lab=TRUE,
diff --git a/R/read.cif.R b/R/read.cif.R
index 9145046..6a06727 100644
--- a/R/read.cif.R
+++ b/R/read.cif.R
@@ -17,7 +17,7 @@ read.cif <- function(file, maxlines = -1, multi=FALSE,
     if(substr(file,1,4)=="http") {
         ## cpp function can not read from http
         putfile <- tempfile(fileext=".cif")
-        rt <- try(download.file(file, putfile, method='internal', quiet = !verbose), silent=TRUE)
+        rt <- try(download.file(file, putfile, quiet = !verbose), silent=TRUE)
         if(inherits(rt, "try-error")) {
             file.remove(putfile)
             stop("File not found at provided URL")
diff --git a/R/read.pdb.R b/R/read.pdb.R
index c8b1cce..785fe11 100644
--- a/R/read.pdb.R
+++ b/R/read.pdb.R
@@ -16,7 +16,7 @@ read.pdb <- function(file, maxlines = -1, multi=FALSE, rm.insert=FALSE, rm.alt=T
     if(substr(file,1,4)=="http") {
         ## cpp function can not read from http
         putfile <- tempfile(fileext=".pdb")
-        rt <- try(download.file(file, putfile, method='internal', quiet = !verbose), silent=TRUE)
+        rt <- try(download.file(file, putfile, quiet = !verbose), silent=TRUE)
         if(inherits(rt, "try-error")) {
             file.remove(putfile)
             stop("File not found at provided URL")
diff --git a/R/uniprot.R b/R/uniprot.R
index 9e92912..c04c7fd 100644
--- a/R/uniprot.R
+++ b/R/uniprot.R
@@ -30,8 +30,13 @@ uniprot <- function(accid) {
   ## organism
   inds <- which(node.names=="organism")
   node <- xml[[1]][[inds]]
-  organism <- XML::xmlValue(node[[1]])
-  
+  organism <- NULL
+  tmpl <- unlist(XML::xmlApply(node, XML::xmlAttrs))
+  if("scientific" %in% tmpl)
+      organism <- XML::xmlValue(node[[which(tmpl %in% "scientific")]])
+  if("common" %in% tmpl)
+      organism <- c(organism, XML::xmlValue(node[[which(tmpl %in% "common")]]))
+    
   ## taxon
   inds <- which(node.names=="organism")
   node <- xml[[1]][[inds]]
@@ -48,11 +53,26 @@ uniprot <- function(accid) {
   ## gene
   node <- xml[[1]][['gene']]
   gene <- XML::xmlValue(node[[1]])
+
+  ## dbReference
+  inds <- which(node.names=="dbReference")
+  dbref <- list()
+  for(i in 1:length(inds)) {
+      node <- xml[[1]][[inds[i]]]
+      dbref[[i]] <- XML::xmlAttrs(node)
+  }
+  
+  dbref <- unlist(dbref)
+  type.inds <- names((dbref)) == "type"
+  id.inds <- names((dbref)) == "id"
+  dbref <- data.frame(type=dbref[type.inds], id=dbref[id.inds],
+                      stringsAsFactors=FALSE)
   
   out <- list(accession = accession, name = name,
               fullName = fullName, shortName = shortName,
               sequence = sequence, gene = gene,
-              organism = organism, taxon = taxon)
+              organism = organism, taxon = taxon,
+              dbref=dbref)
   
   return(out)
 }
diff --git a/build/vignette.rds b/build/vignette.rds
index 2b06770..e0413eb 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/doc/bio3d_vignettes.html b/inst/doc/bio3d_vignettes.html
index fd113fb..744f11f 100644
--- a/inst/doc/bio3d_vignettes.html
+++ b/inst/doc/bio3d_vignettes.html
@@ -1,40 +1,172 @@
 <!DOCTYPE html>
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-
+<html>
 <head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title></title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
 
-<meta charset="utf-8">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="pandoc" />
-
-<meta name="viewport" content="width=device-width, initial-scale=1">
-
-
-
-<title>bio3d Vignettes</title>
 
 
 
 
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+ at media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
 
 
-<link href="data:text/css,body%20%7B%0A%20%20background%2Dcolor%3A%20%23fff%3B%0A%20%20margin%3A%201em%20auto%3B%0A%20%20max%2Dwidth%3A%20700px%3B%0A%20%20overflow%3A%20visible%3B%0A%20%20padding%2Dleft%3A%202em%3B%0A%20%20padding%2Dright%3A%202em%3B%0A%20%20font%2Dfamily%3A%20%22Open%20Sans%22%2C%20%22Helvetica%20Neue%22%2C%20Helvetica%2C%20Arial%2C%20sans%2Dserif%3B%0A%20%20font%2Dsize%3A%2014px%3B%0A%20%20line%2Dheight%3A%201%2E35%3B%0A%7D%0A%0A%23header%20%7B%0A%20%20text%2Dalign%3A% [...]
 
 </head>
 
 <body>
-
-
-
-
-<h1 class="title toc-ignore">bio3d Vignettes</h1>
-<h4 class="date"><em>Sep 22 2016</em></h4>
-
-
-
 <p>We distribute a number of extended <strong>Bio3D vignettes</strong> that provide worked examples of using Bio3D to perform a particular type of structural bioinformatics analysis. An updated list of these can be found <a href="http://thegrantlab.org/bio3d/tutorials">on-line</a>.</p>
+
 <p>At the time of writing these include:</p>
+
 <ul>
 <li>Installing Bio3D ( <a href="http://thegrantlab.org/bio3d/phocadownload/vignettes/Bio3D_install.pdf">PDF</a> | <a href="http://thegrantlab.org/bio3d/tutorials/installing-bio3d">HTML</a>)</li>
 <li>Getting started with Bio3D ( PDF | <a href="http://thegrantlab.org/bio3d/user-guide">HTML</a> )</li>
@@ -49,20 +181,11 @@
 <li>Online protein structure analysis with the Bio3D WebApp ( <a href="http://thegrantlab.org/bio3d/phocadownload/vignettes/PCA-WebApp.pdf">PDF</a> | HTML )</li>
 <li>Online Normal Mode Analysis with Bio3D WebApps ( <a href="http://thegrantlab.org/bio3d/phocadownload/vignettes/NMA-WebApp.pdf">PDF</a> | HTML )</li>
 </ul>
-<p>There is also extensive <a href="http://thegrantlab.org/bio3d/html/index.html">on-line documentation</a> with worked examples (and their output) for all functions and a <a href="http://thegrantlab.org/bio3d/bio3d.pdf">package manual</a> (in PDF format) that is a concatenation of each functions documentation (without example output).</p>
-<p>Note that for information on Bio3D development status or to report a bug, please refer to: <a href="https://bitbucket.org/Grantlab/bio3d">https://bitbucket.org/Grantlab/bio3d</a></p>
-
 
+<p>There is also extensive <a href="http://thegrantlab.org/bio3d/html/index.html">on-line documentation</a> with worked examples (and their output) for all functions and a <a href="http://thegrantlab.org/bio3d/bio3d.pdf">package manual</a> (in PDF format) that is a concatenation of each functions documentation (without example output).</p>
 
-<!-- dynamically load mathjax for compatibility with self-contained -->
-<script>
-  (function () {
-    var script = document.createElement("script");
-    script.type = "text/javascript";
-    script.src  = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML";
-    document.getElementsByTagName("head")[0].appendChild(script);
-  })();
-</script>
+<p>Note that for information on Bio3D development status or to report a bug, please refer to: <a href="https://bitbucket.org/Grantlab/bio3d">https://bitbucket.org/Grantlab/bio3d</a></p>
 
 </body>
+
 </html>
diff --git a/man/atom.select.Rd b/man/atom.select.Rd
index 8aff4be..ad32920 100644
--- a/man/atom.select.Rd
+++ b/man/atom.select.Rd
@@ -50,7 +50,9 @@ atom.select(\dots)
   \item{insert}{ a character vector of insert identifiers. Non-insert 
     residues can be selected with \code{NA} or \sQuote{} values. The default value 
     of \code{NULL} will select both insert and non-insert residues. }
-  \item{segid}{ a character vector of segment identifiers. }
+  \item{segid}{ a character vector of segment identifiers. Empty segid
+    values can be selected with \code{NA} or \sQuote{} values. The default value
+    of \code{NULL} will select both empty and non-empty segment identifiers. }
   \item{operator}{ a single element character specifying either the AND
     or OR operator by which individual selection components should be
     combined. Allowed values are \sQuote{"AND"} and \sQuote{"OR"}. }
diff --git a/man/atom2ele.Rd b/man/atom2ele.Rd
index efecaf4..7bf1021 100644
--- a/man/atom2ele.Rd
+++ b/man/atom2ele.Rd
@@ -11,14 +11,14 @@ atom2ele(\dots)
 
 \method{atom2ele}{default}(x, elety.custom=NULL, rescue=TRUE, \dots)
 
-\method{atom2ele}{pdb}(pdb, inds, elety.custom=NULL, rescue=TRUE, \dots)
+\method{atom2ele}{pdb}(pdb, inds=NULL, \dots)
 }
 \arguments{
   \item{x}{a character vector containing atom names/types to be converted.}
   \item{elety.custom}{a customized data.frame containing atom
     names/types and corresponding atomic symbols.} 
-  \item{rescue}{logical, if TRUE the atomic symbols will be mapped to
-    the first character of the atom names/types.} 
+  \item{rescue}{logical, if TRUE the atomic symbols will be converted 
+    based on matching with \code{bio3d::elements$symb}. }
   \item{pdb}{an object of class \sQuote{pdb} for which \code{elety} will
     be converted.} 
   \item{inds}{an object of class \sQuote{select} indicating a subset of
@@ -53,14 +53,14 @@ atom2ele(atom.names)
 
 ## Get atomic symbols from a PDB object with a customized data set
 pdb <- read.pdb("3RE0",verbose=FALSE)
-inds <- atom.select(pdb, resno=201, verbose=FALSE)
+lig <- trim(pdb, "ligand")
 
-## maps CL2 to C
-atom2ele(pdb, inds, elety.custom = NULL)
+## maps PT1 to Pt, CL2 to Cl, C4A to C
+atom2ele(lig)
 
-## map CL2 to Cl manually
+## map atom name to element manually
 myelety <- data.frame(name = "CL2", symb = "Cl")
-atom2ele(pdb, inds, elety.custom = myelety)
+atom2ele(lig, elety.custom = myelety)
 
 }
 }
diff --git a/man/bio3d.package.Rd b/man/bio3d.package.Rd
index 1023edd..109e991 100644
--- a/man/bio3d.package.Rd
+++ b/man/bio3d.package.Rd
@@ -10,8 +10,8 @@ Utilities for the analysis of protein structure and sequence data.
 \tabular{ll}{
 Package: \tab bio3d\cr
 Type: \tab Package\cr
-Version: \tab 2.3-1\cr
-Date: \tab 2016-11-10\cr
+Version: \tab 2.3-3\cr
+Date: \tab 2017-07-29\cr
 License: \tab GPL version 2 or newer\cr
 URL: \tab \url{http://thegrantlab.org/bio3d/}\cr
 }
diff --git a/man/cna.Rd b/man/cna.Rd
index 7b81d43..3c7a6fc 100644
--- a/man/cna.Rd
+++ b/man/cna.Rd
@@ -114,6 +114,10 @@
 \donttest{
 # PDB server connection required - testing excluded
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 ##-- Build a correlation network from NMA results
 ## Read example PDB
 pdb <- read.pdb("4Q21")
@@ -166,6 +170,6 @@ attributes(net)
 table( net$communities$members )
 
 }
-
+}
 }
 \keyword{analysis}
diff --git a/man/cnapath.Rd b/man/cnapath.Rd
index 1f84034..f2623aa 100644
--- a/man/cnapath.Rd
+++ b/man/cnapath.Rd
@@ -75,6 +75,10 @@ cnapath(cna, from, to=NULL, k=10, collapse=TRUE, ncore=NULL, \dots)
 \donttest{
 # Redundant testing excluded
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 attach(transducin)
 inds = match(c("1TND_A", "1TAG_A"), pdbs$id)
 
@@ -117,6 +121,8 @@ print.cnapath(pas, pdb = pdb, col=c("red", "darkgreen"), plot=TRUE)
 #vmd.cnapath(pa2, pdb2, launch = TRUE)
 
 detach(transducin)
+
+}
 }
 }
 \keyword{ utilities }
diff --git a/man/community.aln.Rd b/man/community.aln.Rd
index 07f8085..73bfa43 100644
--- a/man/community.aln.Rd
+++ b/man/community.aln.Rd
@@ -38,6 +38,10 @@ vector is added as an extra component in the returned \sQuote{cna} object.
   # Needs MUSCLE installed - testing excluded
   if(check.utility("muscle")) {
 
+    if (!requireNamespace("igraph", quietly = TRUE)) {
+      message('Need igraph installed to run this example')
+    } else {
+
     ## Fetch PDB files and split to chain A only PDB files
     ids <- c("1tnd_A", "1tag_A")
     files <- get.pdb(ids, split = TRUE, path = tempdir())
@@ -78,6 +82,8 @@ vector is added as an extra component in the returned \sQuote{cna} object.
        plot(x, layout=layout.cna(x, pdb=pdb, k=3)[, 1:2])) )
 
     par(op)     
+
+    }
   }
 }
 }
@@ -85,4 +91,3 @@ vector is added as an extra component in the returned \sQuote{cna} object.
 \code{\link{cna}}, \code{\link{plot.cna}}
 }
 \keyword{analysis}
-
diff --git a/man/community.tree.Rd b/man/community.tree.Rd
index 7488981..776fb54 100644
--- a/man/community.tree.Rd
+++ b/man/community.tree.Rd
@@ -43,6 +43,10 @@
 \donttest{
 # PDB server connection required - testing excluded
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 ###-- Build a CNA object
 pdb <- read.pdb("4Q21")
 modes <- nma(pdb)
@@ -78,4 +82,5 @@ plot(net.7, pdb)
 
 }
 }
+}
 \keyword{analysis}
diff --git a/man/identify.cna.Rd b/man/identify.cna.Rd
index df5887b..095f2f0 100644
--- a/man/identify.cna.Rd
+++ b/man/identify.cna.Rd
@@ -40,6 +40,10 @@
 \examples{
 \dontrun{
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 attach(hivp)
 
 # Read the starting PDB file to determine atom correspondence
@@ -59,4 +63,5 @@ detach(hivp)
 
 }
 }
+}
 \keyword{ utility }
diff --git a/man/layout.cna.Rd b/man/layout.cna.Rd
index 0e0368c..dbe0c79 100644
--- a/man/layout.cna.Rd
+++ b/man/layout.cna.Rd
@@ -41,6 +41,10 @@
   \code{\link[igraph:plot.igraph]{plot.igraph}}}
 \examples{
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 # Load the correlation network
 attach(hivp)
 
@@ -62,4 +66,5 @@ layout.cna(net, pdb)
 detach(hivp)
 
 }
+}
 \keyword{ utility }
diff --git a/man/mustang.Rd b/man/mustang.Rd
index abaeb5f..f0fdea3 100644
--- a/man/mustang.Rd
+++ b/man/mustang.Rd
@@ -65,6 +65,11 @@ mustang(files, exefile="mustang", outfile="aln.mustang.fa",
 }
 \examples{
 \dontrun{
+
+if(!check.utility('mustang')) {
+   message('Need MUSTANG installed to run this example')
+} else {
+
 ## Fetch PDB files and split to chain A only PDB files
 ids <- c("1a70_A", "1czp_A", "1frd_A")
 files <- get.pdb(ids, split = TRUE, path = tempdir())
@@ -83,4 +88,5 @@ pdbs <- read.fasta.pdb(aln)
 
 }
 }
+}
 \keyword{ utilities }
diff --git a/man/network.amendment.Rd b/man/network.amendment.Rd
index 0c587c7..7d1149a 100644
--- a/man/network.amendment.Rd
+++ b/man/network.amendment.Rd
@@ -33,6 +33,10 @@
 \donttest{
 # PDB server connection required - testing excluded
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 ##-- Build a CNA object
 pdb <- read.pdb("4Q21")
 modes <- nma(pdb)
@@ -50,7 +54,8 @@ plot(net.7, pdb)
 
 print(net)
 print(net.7)
-}
 
 }
+}
+}
 \keyword{utility}
diff --git a/man/plot.cna.Rd b/man/plot.cna.Rd
index e3d497e..d670c58 100644
--- a/man/plot.cna.Rd
+++ b/man/plot.cna.Rd
@@ -77,7 +77,9 @@
 \donttest{
 # PDB server connection required - testing excluded
 
-require(igraph)
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
 
 ##-- Build a CNA object
 pdb <- read.pdb("4Q21")
@@ -93,16 +95,15 @@ xy <- plot.cna(net)
 plot.cna(net, pdb)
 
 # Play with plot layout and colors...
-plot.cna(net, layout=layout.mds(net$community.network), col=c("blue","green") ) 
-}
+plot.cna(net, layout=igraph::layout.mds(net$community.network), col=c("blue","green") ) 
 
-\dontrun{
 # Plot full residue network colored by communities - will be slow due to number of edges!!
 plot.cna(net, pdb, full=TRUE)
 
 # Alter plot settings
 plot.cna(net, pdb, full=TRUE, vertex.size=3, weights=1, vertex.label=NA)
-}
 
 }
+}
+}
 \keyword{ hplot }
diff --git a/man/plot.matrix.loadings.Rd b/man/plot.matrix.loadings.Rd
index a79c62d..1976041 100644
--- a/man/plot.matrix.loadings.Rd
+++ b/man/plot.matrix.loadings.Rd
@@ -5,7 +5,7 @@
 \title{Plot Residue-Residue Matrix Loadings}
 \usage{
 \method{plot}{matrix.loadings}(x, pc = 1, resno = NULL, sse = NULL,
-  mask.n = 0, ...)
+  mask.n = 0, plot = TRUE, ...)
 }
 \arguments{
 \item{x}{the results of PCA as obtained from \code{\link{pca.array}}.}
@@ -21,6 +21,8 @@ structural elements along x- and y-axis.}
 
 \item{mask.n}{the number of elements from the diagonal to be masked from output.}
 
+\item{plot}{logical, if FALSE no plot will be shown.}
+
 \item{...}{additional arguments passed to \code{\link{plot.dccm}}.}
 }
 \value{
diff --git a/man/plot.pca.Rd b/man/plot.pca.Rd
index 370e917..1ec7db9 100644
--- a/man/plot.pca.Rd
+++ b/man/plot.pca.Rd
@@ -12,7 +12,7 @@
 
 \method{plot}{pca.scree}(x, y = NULL, type = "o", pch = 18,
          main = "", sub = "", xlim = c(0, 20), ylim = NULL,
-         ylab = "Proporton of Variance (\%)",
+         ylab = "Proportion of Variance (\%)",
          xlab = "Eigenvalue Rank", axes = TRUE, ann = par("ann"),
          col = par("col"), lab = TRUE, ...)
 \method{plot}{pca.score}(x, inds=NULL, col=rainbow(nrow(x)), lab = "", ...)
diff --git a/man/print.cna.Rd b/man/print.cna.Rd
index f4a13dd..91683d8 100644
--- a/man/print.cna.Rd
+++ b/man/print.cna.Rd
@@ -44,6 +44,10 @@
 }
 \examples{
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 ## Load the correlation network
 attach(hivp)
 
@@ -59,5 +63,6 @@ x$members[[2]]
 detach(hivp)
 
 }
+}
 \keyword{ utilities }
 
diff --git a/man/prune.cna.Rd b/man/prune.cna.Rd
index b608f9c..69a1452 100644
--- a/man/prune.cna.Rd
+++ b/man/prune.cna.Rd
@@ -44,6 +44,10 @@ that is returned also.
 }
 \examples{
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 # Load the correlation network
 attach(hivp)
 
@@ -62,4 +66,5 @@ plot(dnet)
 detach(hivp)
 
 }
+}
 \keyword{ utility }
diff --git a/man/vmd.cna.Rd b/man/vmd.cna.Rd
index 9ccc7c3..cb25465 100644
--- a/man/vmd.cna.Rd
+++ b/man/vmd.cna.Rd
@@ -97,6 +97,10 @@ Barry Grant}
 \examples{
 \dontrun{
 
+if (!requireNamespace("igraph", quietly = TRUE)) {
+   message('Need igraph installed to run this example')
+} else {
+
 # Load the correlation network from MD data
 attach(hivp)
 
@@ -121,5 +125,6 @@ detach(hivp)
 
 }
 }
+}
 
 \keyword{ utility }
diff --git a/src/init.c b/src/init.c
new file mode 100644
index 0000000..7e95eb5
--- /dev/null
+++ b/src/init.c
@@ -0,0 +1,28 @@
+#include <R.h>
+#include <Rinternals.h>
+#include <stdlib.h> // for NULL
+#include <R_ext/Rdynload.h>
+
+/* FIXME: 
+   Check these declarations against the C/Fortran source code.
+*/
+
+/* .Call calls */
+extern SEXP bio3d_read_cif(SEXP, SEXP, SEXP);
+extern SEXP bio3d_read_crd(SEXP);
+extern SEXP bio3d_read_pdb(SEXP, SEXP, SEXP, SEXP, SEXP);
+extern SEXP bio3d_read_prmtop(SEXP);
+
+static const R_CallMethodDef CallEntries[] = {
+    {"bio3d_read_cif",    (DL_FUNC) &bio3d_read_cif,    3},
+    {"bio3d_read_crd",    (DL_FUNC) &bio3d_read_crd,    1},
+    {"bio3d_read_pdb",    (DL_FUNC) &bio3d_read_pdb,    5},
+    {"bio3d_read_prmtop", (DL_FUNC) &bio3d_read_prmtop, 1},
+    {NULL, NULL, 0}
+};
+
+void R_init_bio3d(DllInfo *dll)
+{
+    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
+    R_useDynamicSymbols(dll, FALSE);
+}
diff --git a/src/read_cif.cpp b/src/read_cif.cpp
index c01c73e..fb48931 100644
--- a/src/read_cif.cpp
+++ b/src/read_cif.cpp
@@ -118,7 +118,7 @@ List read_cif(std::string filename, int maxlines=-1, bool multi=false) {
 
 	// include here check for model number as in read_pdb.cpp
 	// add checks for "?"
-	curr_model = stringToInt(tmp_vec[25]);
+	curr_model = stringToInt(tmp_vec[20]);
 
 	if(curr_model != prev_model) {
 	  models++;
@@ -186,18 +186,18 @@ List read_cif(std::string filename, int maxlines=-1, bool multi=false) {
 	  //_atom_site.occupancy_esd
 	  //_atom_site.B_iso_or_equiv_esd
 	  //_atom_site.pdbx_formal_charge
-	  charge.push_back(tmp_vec[20]);
+	  charge.push_back(tmp_vec[15]);
 	  
 	  //_atom_site.auth_seq_id
-	  resno.push_back(stringToInt(tmp_vec[21]));
+	  resno.push_back(stringToInt(tmp_vec[16]));
 	  //_atom_site.auth_comp_id
-	  resid.push_back(tmp_vec[22]);
+	  resid.push_back(tmp_vec[17]);
 	  //_atom_site.auth_asym_id
-	  chain.push_back(tmp_vec[23]);
+	  chain.push_back(tmp_vec[18]);
 	  //_atom_site.auth_atom_id
-	  elety.push_back(tmp_vec[24]);
+	  elety.push_back(tmp_vec[19]);
 	  //_atom_site.pdbx_PDB_model_num
-	  model.push_back(stringToInt(tmp_vec[25]));
+	  model.push_back(stringToInt(tmp_vec[20]));
 	  
 	} 
       } 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-bio3d.git



More information about the debian-med-commit mailing list