save pdbs after superposition via pdbfit and fit.xyz
Dear Bio3D team,
Nice work first! I've been playing with Bio3D since the BPS annual meeting this year. Now I'm trying to repeat some of my work involved some of our in-house python, vmd and bash scripts using your Bio3D library. I was wondering whether you could provide some help with the following questions.
I would like to superimpose all structures with similar amino acid sequence of pdb 4dii and save them as individual pdbs. Attached is my relevant R script. But I could see the error below no matter whether I was using fit.xyz or pdbfit.
> xyz <- fit.xyz(pdbs$xyz[1,], pdbs,core.inds$xyz, core.inds$xyz, outpath='XXX', full.pdbs=TRUE)
Error in read.pdb(full.files[i], ...) :
No input PDB file found: check filename
> pdbfit( pdbs, core.inds, outpath="AlignedPDB")
Error in read.pdb(full.files[i], ...) :
No input PDB file found: check filename
Moreover, I'm also curious whether the pdbfit fucntion can return pdb objects instead of the coordinates.
Thanks!
Jiajie
Comments (7)
-
-
As Xinqiu notes this is failing because your full original coordinate file names do not match your
pdbs$id
vector entries. Try thefile.exists(pdbs$id)
and you will likely see FALSE printed out. Fix this and you should be good to continue.For your second question you might also want to try the
pdbs2pdb()
function.
Hope this is useful!
B. -
-
- changed component to Q&A
-
reporter Hi Xinqiu and Barry,
Thank you very much for your helpful replies. It works!
Jiajie
-
- changed status to resolved
-
- changed version to v2.2
- Log in to comment
Hi Jiajie,
Make sure the
pdbs$id
contains the actual path to your pdb files. If it does not, you may think of usingprefix
andpdbext
arguments infit.xyz()
to specify the paths. For example,The pdbfit() returns only "moved" coordinates. You can read the moved PDB files from disk to generate a new 'pdbs' object or simply loop over files to obtain a list of 'pdb' objects. For example,