pdb_dataframe: inconsistent calpha pointer

Issue #105 resolved
Lars Skjærven created an issue

For branch feature_pdb_dataframe:

pdb = read.pdb("1cdk")
inds = atom.select(pdb, "calpha")$atom

identical(inds, which(pdb$calpha))
[1] FALSE

For branch master:

pdb = read.pdb("1cdk")
inds = atom.select(pdb, "calpha")$atom

identical(inds, which(pdb$calpha))
[1] TRUE

Comments (4)

  1. Lars Skjærven reporter

    proposing to replace the following in read.pdb():

    calpha = (atom[,"elety"]=="CA") & (atom[,"resid"]!="CA") & (atom[,"type"]=="ATOM")
    

    with

    output$calpha <- seq(1, nrow(atom)) %in% atom.select(output, "calpha")$atom
    

    the latter will include calphas also for residues of type TPO, SEP, etc, while the current implementation will not.

  2. Barry Grant

    I agree - This will keep all potentially funny calcium containing residue as Calpha issues to one function, atom.select()

  3. Log in to comment