PDB write & Molviewer give dimensional error

10 visualizaciones (últimos 30 días)
Krisztina Zechmeister
Krisztina Zechmeister el 9 de Ag. de 2021
Editada: Krisztina Zechmeister el 9 de Ag. de 2021
Hi everyone!
I try to alter and superimpose multiple pdb files. I read the file with pdbread and can also transform it with e.g. pbd transform. But when I try to use either molviewer to look at the alterations (or the original read file) or try to save it with pdbwrite I get the error 'Dimensions of arrays being concatenated are not consistent.'
Because this also happens with unmodified pdb files, is there anything I am doing wrong with the reading? Or do I have to alter the MATLAB-Generated file before saving/viewing is possible?
Your help is really appreciated.
My very simple test code:
%read file
a=pdbread('C:\Users\zechmeisterin\Desktop\4d5q.pdb'); %PDB file downloaded directly from PDB website
pdbwrite('C:\Users\zechmeisterin\Desktop\modified4d5q.pdb',a); %save original
molviewer(a)
transf.T = eye(3); transf.b = 1; transf.c = [11.8 -2.8 -32.3]; % test transformation from mathworks
pdbtx = pdbtransform(a, transf, 'segment', 'all');
pdbwrite('C:\Users\zechmeisterin\Desktop\modified4d5q.pdb',pdbtx); %save modified
Error for molviewer:
Error using molviewer (line 161)
Encountered error while reading the PDB structure.
Dimensions of arrays being concatenated are not consistent.
Error for pdb write:
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in pdbwrite>writeCaveat (line 404)
z(2:end,12:lineLen+19) = [ repmat(mRec.idCode,noOfLines-1,1) ' '...
Error in pdbwrite>getPDBRecord (line 139)
pdbout = [pdbout;writeCaveat(pdb_struct.Caveat)];
Error in pdbwrite (line 97)
pdbrecord = getPDBRecord(pdbstruct);
Error in PDB_file_generator (line 3)
pdbwrite('C:\Users\zechmeisterin\Desktop\modified4d5q.pdb',a); %save original

Respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by