Bugs item #978526, was opened at 2004-06-23 22:37
Message generated for change (Comment added) made by migueljmol
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=978526&group_id=23629

Category: None
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: molvisions (molvisions)
Assigned to: Miguel (migueljmol)
Summary: echo atom numbers

Initial Comment:
At the moment there is no way to determine the atom number of an 
atom in Jmol, aside from reading it in the pdb file.  IT would be 
great if this info echoed to the console, through the pickCallBack in 
the applet, and was shown in the 'hover' data.

thanks!!

tim


----------------------------------------------------------------------

>Comment By: Miguel (migueljmol)
Date: 2004-09-17 20:23

Message:
Logged In: YES 
user_id=1050060

atom number is now reported as part of hover, default label,
and atom click info

----------------------------------------------------------------------

Comment By: molvisions (molvisions)
Date: 2004-06-29 18:40

Message:
Logged In: YES 
user_id=920824

Chime and RasMol report the value of the atom number column in the pdb 
file when an atom is clicked.  this is useful (almost necessary) for setting 
monitor lines between atoms in a script file:

monitor 134 1677

it is also useful for dynamic actions based on the pick event in the Jmol 
applet - for example, color a picked atom, add a picked atom to the 
selected set, etc.

function colorPicked(atomnum) 
{
 #atomnum comes from the pickcallback
 document.jmol.script('select atomno='+atomnum+';color goldenrod;');
}



regards,

tim


----------------------------------------------------------------------

Comment By: Miguel (migueljmol)
Date: 2004-06-29 18:17

Message:
Logged In: YES 
user_id=1050060

I am not sure what you are trying to do ... I need a simple
example. 

This is complicated but ... the third parameter to the
PickCallback is *not* the atom number. Rather, it is the
atom *index*. Atom numbers are something specific to .pdb
files. The atom index is used internally by Jmol. 

I am actually quite reluctant to use this atom index. It
will be a source of confusion until we get a well-defined
API in place. 

Miguel


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2004-06-24 00:47

Message:
Logged In: NO 

The third parameter in the callback is the atom number, but
I, ah, ECHO your request to generalize the pick callback 2nd
paramter to be based on the label %character format. The
command we are looking for is something like

pickcallback "This is atom %i with coordinates %x %y %z"

Right now the 3rd parameter to the callback function is the
atom index, starting with 0 for atom 1. (Same issue as frame
callback giving "0" for frame 1. Is this something that
should get fixed?) So if that is all you want, you have it.
But I do note that with 1blu this callback is NOT the number
in the third pdb column, because (a) it starts with 0, not
1, and (b) there is a "TER" record that is numbered but has
no atoms, so by the time you get to 614 the numbers reported
are the rasmol "serial number--may have gaps" (%i) minus 2.
The command "label %i" on the other hand, (as well as select
atomno=n) reports the "gapped" PDB number. So, for example,
in 1blu there is no "atomno=613" and no label with a 613 on
it using 

select atomno>600 and atomno<620
label %i

select atomno=613
reports "0 atoms selected"

but picking atomno=615 reports to the pickCallback "613" in
that third parameter.

Bob Hanson



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379133&aid=978526&group_id=23629


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to