asking for multiple CPUs

Issue #392 resolved
Former user created an issue

Hi all,

I have set for multiple CPU call, but the calculation is still being processed with one single CPU. The script is as below, please point me if any mistake as I'm newbie to R and bio3d.

**library(bio3d) library(igraph)

set multiple CPUs

ncore <- setup.ncore(NULL)

dcd <- read.dcd("MDtraj.dcd") pdb <- read.pdb("Com.pdb")

superimpose

inds <- atom.select(pdb, elety = "CA")

trj <- fit.xyz(fixed = pdb$xyz, mobile = dcd, fixed.inds = inds$xyz, mobile.inds = inds$xyz)

cij <- dccm(trj,ncore=ncore) net <- cna(cij,cutoff.cij=0.8)**

Thank you. CS

Comments (2)

  1. Xinqiu Yao

    Hi,

    Not all functions support running in multiple CPUs. Check the help document (e.g. '?fit.xyz') and if there is the 'ncore' argument it supports multiple CPUs. These functions are the most computationally intensive ones.

    To run in multiple CPUs, set the 'ncore' argument of the function directly. For example, try <- fit.xyz(fixed = pdb$xyz, mobile = dcd, fixed.inds = inds$xyz, mobile.inds = inds$xyz, ncore=NULL).

  2. Log in to comment