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

Saving a full pdb? #45

Open
jevandezande opened this issue Jan 14, 2025 · 1 comment
Open

Saving a full pdb? #45

jevandezande opened this issue Jan 14, 2025 · 1 comment

Comments

@jevandezande
Copy link

I'd like to be able to completely roundtrip a pdb, but it seems I can only save a single model from the pdb? Is this correct, or am I missing something?

I'd like to be able to do something like:

pdb = atomium.fetch("1EMA")
pdb.save("1ema.pdb")  # This function doesn't exist
atomium.open("1ema.pdb")
@samirelanduk
Copy link
Owner

So related to #44 I guess, but in 2.0 you can do:

pdb = atomium.fetch("1EMA.pdb", dictionary=True)
atomium.io.save_dictionary(pdb, "1ema.pdb")

Note this will convert the PDB to cif and then back again for the saving, which may not mean the filestring is exactly the same.

It might be better to just use requests and get the string directly without atomium.

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

2 participants