Hi Yingjie,

Yes, on this list one can really learn a lot about JmolScripting and
combining this with other web techniques.

On Fri, Mar 25, 2011 at 15:18, Yingjie Lin <[email protected]> wrote:
> Hi Bob,
>
> Your answer is very thorough. My problem is solved. More importantly, I 
> learned a lot from your solutions. Thank you!
>
> Two side questions:
> 1. when replying to a thread, does the title of my email matter? For example, 
> should I use "Re: Jmol-users Digest, Vol 58, Issue 33" or "Re: jmolEvaluate 
> problem" as my title?

Please don't leave the Subject as "Re: Jmol-users Digest ..." but
rather change it to "Re: jmolEvaluate problem" or "Re: [Jmol-users]
one label per residue".

In this way most Email-Clients are able to sort these emails together
as a Thread and it gives the others an idea what's inside.

> 2. if at the end of a thread, I just want to say thank you to the people who 
> have offered help, should I reply to [email protected] or just 
> reply to those people? =)

I believe it is very useful for those who tried to help and later on
those who search the list-archive to give a feedback if a solution
worked out well for you. In this case when someone has a similar
problem he/she can find a solution on the archive without waiting for
other jmol-users to reply.

Oliver

>> If you label the alpha carbons, then some of those labels won't appear,
>> because they are not visible.
>>
>> Well, first question, I guess, is: How did you make them visible or not?
>>
>> Also, where do you  want the labels to appear?
>>
>> This worked reasonably well:
>>
>> load =1crn
>>
>> # establish the box
>> boundbox {0 0 0} {10 10 10}
>>
>> # just to see what I'm working with
>> boundbox on
>>
>> # select all alpha carbons for groups  with any atoms in the box
>> select *.ca and within(group, within(boundbox))
>> label %r
>>
>> # display only these groups
>> display within(group, selected)
>>
>> # "hide" all atoms outside the box. The labels will
>> # still be there, because I'm not turning those off
>> select not within(boundbox)
>> spacefill off;wireframe off
>>
>>
>> I guess the only question is whether you think the labels are in the right
>> place.
>>
>> Let's see if I can label JUST the atoms in the box. This time I'll define
>> some variables so we can make sense of the logic:
>>
>> load 1crn.pdb
>> boundbox {0 0 0} {10 10 10}
>> boundbox on
>> inBox = within(boundbox)
>> display inBox
>> select *;labels off
>> allGroupsIntersectingBox = {within(group, inBox)}
>> allGroupsInBox = {allGroupsIntersectingBox and not within(group, not inBox)}
>> allGroupsPartiallyInBox = {allGroupsIntersectingBox and not allGroupsInBox}
>> allAlphaInBox = {*.ca and allGroupsInBox}
>> allTerminatingAtoms = {allGroupsPartiallyInBox and connected(not inBox)}
>> selectedAtoms = allAlphaInBox or allTerminatingAtoms
>> select selectedAtoms
>> label %r
>>
>> # That comes close, but includes two labels for some groups that have two
>> # connections into the box. I guess if you want only one label per group you
>> still
>> # have to use a for loop:
>>
>> finalSelection = ({})
>> var nAtoms = selectedAtoms.size
>> for (var i = 1; i <= nAtoms; i++) {
>>  var a = selectedAtoms[i]
>>  if ({finalSelection and within(group, a)}.size == 0) {
>>    finalSelection |= a
>>  }
>> }
>> select *;labels off
>> select finalSelection
>> label %r
>>
>>
>
>
> ------------------------------------------------------------------------------
> Enable your software for Intel(R) Active Management Technology to meet the
> growing manageability and security demands of your customers. Businesses
> are taking advantage of Intel(R) vPro (TM) technology - will your software
> be a part of the solution? Download the Intel(R) Manageability Checker
> today! http://p.sf.net/sfu/intel-dev2devmar
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to