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

Cavity Display Effect #41

Open
ye1002551506 opened this issue Mar 6, 2019 · 4 comments
Open

Cavity Display Effect #41

ye1002551506 opened this issue Mar 6, 2019 · 4 comments

Comments

@ye1002551506
Copy link

Hello David, I have a question to consult you.

I want the cavity to show its atomic radius, which is similar to the shape of a pipe, but I can only show this effect by selecting VDW Balls in the controller.

default

I want to achieve the effect of example / Channels.

default

There is a data. json file in example / Channels. Is it generated with a PDB file? Should I use some method to generate the JSON file from my PDB file? To achieve the desired effect? Please give me some advice and guidance. @dsehnal Thank you.

@dsehnal
Copy link
Owner

dsehnal commented Mar 7, 2019

Hi,

The data for this example was generated by MOLE, including the surface triangulation (which is saved a list of vertices and triangles). It might be a little overkill for you to do this :)

The PrimitivesAndLabels [ source | view live ] example shows how to create custom geometries (you can do spheres, cylinders, arrows, etc). You can encode your centerline and radii say in JSON and then create a transform that map this JSON into a custom visual. How to create a transform that downloads JSON and creates something else (i.e. a custom geometry) is shown for example here https://github.com/dsehnal/LiteMol/blob/master/src/Viewer/PDBe/Validation.ts#L184 (the transform and state action).

Regards,
David

@ye1002551506
Copy link
Author

Dear David
I spent a lot of time thinking about the solution you gave, but I don't know enough about the structure of the protein. It is too difficult for me to write the algorithm myself. Is there a simpler method? Instead of writing the algorithm yourself, use the existing algorithm to implement the function I want? Thank you
@dsehnal

@dsehnal
Copy link
Owner

dsehnal commented Mar 20, 2019

But the existing algorithm is there. You can use the primitives and labels example as a base to render spheres with the appropriate radius along your channel's centerline.

@ye1002551506
Copy link
Author

Already implemented this feature, thank you

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

No branches or pull requests

2 participants