# NOT RUN {
if (!requireNamespace("igraph", quietly = TRUE)) {
message('Need igraph installed to run this example')
} else {
# Load the correlation network
attach(hivp)
# Read the starting PDB file to determine atom correspondence
pdbfile <- system.file("examples/hivp.pdb", package="bio3d")
pdb <- read.pdb(pdbfile)
# Plot coarse grain network based on dynamically coupled communities
par(mfcol=c(1,2), mar=c(0,0,0,0))
plot.cna(net)
# Prune network
dnet <- prune.cna(net, edges.min = 1)
plot(dnet)
detach(hivp)
}
# }
Run the code above in your browser using DataLab