Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching PDB and saving it to a PDB file shifts one space element type due to b-factor 3 digits #133

Open
zehraacarsarica opened this issue Jul 15, 2023 · 0 comments

Comments

@zehraacarsarica
Copy link
Contributor

zehraacarsarica commented Jul 15, 2023

Describe the bug

The problem is that after fetching PDB and saving it to a file, it shifts one space due to the b-factor value due to 3 digits. If the saved PDB file is read it again via biopandas, some element type value is empty.

Steps/Code to Reproduce

from biopandas.pdb import PandasPdb

ppdb = PandasPdb().fetch_pdb("2e28")

ppdb.to_pdb(path="2e28.pdb",
            records=None,
            gz=False,
            append_newline=True)

ppdb.read_pdb("2e28.pdb")
print(ppdb.df['ATOM'][138:150])

Expected Results

I would expect to save the PDB file correctly without shifting one space for the element type. Also, the blank_4 column should be white space not includes numbers (see the last figure).

Actual Results

image

image

image

Versions

biopandas 0.4.1
Windows-10-10.0.22000-SP0
Python 3.10.12]
Scikit-learn 1.3.0
NumPy 1.25.1
SciPy 1.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant