8000 [Feature]: Adding mmCIF file support for `wandb.Molecule` · Issue #9535 · wandb/wandb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Feature]: Adding mmCIF file support for wandb.Molecule #9535

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

Open
amorehead opened this issue Feb 28, 2025 · 22 comments
Open

[Feature]: Adding mmCIF file support for wandb.Molecule #9535

amorehead opened this issue Feb 28, 2025 · 22 comments
Labels
a:app Area: Frontend/Backend c:table Component: Table - all the wandb.Table related issues ty:feature type of the issue is a feature request

Comments

@amorehead
Copy link

Description

The following error message displayed in the WandB UI after logging a table containing a wandb.Molecule object constructed from a .cif (i.e., mmCIF) file suggests that mmCIF files aren't supported, even though documentation suggests otherwise.

Log: Tried to render media/molecule/1a335c7f618260e68830/sample.cif, but only .pdb files are currently supported.

Suggested Solution

It'd be great for mmCIF file support to be added for wandb.Molecule objects, as the PDB file format has long since been deprecated in favor of mmCIF files (according to the RCSB PDB).

@amorehead amorehead added the ty:feature type of the issue is a feature request label Feb 28, 2025
@ArtsiomWB
Copy link
Contributor

Hey @amorehead, thank you for writing in.

Could you please send me an example script of how you are logging your molecule to wandb? I am trying to get the exact same error.

@ArtsiomWB
Copy link
Contributor

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

@amorehead
Copy link
Author

Hi, @ArtsiomWB. Attached is one such mmCIF file (renamed to .txt to upload to GitHub) that failed to display properly in the WandB UI. Let me know if you have any follow-up questions.

sample.cif.txt

@ArtsiomWB
Copy link
Contributor

Thank you for sending it over. Even though I am logging a .cif file I am still seeing this error:
ValueError: Molecule only supports files of the type: sdf, mmtf, pqr, pdb, sd, mcif, cif, mol2, gro, mmcif
I'll go ahead and report it to our eng team. I'll let you know as soon as I get any updates from them.

@amorehead
Copy link
Author

Thanks for your help, @ArtsiomWB. Let me know if you need any other information to help debug this issue. My hunch is there's some kind of necessary metadata missing in these mmCIF files I'm creating that WandB requires for visualization.

@amorehead
Copy link
Author

Hi, @ArtsiomWB. I hope all is well on your end. I was curious if you have heard back from the WandB engineering team about this issue. It would be helpful to have CIF files plotting correctly in the WandB UI.

@kptkin kptkin added a:sdk Area: sdk related issues c:sdk:media Component: Relating to media labels Mar 24, 2025
@ArtsiomWB
Copy link
Contributor

Could you try logging your molecule to wandb now? I think the error should now be fixed on the client's side and now we need to look into it from the App's side instead

@amorehead
Copy link
Author

Hi, @ArtsiomWB. Yes, for table rows logged within the last few hours, I'm still not able to see their associated CIF files rendered in the WandB UI:

Image

@ArtsiomWB
Copy link
Contributor

Thank you for the follow-up!

I have sent a feature request to our Tables team to add the ability to log molecules in tables. It should be now enabled from the SDK's side but our frontend still doesn't know how to handle it.

@ArtsiomWB
Copy link
Contributor

Quick update here, you should now be able to log cif-formatted molecules to tables in wandb.

@amorehead
Copy link
Author

Thanks! I just checked, and it looks like I'm no longer seeing the original error message in my WandB tables. However, it seems like my CIF molecules are loading indefinitely in the UI. Could this be caused by issues in rendering (e.g., large or irregular) molecules in WandB's table UI?

@ArtsiomWB
Copy link
Contributor

It could be because of the size... Could you please send me a molecule file you have logged to wandb that is loading indefinitely for you?

@amorehead
Copy link
Author

Here's one of such molecule .cif files.

sample.cif.txt

@ArtsiomWB
Copy link
Contributor
ArtsiomWB commented Apr 7, 2025

Could you please try logging this cif file as a table and see if it works for you? I am seeing it in my table as per screenshot.

my-molecule.cif.zip

Image

@ArtsiomWB
Copy link
Contributor

Hi there, I wanted to follow up on this request. Please let us know if we can be of further assistance or if your issue has been resolved.

@ArtsiomWB
Copy link
Contributor

Hi, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

@amorehead
Copy link
Author

Hi, @ArtsiomWB. Thanks for looking into this for me, and apologies for my delayed response. I have not yet been able to test logging your CIF file within one of my tables (integrating it within my existing workflow is not simple). However, I am curious, are you able to log the CIF file I attached above? If not, that suggests there is some metadata in my CIF file that is either missing or unncessary (and confusing the WandB UI).

@ArtsiomWB
Copy link
Contributor

When trying to log your CIF file It does get logged, and there is not error in the UI anymore.

UI for some reason instead of displaying it, will keep on constantly loading:

Image

And I do see a couple of errors inside of the browser's console logs:

Image

@ArtsiomWB ArtsiomWB reopened this Apr 14, 2025
@amorehead
Copy link
Author

Thanks for looking into this for me. It seems there is indeed some missing metadata in this mmCIF file of mine. Is it somehow possible to find out which metadata are missing on the backend?

@ArtsiomWB
Copy link
Contributor

Totally~ Always happy to help!

Unfortunately, besides of the errors in the browser logs there is not much else that is telling us what could be broken.

In order to confirm that things are working properly on our end I've used a 3rd party website to try and visualize the molecule in order to see if it will load or not, such as this one:
https://www.openmx-square.org/viewer/

@amorehead
Copy link
Author

Hi, @ArtsiomWB. Thanks for sharing this link with me. I cannot get my CIF file to load correctly with this service. However, I can load my CIF file using the RCSB PDB's official recommendation for molecule visualization software packages (i.e., MolStar: https://molstar.org/viewer/). This tells me WandB is relying on some piece of metadata that MolStar doesn't require for visualization. Once I find out what that is, I can modify how I am writing my CIF files to include this (necessary) metadata.

@ArtsiomWB
Copy link
Contributor

Sounds like a plan, and I'll report the fact that your molecule is not loading and failing silently to our Tables Team. Thank you for bringing it up.

@jacobromero jacobromero added c:table Component: Table - all the wandb.Table related issues and removed c:sdk:media Component: Relating to media labels Apr 30, 2025
@jacobromero jacobromero added a:app Area: Frontend/Backend and removed a:sdk Area: sdk related issues labels May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:app Area: Frontend/Backend c:table Component: Table - all the wandb.Table related issues ty:feature type of the issue is a feature request
Projects
None yet
Development

No branches or pull requests

4 participants
0