how to merge more than two groups ?

Issue #909 new
imren bayil created an issue

I want to analysis my dna-ligand using bio3d.

a.inds <- atom.select(pdb, resid="CYT")

b.inds <- atom.select(pdb, resid="GUA")

c.inds <- atom.select(pdb, resid="THY")

d.inds <- atom.select(pdb, resid="ADE"),I want to merge all this.

sele <- combine.select(a.inds, b.inds, c.inds, d.inds operator="OR") using this command I got error Error: unexpected symbol in "sele <- combine.select(a.inds, b.inds, c.inds, d.inds operator"

I tried to select two groups,

sele1 <- combine.select(c.inds, d.inds, operator="OR")

sele1 <- combine.select(c.inds, d.inds, operator="OR") it is ok but I want to combine four groups,so How can I merge them ?

Could you guide me please ?

Comments (3)

  1. imren bayil reporter

    sel1 <- atom.select(pdb, resid="ADE")
    sel2 <- atom.select(pdb, resid="THY")
    sel3 <- atom.select(pdb, resid="GUA")
    sel4 <- atom.select(pdb, resid="CYT")
    sel <- combine.select(sel1, sel2, sel3, sel4, operator="+")
    Union of selects

    • Selected a total of: 2003 atoms *
    • I did ! Thank you

  2. imren bayil reporter

    I have another question.I want to calculate my ligand rmsd.

    lig.inds <- atom.select(pdb, resid="UNK")

    lig.xyz <- xyz[, lig.inds$xyz]

    rd <- rmsd(xyz[1,lig.inds$xyz], xyz[,lig.inds$xyz])

    plot(rd, typ="l", ylab="RMSD", xlab="Frame No.")

    points(lowess(rd), typ="l", col="red", lty=2, lwd=2)

    so I did.But I want to calculate my ligand noh ,

    lig.inds <- atom.select(pdb, resid="B noh")

    lig.xyz <- xyz[, lig.inds$xyz]
    rd <- rmsd(xyz[1,lig.inds$xyz], xyz[,lig.inds$xyz])
    Error in apply((apply(b[, b.inds], 1, "-", a[a.inds])^2), 2, sum) :
    dim(X) must have a positive length

    so How can I could ?

  3. Xinqiu Yao

    check your command lig.inds <- atom.select(pdb, resid="B noh"). Is the double quoted a valid residue ID? “noh” should be a value given to the argument string.

  4. Log in to comment