-
Notifications
You must be signed in to change notification settings - Fork 161
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
MVS: IHM support #1433
base: master
Are you sure you want to change the base?
MVS: IHM support #1433
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine but some things are not clear to me - see comments.
Also, have you tested if the new selections work in all possible contexts (I mean, as inline component, as *_from_uri, as target for primitive...)?
src/extensions/mvs/load-helpers.ts
Outdated
// If no color child node is specified, use Mol*'s default | ||
return undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are making sure MVS is pretty much Molstar-specific and no one will ever implement it for any other viewer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. You can still implement explicit colors. And this could be defined as expected behavior (= colors determined by viewer if not specified explicitly).
And we focus on iterating on color
in "MVS 2.0".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have an alternate solution to support "vendor extension" to do that. Thanks for the feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the original idea was that a MVS view should look roughly the same in all viewers.
With this, a representation node without specified color can look very different in different viewers.
So as a user, I might think I have created a beautiful view where each chain has a different color, but then I load it in PyMOL it will be all magenta because default per-chain coloring was just Molstar's implementation detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, I will implement the auto mol* coloring as a custom extension on the color node.
if (isDefined(row.label_seq_id)) { | ||
if (row.element_granularity === 'coarse') { | ||
residueTests.push(ihm.hasSeqId({ 0: row.label_seq_id })); | ||
} else { | ||
residueTests.push(eq([macromolecular.label_seq_id(), row.label_seq_id])); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that if label_seq_id
is not present, it will select from both atomic and coarse parts of the structure?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we can completely remove element_granularity
in this case and just use the ihm.hasSeqId
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, if we can remove element_granularity
, let's do it. One thing less for the user to worry about.
My goal was to make this work with the primitives here. @midlik you wrote this code, so do I need to change anything else for things you mention to work or is this fine? Can also do this in a separate PR. |
If we remove |
@midlik |
Description
Adds better support for I/HM structure in MolViewSpec
coarse
componentsspacefill
representationelement_granularity
in component expressionsatom.ihm.has-seq-id
symbol to the query languagehttps://pdb-ihm.org/cif/8zz1.cif with crosslink restraints:
Actions
[Unreleased]
section ofCHANGELOG.md