| Residue descriptors are instances of the class res_descriptor. Typically,
you loop over all residue descriptors in the ith selection menu:
for j in range(yasara.selection[i].residues):
residue=yasara.selection[i].residue[j]
And then access various residue properties: |
residue.name3
| The name of the residue in three letter code. |
residue.name1
| The name of the residue in one letter code. |
residue.number.inyas
| The unique number/ID of the residue in YASARA (a string). |
residue.number.inall
| The sequential number of the residue in the soup (a string, starting with
1). |
residue.number.inobj
| The sequential number of the residue in the object (a string,
starting with 1). |
residue.number.inmol
| The sequential number of the residue in the molecule (a string,
starting with 1). |
residue.number.inpdb
| The number of the residue in the PDB file (a string, last character may be the insertion code). |
residue.object
| The object descriptor
for the object the residue belongs to. |
residue.molecule
| The molecule descriptor
for the molecule the residue belongs to. | |
You could then color the residue yellow:
yasara.ColorRes(residue.number.inyas+",Yellow")
Or display a ribbon for the entire molecule containing this residue:
yasara.ShowSecMol(residue.molecule.number.inyas,"Ribbon")
If you wonder why a '+' is used to combine the arguments in the first case,
while a comma ',' is used in the second case, look here
. |