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

Fix issue #270 #271

Merged
merged 3 commits into from
Apr 12, 2024
Merged

Fix issue #270 #271

merged 3 commits into from
Apr 12, 2024

Conversation

lohedges
Copy link
Contributor

@lohedges lohedges commented Apr 9, 2024

This PR closes #270 by using a list rather than a set to store the names of protein and nucleic acid residues. This makes the search string for backbone atoms reproducible, hence the tests now repeatedly pass. I'm still not sure why this issue has only cropped up recently, since _prot_res has been a set since the code was first added.

In [1]: x = {"1", "2", "3"}

In [2]: ",".join(x)
Out[2]: '2,3,1'

In [3]: x = ["1", "2", "3"]

In [4]: ",".join(x)
Out[4]: '1,2,3'
  • I confirm that I have merged the latest version of devel into this branch before issuing this pull request (e.g. by running git pull origin devel): [y]
  • I confirm that I have permission to release this code under the GPL3 license: [y]

Suggested reviewers:

@chryswoods

@lohedges lohedges added the bug Something isn't working label Apr 9, 2024
@lohedges lohedges requested a review from chryswoods April 9, 2024 12:11
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 12:12 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 12:12 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 12:12 — with GitHub Actions Inactive
@lohedges lohedges had a problem deploying to biosimspace-build April 9, 2024 12:12 — with GitHub Actions Failure
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 12:12 — with GitHub Actions Inactive
@lohedges
Copy link
Contributor Author

lohedges commented Apr 9, 2024

Thinking more about this, I had a similar problem when searching for ions during parameterisation. It wasn't possible to do a search for all ions in one go due to the limitation of the search syntax. Instead I just looped over the ions and searched one-by-one. Perhaps I need to update the code to do something similar here, or maybe it could be caught and handled in the sire search grammar.

@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:24 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:24 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:24 — with GitHub Actions Inactive
@lohedges lohedges had a problem deploying to biosimspace-build April 9, 2024 13:24 — with GitHub Actions Failure
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:24 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:51 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:51 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:51 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:51 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 13:51 — with GitHub Actions Inactive
@lohedges
Copy link
Contributor Author

lohedges commented Apr 9, 2024

Actually, it appears that the issue was that the protein and nucleic acid residue strings weren't being joined correctly. No comma was added between then so the last protein residue name was being combined with the first nucleic acid residue. Depending on the ordering from the set, this could result in removing some of the matching residues from the test molecule, e.g. ACE combined with T would create a nonsense residue called ACET, so we would no longer match ACE.

@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 14:16 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 14:16 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 14:16 — with GitHub Actions Inactive
@lohedges lohedges had a problem deploying to biosimspace-build April 9, 2024 14:16 — with GitHub Actions Failure
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 14:16 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 15:12 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 15:12 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 15:12 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 15:12 — with GitHub Actions Inactive
@lohedges lohedges temporarily deployed to biosimspace-build April 9, 2024 15:12 — with GitHub Actions Inactive
Copy link
Contributor

@chryswoods chryswoods left a comment

Choose a reason for hiding this comment

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

All good - the change from { } to [ ] is very subtle - good spot that this was one of the causes of the inconsistent behaviour. Same with the missing "," in the join.

@lohedges lohedges merged commit 283c050 into devel Apr 12, 2024
5 checks passed
@lohedges lohedges deleted the fix_270 branch April 12, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Non-reproducible search for restraint atoms
2 participants