Skip to content

Cif reader - #4681

Closed
hp115 wants to merge 12 commits into
MDAnalysis:developfrom
hp115:cif
Closed

Cif reader#4681
hp115 wants to merge 12 commits into
MDAnalysis:developfrom
hp115:cif

Conversation

@hp115

@hp115 hp115 commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

Fixes #

Changes made in this Pull Request:

PR Checklist

  • Tests?
  • Docs?
  • CHANGELOG updated?
  • Issue raised/referenced?

Developers certificate of origin


📚 Documentation preview 📚: https://mdanalysis--4681.org.readthedocs.build/en/4681/

@pep8speaks

pep8speaks commented Aug 23, 2024

Copy link
Copy Markdown

Hello @hp115! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 29:80: E501 line too long (98 > 79 characters)
Line 30:80: E501 line too long (113 > 79 characters)
Line 44:1: E303 too many blank lines (4)
Line 65:80: E501 line too long (80 > 79 characters)
Line 79:1: W293 blank line contains whitespace
Line 80:5: E303 too many blank lines (3)
Line 89:1: W391 blank line at end of file

Line 28:80: E501 line too long (98 > 79 characters)
Line 29:80: E501 line too long (113 > 79 characters)
Line 47:5: E303 too many blank lines (2)
Line 57:80: E501 line too long (80 > 79 characters)
Line 61:37: E128 continuation line under-indented for visual indent
Line 61:80: E501 line too long (80 > 79 characters)
Line 69:9: E731 do not assign a lambda expression, use a def
Line 73:80: E501 line too long (81 > 79 characters)
Line 74:13: E731 do not assign a lambda expression, use a def
Line 101:1: W391 blank line at end of file

Line 102:13: E122 continuation line missing indentation or outdented
Line 103:9: E122 continuation line missing indentation or outdented

Line 1:14: W291 trailing whitespace
Line 6:1: E303 too many blank lines (3)
Line 8:1: E302 expected 2 blank lines, found 1
Line 8:10: W292 no newline at end of file

Comment last updated at 2024-08-23 15:11:23 UTC

@github-actions

github-actions Bot commented Aug 23, 2024

Copy link
Copy Markdown

Linter Bot Results:

Hi @hp115! Thanks for making this PR. We linted your code and found the following:

Some issues were found with the formatting of your code.

Code Location Outcome
main package ⚠️ Possible failure
testsuite ⚠️ Possible failure

Please have a look at the darker-main-code and darker-test-code steps here for more details: https://github.com/MDAnalysis/mdanalysis/actions/runs/10528066841/job/29172710356


Please note: The black linter is purely informational, you can safely ignore these outcomes if there are no flake8 failures!

@orbeckst

Copy link
Copy Markdown
Member

@richardjgowers / @hmacdope would one of you assign the PR to yourself to look after it? You both seem to have an interest in it.

.. _PDBx:
https://pdb101.rcsb.org/learn/guide-to-understanding-pdb-data/beginner’s-guide-to-pdb-structures-and-the-pdbx-mmcif-format
"""
import gemmi

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for clarity, this is a new MPL-2.0 license dependency we'd be adding.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to make this optional.


def test_pdbx()

def test_ No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't be too hard to draft tests based on other coordinate readers and some small test files.

xyz = np.zeros((self.natoms, 3), dtype=np.float32)

for i, (x, y, z) in enumerate(coords):
xyz[i, :] = x, y, z

@tylerjereddy tylerjereddy Feb 3, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit unfortunate we need a manual CPython loop over each coordinate. I don't see an obvious alternative from poking around. Gemmi is 90 % C++ it seems, so one might think they could return an appropriate buffer somehow, but that's probably an upstream matter and would likely want to focus on correctness here for now.

@RMeli RMeli changed the title [WIP] Cif reader Cif reader Feb 18, 2025
@RMeli
RMeli marked this pull request as draft February 18, 2025 20:50
@RMeli

RMeli commented Feb 18, 2025

Copy link
Copy Markdown
Member

I removed the [WIP] tag and converted it to draft, which better signals that this is still ongoing work.

@orbeckst

Copy link
Copy Markdown
Member

This PR is superseded by PR #4712 which uses gemmi and is close to being merged.

@orbeckst orbeckst closed this Jul 15, 2026
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

Successfully merging this pull request may close these issues.

8 participants