Re: [Jmol-users] labeling residue by position relative to observer

2017-05-16 Thread Luciano Abriata
Dear Eric,

Glad you liked the web app. But I should in turn thank Angel Herraez who did 
the hardest part of modifying webgazer to make it fully compatible with JSmol !

Related, here's another type of technology that would be cool to integrate 
better with JSmol. So far I'm exploring it with my own 3D drawings of 
molecules, just proof of concept:
Augmented reality in chemistry: 
https://lucianoabriata.altervista.org/jsinscience/arjs/arjs.html

(You need to print two small markers to use this web app!)

You can see the works by A. Olson to inspire possible applications of augmented 
reality in chemistry / structural biology (see articles or youtube videos). I 
think JSmol coupled to AR.js should allow such applications and more, in a far 
more simple way, just through HTML + JS.
Luciano





  De: Eric Martz 
 Para: jmol-users@lists.sourceforge.net 
 Enviado: Martes, 16 de mayo, 2017 17:25:59
 Asunto: Re: [Jmol-users] labeling residue by position relative to observer
   
 Dear Luciano, Wow! That is amazing! It worked easily for me (MacBook Pro). For 
people who haven't tried it: Go the link below. It asks permission to use your 
camera. Follow simple instructions to calibrate (takes less than one minute). 
Then whatever part of the molecule you look at rotates to the front! By 
tracking your eye movements! -Eric
  
 On 5/16/17 2:59 AM, Luciano Abriata wrote:
  
 And Eric, regarding the anecdote, actually I wanted to do this for something 
similar. With help from Angel I coupled an eye gazer that uses the webcam to 
track the user's eyes. Then, whatever part of the molecule you look at comes to 
the front (and now its frontmost residues get labeled). It doesn't work very 
well due to the low "resolution" of the eye gazer, but with good light on your 
face you can see the effect coming up! 
  
https://lucianoabriata.altervista.org/jsinscience/jsmolwebgazer/jsmolwebgazer.html
 
  
 
 --
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


   --
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] State of the world of WebGL "alternatives" to JSmol

2017-05-16 Thread Robert Hanson
I note that one could connect JSmol to any of these with only a little
work. Just hasn't been done.

On Mon, May 15, 2017 at 1:33 PM, Paul PILLOT  wrote:

> Dear Jmolers,
> the original message of this thread was posted one year and a half ago…
> and discussed about libraries using WebGL to display macromolecules.
>
> Since then, the landscape of webGL molecular viewers has reshaped:
> - PV is now in maintenance mode : "This project is currently in
> maintenance mode. I simply just don't have the time to work on it anymore.
> I'm happy to fix smaller bugs and answer support requests, though it might
> take a while until I can answer those. » from github repo
> 
>
> - chemDoodle webcomponents has not been updated since nov 2015
>
> - 3dmol.js and NGL (see original post below) are still actively developed
> and from the activity on their respective github accounts are gaining
> contributors and tractions
>
> - Litemol is another opensource viewer (written in typescript) :
> https://webchemdev.ncbr.muni.cz/LiteMol/
> it’s used by PDBe. The githug repo is here
> 
>
> - Molmil, is another open source viewer, used by PDBj. Demo here
>  and github repo here
> 
> Article for reference : https://jcheminf.springeropen.com/articles/10.
> 1186/s13321-016-0155-1
> It uses a subset of Pymol’s command language
>
> -Paul
>
> Le 03-11-2015 à 16:05, Robert Hanson  a écrit :
>
> And don't forget that Jmol has a WebGL option, but I don't claim that it
> is any better than the others. It's not our forte, and it comes with a
> significant overhead if all you want is a molecule to show.
>
> On Tue, Nov 3, 2015 at 1:57 PM, Paul PILLOT  wrote:
>
>> Hi Angel,
>> feel free to include this comparison in the wiki for further reference.
>>
>> I fully agree with all your comments. Persistency of web libraries is an
>> important aspect.
>> Some are funded projects (3Dmol.js relies on a grant), some are academic
>> or backed by
>> public institutions. Open source development (such as public source
>> repositories) provide
>> an opportunity for future developments.
>> The ease of implementation of the library should also be taken into
>> account, especially if
>> you’re going for a multiple alternatives option.
>>
>> Vive Jmol !
>>
>>
>> > Le 03-11-2015 à 04:45, Angel Herráez  a écrit :
>> >
>> > Hi Paul
>> >
>> > Thank you for the information, it is very interesting. I had already
>> seen PV in
>> > action, but not others. I wonder how much hard work is being duplicated
>> in
>> > parallel.
>> >
>> > I'm quite sure that the better performance is due to WebGL, not to the
>> > efficiency of the software code.
>> >
>> > The old problem with WebGL was lack of support in old machines (graphic
>> > cards). I guess this is a nearly negligible worry today --though I
>> wonder about
>> > tablets.
>> >
>> > Another big issue is permanence; many programs are "experiments" that
>> > quickly go dead. I have not experienced this with 3D, but It happened
>> with
>> > 2D molecule drawing, very nice and promising ones stopped being
>> > developed. See http://biomodel.uah.es/en/DIY/
>> > http://biomodel.uah.es/en/DIY/comparison.htm
>> >
>> > That is worrisome when trying to choose.
>> >
>> > But anyway your comparison is very useful and one could design pages
>> > offerring altenatives to users, as e.g. RCSB is now doing: PV / JSmol /
>> > JmolJava
>> >
>> > If you don't mind, I'd be happy to add your comparison table to the Jmol
>> > Wiki, so we can easily find it and keep if updated.
>> >
>> > And finally, I wish some of the "expertise" of these programs would
>> entice
>> > someone to step ahead and grab the task of further implementing WebGL in
>> > Jmol (I'm not saying Bob Hanson)
>> >
>> > Long live Jmol!
>> >
>> >
>>
> Original post :
> Dear Jmolers,
> with the end of Java embedded plugins, we are now relying on JSmol for
> displaying molecular structures in web pages.
> If JSmol bio/geo/chemicabilities appear to me as limitless, I am
> encountering other limitations in respect with its performances : some web
> applications I made are particularly slow even if tuning is possible to
> some extent. This is why I took a look at the alternatives currently
> flourishing on the web which rely on WebGL to display the 3D scenes in the
> browser. None of them could be considered as a replacement to JSmol for my
> purposes, but I thought it could be interesting to share my findings with
> the list.
>
> - 3Dmol.js : http://3dmol.csb.pitt.edu/index.html
> Article in PMC : http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4393526/
> Github Repo : https://github.com/3dmol/3Dmol.js
> Has the simplest embedding mechanisms I have ever seen, based on HTML
> markup or url formatting. Abilities to compute isosurfaces in parallel (use
> web workers that 

Re: [Jmol-users] labeling residue by position relative to observer

2017-05-16 Thread Eric Martz

Dear Luciano,

Wow! That is amazing! It worked easily for me (MacBook Pro).

For people who haven't tried it: Go the link below. It asks permission 
to use your camera. Follow simple instructions to calibrate (takes less 
than one minute). Then whatever part of the molecule you look at rotates 
to the front! By tracking your eye movements!


-Eric


On 5/16/17 2:59 AM, Luciano Abriata wrote:
And Eric, regarding the anecdote, actually I wanted to do this for 
something similar. With help from Angel I coupled an eye gazer that 
uses the webcam to track the user's eyes. Then, whatever part of the 
molecule you look at comes to the front (and now its frontmost 
residues get labeled). It doesn't work very well due to the low 
"resolution" of the eye gazer, but with good light on your face you 
can see the effect coming up!


https://lucianoabriata.altervista.org/jsinscience/jsmolwebgazer/jsmolwebgazer.html



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] labeling residue by position relative to observer

2017-05-16 Thread Angel Herráez
Great solution

I just noted this in the documentation (under "functions"):

point({x,y,z}, true)gives the screen coordinates {sx, sy, sz} corresponding 
to 
the 3D coordinates {x, y, z}.

point({sx,sy,sz}, false)gives the 3D coordinates {x, y, z} 
cooresponding to 
the screen coordinates {sx, sy, sz}. 


Bob, I think that sx, sy, sz should be listed under "atom properties"
https://chemapps.stolaf.edu/jmol/docs/#atomproperties

That's where I looked for it when Luciano asked.



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] labeling residue by position relative to observer

2017-05-16 Thread Luciano Abriata
Thank you Bob and thank you Eric too (your example helped me learn that I could 
set timeout inside Jmol scripts!!)
For documentation: I modified a bit the selection into:
select on *.ca and within(8,sz = @{all.sz.min})
So as to label each protein residue only at its CA, and to label not only the 
topmost but also those around it.
(I tried more straightforward things like select on sz = @{*.ca.sz.min} but 
didn't work)
And Eric, regarding the anecdote, actually I wanted to do this for something 
similar. With help from Angel I coupled an eye gazer that uses the webcam to 
track the user's eyes. Then, whatever part of the molecule you look at comes to 
the front (and now its frontmost residues get labeled). It doesn't work very 
well due to the low "resolution" of the eye gazer, but with good light on your 
face you can see the effect coming up!
https://lucianoabriata.altervista.org/jsinscience/jsmolwebgazer/jsmolwebgazer.html
Best
Luciano


  De: Robert Hanson 
 Para: "jmol-users@lists.sourceforge.net"  
 Enviado: Martes, 16 de mayo, 2017 6:56:47
 Asunto: Re: [Jmol-users] labeling residue by position relative to observer
   
"sz" stands for "screen z"; smaller is closer.

select on sz = @{all.sz.min}
highlights closest atom

(sorry,  Eric!)

​Bob

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


   --
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users