Hi Bob,

I figured out how to get it to color the trace by residue..

trace off; select alpha ;hidenotselected=true;   x=load 
("foldx_data.cgi?ID=$ID&type=HingeMaster");show x; DATA  
"property_hingemaster [EMAIL PROTECTED]";  trace on; color trace 
property_hingemaster;

This is good enough, at least for now.  If by-residue numbering gets  
easier hopefully I'll hear about it, so I can do cartoons and so on.

Thanks for the help..

Sam

On May 6, 2007, at 2:39 AM, Bob Hanson wrote:

> It would be nice to be able to write a Jmol "macro" to do it:
>
> residueData = load("mydata.dat")
> nResidues = {*}[{*}].resno      #{*}[{*}] is "the last atom"
> n = 1
> message _start
> if (n > nResidues);goto _end;endif
>  select resno = n
>  ....what here....?
>  n = n + 1
> goto _start
> message _end
>
> Hmm. Say, maybe we need
>
> select xxxx
> set property_x   [some value]
>
> ?
>
> Bob
>
>
>
>
> Samuel Flores wrote:
>
>> Hi All,
>>
>> Many thanks for prior help received on this.
>>
>> Is there a way to assign the coloration based on residue number
>> rather than atom number?  I have flexibility information associated
>> with each residue and would like to shade the protein according to
>> this scheme.  My current "fix" is to select only alpha carbons, then
>> color by this property, then turn on the trace.  However the result
>> looks clownish and unprofessional, like a snake with mumps.  I could
>> do some database work and count the number of atoms in each residue,
>> then generate the color data appropriately.  But that seems so  
>> clunky..
>>
>> Does anyone have an alternative?
>>
>> For any party willing to look at it, I have this set up at:
>> http://molmovdb.org/cgi-bin/morph.cgi?ID=f419381-29700
>> Click on the Hinge anallysis tab, then on: "Color by HingeMaster
>> score (Jmol window)"
>>
>> Sam
>>
>> On May 4, 2007, at 11:25 AM, Samuel Flores wrote:
>>
>>
>>
>>> Ah, so that was the problem.  apache of course tries to execute all
>>> files in cgi-bin.  The page with my jmol applet is actually a CGI
>>> script.  The data file will not be served up because it is not
>>> executable.  I finally fixed the problem by making a program called
>>> "foldx_data.cgi"  which does nothing more than serve up a web page
>>> with a CR-delimited list of numbers.  The following is my code:
>>>
>>> x=load("foldx_data.cgi"); DATA "property_foldx @x";  color
>>> property_foldx;
>>>
>>> Thanks for all your help!  Hopefully this will be of use to someone
>>> else, and my suffering will not have been in vain, amen.
>>>
>>> Sam
>>>
>>> On May 3, 2007, at 11:27 PM, Bob Hanson wrote:
>>>
>>>
>>>
>>>> well, that's your clue. Use
>>>>
>>>> message @x
>>>>
>>>> to see the whole message (115 bytes). It will say, "HTTP Error  
>>>> 500 -
>>>> Internal server error"
>>>>
>>>> That's an indicator that you have the wrong URL or something is  
>>>> amiss
>>>> with your server.
>>>>
>>>> See  http://www.checkupdown.com/status/E500.html
>>>>
>>>> I think it's nothing to do with Jmol.
>>>>
>>>> x got loaded with an error message instead of the file. That can
>>>> certainly happen. We aren't
>>>> checking for that, so it goes ahead and tries to assign colors. All
>>>> green, I would have guessed,
>>>> but maybe red because it reads that one number "500" and all the  
>>>> rest
>>>> are 0.
>>>>
>>>> Make sure the file name capitalization is exact, directories are
>>>> right,
>>>> etc. Something is wrong
>>>> on that server. Try just reading that file directly as a URL in  
>>>> your
>>>> browser. Bet you get the same
>>>> error message. Try changing the file extension to "txt" -- your
>>>> server
>>>> may be treating "dat"
>>>> extensions in some bizarre way.
>>>>
>>>> Bob
>>>>
>>>>
>>>> Samuel Flores wrote:
>>>>
>>>>
>>>>
>>>>> Hi Bob,
>>>>>
>>>>> I can do all of this on my local install (except, yes, the color
>>>>> syntax was wrong -- least of my worries ;).)  The problem is that
>>>>> none of it works on the applet on my web server.
>>>>>
>>>>> My first problem is just loading foldx.dat.  If I do this through
>>>>> the
>>>>> console of my web applet, I get:
>>>>>
>>>>> x=load("foldx.dat")
>>>>> pending
>>>>> script 5 started
>>>>> x = "Error:java.io.IOException: Server returned HTTP response  
>>>>> code:
>>>>> 500 for URL: htt
>>>>> #...(115 bytes -- use SHOW x or MESSAGE @x to view)
>>>>> Script completed
>>>>> Jmol script terminated
>>>>>
>>>>> The DATA command results in:
>>>>>
>>>>> DATA "property_foldx @x"
>>>>> pending
>>>>> script 9 started
>>>>> Script completed
>>>>> Jmol script terminated
>>>>>
>>>>> Any help is much appreciated.  Is there an example on the web  
>>>>> of an
>>>>> applet that does this?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Don't worry -- you are doing it right in Jmol. Call your IT guys  
>>>> and
>>>> have them check that URL.
>>>>
>>>>
>>>>
>>>>> Many thanks
>>>>>
>>>>> Sam
>>>>>
>>>>> On May 3, 2007, at 10:38 PM, Bob Hanson wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> Sam, you should be doing all this testing from a Jmol console --
>>>>>> pull
>>>>>> that up from the popup menu and work from it.
>>>>>> It's far easier than trying to get it going this way.
>>>>>>
>>>>>> you can't say
>>>>>>
>>>>>> color atoms cartoons property_foldx
>>>>>>
>>>>>> one or the other:
>>>>>>
>>>>>> select *
>>>>>> color atoms property_foldx
>>>>>> color cartoons property_foldx
>>>>>>
>>>>>>
>>>>>>
>>>>>> Samuel Flores wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Cool, this helps.
>>>>>>>
>>>>>>> I am still having trouble with getting the DATA command to work,
>>>>>>> though.  Is there something obviously wrong with the  
>>>>>>> following?  I
>>>>>>> verified that execution stops due to the DATA statement.
>>>>>>>
>>>>>>> jmolScript('x=load("foldx.dat"); select *;  DATA "property_foldx
>>>>>>> @x" ; color atoms cartoons property_foldx; ');
>>>>>>>
>>>>>>> Many thanks,
>>>>>>>
>>>>>>> Sam
>>>>>>>
>>>>>>> On May 3, 2007, at 6:43 PM, Bob Hanson wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Yes, certainly. Macs and PCs are different, though. Can you
>>>>>>>> find the
>>>>>>>> Java Console (PC) or
>>>>>>>> System logs (I think) directory on your Mac. Macs dump this  
>>>>>>>> to a
>>>>>>>> file;
>>>>>>>> PCs just display in on a
>>>>>>>> console.
>>>>>>>>
>>>>>>>> Use
>>>>>>>>
>>>>>>>> loglevel = 5
>>>>>>>>
>>>>>>>> to get voluminous reports of what is going on, and use
>>>>>>>>
>>>>>>>> message @x
>>>>>>>>
>>>>>>>> or
>>>>>>>>
>>>>>>>> show x
>>>>>>>>
>>>>>>>> to display the value of any variable any time in the Jmol  
>>>>>>>> console
>>>>>>>> (from
>>>>>>>> the popup menu).
>>>>>>>>
>>>>>>>> Bob
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Samuel Flores wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Also, is there some way to access the error log?  Debugging
>>>>>>>>> applets
>>>>>>>>> without error messages is painful.
>>>>>>>>>
>>>>>>>>> Sam
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On May 3, 2007, at 1:09 PM, Samuel Flores wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hi Bob,
>>>>>>>>>>
>>>>>>>>>> I am trying to follow this advice you gave Tim.  I have an
>>>>>>>>>> applet
>>>>>>>>>> and want to color my molecule by a parameter which I store  
>>>>>>>>>> in a
>>>>>>>>>> file called 'foldx.dat.'  I am stuck on the first step,
>>>>>>>>>> though --
>>>>>>>>>> loading the data file.  I have the following line in my
>>>>>>>>>> javascript:
>>>>>>>>>>
>>>>>>>>>> jmolScript('x=load("../foldx.dat"); select *; color red;');
>>>>>>>>>>
>>>>>>>>>> The 'color red' command is only a flag to show me that the  
>>>>>>>>>> load
>>>>>>>>>> command didn't incur an error.  However the molecule does not
>>>>>>>>>> change color, indicating that the load command failed.  Is
>>>>>>>>>> there an
>>>>>>>>>> obvious problem with my syntax?  I will write the rest of the
>>>>>>>>>> code
>>>>>>>>>> once the load command is working.
>>>>>>>>>>
>>>>>>>>>> Sam
>>>>>>>>>>
>>>>>>>>>> On Apr 30, 2007, at 11:01 PM, Bob Hanson wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> Tim, I think you will like how this works. The idea is to  
>>>>>>>>>>> set
>>>>>>>>>>> up a
>>>>>>>>>>> property (like temperature, but of your own definition) and
>>>>>>>>>>> then
>>>>>>>>>>> use it
>>>>>>>>>>> in the command
>>>>>>>>>>>
>>>>>>>>>>> color atoms property_x
>>>>>>>>>>>
>>>>>>>>>>> To set up "property_x", you load the values into a variable
>>>>>>>>>>> and
>>>>>>>>>>> then use
>>>>>>>>>>> the DATA command
>>>>>>>>>>> to assign that variable to a property. "x" here is  
>>>>>>>>>>> arbitrary:
>>>>>>>>>>>
>>>>>>>>>>> x = load("myfile.dat")
>>>>>>>>>>> select *
>>>>>>>>>>> data "property_tim @x"
>>>>>>>>>>>
>>>>>>>>>>> Make sure the data are a single column -- the second of what
>>>>>>>>>>> you
>>>>>>>>>>> show
>>>>>>>>>>> below. Then just
>>>>>>>>>>>
>>>>>>>>>>> color atoms [cartoons, trace, etc.] property_tim
>>>>>>>>>>>
>>>>>>>>>>> The idea is that once you have assigned the property to the
>>>>>>>>>>> atoms
>>>>>>>>>>> with
>>>>>>>>>>> the data statement, then
>>>>>>>>>>> you can color them using it.
>>>>>>>>>>>
>>>>>>>>>>> If you don't have data for all the atoms, just supply the
>>>>>>>>>>> necessary data
>>>>>>>>>>> for the SELECED atoms.
>>>>>>>>>>> So, for example, if you are only coloring the alpha carbons,
>>>>>>>>>>> you
>>>>>>>>>>> can do
>>>>>>>>>>> that using
>>>>>>>>>>>
>>>>>>>>>>> select *.CA
>>>>>>>>>>> data "property_ca @x"
>>>>>>>>>>>
>>>>>>>>>>> The color scheme will be roygb.
>>>>>>>>>>>
>>>>>>>>>>> Bob
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Timothy Driscoll wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>> hi,
>>>>>>>>>>>>
>>>>>>>>>>>> I have a set of charge values for atoms in a pdb file.  I'd
>>>>>>>>>>>> like to
>>>>>>>>>>>> color the structure according to those charges, but I'm  
>>>>>>>>>>>> a bit
>>>>>>>>>>>> confused how to do that.  I have this, from an email in  
>>>>>>>>>>>> march
>>>>>>>>>>>> 2007:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>> Jmol 11.1.18 will allow a broad range of customized
>>>>>>>>>>>>> colorings for
>>>>>>>>>>>>> isosurfaces as well as new capabilities for labels.
>>>>>>>>>>>>> Basically
>>>>>>>>>>>>> you can
>>>>>>>>>>>>> read in any number of sets of atom-based data (charges,
>>>>>>>>>>>>> distances
>>>>>>>>>>>>> from a
>>>>>>>>>>>>> given point, anything) and then you can display that  
>>>>>>>>>>>>> either
>>>>>>>>>>>>> in a
>>>>>>>>>>>>> label
>>>>>>>>>>>>> or as a coloration of an isosurface. It's very simple:
>>>>>>>>>>>>>
>>>>>>>>>>>>> 1) In a file, construct a list of the numbers you want to
>>>>>>>>>>>>> associate
>>>>>>>>>>>>> with
>>>>>>>>>>>>> atoms. Just any list separated by lines or spaces or  
>>>>>>>>>>>>> tabs --
>>>>>>>>>>>>> any
>>>>>>>>>>>>> white
>>>>>>>>>>>>> space is fine. Just numbers. It does not have to be for
>>>>>>>>>>>>> ALL the
>>>>>>>>>>>>> atoms,
>>>>>>>>>>>>> just whatever ones you wish to SELECT.
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2.5 2e-3
>>>>>>>>>>>>> -2.54 3 6
>>>>>>>>>>>>> etc.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>> I grasp how to load the external dataset into Jmol, but how
>>>>>>>>>>>> do I
>>>>>>>>>>>> associate a particular charge with the correct atom?  for
>>>>>>>>>>>> example:
>>>>>>>>>>>>
>>>>>>>>>>>> atomnum  charge
>>>>>>>>>>>> 1        -0.33
>>>>>>>>>>>> 2         0.32
>>>>>>>>>>>> 3         0.55
>>>>>>>>>>>> 4        -0.55
>>>>>>>>>>>> 5         0
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> thanks for any help,
>>>>>>>>>>>>
>>>>>>>>>>>> tim
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>> ------------------------------------------------------------ 
>>>>>>>>>>> --
>>>>>>>>>>> -
>>>>>>>>>>> --
>>>>>>>>>>> --
>>>>>>>>>>> --
>>>>>>>>>>> ----
>>>>>>>>>>> This SF.net email is sponsored by DB2 Express
>>>>>>>>>>> Download DB2 Express C - the FREE version of DB2 express and
>>>>>>>>>>> take
>>>>>>>>>>> control of your XML. No limits. Just data. Click to get it
>>>>>>>>>>> now.
>>>>>>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Jmol-users mailing list
>>>>>>>>>>> [email protected]
>>>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>> -------------------------------------------------------------- 
>>>>>>>>> --
>>>>>>>>> -
>>>>>>>>> --
>>>>>>>>> --
>>>>>>>>> ----
>>>>>>>>> This SF.net email is sponsored by DB2 Express
>>>>>>>>> Download DB2 Express C - the FREE version of DB2 express and
>>>>>>>>> take
>>>>>>>>> control of your XML. No limits. Just data. Click to get it  
>>>>>>>>> now.
>>>>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>>>>> _______________________________________________
>>>>>>>>> Jmol-users mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --------------------------------------------------------------- 
>>>>>>>> --
>>>>>>>> -
>>>>>>>> --
>>>>>>>> --
>>>>>>>> ---
>>>>>>>> This SF.net email is sponsored by DB2 Express
>>>>>>>> Download DB2 Express C - the FREE version of DB2 express and  
>>>>>>>> take
>>>>>>>> control of your XML. No limits. Just data. Click to get it now.
>>>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>>>> _______________________________________________
>>>>>>>> Jmol-users mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> ---------------------------------------------------------------- 
>>>>>>> --
>>>>>>> -
>>>>>>> --
>>>>>>> ----
>>>>>>> This SF.net email is sponsored by DB2 Express
>>>>>>> Download DB2 Express C - the FREE version of DB2 express and  
>>>>>>> take
>>>>>>> control of your XML. No limits. Just data. Click to get it now.
>>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>>> _______________________________________________
>>>>>>> Jmol-users mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> ----------------------------------------------------------------- 
>>>>>> --
>>>>>> -
>>>>>> --
>>>>>> ---
>>>>>> This SF.net email is sponsored by DB2 Express
>>>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>>>> control of your XML. No limits. Just data. Click to get it now.
>>>>>> http://sourceforge.net/powerbar/db2/
>>>>>> _______________________________________________
>>>>>> Jmol-users mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> ------------------------------------------------------------------ 
>>>>> --
>>>>> -
>>>>> ----
>>>>> This SF.net email is sponsored by DB2 Express
>>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>>> control of your XML. No limits. Just data. Click to get it now.
>>>>> http://sourceforge.net/powerbar/db2/
>>>>> _______________________________________________
>>>>> Jmol-users mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>>
>>>>>
>>>>>
>>>>>
>>>> ------------------------------------------------------------------- 
>>>> --
>>>> -
>>>> ---
>>>> This SF.net email is sponsored by DB2 Express
>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>> control of your XML. No limits. Just data. Click to get it now.
>>>> http://sourceforge.net/powerbar/db2/
>>>> _______________________________________________
>>>> Jmol-users mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>>
>>>>
>>> -------------------------------------------------------------------- 
>>> --
>>> ---
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> _______________________________________________
>>> Jmol-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>
>>>
>>
>>
>> --------------------------------------------------------------------- 
>> ----
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to