Hello Angel,

I almost get what I want with what you suggested, except for some minor issues.
I want to label all residues in a chosen box (x1<x<x2 and y1<y<y2 and z1<z<z2), 
and I want there to be only one label for each residue. Some residues in the 
box are partial, but they should be labeled, too.
Here's my script:
......
no1 = {visible}.resno.min;   #only those atoms inside the box is visible.
no2 = {visible}.resno.max;
for (i=no1; i<no2; i++) {
 select {visible and resno=i}[1]; label %r;
}

It turned out that most residues are labeled correctly, but some partial 
residues are not (I am not sure whether that's all the partial residues).

Some additional questions:
1. 
        print {visible}.resno.min;
        >> 19
        print {visible}.resno.max;
        >> 501
        print {visible}.length;
        >> 8603
        print {visible}.resno;
        >> 2259973
        print {visible}[1];
        >> ({0})
I understand the first 3 values: min and max of resno are 19 and 501, 
respectively; There are 8603 atoms. 
But I don't understand the 4th value 2259973. What I want is to see a list of 
residue numbers.
I don't understand the 5th value either. I thought this should return the first 
visible atom. I guess what I don't understand here is {} inside ().

2. This question is not related to the above. 
        load file1.pdb; load APPEND file2.pdb
If after loading two files, I somehow decide to "unload" file2.pdb, how should 
I do it?

Thanks for your patience.

Yingjie

> ------------------------------
> 
> Message: 2
> Date: Wed, 23 Mar 2011 19:31:25 +0100
> From: " Angel Herr?ez " <[email protected]>
> Subject: Re: [Jmol-users] one label per residue
> To: [email protected]
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=US-ASCII
> 
> Hello Yingjie
> 
> You can probably use the atoms array, and either use their geometric 
> center (not for a label, but an echo) or the first atom in the array.
> The result will probably not look very nice.
> 
> I cannot give you the exact syntax, but check the doc under "atom 
> expressions". It will be something like
> 
> select {resno=3}[0]; label %r
> 
> Good luck!


------------------------------------------------------------------------------
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

Reply via email to