Foros: Open Discussion (Thread #34878)

from residue / atom list to the mesh (2014-01-03 08:02 by alex_mass #71194)

Hi,
I'm discovering your lib (and Three.js) and it's really great!

Is there a way to go from a residue+chain to the mesh?

thanks
Alex

Re: from residue / atom list to the mesh (2014-01-07 00:42 by biochem_fan #71217)

Hi Alex,

Sorry for delayed reply. I was taking new year holidays.

> I'm discovering your lib (and Three.js) and it's really great!

Thank you very much!

> Is there a way to go from a residue+chain to the mesh?

Do you mean that you want to make mesh from specific part of
the molecule, not the entire molecule?
There is no GUI for it. You have to code yourself.

Look at the source code of
http://webglmol.sourceforge.jp/glmol/surfaceTest.html .

generateMesh() function generates surface or mesh.
The second argument is the list of target atoms from which you want to
generate mesh. (How to make the list? Please examine the source code of
haemoglobin example in
http://webglmol.sourceforge.jp/glmol/embedding-examplesEN.html .)

However, there is a serious limitation. It creates surface/mesh
as if only those specified atoms are present in vacuum.
In PyMOL's terminology, you can create only 'closed' surface, not 'open' surface,
which is usually preferred. http://www.pymolwiki.org/index.php/Surface
Responder al #71194

Re: from residue / atom list to the mesh (2014-01-08 02:37 by alex_mass #71232)

Thanks for you reply,
It helped me trying to make some sense of all that new stuff ;)

Sorry to to have been clear enough.

In fact, I'm rendering the protein as a thin ribbon.
And my question was to find a way to get the ribbon part corresponding to a residue, to be able to map a text (the amino acid letter) as a texture.

Any hint on how to go in that direction?

Alex

PS: I have a fork of glmol using the latest three.js. The only thing I can say is that your interactive demo viewer looks like working. Any interest of having it committed?


[Reply To Message #71217]
> Hi Alex,
>
> Sorry for delayed reply. I was taking new year holidays.
>
> > I'm discovering your lib (and Three.js) and it's really great!
>
> Thank you very much!
>
> > Is there a way to go from a residue+chain to the mesh?
>
> Do you mean that you want to make mesh from specific part of
> the molecule, not the entire molecule?
> There is no GUI for it. You have to code yourself.
>
> Look at the source code of
> http://webglmol.sourceforge.jp/glmol/surfaceTest.html .
>
> generateMesh() function generates surface or mesh.
> The second argument is the list of target atoms from which you want to
> generate mesh. (How to make the list? Please examine the source code of
> haemoglobin example in
> http://webglmol.sourceforge.jp/glmol/embedding-examplesEN.html .)
>
> However, there is a serious limitation. It creates surface/mesh
> as if only those specified atoms are present in vacuum.
> In PyMOL's terminology, you can create only 'closed' surface, not 'open' surface,
> which is usually preferred. http://www.pymolwiki.org/index.php/Surface
Responder al #71217

Re: from residue / atom list to the mesh (2014-01-08 05:08 by biochem_fan #71233)

Hi,

> In fact, I'm rendering the protein as a thin ribbon.
> And my question was to find a way to get the ribbon part corresponding to a residue, to be able to map a text (the amino acid letter) as a texture.

No. You can drawCartoon() for specific part of a protein, but
it will not work for single residue (it needs at least 2 (3?) residues)).

You can add 'labels' to residues. Try
http://webglmol.sourceforge.jp/labelling/viewer.html
(click residues to identify it)

But this is very 'dirty' implementation and not very accurate.
For accurate picking, I have to completely refactor the rendering engine
to preserve atom-wise information. I am working for it in the
Android/iOS version, which will be back-ported to the WebGL version.
But I do not think I can finish it very soon.

> PS: I have a fork of glmol using the latest three.js. The only thing I can say is that your interactive demo viewer looks like working. Any interest of having it committed?

Thanks, but I am not going to keep up to date with Three.js, because
newer versions are larger and we don't need new features.
Actually, I am trying to rewrite GLmol without using Three.js.
Responder al #71232

Re: from residue / atom list to the mesh (2014-01-08 10:26 by alex_mass #71236)

I had a look at the labelling, but I want to do something prettier.
I guess the easier path is to delay that feature.

I sent you an email with a snapshot of my app.

Can you briefly tell the reasons why you want to ove out of Three.js?


Alex

[Reply To Message #71233]
> Hi,
>
> > In fact, I'm rendering the protein as a thin ribbon.
> > And my question was to find a way to get the ribbon part corresponding to a residue, to be able to map a text (the amino acid letter) as a texture.
>
> No. You can drawCartoon() for specific part of a protein, but
> it will not work for single residue (it needs at least 2 (3?) residues)).
>
> You can add 'labels' to residues. Try
> http://webglmol.sourceforge.jp/labelling/viewer.html
> (click residues to identify it)
>
> But this is very 'dirty' implementation and not very accurate.
> For accurate picking, I have to completely refactor the rendering engine
> to preserve atom-wise information. I am working for it in the
> Android/iOS version, which will be back-ported to the WebGL version.
> But I do not think I can finish it very soon.
>
> > PS: I have a fork of glmol using the latest three.js. The only thing I can say is that your interactive demo viewer looks like working. Any interest of having it committed?
>
> Thanks, but I am not going to keep up to date with Three.js, because
> newer versions are larger and we don't need new features.
> Actually, I am trying to rewrite GLmol without using Three.js.
Responder al #71233