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: allow ccd residues with missing coords #730

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

davegrays
Copy link
Contributor

@davegrays davegrays commented Dec 27, 2024

There are a number of ligands/residues in the CCD with missing coordinates that cannot be retrieved now with structure.info.residue due to a ValueError that is raised twice and not excepted the second time. Relative to v0, this is new behavior.

This allows these residues to be returned from the second attempt with nans where missing.

Provides an exception so that residues with missing coords in the ccd can still be returned from the ideal coordinates.
@davegrays davegrays changed the title Allow ccd residues with missing coords fix: allow ccd residues with missing ideal coords Dec 27, 2024
@davegrays davegrays changed the title fix: allow ccd residues with missing ideal coords fix: allow ccd residues with missing coords Dec 27, 2024
Copy link

codspeed-hq bot commented Dec 27, 2024

CodSpeed Performance Report

Merging #730 will not alter performance

Comparing davegrays:fix/allow-all-ccd-residues (2a7fcbd) with main (e76eb24)

Summary

✅ 47 untouched benchmarks

@padix-key
Copy link
Member

Hi, from my perspective having a molecule without atom coordinates has barely a benefit. Consequently, getting an exception, that can be easily captured, is more clearer than checking for NaN coordinates in my opinion. However, I would be curious what your use case is.

@davegrays
Copy link
Contributor Author

@padix-key Makes sense. My use case is that I'm identifying missing atoms in the experimental structure by constructing molecular templates from the CCD (essentially just the list of atom names per residue). So for that I use the CCD's AtomArray and I'm ignoring the coords anyway.

I get your concern tho... what would you think about an optional arg for this in get_components() that can propagate to structure.info.residue?

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.

2 participants