Eigenstate / vmd-python

Installable VMD as a python module
Other
132 stars 25 forks source link

Blank lines when writing a PDB #29

Closed DomML closed 4 years ago

DomML commented 4 years ago

Hello, I notice the insertion of blank line between ATOM lines when writing a PDB. Original : image vmd writen : image

jvermaas commented 4 years ago

Do you have the .pdb files handy? Images lie, and this might just be a line-wrapping feature making it appear like something it is not.

Eigenstate commented 4 years ago

I agree with @jvermaas, it looks like the width of your text editor is such that the lines are wrapping. If there's a problem with Dabble not running or producing output that doesn't make sense, reopen this issue with a detailed description of the inputs and outputs and I can take look.

DomML commented 4 years ago

it is not an issue with the editor (original on the left, copy by vmd-python on the right) : image

TAA-aa-all.pdb.txt test0.pdb.txt

jvermaas commented 4 years ago

Weird. What is the extra non-standard stuff in your pdb? It could be that your oddly formatted pdb means that VMD sees a newline in a column where it expects data and as a result writes newlines where it doesn't intend to when writing the data back out. Basically, this isn't a bug with the plugin, since regular VMD will do the same thing. VMD is pretty strict about its input format and output requirements for PDBs, since those are tightly specified. See https://www.wwpdb.org/documentation/file-format-content/format33/sect9.html for what the pdb standard is, since that is what VMD expects. For instance, your input is only 75 columns wide, but the pdb format is 80. That might be why you get 3 spaces in the output.

DomML commented 4 years ago

It indeed seems that adding 5 whitespaces at the end of each line lead to a normal vmd written file. Thank you very much.