Open Yoshanuikabundi opened 7 months ago
Hi @Yoshanuikabundi
Would you accept a PR to add this functionality?
yeah, PRs are always very welcome
Updating the version of NGL used by NGLView to at least 2.2.0
Please continue my work here (the build passed on my macbook but failing. I guess I am using newer lab version (or so on) https://github.com/nglviewer/nglview/pull/1086
NGLView seems to be on "2.0.0-dev.39" - is there a reason we're on a pre-release from 3 years ago?
no, it is just I am too lazy to check and no one ever asked.
Ideally, adding a way to set PDB loader parameters from Structure subclasses
Agree.
it seems that the Structure.params attribute would be for this, but it doesn't seem to get used anywhere. Or am I missing something?
No you're not. I think we don't use it. But I am open for suggestion.
I think the params will be passed in this _load_data
function:
The API can be
nv.show_file('abc.pdb', infer_bonds=True)
But please use 2 PRs
thanks
- Updating the version of NGL used by NGLView to at least 2.2.0
@Yoshanuikabundi updated in nglview 3.1.0
Oh awesome, thanks @hainm! It's going to be a while before I can get to contributing to this - hopefully I'll be able to get to it in March.
Upstream NGL has recently added support for configuring which bonds are inferred from interatomic distances in PDB files: https://github.com/nglviewer/ngl/pull/977. This was released on Node in 2.2.0
At OpenFF, we'd love to be able to take advantage of this option in our visualization methods. Would you accept a PR to add this functionality?
I think it would involve:
Structure
subclassesStructure.params
attribute would be for this, but it doesn't seem to get used anywhere. Or am I missing something?Widget._remote_call
to load the PDB by hand if necessary, but I would think first-class support for this configuration object would be widely useful.Thanks!