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

Use Gemmi to interconvert between pdb and cif? #1

Open
danny305 opened this issue Apr 29, 2021 · 2 comments
Open

Use Gemmi to interconvert between pdb and cif? #1

danny305 opened this issue Apr 29, 2021 · 2 comments
Assignees

Comments

@danny305
Copy link

danny305 commented Apr 29, 2021

Gemmi is an open sourced c++ library with python bindings for working with structural biology data.

I have implemented code to convert a pdb to a cif with gemmi (in python) in the past (screenshot below) and I am pretty sure its probably just as simple to go from cif to pdb.

image

So I am currently finishing up implementing cif functionality (reading and writing) to the freesasa C library with the author of the repository and we just used gemmi for everything. We have freesasa outputting a freesasa cif file where we appended cif blocks specific to freesasa and added 2 additional columns to the _atom_site. block. 1 the freesasa solvent accessibility value and the other for freesasa atomic radii. This is kinda what I was thinking about doing with pdb2pqr....?

@danny305 danny305 changed the title Use Gemming to interconvert between pdb and cif? Use Gemmi to interconvert between pdb and cif? Apr 29, 2021
@sobolevnrm
Copy link
Member

Hi Danny -- thanks for the suggestion. We're trying to favor native Python solutions as much as possible given problems our user base has had in the past with compilers. Even if it duplicates effort a bit, I'd prefer to stick with a native Python solution for this interconversion.

@danny305
Copy link
Author

I agree with that approach and I honestly prefer it. Working with the C++ gemmi api was definitely a learning curve.

However, we can use gemmi 100% in python. Using gemmi in this situation is not much different to using numpy (where everything is implemented in C/C++ and then wrapped with python). Gemmi has a nice python api, python documentation, and can be installed with pip install gemmi, removing all compiler issues.

This can reduce a lot of the low level code duplication. Gemmi cif parser is very robust and I have had zero trouble working with them (I cannot say the same about pdb2pqr cif reading capability--its very finicky, especially with pdb/cif files from the pdb-redo server.)

If you still rather not use gemmi I understand! I am just providing as much information so y'all make the best decision for pdb2pqr.

@sobolevnrm sobolevnrm self-assigned this May 9, 2021
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