eDDM help
In the eDDM tutorial, the input to function dm is from read.all function which creates a list of class pdb. I have created a list of pdb using
a<-read.pdb("Frame0.pdb")
b<-read.pdb("Frame1.pdb")
c<-read.pdb("Frame2.pdb")
d<-read.pdb("Frame3.pdb")
e<-read.pdb("Frame4.pdb")
pdbs<-c(a,b,c,d,e)
and then used the function as
dm<-dm(pdbs)
But then I am getting an error as
Error in UseMethod("dm") :
no applicable method for 'dm' applied to an object of class "list".
How should I read in the pdbs ?
Thank you
Comments (5)
-
reporter -
Hi,
read.all()
is not just to create a list of pdb objects. It aligns atoms, coordinates, etc. and saves it in a particular class that will be needed for the use ofdm.()
. Why did you manually read pdb files instead of using read.all()?
-
reporter Yes I do know that read.all does alignment too but I do not want the sequence alignment of the pdbs to be done as they are from the same protein.
Nonetheless when I do that, I get the following error,
pdbs.aa<-read.all(pdbs)
Error in read.all(pdbs) :
input 'aln' should be a list object as obtained from 'seqaln()', 'pdbaln()', or 'read.fasta.pdb()'
pdbs.aa<-read.all("Frame0.pdb", "Frame1.pdb", "Frame2.pdb", "Frame3.pdb", "Frame4.pdb", "Frame5.pdb")
Error in read.all("Frame0.pdb", "Frame1.pdb", "Frame2.pdb", "Frame3.pdb", :
input 'aln' should be a list object as obtained from 'seqaln()', 'pdbaln()', or 'read.fasta.pdb()'How should I read multiple pdbs so that I can feed that into “dm” function.
Thanks for your help.
-
If all pdbs are for the same protein, you can put them in one file separated by “MODEL/ENDMDL”, just like what NMR models are deposited in PDB. Then, a single call of
read.pdb(multi=TRUE)`
will be sufficient. In this case, use pdb$xyz as the input ofdm()
.
Although PDB format is fine for short trajectories, for long trajectories, we recommend some binary format such as DCD or NetCDF. Then use the bio3d
read.dcd()
orread.ncdf()
function to read the coordinates.
If still use aligned structures, the input should be an alignment object from e.g.,
seqaln()
orpdbaln()
, not a LIST of pdb objects by repeatedly reading multiple PDB files or a set of PDB file names. Check?read.all
carefully.
-
reporter Thank you so much Xinqiu Yao. I will definitely try the ENDMDL to create multiple model PDB.
I think I had tried the read.dcd for my trajectory initially but it was taking way too long to finish and give any output for the eddm function.
- Log in to comment
I did the following instead of pdbaln used in the tutorial,